diff --git a/content/en/docs/howto/front-end/atlas-ui/customize-styling-new.md b/content/en/docs/howto/front-end/atlas-ui/customize-styling-new.md index 74fa606cd24..47e7d9d4c54 100644 --- a/content/en/docs/howto/front-end/atlas-ui/customize-styling-new.md +++ b/content/en/docs/howto/front-end/atlas-ui/customize-styling-new.md @@ -75,6 +75,30 @@ The shades are calculated in the browser from the base color, so you do not have Lighter shades are mixed with `--color-base` (white by default), and darker shades are mixed with `--color-contrast` (black by default). +#### Styling the Navigation Bars {#navigation-bars} + +In Atlas Core 4.6.0 and above, the navigation bars do not follow `--brand-primary`. Each layout has one primary bar (dark by default) and at most one secondary bar (light by default): + +| Layout | Primary Bar | Secondary Bar | +| --- | --- | --- | +| **Atlas_SideBar** | Sidebar | Top bar | +| **Atlas_Default** | Top bar | Sidebar | +| **Atlas_TopBar** | Top bar | None | + +To restyle the bars in every layout, set the `--bar-primary-*` and `--bar-secondary-*` variables. Each set has the variables `bg`, `bg-hover`, `bg-active`, `color`, `color-hover`, `color-active`, `sub-color`, `title-color`, `border-color`, and `edge`, for example `--bar-primary-bg` and `--bar-secondary-title-color`: + +```scss +:root { + --bar-primary-bg: #0a2540; + --bar-primary-color: #d0d7de; + --bar-primary-title-color: #ffffff; +} +``` + +Atlas Core does not set the region variables, such as `--topbar-bg`, `--sidebar-bg`, the `--navsidebar-*` and `--navtopbar-*` colors, and `--navigation-color`. You can still set them to give one region the same look in every layout. If you set only the background of a region, also set the text colors of that region (or `--navigation-color`). Otherwise, the text is dark where that region is the secondary bar. + +Layouts that you copy from Atlas Core get the bar colors only if they keep the `region-topbar` and `region-sidebar` classes. To show the app logo and app name, add the **AppInfo** snippet from Atlas Core. The app name uses the title color of the bar, unless you set `--navbar-brand-name`. The logo height is set by `--brand-logo-height`, and the width follows the logo. To replace the default logo, add your own *logo.svg* to *theme/web*, or to the **public** folder of a theme module. + ### Using the Styling Editor {#styling-editor} The styling editor is based on the editor that powers Visual Studio Code and is also used for JavaScript actions. You can find the styling files (JS, SCSS) and theme settings (JSON) under App Explorer's **Styling** node. When you double-click a styling file, it will be opened in the styling editor: @@ -381,7 +405,7 @@ The bullets below describe the file structure for the theme folder and for modul * *themes/_theme-default.scss* – This file contains all the theme settings (CSS variables) with their default values. Use it as a reference for the variables that can be overridden in your app. * *design-properties.json* – This file contains the design properties for the standard Mendix supported widgets. * **native** – This folder (and subfolders) contain the native mobile resources for the standard Mendix supported widgets. - * **public** – This folder contains the font files of the default font. + * **public** – This folder contains the bundled font files, the default app logo (*logo.svg*), and the default chart palette (*com.mendix.charts.json*). To override the logo or the chart palette, add a file with the same name to *theme/web* or to the **public** folder of a theme module. * **{MODULE_NAME}** – Per module a folder is created which can contain styling resources for (progressive) web apps and native mobile apps. * **web** – This folder contains re-usable web resources * *main.scss* – This file is the starting point for the module web based styling. @@ -709,7 +733,7 @@ When an end-user opens a Mendix app in an unsupported browser, a page is shown t ## Serving Fonts Locally (Web) {#local-fonts} -By default, Atlas uses the font Poppins. The font files are part of the Atlas Core module (*themesource/atlas_core/public/resources/fonts/poppins*) and are served by your own app. No font files are loaded from an external Content Delivery Network (CDN), which helps you comply with stricter [CSP](/howto/security/csp/) policies. +In Atlas Core 4.6.0 and above, the default font (`--font-family-base`) is the system font stack of the device, so no font files are downloaded. Atlas Core still includes the font Poppins, which was the default font in earlier versions. The font files are part of the Atlas Core module (*themesource/atlas_core/public/resources/fonts/poppins*) and are served by your own app. No font files are loaded from an external Content Delivery Network (CDN), which helps you comply with stricter [CSP](/howto/security/csp/) policies. To use Poppins, set `--font-family-base: "Poppins", sans-serif;` in the `:root` block of your theme file. ### Using a Different Font diff --git a/content/en/docs/howto/front-end/configuring-your-theme.md b/content/en/docs/howto/front-end/configuring-your-theme.md index 4c09c174384..da70d56de6a 100644 --- a/content/en/docs/howto/front-end/configuring-your-theme.md +++ b/content/en/docs/howto/front-end/configuring-your-theme.md @@ -14,11 +14,11 @@ This document describes how to configure the styling of your page in Studio Pro. The styling that is loaded when opening your Mendix application in a web browser is configured in the HTML of your index pages. -To ensure that the same styling is loaded when viewing your page in Studio Pro, you can configure the `"cssFiles"` property in *settings.json* in the theme folder of your app. For example, in this configuration, `theme/web/main.scss` is loaded when viewing a page in Studio Pro: +To ensure that the same styling is loaded when viewing your page in Studio Pro, you can configure the `"cssFiles"` property in *settings.json* in the theme folder of your app. For example, in the default configuration of an app that uses Atlas, the compiled theme stylesheet *theme.compiled.css* is loaded when viewing a page in Studio Pro: ```json { - "cssFiles": [ "theme/web/css/main.scss" ] + "cssFiles": [ "theme.compiled.css" ] } ``` diff --git a/content/en/docs/howto/front-end/styles.md b/content/en/docs/howto/front-end/styles.md index 356990a9050..d5d18dc64bf 100644 --- a/content/en/docs/howto/front-end/styles.md +++ b/content/en/docs/howto/front-end/styles.md @@ -24,7 +24,7 @@ Add these classes to an element to change the text color to your theme colors: * `text-default`: default text color * `text-primary`: primary brand color -* `text-info`: info brand color +* `text-info`: info color (a light shade of the primary color) * `text-success`: success brand color * `text-warning`: warning brand color * `text-danger`: danger brand color @@ -40,12 +40,12 @@ These are standard useful text colors: The background colors are based on your theme colors. These are the same colors as for the buttons: * `background-primary`: primary background color -* `background-info`: info background color +* `background-info`: info background color (a light shade of the primary color) * `background-success`: success background color * `background-warning`: warning background color * `background-danger`: danger background color -A lighter variant of the background color also sets the matching foreground color: +These background classes come from Bootstrap. Their colors are fixed and do not follow your theme colors: * `bg-primary`: primary background color * `bg-info`: info background color @@ -77,7 +77,11 @@ For more information on shades, see the [Using Color Shades](/howto/front-end/cu These are useful classes for text items: +* `text-small`: small text +* `text-large`: large text +* `text-light`: light text * `text-normal`: normal text +* `text-semibold`: semibold text * `text-bold`: bold text * `text-break`: breaks text over multiple lines * `text-uppercase`: transforms the text to upper case @@ -127,6 +131,10 @@ Change the way items appear in a list: * `listview-striped`: list view widget with striped list view items * `listview-seperated`: list view widget with list view items separated * `listview-stylingless`: list view widget without spacing and background +* `listview-bordered`: list view widget with a border around each list view item +* `listview-hover`: list view widget with a hover color on list view items +* `listview-sm`: list view widget with small padding in list view items +* `listview-lg`: list view widget with large padding in list view items ## Alerts diff --git a/content/en/docs/marketplace/platform-supported-content/modules/atlas-core.md b/content/en/docs/marketplace/platform-supported-content/modules/atlas-core.md index 48a8e78d783..2597855e401 100644 --- a/content/en/docs/marketplace/platform-supported-content/modules/atlas-core.md +++ b/content/en/docs/marketplace/platform-supported-content/modules/atlas-core.md @@ -18,6 +18,18 @@ Further documentation on styling can be found here: To migrate from Atlas 3 to Atlas 4, see [Migrating to Atlas UI 4](/refguide/frontend/atlas4-migration/). To migrate from Atlas 2 to Atlas 3, see [Migrate From Atlas 2 To Atlas 3](/refguide9/moving-from-atlas-2-to-3/). +Atlas Core 4.7 requires Studio Pro 11.0.0 or above. + +## Upgrading to Atlas Core 4.6.0 or Above + +In Atlas Core 4.6.0, the default theme changed to Atlas Neutral. Theme settings that your app sets in *theme/web/custom-variables.scss* are kept. Everything that your app leaves to Atlas Core changes, for example: + +* The brand colors, the page, text, and border colors, and the corner sizes +* The default font, which is the system font stack instead of Poppins (Poppins is still included) +* The navigation bars, which no longer follow `--brand-primary`. Each layout has one dark primary bar and at most one light secondary bar, styled with the `--bar-primary-*` and `--bar-secondary-*` variables. For more information, see the [Styling the Navigation Bars](/howto/front-end/customize-styling-new/#navigation-bars) section of *Customize Styling*. + +To keep the previous look, paste the "Previous look" block from the Atlas Core 4.6.0 release notes into the `:root` block of *theme/web/custom-variables.scss* before upgrading, and delete the lines for the variables that your app already sets. If you used that block, also add the three lines listed in the Atlas Core 4.7.0 release notes. + ## Read More * [Atlas UI Kit for Figma](/howto/front-end/figma-ui-kit/) diff --git a/content/en/docs/marketplace/platform-supported-content/modules/calendar.md b/content/en/docs/marketplace/platform-supported-content/modules/calendar.md index c1dd45af94f..f9ac6f16381 100644 --- a/content/en/docs/marketplace/platform-supported-content/modules/calendar.md +++ b/content/en/docs/marketplace/platform-supported-content/modules/calendar.md @@ -15,6 +15,8 @@ The [Calendar](https://marketplace.mendix.com/link/component/245304) module can * Drag and drop calendar events. * Change calendar event colors. * Retrieve events based on selected date ranges. +* Show events in day, week, work week, month, agenda, and year views. +* Customize the items in the calendar toolbar. ## Basic Configuration @@ -24,65 +26,118 @@ The calendar module provides default calendar building blocks. Drag the calendar The calendar module provides default **CalendarEvent** entity in the domain model. -### Data Source Tab +### General Tab + +#### Data Source * **Events** – Determines the retrieval of calendar events via context, database, microflow, nanoflow, or association. -* **Title attribute** – The String attribute containing the calendar event's title. +* **Title type** – Determines how the calendar event's title is set: + + * **Attribute** – Use the **Title attribute**. This is the default. + * **Expression** – Use the **Title expression**. + +* **Title attribute** – The String attribute containing the calendar event's title. This is available when **Title type** is set to **Attribute**. +* **Title expression** – An expression that results in the calendar event's title. This is available when **Title type** is set to **Expression**. * **All day attribute** – The Boolean attribute indicating if a calendar event takes a full day. * **Start attribute** – The DateTime attribute indicating the start of a calendar event. * **End attribute** – The DateTime attribute indicating the end of a calendar event. -* **Color attribute** – The String attribute affecting the background of a calendar event. +* **Color attribute** – The String or Enumeration attribute affecting the background of a calendar event. All HTML supported color formats are supported, for example "red", "#FF0000", "rgb(250,10,20)" or "rgba(10,10,10, 0.5)". -* **Start date attribute** – The DateTime attribute used on initial load. ### View Tab +* **Editable** – An expression that determines if users can select empty time slots to create events and resize events. The default value is **true**. * **View** – Determines the calendar's views: - * **Standard** – Day, week, and month view only. This is the default. - * **Custom** – Custom views configured on the **Custom views** tab. + * **Standard** – Day, week, month, and year view only. This is the default. + * **Custom** – Views configured as toolbar items on the **Custom view** tab. * **Initial selected view** – Determines the view when the calendar becomes visible for the first time. - The available options are: + When **View** is set to **Standard**, the available options are: * **Day** * **Week** * **Month**. This is the default. - * **Custom**. This is configurable as a custom work week view on the **Custom views** tab. + * **Year** + + When **View** is set to **Custom**, the available options are: + + * **Day** + * **Week** + * **Month**. This is the default. + * **Work week** * **Agenda** + * **Year** +* **Year view: day click opens** – Determines the view that opens when the user clicks a day in the year view. The default value is **Day**. + When **View** is set to **Standard**, the available options are **Day**, **Week**, and **Month**. + When **View** is set to **Custom**, the available options are **Day**, **Week**, **Work week**, **Month**, and **Agenda**. The selected view must also be added as a toolbar item on the **Custom view** tab. Otherwise, clicking a day in the year view does nothing. * **Show event date range** – Display the start and end date of the event. -* **Time format** – Set the format in which the time is displayed. -* **Day start hour** – The hour when the day starts. Choose a value between 0 and 23. -* **Day end hour** – The hour when the day ends. Choose a value between 0 and 24. -* **Show all events** – If set to **yes**, the calendar displays all events in a day without "more" links. +* **Time format** – Set the format in which the time is displayed. The default format is "hh:mm a". This is available when **View** is set to **Standard**. +* **Top bar date format** – Set the format of the title in the toolbar across views. If empty, a locale-aware format is used. This is available when **View** is set to **Standard**. +* **Day start hour** – The hour when the day starts. Choose a value between 0 and 23. The default value is **0**. +* **Day end hour** – The hour when the day ends. Choose a value between 1 and 24. The default value is **24**. +* **Show all events** – If set to **Yes**, the calendar displays all events in a day without "more" links. The default value is **Yes**. +* **Show multi-day times** – If set to **Yes**, the week and day views show the start and end times of events that span multiple days, instead of placing these events in the all-day row. The default value is **No**. +* **Step** – The selectable time increments, in minutes, in the week and day views. The default value is **30**. +* **Time slots** – The number of slots per section in the time grid views. Use this together with **Step** to change the default of one-hour sections with 30-minute slots. The default value is **1**. +* **Start date attribute** – The DateTime attribute used on initial load. ### Custom View Tab -#### Visible Views +The settings on this tab are available when **View** is set to **Custom**. + +#### Toolbar -* **Day** – Show the day button view in the toolbar. -* **Week** – Show the week button view in the toolbar. -* **Custom work week** – Show the custom work week button view in the toolbar. Visible days can be configured in the **Custom view visible days** section. -* **Custom view caption** – Configure the **Custom work week** button and title. - This is configurable when **Custom work week** is set to **Yes**. - The default value is **Custom**. -* **Month** – Show the month button view in the toolbar. -* **Agenda** – Show the agenda button view in the toolbar. +* **Custom top bar views** – Configure the items displayed in the calendar toolbar, and the views that are available. If no view items are configured, the calendar shows the day, week, and month views. -#### Visible Days in the Custom View +Each toolbar item has the following properties: -Configure the visible days in the **Custom work week** view. -Any day of the week you choose is displayed in the custom week view. +* **Item** – The item to render in the toolbar. The default value is **Month view button**. The available options are: + + * **Day view button** + * **Month view button** + * **Agenda view button** + * **Week view button** + * **Work week view button** – Shows the custom work week view. Visible days can be configured in the **Custom view visible days** section. + * **Year view button** + * **Title date text** + * **Previous button** + * **Next button** + * **Today button** + +* **Position** – The alignment of the item within the toolbar: **Left** (default), **Center**, or **Right**. +* **Caption** – Optional text for the button. If empty, a default localized label is used. +* **Render mode** – Determines whether the item is rendered as a **Button** (default) or a **Link**. +* **Button tooltip** – The tooltip for the button. +* **Button style** – The style of the button: **Default** (default), **Primary**, **Success**, **Info**, **Warning**, or **Danger**. + +The **Caption**, **Render mode**, **Button tooltip**, and **Button style** properties are not available for the **Title date text** item. + +For view button items, the following format and text properties are also available, depending on the view: + +* **Header day format** – The format of the dates in the header above the view. This is available for the day, week, work week, month, and agenda view buttons. +* **Cell date format** – The date shown in the month cells. This is available for the month view button. +* **Time gutter format** – The time shown as the first column in the view. This is available for the day, week, work week, and agenda view buttons. +* **Date gutter format** – The date shown as the first column in the agenda view. +* **All day text** – The text shown in the all-day column of the agenda view. +* **Text header date** – The header of the date column in the agenda view. +* **Text header time** – The header of the time column in the agenda view. +* **Text header event** – The header of the event column in the agenda view. + +#### Custom View Visible Days + +Configure the visible days in the custom work week view. +Any day of the week you choose is displayed in the custom week view. By default, Monday to Friday are visible. ### Events Tab * **On edit** – Specifies the action to be executed when the user selects an existing event in the calendar. The default action is to call the **Calendar.Event_NewEdit** page and to set the selected event object as the page's parameter. -* **On create** – Specifies the action to be executed when the user selects an empty slot in the calendar. +* **On create** – Specifies the action to be executed when the user selects an empty slot in the calendar. This requires **Editable** to be **true**. The default action is to call the **Calendar.ACT_CreateEvent** nanoflow, then to create a new **CalendarEvent** entity and to set the default variables. The available variables are: - * **$allday** + * **$allDay** * **$startDate** * **$endDate** * **On drag/drop/resize** – Specifies the action to execute when the user moves or drags an item, or changes the start or end time by resizing the item. @@ -92,22 +147,34 @@ Any day of the week you choose is displayed in the custom week view. * **$newEnd** * **$oldStart** * **$oldEnd** -* **On view range change** – Specifies the action to be executed when the calendar view range changes. +* **On view range change** – Specifies the action to be executed when the calendar view range changes. The available variables are: + + * **$rangeStart** + * **$rangeEnd** + * **$currentView** ### Dimensions Tab * **Width unit** – The width of the widget. - * **Percentage** – specifies the width in relation to the rest of the elements on the page. + * **Percentage** – specifies the width in relation to the rest of the elements on the page. This is the default. * **Pixels** – specifies the width in pixels. -* **Width** – Used as an appropriate CSS value. +* **Width** – Used as an appropriate CSS value. The default value is **100**. * **Height unit** – The height of the widget. - * **Percentage of width** – Specifies the height in relation to the width. - * **Pixels** – Specifies the height in pixels. - * **Percentage of parent** – Specifies the width in relation to the rest of the elements on the page. -* **Height** – Used as an appropriate CSS value. -* **Minimum height** – Applicable if the height is relative to the parent's percentage. + * **Auto** – The height adjusts to the content. + * **Pixels** – Specifies the height in pixels. This is the default. + * **Percentage** – Specifies the height in relation to the parent element. + * **Viewport** – Specifies the height in relation to the viewport. +* **Height** – Used as an appropriate CSS value. The default value is **580**. This is not available when **Height unit** is set to **Auto**. + +When **Height unit** is set to **Auto**, the following properties are also available: + +* **Minimum height unit** – **None**, **Pixels** (default), **Percentage**, or **Viewport**. +* **Minimum height** – The minimum height of the widget. The default value is **250**. This is not available when **Minimum height unit** is set to **None**. +* **Maximum height unit** – **None** (default), **Pixels**, **Percentage**, or **Viewport**. +* **Maximum height** – The maximum height of the widget. The default value is **250**. This is not available when **Maximum height unit** is set to **None**. +* **Vertical overflow** – Determines how content that exceeds the maximum height is handled: **Auto** (default), **Scroll**, or **Hidden**. This is not available when **Maximum height unit** is set to **None**. ## Flows diff --git a/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/_index.md b/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/_index.md index 109fc2a250e..064a7d47604 100644 --- a/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/_index.md +++ b/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/_index.md @@ -22,6 +22,18 @@ This module contains the following widgets: * [Text Filter](/appstore/modules/datagrid-text-filter/) * [Tree Node](/appstore/modules/tree-node/) +Data Widgets version 3.11.10 requires Studio Pro 10.24.0 or above. + +## JavaScript Actions {#javascript-actions} + +The module also contains the following JavaScript actions, which you can call from a nanoflow. Each action takes the name of the target widget, which you can find in the widget properties under **Common** > **Name**: + +* `Reset_Filter` – Resets a single filter widget (Date Filter, Drop-Down Filter, Number Filter, or Text Filter) to its default value or to empty. For more information, see [Resetting Filters](/appstore/modules/data-grid-2/#resetting-filters). +* `Reset_All_Filters` – Resets all filter widgets of a Data Grid 2 or Gallery widget to their default values or to empty. +* `Set_Filter` – Sets the value of a single filter widget (Date Filter, Drop-Down Filter, Number Filter, or Text Filter). You can apply the default value of the filter, or pass a filter type, a string value (for the Drop-Down Filter and Text Filter), a number value (for the Number Filter), or one or two date and time values (for the Date Filter, where the second value is the end date of a range). For more information, see [Setting Filters](/appstore/modules/data-grid-2/#setting-filters). +* `Clear_Selection` – Clears the selection of a Data Grid 2 or Gallery widget. For more information, see [Clearing the Selection From a Nanoflow](/appstore/modules/data-grid-2/#clear-selection). +* `Export_To_Excel` – Exports the data of a Data Grid 2 widget to an Excel file. For more information, see [Export to Excel](/appstore/modules/data-grid-2/#export-to-excel). + ## Migration If you were previously using the Data Grid 2 module, you must follow these steps before updating it to the new [Data Widgets](https://marketplace.mendix.com/link/component/116540) module: diff --git a/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/data-grid-2-properties.md b/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/data-grid-2-properties.md index d598a3d04cf..fb685c4ab8c 100644 --- a/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/data-grid-2-properties.md +++ b/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/data-grid-2-properties.md @@ -120,7 +120,7 @@ This specifies the method of selection. This property is only shown when **Selec ##### Auto Select First Row -When set to **Yes**, the first row is selected automatically. This property is only shown when **Selection** is set to **Single** or **Multi**. The default value is **No**. +When set to **Yes**, the first row is selected automatically when the data is first loaded. This is useful for master-detail views. This property is only shown when **Selection** is set to **Single** or **Multi**. The default value is **No**. ##### Toggle on Click @@ -179,7 +179,7 @@ When set to **Yes**, the grid shows a refresh indicator while the data is being ##### Page Size -This sests the number of rows to display per page. When **Pagination** is set to **Virtual scrolling** or **Load more**, this number defines how many rows are added each time more data is loaded. The default value is 20. +This sets the number of rows to display per page. When **Pagination** is set to **Virtual scrolling** or **Load more**, this number defines how many rows are added each time more data is loaded. The default value is 20. ##### Pagination @@ -226,11 +226,11 @@ This sets the caption of the button that loads more rows. The default value is * ##### Page Size Attribute -This is an **Integer** attribute used to set the page size dynamically. When this attribute is set, it is used as the page size instead of **Page size**. +This is an **Integer** attribute used to set the page size dynamically. When this attribute has a value greater than 0, it is used as the page size instead of **Page size**. ##### Page Attribute -This is an **Integer** attribute used to set the current page dynamically. The data grid also writes the current page back to this attribute when the user navigates between pages. +This is an **Integer** attribute used to set the current page dynamically. The data grid also writes the current page back to this attribute when the user navigates between pages. When **Pagination** is set to **Paging buttons**, the value is the page number, starting at 1. When **Pagination** is set to **Virtual scrolling** or **Load more**, the value is the number of loaded pages. ##### Total Count @@ -384,7 +384,7 @@ Controls the type of the data displayed in the column. The following options are #### Attribute -This sets the attribute used for the column. This property is required when **Show** is set to **Attribute**, and when the column can be sorted or filtered. +This sets the attribute used for the column. The attribute can be of type String, Autonumber, Boolean, Date and time, Decimal, Enumeration, Integer, or Long. This property is required when **Show** is set to **Attribute**, and when the column can be sorted or filtered. This property is hidden when **Show** is not set to **Attribute**, **Can sort** is set to **No**, and **Show column filters** is set to **No**. @@ -404,16 +404,18 @@ This is a text template that sets the value exported for this column when data i This sets the cell type used for the column's values when data is exported to Excel. The following options are available: -* **Default** (default) -* **Number** -* **Date** -* **Boolean** +* **Default** (default): for attribute columns, the value is exported with the type and formatting of the attribute. Numbers are exported as numeric cells with the same decimals and digit grouping as in the grid, dates use the attribute's custom date pattern (or the date format of the app's language, without the time, when no custom pattern is set), and Boolean values are exported as Boolean cells. For custom content columns, the **Export value** is exported as text. +* **Number**: the value is exported as a numeric cell, using **Export number format** if set. For custom content columns, the **Export value** is converted to a number; if it is not a valid number, it is exported as text. +* **Date**: the value is exported as a date cell, using **Export date format** if set. If the format has no time part, the time is removed. For custom content columns, the **Export value** is converted to a date; if it is not a valid date, it is exported as text. +* **Boolean**: the value is exported as a Boolean cell. For custom content columns, an **Export value** of `true`, `yes`, or `1` is exported as TRUE, and `false`, `no`, or `0` as FALSE; other values are exported as text. + +Numbers with more than 15 significant digits are exported as text, so that no digits are lost. This property is hidden when **Show** is set to **Dynamic text**. #### Export Number Format -THis is an optional expression that returns the Excel number format for exported numeric values, for example `"#,##0.00"`, `"$0.00"`, or `"0.00%"`. For the available formats, see [Number Formats](https://docs.sheetjs.com/docs/csf/features/nf/) in the SheetJS documentation. +This is an optional expression that returns the Excel number format for exported numeric values, for example `"#,##0.00"`, `"$0.00"`, or `"0.00%"`. For the available formats, see [Number Formats](https://docs.sheetjs.com/docs/csf/features/nf/) in the SheetJS documentation. This property is only shown when **Export type** is set to **Number**, and is hidden when **Show** is set to **Dynamic text**. @@ -509,4 +511,4 @@ This is an expression that returns the CSS class for each cell of the column. Th #### Wrap Text -If set to **Yes**, then the column tries to wrap long text. The default value is **No**. +If set to **Yes**, then the column tries to wrap long text. When set to **No**, long text stays on one line and is cut off with an ellipsis. The default value is **No**. diff --git a/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/data-grid-2.md b/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/data-grid-2.md index 4b28f08a822..b88d68b458b 100644 --- a/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/data-grid-2.md +++ b/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/data-grid-2.md @@ -9,7 +9,7 @@ description: "Describes the configuration and usage of the Data Grid 2 widget, w [Data Grid 2](https://marketplace.mendix.com/link/component/116540) is the successor to the standard data grid widget for displaying content in a tabular form. It comes with many powerful new features and settings like support for widgets, row and cell coloring, responsive layout, accessibility, and paging options like virtual scrolling. The Data Grid 2 widget offers personalization support so that end-users can show, hide, and re-order columns. Personalizations can be persisted in the database for flexibility and control. -This document focusing on explaining module features. For precise details on Data Grid 2 widget properties, see [Data Grid 2 Properties](/appstore/modules/data-grid-2-properties/). +This document focuses on explaining module features. For precise details on Data Grid 2 widget properties, see [Data Grid 2 Properties](/appstore/modules/data-grid-2-properties/). The data source determines which objects will be shown in a Data Grid 2 widget. In v2.3.0 and above, selecting the entity of the data source will automatically fill the contents, create columns with filters, and create buttons. You can also select which columns to use for the content generation. @@ -89,7 +89,7 @@ Here is an example containing a column with **Yes, hidden by default** in **Desi When set to **Yes**, default events such as On click action or selection will be triggered when the user interacts with the content. -{{% alert color="alert" %}} +{{% alert color="warning" %}} If a column contains interactive elements such as buttons, this might lead to unexpected behavior when both a click on the button and the action configured on the row are triggered. To prevent default events from triggering when interacting with content, set this setting to **No**. {{% /alert %}} @@ -111,6 +111,8 @@ You can configure pagination based on the following properties: * **Position** – The **Position of pagination** options (**Below grid**, **Above grid**, or **Both**) set where the pagination appears. For **Virtual scrolling** and **Load more**, this option is available only when **Show number of rows** is set to **Yes**. * **Visibility** – The **Show paging buttons** options allow you to always show paging, or to automatically show and hide paging based on the amount of available data compared to the display limit per page. This option is available only when **Pagination** is set to **Paging buttons** and **Custom pagination** is set to **No**. +* **Custom pagination** – When **Custom pagination** is set to **Yes**, the built-in paging buttons are replaced by a widget area where you place your own pagination widgets, for example buttons that change the value of the **Page attribute**. The custom pagination follows **Position of pagination**, but with **Both** it is shown only once, below the grid. +* **Dynamic paging** – Use **Page size attribute** and **Page attribute** to set the page size and current page from an attribute, and **Total count** to store the total number of rows in an attribute. ### Virtual Scrolling @@ -186,7 +188,7 @@ In this example we check the value of `StringAttribute` and then apply the class ### Wrap Text -You can choose if you want to wrap the text content of a column and apply ellipsis in the end of it. +You can choose if you want to wrap the text content of a column. When **Wrap text** is set to **No**, long text stays on one line and is cut off with an ellipsis. {{% alert color="info" %}} If you are using **Custom content** in the **Show** option of the **General** tab, please make sure you are using a **Text Widget** without containers around it. Containers sometimes interfere with wrapping texts. @@ -498,22 +500,30 @@ To filter across multiple attributes from the data grid header (outside the colu * [Date Filter](/appstore/modules/datagrid-date-filter/) * [Drop-Down Filter](/appstore/modules/datagrid-dropdown-filter/) -## Export to Excel +## Export to Excel {#export-to-excel} The Data Grid 2 widget ships with built-in functionality to export data from the data source you configured in the settings. The export is done via the **Export_To_Excel** JavaScript action that is distributed as part of the [Data Widgets](/appstore/modules/data-widgets/) module. -To export data from the data grid, create a new nanoflow that calls **Export_To_Excel**. The **Export_To_Excel** action has a set of inputs: +To export data from the data grid, create a new nanoflow that calls **Export_To_Excel**. In the nanoflow toolbox, you can find it as **Export To Excel** in the **Data widgets** category. The **Export_To_Excel** action has a set of inputs: -* **Datagrid name**: the name of the data grid from which data should be exported (the name can be found and copied from the data grid's settings (**Properties** > **Common** > **Name**)) -* **File name**: the file name to use for the exported document (does not require an appended file extension) -* **Sheet name**: the name to use for the Excel sheet of the exported document. -* **Include column names**: a Boolean expression that, if true, tells the action to include column captions as the first row in the exported document -* **Chunk size**: the number of rows fetched from the backend to the browser at a time. +* **datagridName**: the name of the data grid from which data should be exported (the name can be found and copied from the data grid's settings (**Properties** > **Common** > **Name**)) +* **fileName**: the file name to use for the exported document (does not require an appended file extension) +* **sheetName**: the name to use for the Excel sheet of the exported document. +* **includeColumnHeaders**: a Boolean expression that, if true, tells the action to include column captions as the first row in the exported document +* **chunkSize**: the number of rows fetched from the backend to the browser at a time. {{% alert color="info" %}} -The recommended value for **Chunk size** is 200. However, because each data grid has a unique set of columns and varying amounts of data per row, a different chunk size might result in better performance. +The recommended value for **chunkSize** is 200. However, because each data grid has a unique set of columns and varying amounts of data per row, a different chunk size might result in better performance. {{% /alert %}} +The action returns a Boolean. It returns `true` when the file is created. It returns `false` when **datagridName**, **fileName**, or **sheetName** is empty, when no data grid with that name is on the page, when there is no data to export, or when the export is canceled. + +The export includes the columns that are currently visible in the grid, in their current order. Columns with custom content are only included when their **Export value** property is set. To control the cell type and format of each column in Excel, use the **Export type**, **Export number format**, and **Export date format** column properties. For more information, see the [Column Properties](/appstore/modules/data-grid-2-properties/#column-properties) section of *Data Grid 2 Properties*. + +While the export runs, the data grid shows a progress dialog with a button to cancel the export. + +To run logic before or after an export, for example to log export operations, use the **On before export** and **On after export** events of the data grid. For the variables these actions receive, see the [Configuration](/appstore/modules/data-grid-2-properties/#data-grid2-properties) section of *Data Grid 2 Properties*. + ## Configuration You can store the current configuration of the data grid. In this way, if you re-open your page then the current sorted columns, column order, column widths, and hidden columns will remain the same as in the previous state. When **Store filters** is set to **Yes**, filter values are stored as well. Use **Store configuration in** on the data grid **Personalization** tab in Studio Pro to choose where the configuration is stored: **Attribute** or **Browser local storage**. Browser local storage is scoped to the browser profile, not to the Mendix user, and hides the **Attribute** and **On change** properties. When you choose **Attribute**, you need to select a `String` attribute with `Unlimited` as its size in **Attribute**. @@ -562,6 +572,12 @@ If this setting is enabled, then selected items persist across page navigation, By default, **Keep selection** is disabled and the selection is cleared when the data source changes. When enabled, selected items remain selected until manually cleared by the user. +### Clearing the Selection From a Nanoflow {#clear-selection} + +The [Data Widgets](/appstore/modules/data-widgets/) module includes the **Clear Selection** (`Clear_Selection`) JavaScript action, which clears the selection of a Data Grid 2 or Gallery widget. In the nanoflow toolbox, you can find it in the **Data widgets** category. + +The action has one parameter, **targetName**: the name of the data grid, as a String. You can find the name of a widget in its properties, at **Common** > **Name**. If no widget with the specified name is on the current page, the action does nothing. + ### Selection and Row Click Action {{% alert color="info" %}} @@ -611,6 +627,23 @@ To configure selection, do the following: 1. Configure the button to trigger a microflow or nanoflow. 1. Set the input parameter of the flow to match the selection type (single object or list). +## Styling {#styling} + +### Design Properties + +The [Data Widgets](/appstore/modules/data-widgets/) module adds the following design properties to Data Grid 2. You can find them in the **Design** properties of the data grid in Studio Pro: + +| Design property | Type | Options and CSS classes | Description | +| --- | --- | --- | --- | +| **Borders** | Drop-down | **Both** (`table-bordered-all`), **Vertical** (`table-bordered-vertical`), **Horizontal** (`table-bordered-horizontal`), **None** (`table-bordered-none`) | Adds a horizontal separator, a vertical separator, or both to the cells. | +| **Compact** | Toggle | `table-compact` | Changes the cell spacing to compact. | +| **Hover** | Toggle | `table-hover` | Highlights a row when the user hovers over it. This is only useful when the row is clickable. | +| **Striped** | Toggle | `table-striped` | Adds alternating background colors to rows. | + +### Pagination Text Color + +The pagination text follows the default font color of the theme. To use a different color, set `color` on the `.pagination-bar` class in your theme. + ## Keyboard Support {#keyboard-support} | Key | Function | @@ -620,13 +653,14 @@ To configure selection, do the following: | ↓ | Moves focus one cell down. | | ↑ | Moves focus one cell up. | | Page up | Moves focus one page up. | -| Page down | Moves focus once page down. | +| Page down | Moves focus one page down. | | Home | Moves focus to the first cell in the row. | | End | Moves focus to the last cell in the row. | | Ctrl + Home | Moves focus to the first cell in grid. | | Ctrl + End | Moves focus to the last cell in grid. | +| Enter or Space | Runs the **On click action** for the row of the focused cell. (3) | | Shift + Space | Selects current row. (1) | -| Ctrl + A | Select all visible rows. (1)(2) | +| Ctrl + A (Command + A on Mac) | Select all visible rows. (1)(2) | | Shift + ↑/↓ | Moves focus and selects current and row above/below. (1)(2) | | Shift + Page up/Page down | Moves focus one page up/down and selects all rows between current and final row. (1)(2) | | Shift + Home/End | Moves focus to the start/end of the grid and selects all rows between current and final row. (1)(2) | @@ -636,7 +670,8 @@ Legend: | Symbol | Meaning | | ------ | ------------------------------------------------------- | | 1 | Available only when selection is enabled. | -| 2 | Available only when selection mode should be **Multi**. | +| 2 | Available only when selection mode is **Multi**. | +| 3 | Available only when an **On click action** is set. | ## Resetting Filters {#resetting-filters} @@ -659,7 +694,7 @@ Both actions have the following parameters: **Reset All Filters** resets both the filters in the column headers and the filters in the [filters placeholder](/appstore/modules/data-grid-2-properties/#filters-placeholder) of the data grid. {{% alert color="info" %}} -The action above find the widget by its name. If no widget with the specified name is on the current page, the action does nothing and does not show an error. To address this issue, confirm that **targetName** matches the name of the widget exactly. +These actions find the widget by its name. If no widget with the specified name is on the current page, the action does nothing and does not show an error. To address this issue, confirm that **targetName** matches the name of the widget exactly. {{% /alert %}} ### Adding a Reset Button @@ -674,6 +709,22 @@ To add a button that resets all filters of a data grid, do the following: To reset a single filter, follow the same steps with the **Reset Filter** action, and set **targetName** to the name of the filter widget. +## Setting Filters {#setting-filters} + +The [Data Widgets](/appstore/modules/data-widgets/) module includes the **Set Filter** (`Set_Filter`) JavaScript action, which sets a single text, number, date, or drop-down filter to a specific value from a nanoflow. The action is available for web apps only. In the nanoflow toolbox, you can find it in the **Data widgets** category. + +The action has the following parameters: + +* **targetName** – The name of the filter widget, as a String. You can find the name of a widget in its properties, at **Common** > **Name**. +* **useDefaultValue** – A Boolean. When `true`, the filter returns to its default state, and the other value parameters are ignored. When `false`, the filter is set to the values below. +* **operators** – A value of the **DataWidgets.Filter_Operators** enumeration that sets the filter type, for example **Contains**, **Equal**, or **Between**. It applies to text, number, and date filters. +* **stringValue** – The value for a text filter or a drop-down filter. For a drop-down filter, use the same format as the **Default value** of the [Drop-Down Filter](/appstore/modules/datagrid-dropdown-filter/): to select several options, separate the values with commas; when **Multiselect** is set to **No**, only the first value is used. +* **numberValue** – The value for a number filter. +* **dateTimeValue** – The value for a date filter, or the start date when **operators** is **Between**. +* **dateTimeValue_2** – The end date when **operators** is **Between**. + +Leave the parameters that do not apply to the target filter empty. + ## Troubleshooting Runtime Errors {#troubleshooting-runtime-errors} ### Filter Widget Errors {#filter-widget-errors} diff --git a/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/gallery.md b/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/gallery.md index 5b2117c19f1..39642b68b08 100644 --- a/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/gallery.md +++ b/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/gallery.md @@ -21,17 +21,19 @@ Several options can be defined in the Gallery widget: Data source specifies the source of the data being presented in the Gallery. You can select data from **Database** (optionally with an XPath constraint), **Association**, **Microflow**, or **Nanoflow**. +**Refresh time (in seconds)** sets the time the gallery waits between refreshing the data. Auto-refreshing is turned off when the value is 0. The default value is 0. + ### Columns -The Gallery widget applies a different number of columns based on the device being used. You can set **Desktop columns**, **Tablet columns**, and **Phone columns**. +The Gallery widget applies a different number of columns based on the device being used. You can set **Desktop columns**, **Tablet columns**, and **Phone columns**. Each value must be a number between 1 and 12. The default value is 1. ### Items -On the **Behavior** tab, you can define the properties related to the items being presented. **Page size**, **Pagination**, and **Position of pagination** are in the **Pagination** group. **Empty message** and **Dynamic item class** are in the **Appearance** group. +On the **Behavior** tab, you can define the properties related to the items being presented. **Page size**, **Pagination**, **Custom pagination**, **Show paging buttons**, **Show total count**, **Position of pagination**, **Load more caption**, and the dynamic pagination attributes are in the **Pagination** group. **Loading type** and **Show refresh indicator** are in the **Loading state** group. **Empty message** and **Dynamic item class** are in the **Appearance** group. **Custom item key** is in the **Advanced** group. -#### Page size +#### Page Size -Defines the amount of data shown for each page or the limit to be presented when using virtual scrolling. +Defines the amount of data shown for each page or the limit to be presented when using virtual scrolling. When **Pagination** is set to **Virtual scrolling** or **Load more**, this number defines how many items are added each time more data is loaded. The default value is 20. #### Pagination @@ -39,11 +41,44 @@ Defines the amount of data shown for each page or the limit to be presented when The pagination status text and the screen reader labels of the paging buttons are currently written in English and cannot be translated. We are working to improve this in the future. {{% /alert %}} -You can choose between paging buttons (buttons presented below or above the grid), virtual scrolling (a mechanism that automatically loads data when the user reaches the bottom of the scroll bar), or load more (a button that loads more items). +You can choose between paging buttons (buttons presented below or above the grid), virtual scrolling (a mechanism that automatically loads data when the user reaches the bottom of the scroll bar), or load more (a button that loads more items). The default value is **Paging buttons**. + +#### Custom Pagination + +When set to **Yes**, the built-in paging buttons are replaced with your own pagination. A second property, also named **Custom pagination**, then appears. It is a widget area where you place the widgets that make up the custom pagination. The default value is **No**. These properties are only shown when **Pagination** is set to **Paging buttons**. + +#### Show Paging Buttons + +This controls the visibility of the navigation buttons. When set to **Always** (default), the navigation buttons are always visible. When set to **Auto**, the navigation buttons are only visible when the number of items in the data source exceeds the page size. This property is only shown when **Pagination** is set to **Paging buttons**. + +#### Show Total Count + +When set to **Yes**, the pagination area shows the number of loaded items and the total number of items, such as "20 of 150". The default value is **No**. This property is only shown when **Pagination** is set to **Virtual scrolling** or **Load more**. #### Position of Pagination -This option defines the position of the pagination relative to the grid items: **Below grid**, **Above grid**, or **Both**. It is available when **Pagination** is set to **Paging buttons**, or when **Pagination** is set to **Virtual scrolling** or **Load more** and **Show total count** is enabled. +This option defines the position of the pagination relative to the grid items: **Below grid** (default), **Above grid**, or **Both**. It is available when **Pagination** is set to **Paging buttons**, or when **Pagination** is set to **Virtual scrolling** or **Load more** and **Show total count** is enabled. Custom pagination cannot be shown in both positions. When **Custom pagination** is set to **Yes** and this property is set to **Both**, Studio Pro shows a warning and the custom pagination is rendered below the gallery. + +#### Load More Caption + +This sets the caption of the button that loads more items. The default value is **Load More**. This property is only shown when **Pagination** is set to **Load more**. + +#### Dynamic Pagination Attributes + +The **Pagination** group also contains the following optional **Integer** attributes: + +* **Page size attribute** – sets the page size dynamically; when this attribute is set, it is used as the page size instead of **Page size** +* **Page attribute** – sets the current page dynamically; the gallery also writes the current page back to this attribute when the user navigates between pages +* **Total count** – stores the current total number of items +* **Loaded items** – a read-only attribute that reflects the number of items currently loaded; this property is only shown when **Pagination** is set to **Virtual scrolling** or **Load more** + +#### Loading Type + +This sets the type of loading state. The options are **Spinner** (default) and **Skeleton**. + +#### Show Refresh Indicator + +When set to **Yes**, the gallery shows a progress bar on top of the gallery while the data is being reloaded. The default value is **No**. #### Empty Message @@ -59,14 +94,53 @@ This example checks the value of `CountryName` and, if the attribute is equal to {{< figure src="/attachments/appstore/platform-supported-content/modules/data-widgets/gallery/dynamic-item-class.png" alt="Example of dynamic item class" width="300" class="no-border" >}} +#### Custom Item Key + +This is an expression that returns a stable identifier for each item. Use it to maintain the scroll position during data refreshes when using view entities. When it is not set, the object ID is used. + ### Events The new Gallery widget can trigger some events while iterating with it. +#### On Click Trigger + +This defines which interaction triggers the **On click action**: **Single click** (default) or **Double click**. + #### On Click Action Triggers an action (such as a nanoflow, microflow, or Show page action) when the end-user clicks in one of the items. It also adds a pointer cursor to signal that it is clickable. This function also complies with accessibility features and can be reached using only the keyboard. +#### On Selection Change + +Triggers an action when the selection changes. This property is only shown when **Selection** is set to **Single** or **Multi**. + +### Personalization {#personalization} + +On the **Personalization** tab, you can store the current filter and sort configuration of the gallery. In this way, if you re-open your page, the filters and sort order remain the same as in the previous state. The following properties are available: + +* **Store filters** – When set to **Yes** (default), filter values are stored. +* **Store sort** – When set to **Yes** (default), the sort order is stored. +* **Store configuration in** – This sets where the configuration is stored: **Attribute** (default) or **Browser local storage**. Browser local storage is scoped to the browser profile, not to the Mendix user. This property is only shown when **Store filters** or **Store sort** is set to **Yes**. +* **Attribute** – This is the attribute in which the configuration is stored and from which it is loaded. Select a `String` attribute with `Unlimited` as its size. To select an attribute, surround the gallery with a data view. This property is only shown when **Store configuration in** is set to **Attribute**. +* **On change** – This is an action that is triggered when the configuration stored in **Attribute** changes. This property is only shown when **Store configuration in** is set to **Attribute**. + +### Texts {#texts} + +On the **Texts** tab, you can configure the following texts. + +The **Aria labels** group contains the texts that assistive technology reads: + +* **Filter section** – read upon reaching a filtering or sorting section +* **Empty message** – read upon reaching an empty message section +* **Content description** – read upon reaching the gallery +* **Item description** – read upon reaching each gallery item; this text template can use the attributes of the item + +The **Captions** group contains the texts of the selection count: + +* **Item count singular** – The default value is "%d item selected". It must include `%d` to denote the position of the number. +* **Item count plural** – The default value is "%d items selected". It must include `%d` to denote the position of the number. +* **Clear selection label** – This sets the label of the button that clears the selection. The default value is "Clear selection". This property is only shown when **Selection** is set to **Multi**. + ## Filtering {{% alert color="info" %}} @@ -95,7 +169,7 @@ If the data source of the gallery has a sort order, the Drop-Down Sort widget pr The Drop-Down Sort widget lets end-users choose the attribute and direction to sort the gallery items by. Place it inside the filters placeholder of the Gallery widget and configure these properties: * **Datasource to sort**: the data source of the gallery, linked automatically when the widget is placed in the filters placeholder -* **Attributes**: the attributes that end-users can sort by; for each attribute, set the **Caption** shown in the drop-down +* **Attributes**: the attributes that end-users can sort by; for each attribute, set the **Caption** shown in the drop-down; supported attribute types are AutoNumber, Boolean, Date and time, Decimal, Enumeration, Integer, Long, and String * **Empty option caption**: the text shown when no sort option is selected * **Sort order button caption** and **Input caption**: the text announced by screen readers when using assistive technology @@ -115,6 +189,14 @@ The **Selection** property determines what type of selection is available to use When **Selection** is enabled, the Gallery automatically provides visual feedback to indicate selected items and supports keyboard navigation for accessibility. +### Auto Select First Item + +When set to **Yes**, the first item is selected automatically. This property is only shown when **Selection** is set to **Single** or **Multi**. The default value is **No**. + +### Toggle on Click + +This defines the selection behavior when an item is clicked. When set to **Yes**, clicking an item toggles its selection and keeps the other selected items. When set to **No** (default), clicking an item selects that item and clears the rest of the selection. This property is only shown when **Selection** is set to **Single** or **Multi**. + ### Selection and Click Actions Constraint {{% alert color="info" %}} @@ -216,6 +298,17 @@ To further improve the user experience, it is also possible to select many items Employing keyboard navigation is an effective way of ensuring users who cannot use a mouse can still interact with the Gallery widget. +## Styling + +The [Data Widgets](/appstore/modules/data-widgets/) module ships the following design properties for the Gallery widget: + +* **Borders** – Adds a separator to the items: **Both**, **Vertical**, **Horizontal**, or **Horizontal divider**. +* **Hover** – Highlights an item when hovering over it. This is only useful when the item is clickable. +* **Striped** – Adds alternating background colors to items. +* **Grid spacing** – Changes the gap between grid items: **None**, **Small**, **Medium**, or **Large**. +* **Pagination** – Aligns the pagination controls above and below the gallery: **Left**, **Center**, or **Right**. The selection count and the load more button move aside so both stay visible on the same row. +* **Disable selection highlight** – Disables the standard styles for highlighting selected items. + ## Troubleshooting The new Gallery widget uses [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout) as its base for styling. If you need to combine rows or columns you can achieve this using the following helper classes in the `Dynamic item class`: diff --git a/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/tree-node.md b/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/tree-node.md index d55df09d5ef..806f49a70cf 100644 --- a/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/tree-node.md +++ b/content/en/docs/marketplace/platform-supported-content/modules/data-widgets/tree-node.md @@ -55,6 +55,8 @@ Drag the Tree Node widget onto the page and use the configuration properties des ### General Tab {#general} +* **Enable advanced options** – This shows the **Animate** property and the icon properties on the **Visualization** tab (**Show icon**, **Expanded icon**, **Collapsed icon**, and **Animate icon**). When set to **No**, these properties are hidden: + * Default: **No** * **Data source** – This sets the data source of the widget, which can also be optionally used as the data source for the header and content of the widget: * Required * **Parent association** – This sets the association used to select a parent. If set, the widget uses [Infinite tree node](#child-detection-mode) mode. @@ -82,11 +84,11 @@ Drag the Tree Node widget onto the page and use the configuration properties des {{% alert color="info" %}}In **Infinite tree node** mode, Mendix recommends setting **Start expanded** to **No** for large data sets. When **Start expanded** is set to **Yes**, the widget expands all tree nodes directly and loads all data at once.{{% /alert %}} * **Animate** – This defines whether the content is animated when a tree node expands and collapses: - * Default: **Yes** + * Configurable when **Enable advanced options** is set to **Yes**; default: **Yes** ### Visualization Tab {#visualization} -The **Visualization** tab includes the following properties: +The **Visualization** tab includes the following properties. **Show icon**, **Expanded icon**, **Collapsed icon**, and **Animate icon** are only shown when **Enable advanced options** is set to **Yes**. * **Show icon** – This defines the location of the icon relative to the header: * Default: **Left** diff --git a/content/en/docs/marketplace/platform-supported-content/modules/file-uploader.md b/content/en/docs/marketplace/platform-supported-content/modules/file-uploader.md index 80fa7b1e309..40c2ba2527d 100644 --- a/content/en/docs/marketplace/platform-supported-content/modules/file-uploader.md +++ b/content/en/docs/marketplace/platform-supported-content/modules/file-uploader.md @@ -7,7 +7,7 @@ description: "Describes the configuration and usage of the File Uploader module, ## Introduction -The [File Uploader](https://marketplace.mendix.com/link/component/235351) enables you to upload files or images by dragging and dropping them onto the widget, or by using the file selection dialog box. +The [File Uploader](https://marketplace.mendix.com/link/component/235351) enables you to upload files or images by dragging and dropping them onto the widget, or by using the file selection dialog box. You can also paste a file into the focused drop zone to upload it. Pasted files go through the same file type and size checks. It supports multi-file uploading, and includes an image-only mode that previews thumbnails of the uploaded images. The module comes with a domain model containing the entities and nanoflows it needs to function properly. @@ -56,7 +56,7 @@ For an advanced setup, useful when modifying the context entity is not possible, ##### Upload Mode -* **Files** – Allows all file types by default, and adds a configuration option to specify a custom set of allowed file types. +* **Files** – Allows all file types by default, and adds a configuration option to specify a custom set of allowed file types. This is the default. * **Images** – Limits uploads to images and shows a preview thumbnail. ##### Associated Files / Associated Images @@ -64,32 +64,72 @@ For an advanced setup, useful when modifying the context entity is not possible, * Defines the entity which is used to store the files or images. Needs to be a specialization of **System.FileDocument** or **System.Image**. * By default, use **FileUploader.UploadedFile** for upload mode Files and **FileUploader.UploadedImage** for upload mode Images. -##### Action to Create New Files +##### Read-Only Mode + +If set to **Yes**, the widget only displays the associated files or images. The drop zone is hidden, so users cannot upload new files. The default value is **No**. + +When read-only mode is enabled, the **Action to create new files**, **Allowed file formats**, **Maximum number of files**, **Maximum concurrent uploads**, **Maximum file size (MB)**, and **Object creation timeout** properties are not available. + +##### Action to Create New Files / Action to Create New Images * Configuration to set up the nanoflow which creates an associated file object and commits it. * By default, calls **Nanoflow ACT_CreateUploadedFileDocument** for a **Files** upload mode and **ACT_CreateUploadedImageDocument** for an **Images** upload mode. -##### Allowed File Format +##### Allowed File Formats + +This configuration is only shown for the **Files** upload mode. Users can manually set restrictions on the allowed file types. If the list is empty, there are no restrictions. -This configuration is only shown for the **Files** upload mode. Users can manually set restrictions on the allowed file types. +Each allowed file format has the following properties: + +* **Configuration mode** – Determines how the file format is defined: + * **Simple** – Select a **Predefined type**. This is the default. + * **Advanced** – Define the file format with **Mime Type**, **Extensions list**, and **Type description**. +* **Predefined type** – The available options are **PDF Document (.pdf)** (default), **Microsoft Word (.doc and .docx)**, **Microsoft Excel (.xls and .xlsx)**, **Microsoft PowerPoint (.ppt and .pptx)**, **Plain Text (.txt)**, **CSV (.csv)**, **Zip archive**, **Text file**, **Image**, **Audio**, and **Video**. +* **Mime Type** – The MIME type of the file format, for example `image/jpeg` or `application/pdf`. +* **Extensions list** – A comma-separated list of extensions, for example `.jpg,.jpeg`. When you combine a wildcard MIME type with extensions, for example `image/*` with `.png`, only files with those extensions are accepted. +* **Type description** – The text shown to end-users to describe the supported file types. ##### Maximum Number of Files -This configuration sets a limit on how many files can be uploaded in total. +This configuration sets a limit on how many files can be associated in total. It is an expression, and the default value is **10**. Leave it empty or set it to 0 to allow an unlimited number of files. -##### Maximum File Size (MB) +When the limit is reached, the drop zone shows the **File limit reached** message. If users add more files than allowed, only the excess files are rejected. -This configuration sets a maximum limit on the file size of uploaded files. +##### Maximum Concurrent Uploads -#### Text Tab {#texttab} +This configuration sets the maximum number of files that upload at the same time. Remaining files wait in a queue and upload automatically when a slot becomes available. It is an expression. Leave it empty or set it to 0 to allow an unlimited number of concurrent uploads. -Configures the displayed text used in **File Uploader**. +##### Maximum File Size (MB) + +This configuration sets a maximum limit on the file size of uploaded files. The default value is **25**. + +#### Texts Tab {#texttab} + +Configures the displayed text used in **File Uploader**. The following texts are available: + +* **Dropzone message** +* **Dropzone hover for uploadable files** +* **Dropzone hover for non uploadable files** +* **Uploading in progress** +* **Upload queued** – Shown on files that are waiting in the upload queue. +* **Uploading success** +* **Uploading unknown error** +* **Invalid file format** +* **File is too big** +* **Too many files** +* **File limit reached** – Shown when the maximum number of files is reached. +* **Action to create new files is not available or failed** +* **Download button** +* **Remove button** +* **Retry button** – The tooltip of the retry button shown on rejected files. +* **File removal success** – Announced to screen reader users when a file is removed. This text is not shown in the file list. +* **File removal failure** #### Advanced Tab {#advanced} ##### Object Creation Timeout -Configures the timeout to wait until object creation has failed. The value is in seconds. +Configures the timeout to wait until object creation has failed. The value is in seconds. The default value is **10**. ##### On Upload Success @@ -99,27 +139,29 @@ This action runs after a successful upload. When uploading multiple files at onc This action runs when an upload to the server started, but failed during the process. The created object will be passed to the action. This is useful to perform cleanups from empty, dangling objects that were created but did not have content uploaded to them. +By default, this calls the **ACT_DeleteUploadedFileDocument** nanoflow for the **Files** upload mode and the **ACT_DeleteUploadedImageDocument** nanoflow for the **Images** upload mode. + {{% alert color="info" %}} This action will not run if a validation error occurred on the client side, for example, if a provided file was too big or had an incorrect extension. {{% /alert %}} ##### Enable Custom Buttons -Allows the use of custom action buttons that will be displayed on the right side of the file list instead of the standard buttons. If set to **Yes**, the default action buttons will be hidden. +Allows the use of custom action buttons that will be displayed on the right side of the file list instead of the standard buttons. If set to **Yes**, the default action buttons will be hidden. The default value is **No**. ##### Custom Buttons -Adds custom buttons that will be used in the file uploader: +This configuration is only shown when **Enable custom buttons** is set to **Yes**. Adds custom buttons that will be used in the file uploader: * **Caption** – Caption text configuration for the custom button. * **Icon** – Provides icon configuration for the custom button. * **Action** – Provides **On click** action configuration for the custom button. * **Default file action** – If set to **Yes**, the action in the button will be used as the default click action for the file. -* **Visible** – If set to **False**, the button will be hidden. +* **Visible** – An expression that determines if the button is visible. If it returns **false**, the button will be hidden. The default value is **true**. ### Nanoflows -This module includes two predefined nanoflows: +This module includes the following predefined nanoflows: #### ACT_CreateUploadedFileDocument @@ -128,3 +170,11 @@ This nanoflow will attach an uploaded file to the context object. #### ACT_CreateUploadedImageDocument This nanoflow will attach an uploaded image to the context object. + +#### ACT_DeleteUploadedFileDocument + +This nanoflow is the default **On upload failure** action for the **Files** upload mode. + +#### ACT_DeleteUploadedImageDocument + +This nanoflow is the default **On upload failure** action for the **Images** upload mode. diff --git a/content/en/docs/marketplace/platform-supported-content/modules/google-tag.md b/content/en/docs/marketplace/platform-supported-content/modules/google-tag.md index a9c672c7e9d..21e25ae4a06 100644 --- a/content/en/docs/marketplace/platform-supported-content/modules/google-tag.md +++ b/content/en/docs/marketplace/platform-supported-content/modules/google-tag.md @@ -29,7 +29,7 @@ In **Basic** mode, the Google Tag widget sends a pre-configured `page_view` even ### Compatibility {#compatibility} -The module is compatible with Studio Pro 9.18 and above. +The module is compatible with Studio Pro 10.21 and above. {{% alert color="info" %}} This module might not function correctly for users employing ad-blocking extensions in their browsers, as such extensions often block tracking activities. @@ -41,6 +41,17 @@ This module might not function correctly for users employing ad-blocking extensi When the **Widget mode** is set to **Basic**, the widget only sends page-tracking events, which covers the majority of use cases. In this mode, only the **Tag ID** property needs to be filled in. Additionally, you can fill in the **Parameters** if you want to include specific information along with the page view events. For more information, see the [Parameters](#widget-advanced-parameters) section below. +The page view event includes the following parameters, in addition to the ones you configure in **Parameters**: + +* `page_location` – The page URL +* `client_id` – The session ID +* `language` – The user locale +* `page_title` – The page title +* `mx_page_name` – The page name +* `mx_module_name` – The module name + +If **Share user ID** is set to **Yes**, the widget sends the ID of the authenticated user as `user_id` with the `config` command, so that individual users can be identified in Google Analytics. The default value is **No**. + Typically, the Google Tag widget in **Basic** mode is placed in the layout of your app. The widget automatically tracks when the end-user switches pages and sends page view events accordingly. {{< figure src="/attachments/appstore/platform-supported-content/modules/google-tag/widget-basic-mode.png" class="no-border" >}} @@ -67,7 +78,7 @@ Typically, the Google Tag widget in **Advanced** mode with the **Command** setti #### Event Command {#widget-advanced-event} -When **Command** is set to **Event**, the widget issues an `event` command to `gtag.js`. This requires **Event name** and accepts additional parameters configured via the **Parameters** property. Additionally, if the **Track Page Changes** property is set to **Yes**, the widget re-issues the `event` command when a page change happens. +When **Command** is set to **Event**, the widget issues an `event` command to `gtag.js`. This requires **Event name** and accepts additional parameters configured via the **Parameters** property. Additionally, if the **Track page changes** property is set to **Yes**, the widget re-issues the `event` command when a page change happens. The default value is **No**. For this scenario, a widget in the **Advanced** mode must be combined with either a widget in **Basic** mode or with a widget in **Advanced** mode with the **Config** command. @@ -77,6 +88,18 @@ One typical use case of the widget in this scenario is custom page view tracking The **Parameters** property allows for sending additional data along with the commands issued to `gtag.js`. Examples of parameters are **Page Name** and **Session ID** sent together with the page view event. The value of a parameter might be set as a custom value via an expression or chosen from a predefined set. +The predefined set (**Standard value**) contains the following values: + +* **Page Title** +* **Page URL** +* **Page Name** (default) +* **Module Name** +* **Page and Module Name** +* **Session ID** +* **User Locale** + +For the **Config** command, only custom values are available. In a custom value, the `{{__ModuleAndPageName__}}` token is replaced with the module and page name. The custom values `true` and `false` are sent as Boolean values. + {{< figure src="/attachments/appstore/platform-supported-content/modules/google-tag/parameter-value-type.png" class="no-border" >}} ## Google Tag Command {#jsaction} @@ -85,4 +108,6 @@ Google Tag Command is a JavaScript action that allows for making direct calls to The **Command** input can be set to **Config** or **Event**. When set to **Config**, only **Tag ID** and **Parameters** have to be passed. When set to **Event**, only **Event Name** and **Parameters** have to be passed. -The **Parameters** input accepts a list of **GoogleTagParameter** entities to represent arbitrary parameters to send along with a command to `gtag.js`. The entity includes two fields, `Name` and `Value`. +The **Parameters** input accepts a list of **GoogleTagParameter** entities to represent arbitrary parameters to send along with a command to `gtag.js`. The entity includes two fields, `Name` and `Value`. Values of `true` and `false` are sent as Boolean values. + +When **Command** is set to **Config**, the action also loads `gtag.js` with the given **Tag ID** if it is not loaded yet. diff --git a/content/en/docs/marketplace/platform-supported-content/modules/web-actions.md b/content/en/docs/marketplace/platform-supported-content/modules/web-actions.md index 4ea892e11bd..236a22d5af1 100644 --- a/content/en/docs/marketplace/platform-supported-content/modules/web-actions.md +++ b/content/en/docs/marketplace/platform-supported-content/modules/web-actions.md @@ -9,19 +9,22 @@ description: "Describes the configuration and usage of the Web Actions module, w The [Web Actions](https://marketplace.mendix.com/link/component/114337/) module contains the following actions: -| Category | Action | +| Action | Description | | --- | --- | | Focus next | Moves the keyboard focus to the next element that can be focused. | | Focus previous | Moves the keyboard focus to the previous element that can be focused. | | Scroll to | Scrolls the window to make a targeted element visible. For this action, you need to provide a target selector. This target could be an element containing a class (for example, `.mx-class-name`, `.my-class-name`), an HTML element (for example, `td`, `div`, `a`), or an element ID (for example, `#my-element-id`). | -| Set focus | Sets the focus to the element found with the selector. The element should be able to hold focus like a link, button, or input. For this action, you need to provide a target selector. This target could be an element containing a class (for example, `.mx-class-name`, `.my-class-name`), an HTML element (for example, `td`, `div`, `a`), or an element ID (for example, `#my-element-id`). | -| Take picture | Allows users to take a picture from the back and front camera in a web or PWA app. | +| Set focus | Sets the focus to the element found with the selector. The element should be able to hold focus like a link, button, or input. If the element cannot hold focus, the first element inside it that can be focused receives the focus. For this action, you need to provide a target selector. This target could be an element containing a class (for example, `.mx-class-name`, `.my-class-name`), an HTML element (for example, `td`, `div`, `a`), or an element ID (for example, `#my-element-id`). | +| Take picture | Allows users to take a picture from the back and front camera in a web or PWA app. For more information, see the [Usage](#usage) section below. | +| Set cookie | Sets a browser cookie. For this action, you need to provide a key (the cookie name) and a value. | +| Read cookie | Returns the value of the browser cookie with the given key as a String. If the cookie does not exist, the action returns an empty String. | +| Set favicon | Replaces the favicons of the app with the icons at the given URLs. For this action, you need to provide the URLs of a 16x16 icon, a 32x32 icon, and an Apple touch icon. | {{% alert color="warning" %}} When using Studio Pro on Mac, the **Take picture** action sometimes makes your device's screen turn black due to a bug. Fix this bug by upgrading to an iOS version above 17.3.1. {{% /alert %}} -## Usage +## Usage {#usage} To take a picture, follow these steps: @@ -41,7 +44,9 @@ To take a picture, follow these steps: {{< figure src="/attachments/appstore/platform-supported-content/modules/web-actions/confirmation.png" alt="Confirmation Screen" class="no-border" >}} -5. After the execution, check if the picture was taken or not. The value returned from the action is a Boolean: +5. Optionally, set the picture quality. The available options are Original, Low, Medium, High, and Custom. The default picture quality is Medium. When you select Custom, provide a maximum width or a maximum height, or both. The picture is scaled to these maximum pixel dimensions, while maintaining the aspect ratio. + +6. After the execution, check if the picture was taken or not. The value returned from the action is a Boolean. It is **true** when the picture is saved to the object and the object is committed, and **false** when the user closes the camera without saving a picture or the camera cannot be started: {{< figure src="/attachments/appstore/platform-supported-content/modules/web-actions/check.png" alt="Check" class="no-border" >}} diff --git a/content/en/docs/marketplace/platform-supported-content/services/pusher.md b/content/en/docs/marketplace/platform-supported-content/services/pusher.md index 736fa7c2d14..47450ea4831 100644 --- a/content/en/docs/marketplace/platform-supported-content/services/pusher.md +++ b/content/en/docs/marketplace/platform-supported-content/services/pusher.md @@ -84,8 +84,9 @@ To receive notify messages in the client, place a widget on a page inside a [dat #### React-Compatible Widget 1. Place the new widget on a page within a [data view](/refguide/data-view/) where the context matches the parameter object. -2. Configure **Action list**. For each entry: - * **Action name** matches the notify message name sent from the server. +2. Set **Object to listen** to the object that matches the parameter object of the **Notify** action. +3. Configure **Event Handlers**. For each entry: + * **Action name** matches the notify message name sent from the server. Each action name must be unique within the widget. * **Action** defines the client action to run when the message is received. The new widget can run any configured client action. For example, you can run a microflow to retrieve committed data and refresh the page. #### Legacy Widget diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/accessibility-helper.md b/content/en/docs/marketplace/platform-supported-content/widgets/accessibility-helper.md index 1fbb2325ee2..099a8932f70 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/accessibility-helper.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/accessibility-helper.md @@ -22,16 +22,16 @@ The widget acts like a container and alters the elements inside it. In order to ### Dragging Widgets into Accessibility Helper -Since Accessibility Helper is a containment widget it will try to change the widgets inside it. Thus the user must drag the widgets they want to change into Accessibility Helper. +Since Accessibility Helper is a containment widget it will try to change the widgets inside it. Thus the user must drag the widgets they want to change into the **Content** area of Accessibility Helper. ### Specifying the Target Selector -Target selector is a basic CSS selector, and more information can be found in Mozilla's [documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors). +**Target selector** is a basic CSS selector, such as `.mx-name-textBox1 input`, and more information can be found in Mozilla's [documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors). The widget applies the HTML attributes to the elements inside its content that match the selector. ### Adding New Accessibility Properties -Every HTML attribute consists of a `name` and a `value`. The user can add any attribute by filling the HTML attributes list. However, the following attribute names are not allowed since they will interfere with Mendix's core mechanism: `class`, `style`, `widgetid`, and `data-mendix-id`. +Every HTML attribute consists of a `name` and a `value`. The user can add any attribute by filling the **HTML Attributes** list and entering the name in **HTML attribute**. However, the following attribute names are not allowed since they will interfere with Mendix's core mechanism: `class`, `style`, `widgetid`, and `data-mendix-id`. -After selecting a `name` for the attribute, the user can determine what kind of value the attribute will get via `Source Type` (`Text` or `Expression`). `Text` can be used for static values, while `Expression` can be used for dynamic values. +After selecting a `name` for the attribute, the user can determine what kind of value the attribute will get via **Source type** (**Text** or **Expression**, default **Text**). **Text** can be used for static values in **Text value**, while **Expression** can be used for dynamic values in **Expression value**. -The user may can select how this HTML attribute can be set using `Condition`. +The user can select when this HTML attribute is set using **Condition**, a Boolean expression (default: `true`). When the condition is false, the attribute is removed from the target elements. diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/accordion.md b/content/en/docs/marketplace/platform-supported-content/widgets/accordion.md index db5f95cfd81..57386f1c1ff 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/accordion.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/accordion.md @@ -35,11 +35,15 @@ The **General** tab in the **Edit Groups Item** dialog box has the following pro * **Render mode** – the text's heading level * Default: **Heading 3** * Configurable when the header content consists of **Text** -* **Custom header content** – the widgets to be displayed in the header - * Configurable when the header content consists of widgets +* **Header** – the widgets to be displayed in the header + * Configurable when **Header** is set to **Custom** * **Visible** – a Boolean expression indicating whether the group should be visible * Default: **true** -* **Dynamic class** (required) – a string expression to apply dynamic classes (separated by a space) to the group +* **Dynamic class** – a string expression to apply dynamic classes (separated by a space) to the group +* **Load content** – determines when the widgets in the group content are rendered and their data is fetched + * Default: **Always** + * **Always** loads the widgets regardless of whether the group is expanded + * **When expanded** can reduce the initial page load time, but increases the load time when the group is expanded The **State** tab in the **Edit Groups Item** dialog box is only visible when [Advanced options](#advanced) is set to **Yes**, and it has the following properties: @@ -66,9 +70,9 @@ Configure the following properties in this section: * Default: **Yes** * Only visible when [Advanced options](#advanced) is set to **Yes** -### Advanced Tab {#advanced} +### Advanced Options {#advanced} -The **Enable advanced options** toggle (default: **No**) determines whether advanced configuration properties become visible. +The **Enable advanced options** toggle (default: **No**) in the **General** section of the [General](#general) tab determines whether advanced configuration properties become visible. When set to **Yes**, the following tabs and properties become visible: diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/badge-button.md b/content/en/docs/marketplace/platform-supported-content/widgets/badge-button.md index 6f5010b0490..617efc8ab90 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/badge-button.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/badge-button.md @@ -17,6 +17,19 @@ The [Badge Button](https://marketplace.mendix.com/link/component/52705/) widget ## Usage -To use this widget, place it in the context of an object that has a value attribute. However, on the **Badge** tab, the **Badge value attribute** from the data source is optional. If not set, static data should be specified in **Caption** on the **Button** tab. +To use this widget, place it on a page and configure the following properties on the **General** tab: -Behavior is configured on the **Events** tab. +* **Caption** (in the **General** section) – the text template displayed on the button + * Default: **Button** +* **Value** (in the **Badge** section) – the text template displayed in the badge on the button +* **On click** (in the **Events** section) – the action executed when the button is clicked + +## Styling + +The following design properties are available on the **Appearance** tab: + +* **Style** – the brand color of the button: **Brand Primary**, **Brand Secondary**, **Brand Success**, **Brand Warning**, or **Brand Danger** + * When no style is selected, the button uses the primary brand style +* **Size** – **Small** or **Large** +* **Full width** – makes the button take the full width of its container +* **Border** – shows the button with a border diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/barcode-generator.md b/content/en/docs/marketplace/platform-supported-content/widgets/barcode-generator.md index ef57e3932be..4bb625269b0 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/barcode-generator.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/barcode-generator.md @@ -7,12 +7,12 @@ description: "Describes the configuration and usage of the Barcode Generator wid ## Introduction -The [Barcode Generator](https://marketplace.mendix.com/link/component/200681) widget generates a barcode or QR code from a string value and displays it in your Mendix web application. +The [Barcode Generator](https://marketplace.mendix.com/link/component/200681) widget generates a barcode, QR code, or Data Matrix code from a string value and displays it in your Mendix web application. The widget does the following: -* Encodes a static or dynamic string value as a barcode or QR code -* Supports ten linear barcode formats as well as QR codes +* Encodes a static or dynamic string value as a barcode, QR code, or Data Matrix code +* Supports ten linear barcode formats as well as QR codes and Data Matrix codes (including GS1 Data Matrix) * Validates the input value against the selected format before rendering * Renders the result as a scalable SVG image * Lets end-users download the generated code as a PNG file @@ -21,11 +21,12 @@ The widget does the following: ### Features -* Two render modes selected through a single property: linear barcode or QR code +* Three render modes selected through a single property: linear barcode, QR code, or Data Matrix * Per-format input validation with configurable logging * Optional download button with a customizable caption, file name, and position * EAN-2 and EAN-5 addon support for EAN barcodes * Error correction levels and image overlays for QR codes +* Square or rectangular symbol shapes and GS1 encoding for Data Matrix codes * Offline capable ## Properties Pane @@ -42,8 +43,8 @@ The following sections describe the available properties and how to configure th The **General** tab configures the value to encode, the code format, and the download button: -* **Dynamic value** (required) – The string to encode as a barcode or QR code. -* **Barcode Format** (required) – The type of code to generate. Choose **Barcode** to render a standard linear barcode, **QR Code** to render a QR code, or **Custom** to select a specific linear format on the **Advanced** tab. +* **Dynamic value** (required) – The string to encode as a barcode, QR code, or Data Matrix code. +* **Barcode Format** (required) – The type of code to generate. Choose **Barcode** to render a standard linear barcode, **QR Code** to render a QR code, **Data Matrix** to render a Data Matrix code, or **Custom** to select a specific linear format on the **Advanced** tab. * **Empty message** – The text shown when no value is provided to encode. * **Allow download** – When enabled, the widget shows a button that lets end-users download the generated code as a PNG file. Enabling this property reveals the following options: * **Button text** – The caption shown on the download button. @@ -53,7 +54,7 @@ The **General** tab configures the value to encode, the code format, and the dow ### Advanced Tab {#advanced} -The **Advanced** tab configures format-specific settings for linear barcodes and QR codes. +The **Advanced** tab configures format-specific settings for linear barcodes, QR codes, and Data Matrix codes. #### Advanced Barcode Settings @@ -74,6 +75,14 @@ The **Advanced** tab configures format-specific settings for linear barcodes and * **Level** (required) – The error correction level to use. Choose **L**, **M**, **Q**, or **H**, from lowest to highest correction. * **QR Size** (required) – The size of the QR code box, in pixels. In the Studio Pro preview, the maximum height is 200 pixels; the QR code renders at full size in your application. +#### Advanced Data Matrix Settings + +These properties are available when **Barcode Format** is set to **Data Matrix**: + +* **GS1 Data Matrix** – When enabled, encodes the value as a GS1 Data Matrix (FNC1 and Application Identifiers), used for pharmaceutical serialization. The value must use Application Identifier syntax, for example `(01)09501101020917(17)261231(10)ABC123`. +* **Symbol shape** (required) – The shape of the Data Matrix symbol. Choose **Square** or **Rectangle**. +* **Data Matrix size** (required) – The size of the Data Matrix symbol, in pixels. The minimum value is 32. In the Studio Pro preview, the maximum height is 200 pixels; the symbol renders at full size in your application. + #### Development * **Log Level** (required) – The level of logging when barcode generation fails. Choose **None** for no logging, **Info** to display a generic error message in the user interface, or **Debug** to log detailed information to the developer console. @@ -88,6 +97,7 @@ The **Display** tab configures the size and appearance of the rendered code. * **Code height** (required) – The height of the barcode, in pixels. In the Studio Pro preview, the maximum height is 200 pixels; the barcode renders at full height in your application. * **Margin size** (barcode, required) – The barcode margin, in pixels. * **Margin size** (QR, required) – The QR code margin, expressed as a number of module units (QR grid cells). Increasing the margin compresses the QR pattern within the fixed size. The margin is not visible in the preview. +* **Margin size** (Data Matrix, required) – The quiet zone around the Data Matrix symbol, expressed as a number of module units (Data Matrix cells). Increasing the margin compresses the symbol within the fixed size. Keep it at 1 or more for the code to stay scannable. The margin is not visible in the preview. * **Title** (required) – The title of the QR code, used for accessibility. * **Show title** – When enabled, displays the title on top of the QR code. * **Overlay image** (required) – When enabled, includes an image overlay on the QR code. Enabling this property reveals the following options: @@ -104,18 +114,18 @@ The **Display** tab configures the size and appearance of the rendered code. The widget supports the following formats: -| Linear | 2D | -| ---------- | ------- | -| CODE128 | QR Code | -| EAN-13 | | -| EAN-8 | | -| UPC | | -| CODE39 | | -| ITF-14 | | -| MSI | | -| Pharmacode | | -| Codabar | | -| CODE93 | | +| Linear | 2D | +| ---------- | ----------- | +| CODE128 | QR Code | +| EAN-13 | Data Matrix | +| EAN-8 | | +| UPC | | +| CODE39 | | +| ITF-14 | | +| MSI | | +| Pharmacode | | +| Codabar | | +| CODE93 | | Each format accepts a specific set of values: @@ -132,6 +142,7 @@ Each format accepts a specific set of values: | Codabar | Up to 20 characters: digits, A–D, and `- $ : / . +` | | CODE93 | Up to 47 characters | | QR Code | Up to 1200 characters | +| Data Matrix | Any text; with **GS1 Data Matrix** enabled, Application Identifier syntax | {{% alert color="info" %}} When a value does not match the requirements of the selected format, the widget does not render a code. Set the **Log Level** property to **Info** or **Debug** to surface the reason. diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/barcode-scanner.md b/content/en/docs/marketplace/platform-supported-content/widgets/barcode-scanner.md index 60b5573f4cb..8ba2df78896 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/barcode-scanner.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/barcode-scanner.md @@ -11,7 +11,7 @@ The [Barcode Scanner](https://marketplace.mendix.com/link/component/117627) widg The widget does the following: -* Displays a full-screen canvas overlay that allows the end-user to scan a barcode +* Displays the camera feed of the end-user's device so the end-user can scan a barcode * Supports QR codes and a wide range of different barcode types * Allows for additional styling customizations through Atlas UI @@ -27,25 +27,40 @@ The only requirement for the Barcode Scanner widget is that it needs to be place Make sure the length of this string attribute is long enough to store the barcode detection results for your use case, or the application will throw an error. If you are not sure about what length is required, then Mendix recommends setting the string attribute length to **Unlimited**. {{% /alert %}} -When the widget is placed on a page, it will automatically put a black canvas overlay on top of the entire page. This canvas will provide end-users with the ability to see their device's camera feed and scan barcodes if they allow the permission request from the application. +When the widget is placed on a page, it shows a black canvas with the size configured on the [Dimensions](#dimensions) tab. This canvas will provide end-users with the ability to see their device's camera feed and scan barcodes if they allow the permission request from the application. -### Data Source Tab +### General Tab -* **Barcode** (required) – the attribute of the data view object that will store the barcode detection result as a string +The **General** section has the following properties: -### Mask Tab +* **Scanned result** (required) – the string attribute of the data view object that will store the barcode detection result +* **Show barcode mask** (enabled by default) – determines whether a mask with a focus square is shown on top of the end-user's camera feed, as a specific target area for the barcode + * If this property is disabled, the entire widget area shows the end-user's camera feed +* **Use all barcode formats** (enabled by default) – determines whether the widget scans for all [supported barcode types](#supported-barcode-types) + * Disable this property to restrict scanning to specific formats and prevent incorrect scanning +* **Enabled barcode formats** – the list of barcode formats the scanner recognizes; for each item, select a **Barcode format** + * Configurable when **Use all barcode formats** is disabled -* **Show barcode mask** (enabled by default) – determines whether the black canvas overlay with a focus square is shown on top of the end-user's camera feed - * If this property is disabled, the entire screen will be the end-user's camera feed when the barcode scanner is open +The **Events** section has the following property, which provides control over situations where the end-user interacts with the widget: -### Events Tab +* **On detect action** – an optional action that is triggered when the widget successfully detects a barcode -These widget properties provide control over situations where the end-user interacts with the widget: +### Dimensions Tab {#dimensions} -* **On detect** – an optional event handler that is triggered when the widget detects a barcode -* **On close** – an optional nanoflow that is triggered once when the end-user closes the black canvas overlay of the widget +* **Width unit** – determines the unit of the width: **Percentage** (portion of the parent size, default) or **Pixels** (absolute amount of pixels) +* **Width** – the width of the widget + * Default: **100** +* **Height unit** – determines the unit of the height: **Percentage of width** (default), **Pixels**, or **Percentage of parent** +* **Height** – the height of the widget + * Default: **75** -## Supported Barcode Types +### Advanced Tab + +* **Detection logic** – determines the detection logic used for barcode scanning + * **BarcodeDetector API (experimental fast scan, fallback to ZXing)** (default) – uses the native BarcodeDetector API of the browser when it is available, and the ZXing library otherwise + * **ZXing** – always uses the ZXing library + +## Supported Barcode Types {#supported-barcode-types} | 1D Product | 1D Industrial | 2D | | ---------- | ------------------- | -------------- | diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/carousel.md b/content/en/docs/marketplace/platform-supported-content/widgets/carousel.md index 55d4cf94c2d..de4b6117217 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/carousel.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/carousel.md @@ -17,6 +17,7 @@ The [Carousel](https://marketplace.mendix.com/link/component/47784/) widget disp * Set the timeouts between each slide * Use the infinite loop to scroll through slides endlessly * Add animation when slides are switched +* Show several slides at the same time and slide them in groups ## Usage @@ -34,6 +35,7 @@ The following sections will describe the different available widget properties a ### General tab * **Data source** – see [Data source](/refguide/data-sources/) documentation for more details +* **Content** – the widgets displayed in each slide, one slide per item in the data source ### Display @@ -41,14 +43,20 @@ The following sections will describe the different available widget properties a * Default: **Yes** * **Navigation controls** – shows arrows on the left and right side * Default: **Yes** -* **Autoplay** – allows images to start sliding automatically when the widget is ready - * Default: **Yes** -* **Delay** – creates a time interval between one item cycling to the next - * Default: **1000ms** +* **Auto play** – allows images to start sliding automatically when the widget is ready + * Default: **No** +* **Delay** – creates a time interval between one item cycling to the next, in milliseconds + * Default: **1000** + * Configurable when **Auto play** is set to **Yes** * **Infinite loop** – cycles between images endlessly * Default: **Yes** +* **Slides per view** – the number of slides visible at the same time in the carousel + * Default: **1** +* **Slides per group** – the number of slides that move together when the end-user navigates to the next or previous slide; useful when **Slides per view** is greater than 1 + * Default: **1** * **Animation** – adds a fade animation on each cycle * Default: **Yes** + * Configurable only when **Slides per view** and **Slides per group** are both set to **1**; when more than one slide is shown or grouped, slides align to the start of the carousel and the fade animation is turned off ### Events diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/charts/_index.md b/content/en/docs/marketplace/platform-supported-content/widgets/charts/_index.md index bb3aa4cac96..d1939b77de2 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/charts/_index.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/charts/_index.md @@ -21,8 +21,8 @@ For more examples of what Charts widgets can do, see the following documents: * [Use the Charts Theme](/appstore/widgets/charts-theme/) * [Create a Multiple Series Chart](/appstore/widgets/charts-dynamic-series/) * [Use a Chart with a REST Data Source](/appstore/widgets/charts-basic-rest/) -* [Chart Playground](/appstore/widgets/chart-specific-settings/) -* [Chart-Specific Settings](/appstore/widgets/chart-playground/) +* [Chart Playground](/appstore/widgets/chart-playground/) +* [Chart-Specific Settings](/appstore/widgets/chart-specific-settings/) {{% alert color="info" %}} This document assumes that you are using Charts widget v3.0.0 or above. To read documentation for older versions, see the [Legacy Chart Widget Documentation](#legacy-widget-docs) section below. diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-bubble-chart.md b/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-bubble-chart.md index d4cb1e79a07..1635f08e035 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-bubble-chart.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-bubble-chart.md @@ -11,6 +11,8 @@ A bubble chart shows one or more series as bubbles. The size of each bubble is s For the properties that all series-based charts share, such as the **Series** list, **Dimensions**, and **Advanced** settings, see [Common Chart Properties](/appstore/widgets/charts/#common-properties). This page describes the properties that are specific to the bubble chart. +In the bubble chart properties, the list of series is called **Data source** instead of **Series**. + ## General Tab In addition to the [common series properties](/appstore/widgets/charts/#series-general), the **General** tab has these properties: diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-heat-map.md b/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-heat-map.md index b33cfabf17a..23200ea8d0e 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-heat-map.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-heat-map.md @@ -30,7 +30,7 @@ The heat map does not use a series list. It uses one data source and draws a val ## General Section -* **Show Scale** – If set to **Yes**, a color scale is shown on the right side of the chart. +* **Show Scale** – If set to **Yes**, a color scale is shown on the right side of the chart. The properties on the **Scale** tab are visible only when this property is set to **Yes**. The heat map also has the **X axis label**, **Y axis label**, and **Grid lines** properties described in [General Section](/appstore/widgets/charts/#general). It does not have the **Show legend** property. @@ -41,13 +41,17 @@ The heat map also has the **X axis label**, **Y axis label**, and **Grid lines** * **Show values** – If set to **Yes**, the value of each cell is shown on the chart. * **Font value color** – The font color of the values shown on the chart. -**Smooth color**, **Show values**, and **Font value color** are visible only when [Enable advanced options](/appstore/widgets/charts/#enable-advanced-options) is set to **Yes**. +**Colors** is visible only when **Show Scale** is set to **Yes**. **Smooth color** and **Show values** are visible only when **Show Scale** and [Enable Advanced Options](/appstore/widgets/charts/#enable-advanced-options) are both set to **Yes**. **Font value color** is also visible only when **Show values** is set to **Yes**. ## Events Section * **On click action** – The action that runs when the user clicks a cell. * **Tooltip hover text** – The text template for the message shown when the user hovers over a cell. +## Advanced Section + +In addition to the common [Advanced](/appstore/widgets/charts/#advanced) properties, the **Advanced** tab of the heat map has a **Custom series options** property. It holds a JSON object with advanced configuration for the heat map series. For more information, see [Custom Series Settings](/appstore/widgets/charts/#custom-series-settings). This property is visible only when **Enable Advanced Options** is set to **Yes**. + ## Read More * [Charts](/appstore/widgets/charts/) diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-pie-chart.md b/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-pie-chart.md index c61ae2fea93..621d3279ced 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-pie-chart.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-pie-chart.md @@ -53,6 +53,10 @@ The pie chart also has the **Show legend** property described in [General Sectio * **On click action** – The action that runs when the user clicks a slice. +## Advanced Section + +In addition to the common [Advanced](/appstore/widgets/charts/#advanced) properties, the **Advanced** tab of the pie chart has a **Custom series options** property. It holds a JSON object with advanced configuration for the pie chart series. For more information, see [Custom Series Settings](/appstore/widgets/charts/#custom-series-settings). This property is visible only when [Enable advanced options](/appstore/widgets/charts/#enable-advanced-options) is set to **Yes**. + ## Read More * [Charts](/appstore/widgets/charts/) diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-time-series.md b/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-time-series.md index da87dc3cf80..70f5584ae0a 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-time-series.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/charts/chart-specific-settings/charts-time-series.md @@ -25,7 +25,7 @@ If set to **Yes**, an additional range control is shown at the bottom of the cha ### Y-Axis Range Mode -This property controls the range of the Y axis: +This property controls the range of the Y axis. It is visible only when [Enable advanced options](/appstore/widgets/charts/#enable-advanced-options) is set to **Yes**. * **Auto** – The range is based on the plotted values. * **From zero** – The Y axis starts from zero. This is the default value. diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/charts/charts-custom-usage.md b/content/en/docs/marketplace/platform-supported-content/widgets/charts/charts-custom-usage.md index cbeb60abcd2..8fa0bf46a84 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/charts/charts-custom-usage.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/charts/charts-custom-usage.md @@ -34,10 +34,12 @@ Before starting this how-to, make sure you have the following prerequisites: A **Custom Chart** widget can be configured with a JSON **Data** array and **Layout** object. The configuration can be set statically, via the **Source attribute** or with the **Sample data**. -The configuration in the **Source attribute** is merged into the static settings and overwrites any common properties. The **Sample data** is for demo purposes: it is used in the Studio Pro preview, and at runtime when no **Source attribute** is selected. +The configuration in the **Source attribute** is merged into the static settings and overwrites any common properties. The **Sample data** is for demo purposes: it is used in the Studio Pro preview, and at runtime when no **Source attribute** is selected or the attribute is empty. Data traces are merged by their position in the array. The first trace in the **Source attribute** is merged with the first trace in **Static**, the second with the second, and so on. When both have a value for the same property, the value from the **Source attribute** wins. +If both traces at the same position contain the same data property, such as `x`, `y`, `z`, `values`, or `labels`, they are not merged. Instead, the chart shows them as two separate traces. To merge a trace, keep only styling properties, such as `type` or `marker`, in one of the two traces. + {{% alert color="info" %}} In Charts versions below 6.3.0, the traces from the **Source attribute** were added after the **Static** traces as separate traces, instead of being merged by position. {{% /alert %}} @@ -111,14 +113,14 @@ In the Studio Pro page editor, the chart renders the **Static** and **Sample** d * **Static** – A JSON array of traces. For the available options, see the [JavaScript Figure Reference](https://plotly.com/javascript/reference/) in the Plotly documentation. * **Source attribute** – A string attribute that contains a JSON array of traces. These traces are merged with the **Static** data by position, as described in [Chart Structure](#chart-structure). -* **Sample data** – A JSON array of traces used for the preview in Studio Pro, and at runtime when no **Source attribute** is selected. It is merged with the **Static** data. +* **Sample data** – A JSON array of traces used for the preview in Studio Pro, and at runtime when no **Source attribute** is selected or the attribute is empty. It is merged with the **Static** data. * **Show playground slot** – If set to **Yes**, the chart shows a **Playground slot** for a [Chart playground](/appstore/widgets/chart-playground/) widget. ### Layout Options Tab * **Static** – A JSON object with the layout of the chart. For the available options, see [Layout](https://plotly.com/javascript/reference/layout/) in the Plotly documentation. * **Source attribute** – A string attribute that contains a JSON layout object. It is merged with the **Static** layout and overwrites it. -* **Sample layout** – A JSON layout object used for the preview in Studio Pro, and at runtime when no **Source attribute** is selected. It is merged with the **Static** layout. +* **Sample layout** – A JSON layout object used for the preview in Studio Pro, and at runtime when no **Source attribute** is selected or the attribute is empty. It is merged with the **Static** layout. ### Configuration Options Tab @@ -144,7 +146,7 @@ When **Height unit** is set to **Auto**, these properties are also available: ### Events Tab * **On click** – The action that runs when the user clicks a part of the chart. -* **Event data attribute** – A string attribute in which the chart stores the raw Plotly event data when the user clicks the chart. You can use this attribute in the **On click** action to read which part of the chart was clicked. For the format of the data, see [Event Data](https://plotly.com/javascript/plotlyjs-events/#event-data) in the Plotly documentation: +* **Event data attribute** – A string attribute in which the chart stores data about the clicked point when the user clicks the chart. You can use this attribute in the **On click** action to read which part of the chart was clicked. The value is a JSON object with these properties of the first clicked point: `curveNumber`, `pointNumber`, `pointIndex`, `x`, `y`, `z`, `lat`, `lon`, `location`, and `pointNumbers`. Properties that do not apply to the chart type are left out. For the meaning of these properties, see [Event Data](https://plotly.com/javascript/plotlyjs-events/#event-data) in the Plotly documentation: {{< figure src="/attachments/appstore/platform-supported-content/widgets/charts/charts-tutorials/charts-any-usage/custom-chart-events-attribute.png" alt="On click action that uses the event data attribute" class="no-border" >}} diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/color-picker.md b/content/en/docs/marketplace/platform-supported-content/widgets/color-picker.md index 6ff45af23ea..412f3dc65cc 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/color-picker.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/color-picker.md @@ -29,18 +29,14 @@ To configure this widget, follow these steps: ### Data source Tab -**Data source** (required) – a String attribute containing a valid color in hex, RGB or RGBA color formats +**Color attribute** (required) – a String attribute containing a valid color in hex, RGB, or RGBA color formats; non-color formats such as `red` are not supported ### General Tab * **Enable advanced options** * **Yes** – if selected, the following advanced options become available: - * **Display mode** – determines how Color Picker is displayed in your app - * **Button** (default) – a button is displayed - * **Input** – a button is displayed with a text box that shows the color in the selected format - * **Inline** – a spectrum color picker is displayed - * **Picker type** – select one of the following available pickers from the [React Color](https://casesandberg.github.io/react-color/) library: + * **Picker type** (default: **Sketch**) – select one of the following available pickers from the [React Color](https://casesandberg.github.io/react-color/) library: * **Block** * **Chrome** * **Circle** @@ -52,11 +48,11 @@ To configure this widget, follow these steps: * **Slider** * **Swatches** * **Twitter** - * **Color format** – defines which color format to use - * **HEX** + * **Color format** – defines which color format the selected color is saved in + * **HEX** (default) * **RGB** * **RGBA** - * **Default colors** – defines a list of pre-defined colours used with the color picker + * **Default colors** – defines a list of pre-defined colors used with the color picker {{% alert color="info" %}}The **Default colors** property is only available if the **Picker type** property is set to **Block**, **Sketch**, **Circle**, **Compact**, or **Twitter**.{{% /alert %}} @@ -68,7 +64,14 @@ To configure this widget, follow these steps: * **Move down** – moves down the selected default color * **Color** – the list of the existing default colors * **No** (default) – if selected, the advanced options are disabled. -* **Invalid format message** – defines the message that is shown when the user provides a wrong input +* **Display mode** – determines how Color Picker is displayed in your app + * **Button** (default) – a button is displayed + * **Input box** – a button is displayed with a text box that shows the color in the selected format + * **Inline** – a spectrum color picker is displayed +* **Invalid format message** – defines the message that is shown when the user provides a wrong input; `:colors:` in the message is replaced by a sample format (default: "Invalid format, color value should be of format like :colors:") + + {{% alert color="info" %}}The **Invalid format message** property is not available if **Display mode** is set to **Inline**.{{% /alert %}} + * **Show label** * **Yes** – if selected, you can define the label caption * **Label caption** – defines the label caption of the widget that is displayed on the page @@ -78,7 +81,7 @@ To configure this widget, follow these steps: **On change** – executes an action when the attribute value changes -### Edibility Tab {#editability-tab} +### Editability Tab {#editability-tab} For more information, see [Editability Section](/refguide/common-widget-properties/#editability) in *Properties Common in the Page Editor*. diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/combobox.md b/content/en/docs/marketplace/platform-supported-content/widgets/combobox.md index 59826ddeb31..7d9ee0351e9 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/combobox.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/combobox.md @@ -65,17 +65,26 @@ When Context source is selected, the **Data source** section (required) configur ##### Database List {#database} -The database source type can be used to set the value of a string or integer attribute with options fetched from an attribute with the same type. +The database source type can be used to set the value of a String, Integer, Long, or Enumeration attribute with options fetched from an attribute with the same type. +* **Selectable objects** – Sets the data source that provides the options. * **Selection type** (available in 2.0 and above) – Determines how other [listen to widget](/refguide/listen-to-grid-source/) data sources perceive the data. This property can only be used with widgets using a [database data source](/refguide/database-source/). * **Single** – Allows only a single item to be selected from the options list. * **Multi** – Allows multiple items to be selected from the options list. -* **Caption** – Allows custom captions to be displayed on the options list. -* **Store value** (optional) – Determines where the selected value will be saved into. +* **Caption** – Allows custom captions to be displayed on the options list. Set **Caption type** to **Attribute** (default) or **Expression**, and then set the **Caption**. +* **Store value** (optional) – Determines where the selected value will be saved into. These properties are only available when **Selection type** is set to **Single**. + * **Target** – The String, Integer, Long, or Enumeration attribute that receives the selected value. + * **Value** – The attribute of the selectable objects whose value is stored in **Target**. This property is available when **Target** is set. ##### Static Values {#static} -The static source type can be used to set the value of a string attribute with manually configured values. +The static source type can be used to set the value of a String, Enumeration, Integer, Long, Boolean, Date and time, or Decimal attribute with manually configured values. + +* **Attribute** – The attribute that receives the selected value. +* **Values** – The list of options. Each item has the following properties: + * **Value** – The expression that sets the value to be stored in the attribute. + * **Caption** – The caption to be shown for the option. + * **Custom content** – The widgets to be shown for the option, when **Custom content** in the **General** section is not set to **No**. #### General Tab @@ -83,9 +92,12 @@ The **General** section allows you to configure general behavior and captions fo * **Placeholder text** – Captions that will be displayed when there is no data being selected * **No options text** – Captions that will be used when filter results are empty, or shown when there is no data displayed in the combo box's options -* **Clearable** – If enabled, this allows selected data to be cleared all at once +* **Clearable** (default: **Yes**) – If enabled, this allows selected data to be cleared all at once * **Custom content** – Allows custom widgets to be displayed in the combo box instead of normal text values -* **Show footer** – If enabled, this allows custom widgets to be placed in a combo box's footer (as shown below). For example, you can include a link, button, or image in the footer. A popular choice is including a "new item" button in the footer: + * **Yes** – Custom content is shown both in the options list and for the selected value. + * **List items only** – Custom content is shown in the options list, and the selected value is shown as its caption. + * **No** (default) – Captions are shown as text. +* **Show footer** (default: **No**) – If enabled, this allows custom widgets to be placed in a combo box's footer (as shown below). For example, you can include a link, button, or image in the footer. A popular choice is including a "new item" button in the footer: {{< figure src="/attachments/appstore/platform-supported-content/widgets/combobox/show-footer.png" alt="Shows a footer which can house custom widgets." class="no-border" >}} @@ -93,19 +105,23 @@ The **General** section allows you to configure general behavior and captions fo The **Multi selection (reference set)** section allows you to configure combo box behavior for reference set type datasource. The following configurations are available: -* **Selection Method** – Configures the behavior for selecting options. - * **Checkbox** – Displays a checkbox on the left side of each option. Selected items will be marked by check marks. +* **Selection method** – Configures the behavior for selecting options. + * **Checkbox** (default) – Displays a checkbox on the left side of each option. Selected items will be marked by check marks. * **Row click** – Each selected item will be filtered out from the displayed options. Items can deselected by clicking the {{% icon name="remove" %}} on each of the displayed selected items. -* **Show selected item as** – Allows you to display selected items as labels with {{% icon name="remove" %}} buttons which allow those items to be deselected (shown at the top of this screenshot), or display selected items as simple comma-separated text (shown at the bottom): +* **Show selected items as** – Allows you to display selected items as labels with {{% icon name="remove" %}} buttons which allow those items to be deselected (shown at the top of this screenshot), or display selected items as simple comma-separated text (shown at the bottom): {{< figure src="/attachments/appstore/platform-supported-content/widgets/combobox/combobox-showselected.png" alt="Show selected item as list or labels examples" class="no-border" >}} - {{% alert color="info" %}}The **Show selected item as** property is only available for the **Checkbox** selection method without custom content.{{% /alert %}} + {{% alert color="info" %}}The **Show selected items as** property (options: **Text** (default) and **Labels**) is only available for the **Checkbox** selection method without custom content.{{% /alert %}} -* **Show Select All** – Allows you can choose to enable a "Show select all" button that will be displayed on the top of the options list. It allows the end-user to click it and select or deselect all options at once: +* **Show select all** (default: **No**) – Allows you to enable a select all button that will be displayed on the top of the options list. It allows the end-user to click it and select or deselect all options at once. The button is disabled when no options are available: {{< figure src="/attachments/appstore/platform-supported-content/widgets/combobox/select-all.png" alt="Show select or unselect button header" class="no-border" >}} +* **Caption for select all** (default: *Select all*) – Sets the caption of the select all button. This property is available when **Show select all** is set to **Yes**. + +The properties in this section are only available when **Source** is set to **Context** and **Type** is set to **Association**. + #### Label The **Label** section allows you to display labels for the combo box. @@ -118,14 +134,29 @@ For more information, see [Visibility Section](/refguide/common-widget-propertie For more information, see [Editability Section](/refguide/common-widget-properties/#editability) in *Properties Common in the Page Editor*. +When the database source type is used without a **Target** attribute, the widget shows its own **Editable** property instead: + +* **Default** (default) – The combo box is editable. +* **Never** – The combo box is always read-only. +* **Conditionally** – The combo box is editable when the **Condition** expression returns true. + +{{% alert color="warning" %}} +In combo box version 2.9.0, an issue was fixed where the **Condition** expression was inverted. If you worked around this issue by inverting your expression, remove that workaround after upgrading. +{{% /alert %}} + +* **Read-only style** – Determines how the combo box appears in read-only mode. + * **Control** – Shows the combo box control in a read-only state. + * **Content only** (default) – Shows only the selected value. + ### Events Tab {#events} The following configurations are available: -* **On change** – Executes an action when the attribute value changes. -* **On enter action** – Executes an action when the user sets focus on the widget. -* **On leave action** – Executes an action when the user moves focus away from the widget. -* **On filter input change** – Executes an action when the filter input value changes. +* **On change** – Executes an action when the attribute value changes. For the database source type, this property is only available when a **Target** attribute is set, and the action runs only when the selection changes (available in combo box version 2.8.0 and above). +* **On selection** – Executes an action when the selection of the widget changes or initializes. This property is only available for the database source type. In combo box versions below 2.8.0, this action was called **On change**. +* **On enter** – Executes an action when the user sets focus on the widget. +* **On leave** – Executes an action when the user moves focus away from the widget. +* **On filter input change** – Executes an action when the filter input value changes. The current filter text is passed to the action in the **Filter Input** String variable. ### Accessibility Tab {#accessibility} @@ -138,8 +169,8 @@ The **Accessibility** tab allows you to configure settings for combo box accessi * **Clear selection button** (default: *Clear selection*) – This clears all selected values. * **Remove value button** (default: *Remove value*) – This removes individual selected values when using labels with multi-selection. * **Accessibility status message**: - * **Selected value** (default: *Selected value*) – This sets the text announced before the currently selected values, for example, "Selected value: Avocado, Apple, Banana." The widget appends the selected values automatically, so you do not need to calculate them. - * **Options available** (default:Number of options available)– This sets the text announced before the number of options currently available in the options menu, for example, "Number of options available: 1". The widget appends the number automatically, so you do not need to calculate it. + * **Selected value** (default: *Selected value:*) – This sets the text announced before the currently selected values, for example, "Selected value: Avocado, Apple, Banana." The widget appends the selected values automatically, so you do not need to calculate them. + * **Options available** (default: *Number of options available:*) – This sets the text announced before the number of options currently available in the options menu, for example, "Number of options available: 1". The widget appends the number automatically, so you do not need to calculate it. * **Instructions** (default: *Use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.*) – This sets the instructions to be read out after announcing the accessibility status. ### Advanced Tab {#advanced} @@ -147,12 +178,12 @@ The **Accessibility** tab allows you to configure settings for combo box accessi The **Advanced** tab allows you to configure settings for features that is beyond the normal configurations. * **Performance:** - * **Lazy loading** – This allows the user to configure when to load the combo box's options data. Set it to **yes** to ensure that the data is not loaded until the user opens the options menu. - * **Loading type** – This allows the user to configure the loading animation of a combo box. + * **Lazy loading** (default: **Yes**) – This allows the user to configure when to load the combo box's options data. Set it to **Yes** to ensure that the data is not loaded until the user opens the options menu. This property is not available for the enumeration, Boolean, and static source types, or when **Caption type** is set to **Expression**. + * **Loading type** – This allows the user to configure the loading animation of a combo box: **Spinner** (default) or **Skeleton**. This property is available when **Lazy loading** is set to **Yes**. * **Multiple selection:** * **Selected items sorting** – This governs how items are sorted: * **Caption** – This sorts the selected items alphabetically by their caption. - * **Default** – This does not sort the selected items. + * **Default** (default) – This does not sort the selected items. * **Filter** * **Filter type:** * **Contains (fuzzy)** (default) – This shows options whose captions contain the typed characters in the same order, even if they are not next to each other. When lazy loading is on and the options come from an association or a database, the data source filters the options instead, and **Contains (fuzzy)** works like **Contains (exact)**. @@ -195,6 +226,11 @@ For more information, see [Common Section](/refguide/common-widget-properties/#c {{% snippet file="/static/_includes/refguide/design-section-link.md" %}} +[Atlas Core](https://marketplace.mendix.com/link/component/117187) provides the following design properties for the combo box: + +* **Hide background** – Removes the background of the combo box input (adds the `hide-bg` class). +* **Color** – Sets the text color of the combo box: **Header color**, **Detail color**, **Brand Primary**, **Default**, **Brand Success**, **Brand Warning**, **Brand Danger**, or **Contrast**. + ### Common Section {#common-styling} {{% snippet file="/static/_includes/refguide/common-section-link.md" %}} @@ -205,4 +241,4 @@ For more information, see [Common Section](/refguide/common-widget-properties/#c When using a combo box inside a data view, the widget relies on a store value attribute to determine its editable state. If no store value attribute is configured, the **Editability** setting of the data view (set to **Never** or **Conditionally**) will not be applied to the combo box. This occurs because, without a target attribute, the combo box has no reference for whether it should be editable. -* **Workaround** – To ensure correct behavior, copy and paste the **Editability** setting from the data view directly into each combo box individually. +* **Workaround** – To ensure correct behavior, set the combo box's own **Editable** property (see [Editability](#editability)) to match the **Editability** setting of the data view. diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/document-viewer.md b/content/en/docs/marketplace/platform-supported-content/widgets/document-viewer.md index 19b44ae1197..d07238f4574 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/document-viewer.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/document-viewer.md @@ -22,6 +22,14 @@ Supported file types: * **Images** * All image file types, such as but not limited to JPEG, PNG, GIF, BMP, TIFF, and WebP. +The viewer has a toolbar with the following controls: + +* **Download** – downloads the file +* **Zoom in**, **Zoom out**, and **Fit to width** – change the zoom level of the document +* For PDF files only: + * **Go to previous page** and **Go to next page** – move between pages; you can also type a page number to go to that page + * **Search in document** – searches the text of the PDF, highlights the matches, and moves between matches across pages with **Previous match** and **Next match**; the search is not case-sensitive + ## Configuration To configure this widget, follow these steps: @@ -40,18 +48,18 @@ To configure this widget, follow these steps: These are the dimension configurations for document viewer: -* **Width** – Determines the width size for the document viewer. The developer can choose to use either pixels (px), percentage (%), or **Fit to content**. -* **Height** – Determine the height size for the document viewer. The developer can choose to use either pixels (px), percentage (%), or **Viewport** (vp). Choosing setting to **Auto** will allow the developer to set minimum and maximum heights instead. -* **Minimum Height** – Determines the minimum size for the custom charts container. -* **Maximum Height** – Determines the maximum size for the custom charts container. -* **Vertical Overflow** – If maximum height is set, vertical overflow will determine the widget's behavior to show overflowing content if that content exceeded the maximum height allowed. +* **Width unit** and **Width** – Determines the width size for the document viewer. The developer can choose to use either **Pixels** (px), **Percentage** (%), or **Fit to content** (default). **Width** (default: 100) is not used with **Fit to content**. +* **Height unit** and **Height** – Determine the height size for the document viewer. The developer can choose to use either **Pixels** (px), **Percentage** (%) of the parent, or **Viewport** (vp), and set the value in **Height** (default: 250). Choosing **Auto** (default) will allow the developer to set minimum and maximum heights instead. +* **Minimum height unit** and **Minimum height** – Determines the minimum size for the document viewer when **Height unit** is **Auto**. The options are **None** (default), **Pixels**, **Percentage**, and **Viewport**. **Minimum height** defaults to 250. +* **Maximum height unit** and **Maximum height** – Determines the maximum size for the document viewer when **Height unit** is **Auto**. The options are **None** (default), **Pixels**, **Percentage**, and **Viewport**. **Maximum height** defaults to 250. +* **Vertical overflow** – If maximum height is set, vertical overflow will determine the widget's behavior to show overflowing content if that content exceeded the maximum height allowed. The options are **Auto** (default), **Scroll**, and **Hidden**. ## Advanced {#advanced} The **Advanced** tab allows you to configure settings for features beyond the normal configurations: * **PDF.js worker URL** – Configures the path for PDF.js worker script. This worker script is needed to render PDF type document using a [PDF.js](https://github.com/mozilla/pdf.js?tab=readme-ov-file#including-via-a-cdn) library. - * If left empty, the document viewer widget will retrieve PDF.js from CDN `http://unpkg.com/pdfjs-dist@4.8.69/build/pdf.worker.min.mjs`. + * If left empty, the document viewer widget will retrieve the PDF.js worker from the unpkg CDN, using the PDF.js version bundled with the widget: `//unpkg.com/pdfjs-dist@/build/pdf.worker.min.mjs` (for example, version 5.4.296 for Document Viewer version 1.3.0). * Alternatively, users can grab `pdf.worker.mjs` from `{LOCAL DEV PROJECT FOLDER HERE}/deployment/web/widgets/com/mendix/shared/pdfjs/pdf.worker.mjs`, put it into their own `App Module -> Styling/web/js/pdf.worker.mjs` file, and then set `./js/pdf.worker.mjs` as the worker URL configuration. This is the recommended practice to support [CSP](/howto/security/csp/). ### Common Tab diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/events.md b/content/en/docs/marketplace/platform-supported-content/widgets/events.md index 4ff2e898c36..2be5e2f46bf 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/events.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/events.md @@ -38,9 +38,13 @@ Some common usage examples: Property configurations: * **Action** – Specifies the selected action that will be executed. -* **Delay** – Puts a timer delay on the first executed action. The value is in milliseconds. Setting it to **0** will execute the action immediately. -* **Repeat** – Selecting **Yes** will repeat the event execution based on the repeat delay timer. - * **Delay** – Time interval between repeated action executions. The value is in milliseconds. +* **Parameter type** – Determines whether **Delay** is set as a fixed **Value** (default) or as an **Expression** that returns an Integer. +* **Delay** – Puts a timer delay on the first executed action. The value is in milliseconds. Setting it to **0** (default) will execute the action immediately. +* **Repeat** – Selecting **Yes** will repeat the event execution based on the repeat interval timer. The default is **No**. + * **Parameter type** – Determines whether **Interval** is set as a fixed **Value** (default) or as an **Expression** that returns an Integer. + * **Interval** – Time interval between repeated action executions. The value is in milliseconds. The default is **30000**. + +When **Repeat** is enabled, the next execution does not start if the previous execution has not finished yet. #### On Change @@ -50,4 +54,5 @@ Property configurations: * **Attribute** - Specifies the attribute that will be listened into. The **action** will be executed when this attribute value changed. * **Action** - Specifies the **action** that will be executed. -* **Delay** - Adds a timer delay to the first executed event. The value is in milliseconds. Setting it to **0** will execute the action immediately. +* **Parameter type** - Determines whether **Delay** is set as a fixed **Value** (default) or as an **Expression** that returns an Integer. +* **Delay** - Adds a timer delay to the first executed event. The value is in milliseconds. Setting it to **0** (default) will execute the action immediately. diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/htmlelement.md b/content/en/docs/marketplace/platform-supported-content/widgets/htmlelement.md index 94fd03a9423..d55181a416f 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/htmlelement.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/htmlelement.md @@ -17,19 +17,19 @@ Almost any arbitrary custom HTML configuration can be used with HTML Element. He * Embedded video: - {{< figure src="/attachments/appstore/platform-supported-content/widgets/htmlelement/sample-embedded-html.png" class="no-border" >}} + {{< figure src="/attachments/appstore/platform-supported-content/widgets/htmlelement/sample-embedded-html.png" alt="HTML Element widget showing an embedded video" class="no-border" >}} * Text formatting: - {{< figure src="/attachments/appstore/platform-supported-content/widgets/htmlelement/sample-formatting-text.png" class="no-border" >}} + {{< figure src="/attachments/appstore/platform-supported-content/widgets/htmlelement/sample-formatting-text.png" alt="HTML Element widget showing formatted text" class="no-border" >}} * Building a custom UI component: - {{< figure src="/attachments/appstore/platform-supported-content/widgets/htmlelement/sample-custom-ui.png" class="no-border" >}} + {{< figure src="/attachments/appstore/platform-supported-content/widgets/htmlelement/sample-custom-ui.png" alt="HTML Element widget showing a custom UI component" class="no-border" >}} * Custom-tailored HTML: - {{< figure src="/attachments/appstore/platform-supported-content/widgets/htmlelement/sample-tailored-html.png" class="no-border" >}} + {{< figure src="/attachments/appstore/platform-supported-content/widgets/htmlelement/sample-tailored-html.png" alt="HTML Element widget showing custom-tailored HTML" class="no-border" >}} ## Configuration @@ -44,19 +44,26 @@ To configure this widget, follow these steps: #### HTML Element Section * **Tag name** – Sets the type of the element (such as div, span, or img). If you would like to add a custom name for the element, select **Use custom name** in the drop-down menu. +* **Custom tag** (Visible if **Tag name** is set to **Use custom name**) – The name of the custom element. The `script` tag is not supported. + * Default: **div** * **Repeat element** * **Yes** – If selected, repeats the element for each item in the data source assigned. * **No** (default) – If selected, the element is rendered once. -* **Content** +* **Data source** (Visible if **Repeat element** is set to **Yes**) – The data source that provides the items for which the element is repeated. +* **Content** – Not available for void elements that cannot have children, such as `img`. * **Container for widgets** (default) – If selected, the widget acts as a container for other widgets. * **HTML** – If selected, uses custom HTML markup as defined in the HTML settings. -* **HTML** (Visible if **Content** option is set to **HTML**) – Can be either an expression or a text template. This defines custom HTML markup for the widget, therefore the value should be valid HTML as it will be inserted as HTML element content. +* **HTML** (Visible if **Content** option is set to **HTML**) – A text template that defines custom HTML markup for the widget, therefore the value should be valid HTML as it will be inserted as HTML element content. +* **Content** (Visible if **Content** option is set to **Container for widgets**) – The widgets placed inside the element. #### HTML Attributes Section -* **Attributes** – sets the attributes to be assigned into the HTML element. +* **Attributes** – sets the attributes to be assigned into the HTML element, for example `title` or `href`. If `class` or `style` is added as an attribute, it is merged with the widget's **Class** or **Style** property. For events such as `onClick`, use the [Events](#events-tab) tab. Each attribute has the following properties: + * **Name** – The name of the attribute. Each attribute name must be unique. + * **Value based on** – Determines whether the value is an **Expression** (default) or a **Text template**. + * **Value** – The value of the attribute. -### Events Tab +### Events Tab {#events-tab} Sets the events for the created HTML element. diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/image-cropper.md b/content/en/docs/marketplace/platform-supported-content/widgets/image-cropper.md index fc06cb8b61b..0443e82d582 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/image-cropper.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/image-cropper.md @@ -65,6 +65,9 @@ The **Crop area** section is used to configure the shape and proportions of the * **Custom aspect height** (default **1**) – The height side of the ratio (for example, *2* in 3:2). * Configurable when **Aspect ratio** is set to **Custom**. * When either the custom width or custom height is not greater than *0*, the selection falls back to a free-form shape. +* **Initial crop size (%)** (default **80**) – Sets the size of the crop box when it first appears and after a reset. + * The value is a percentage (1–100) of the largest box that fits the image at the selected aspect ratio. + * The crop box is centered. A value of *100* makes the crop box as large as possible. {{< figure src="/attachments/appstore/platform-supported-content/widgets/image-cropper/image-cropper-circle-demo.gif" alt="Cropping an image with a circular crop shape" class="no-border" >}} @@ -130,6 +133,27 @@ The **Zoom** section is used to configure how the end-user zooms the image. It i * A value of *4* means the image can be zoomed up to four times the canvas size. * This value must be greater than **Minimum zoom**. +### Accessibility Tab {#accessibility} + +#### Toolbar Captions Section + +The **Toolbar captions** section is used to configure the visible texts of the widget. It includes the following properties: + +* **Grayscale caption** (default **Grayscale**) – The visible text and tooltip for the grayscale toggle. +* **Reset caption** (default **Reset**) – The visible text and tooltip for the reset button. +* **Zoom caption** (default **Zoom**) – The visible label for the zoom slider. +* **No image message** (default **No uploaded image to crop**) – The message shown when no image is bound to the image attribute. + +#### Aria Labels Section + +The **Aria labels** section is used to configure the accessible names that screen readers announce. It includes the following properties: + +* **Rotate left** (default **Rotate left**) – The accessible name and tooltip for the rotate-left button. +* **Rotate right** (default **Rotate right**) – The accessible name and tooltip for the rotate-right button. +* **Grayscale** (default **Grayscale**) – The accessible name for the grayscale toggle. +* **Reset** (default **Reset crop**) – The accessible name for the reset button. +* **Zoom** (default **Zoom**) – The accessible name for the zoom slider. + ### Output Tab {#output} #### Output Section @@ -148,7 +172,7 @@ The **Output** section is used to configure the format and resolution of the sav ## Usage -When the widget loads, it shows the image bound to the **Image attribute** with a default crop box centered on the image and covering 80% of it at the configured aspect ratio. If no image is available, the widget shows a **No image** message. +When the widget loads, it shows the image bound to the **Image attribute** with a crop box centered on the image. The crop box covers the percentage set in **Initial crop size (%)** of the largest box that fits the image at the configured aspect ratio. If no image is available, the widget shows the **No image message**. The end-user edits the image as follows: diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/image.md b/content/en/docs/marketplace/platform-supported-content/widgets/image.md index ed59dc640d2..ca668076f2d 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/image.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/image.md @@ -45,6 +45,10 @@ The **Data source** section (required) is used to configure the data for the wid * **Icon** – used to retrieve a static icon or image for the widget * Configurable when **Image type** is set to **Icon** * **Background image** – used to render an image as a background + * When set to **Yes**, more content can be placed inside the image with the **Place content here** property, and design properties have no effect + * Not available when **Image type** is set to **Icon** +* **Place content here** – the widgets displayed on top of the background image + * Configurable when **Background image** is set to **Yes** #### Events Section @@ -62,6 +66,7 @@ The **Events** sections allows you to configure what happens when the user inter The **Accessibility** sections allows you to configure accessibility features for the widget. It includes the following properties: * **Alternative text** – alternative text of the image for accessibility purposes + * Not available when **Background image** is set to **Yes** ### Dimensions Tab {#dimensions} @@ -72,11 +77,24 @@ The **Dimensions** tab allows you to configure settings that are related to the * The **Width** can be set as an appropriate CSS value when **Width unit** is not set to **Auto** * These two properties need to be used together to work * **Height unit** and **Height** – the height of the widget in relation to the rest of the elements on the page - * The available **Height unit** options **Auto** and **Pixels** (**Auto** will keep the aspect ratio of the image) + * The available **Height unit** options are **Auto**, **Pixels**, **Percentage**, and **Viewport** (**Auto** will keep the aspect ratio of the image) * The **Height** can be set as an appropriate CSS value when **Height unit** is not set to **Auto** * These two properties need to be used together to work +* **Minimum Height unit** and **Minimum height** – the minimum height of the image + * Configurable when **Height unit** is set to **Auto** + * The available **Minimum Height unit** options are **None** (default), **Pixels**, **Percentage**, and **Viewport** + * The **Minimum height** can be set when **Minimum Height unit** is not set to **None** +* **Maximum Height unit** and **Maximum height** – the maximum height of the image + * Configurable when **Height unit** is set to **Auto** + * The available **Maximum Height unit** options are **None**, **Pixels** (default), **Percentage**, and **Viewport** + * The **Maximum height** can be set when **Maximum Height unit** is not set to **None** + * Default **Maximum height**: **250** (for new Image widgets) +* **Icon size** – the size of the icon in pixels + * Default: **14** + * Configurable when **Image type** is set to **Icon** and a glyph or icon from an icon collection is selected; the width and height properties are hidden in that case * **Show** – determines how the image will be shown * Default: **Full image** + * Configurable when **Image type** is set to **Image** * When set to **Thumbnail**, the widget will try to retrieve the thumbnail version of the image if present * **Responsive** – when set to **Yes**, the image will scale with its parent container * Default: **Yes** @@ -94,6 +112,8 @@ These are the design properties shipped with Atlas UI for this widget: * **Center image** – determines whether the image is centered horizontally in its container or not * **Yes**, **No** (default) * **Image fit** – changes the fit of the image according to the object-fit CSS property - * **Fill**, **Contain**, **Cover**, **Scale-down**, **None** (default) + * **Fill**, **Contain**, **Cover**, **Scale-down**, **Auto**, **None** (default) +* **Opacity** – changes the opacity of the image + * **Low**, **Medium**, **High**, **None** (default) * **Align content** – aligns elements inside the container as a row or as a column * **Left align as a row**, **Center align as a row**, **Right align as a row**, **Right align as a column**, **Center align as a column**, **Left align as a column** diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/maps.md b/content/en/docs/marketplace/platform-supported-content/widgets/maps.md index 5fbe7344ddb..99af6323c35 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/maps.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/maps.md @@ -14,45 +14,49 @@ The [Maps](https://marketplace.mendix.com/link/component/108261/) widget enables * [Mapbox](https://www.mapbox.com) * [HERE maps](https://www.here.com/) +{{% alert color="info" %}} +Version 5.0.0 and above of the Maps widget requires Studio Pro 10.24.0 or above. +{{% /alert %}} + ## Basic Usage For the easiest way to get started with a basic map in your application, follow these steps: 1. Drag the **Maps** widget onto your page. -2. Open the widget properties and add a Google Maps access token in **General** > **Configurations** > **Google Maps API Key**. -3. In the **General** > **Markers** properties section, select **New** for **Markers**. -4. Create a new location marker based on either **Latitude and longitude** or an **Address**. +2. Open the widget properties and add a Google Maps access token in **General** > **Configurations** > **API Key**. +3. On the **Advanced** tab, add your Google Maps map ID in **Google MapId key**. This property is required when using Google Maps. For more information, see [Use Map IDs](https://developers.google.com/maps/documentation/get-map-id). +4. In the **General** > **Markers** properties section, select **New** for **Marker**. +5. Create a new location marker based on either **Latitude and longitude** or an **Address**. If you want to configure more of your map (for example, end-user interactions and styling) or use a different map provider, see the [Settings](#settings) section below. -{{% alert color="info" %}} -If you are using Google Maps, be sure to include an empty JSON array (specifically `{}`) in **Advanced** > **Map Styles** so your widget is successfully displayed in your app: - -{{< figure src="/attachments/appstore/platform-supported-content/widgets/maps/gmaps.png" class="no-border" >}} - -{{% /alert %}} - ## Settings {#settings} ### Map Provider By default, the Maps widget will use Google Maps. -To change the map provider, go to the **General** properties of the map and enable the **Advanced** > **Show advanced** setting. This will introduce a new **Advanced** tab in the setting window. You can now select one of the map providers listed in the [Introduction](#introduction). +To change the map provider, go to the **Advanced** tab of the widget properties and select one of the map providers listed in the [Introduction](#introduction) in **Map provider**. + +When using Google Maps, the **Google MapId key** property on the **Advanced** tab is required. It is used to render and style the map. For more information on how to get a map ID, see [Use Map IDs](https://developers.google.com/maps/documentation/get-map-id). ### Access Token For all the map providers except OpenStreetMap, you need to have a token in order to view the map. The appropriate tokens can be retrieved via the links to the map types listed in the [Introduction](#introduction). -After obtaining the access token, provide it to the widget in the **General** > **Configurations** widget settings. For Google Maps, the **Google Maps API Key** property should be used, while for the other map providers the **API key** property should be used. +After obtaining the access token, provide it to the widget in the **General** > **Configurations** > **API Key** widget setting. This property is an expression. The **API Key** property is not shown when the map provider is OpenStreetMap. + +{{% alert color="info" %}} +Older versions of the widget used a static string for **API Key** and **Geo location API key**. These static values are deprecated, and Studio Pro shows a warning for them. Use the expression properties instead. +{{% /alert %}} {{% alert color="warning" %}} Make sure that you keep the API key secure. For more information, see [API security best practices](https://developers.google.com/maps/api-security-best-practices). {{% /alert %}} {{% alert color="info" %}} -Placing markers based on addresses does not work without an access token set for **General** > **Configurations** > **Google Maps API key**. This is especially relevant if you are opting into one of the non-Google Maps providers, since you should still provide a Google Maps API access token if you want to specify markers through their address. -The token is necessary for converting addresses to their corresponding latitude and longitude values, which in turn are used to place the markers. If no Google Maps API token is provided, the map is still usable, but markers based on addresses will not be shown. +Placing markers based on addresses does not work without an access token set for **General** > **Configurations** > **Geo location API key**. This key should be a [Google Geocoding API](https://developers.google.com/maps/documentation/geocoding/overview) key, and the property is only shown when at least one marker is based on an address. This is especially relevant if you are opting into one of the non-Google Maps providers, since you should still provide a Google Geocoding API key if you want to specify markers through their address. +The token is necessary for converting addresses to their corresponding latitude and longitude values, which in turn are used to place the markers. If no Geocoding API key is provided, the map is still usable, but markers based on addresses will not be shown. {{% /alert %}} ### Current Location @@ -61,7 +65,7 @@ To show the user's location on the map, enable this in **General** > **Configura ### Markers -To enhance the map widget, you can mark locations on the map by providing them in the widget through **General** > **Markers**. The following conditions apply: +To enhance the map widget, you can mark locations on the map by providing them in the widget through **General** > **Markers** > **Marker**. The following conditions apply: * If exactly one location is provided, the map will center to that location * If multiple locations are provided, the map will center to a position in which all markers are visible @@ -72,7 +76,7 @@ There are two ways to specify locations to be marked, either **Based on latitude You can customize each individual marker in the following ways: * You can provide each marker with a title that will be displayed in a pop-up window when the marker is clicked via the **Location** > **Title** setting -* You can customize the icon of the location marker via the individual marker's setting in **Visualization** > **Marker style** (setting it to *Image* allows you to customize it with either a static resource or dynamic entity) +* You can customize the icon of the location marker via the individual marker's setting in **Visualization** > **Marker style** (setting it to **Image** allows you to replace the default icon with an image in the **Image** property) * You can attach an event handler to the marker to trigger when an end-user clicks it via the **Events** > **On click** setting To make the process of marking batches of locations easier, it is also possible to specify entire lists of markers at once. You can do this through the **General** > **Markers** > **Marker list** setting, which requires a data source. All the usual Mendix data-source settings apply here, as well as the same marker requirements and customizability as the individual markers. @@ -85,7 +89,8 @@ Under the **Controls** properties tab, you can adjust the following settings rel * **Scroll to zoom** – when enabled, the end-user can change the zoom level of the map by mouse-scrolling on a desktop machine or using pinch gestures on mobile * Note that when using the Google Maps provider, this setting requires the **Drag** setting to be enabled in order to work * **Zoom** – when enabled, additional control buttons are shown on the map -* **Attribution** – when enabled, attributions (credits) are shown at the bottom of the map +* **Attribution control** – when enabled, attributions (credits) are shown at the bottom of the map + * This setting is not available when using the Google Maps provider If you are using the Google Maps provider, these additional controls are available: @@ -94,6 +99,7 @@ If you are using the Google Maps provider, these additional controls are availab * The available options are **Map**, with or without a **Terrain** layer, and **Satellite**, with or without a **Labels** layer * By default, this is set to **Map** without the **Terrain** layer * **Full screen** – when enabled, there is a button available in the upper-right corner of the map to view the map in full screen +* **Rotate** – when enabled, the rotate control of Google Maps is shown on the map ### Dimensions diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/markdown-viewer.md b/content/en/docs/marketplace/platform-supported-content/widgets/markdown-viewer.md index 306e195a14b..eb92cdbf324 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/markdown-viewer.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/markdown-viewer.md @@ -14,6 +14,8 @@ The widget does the following: * Displays markdown-formatted text as rendered HTML, supporting headings, bold, italic, lists, links, images, tables, code blocks, blockquotes, and horizontal rules * Applies typographic enhancements such as smart quotes, em dashes, en dashes, and ellipses * Automatically converts URLs in the text to clickable links +* Renders subscript and superscript text +* Renders math expressions with KaTeX * Shows a loading indicator while the data source is being retrieved ### Typical Use Cases @@ -31,6 +33,8 @@ This widget leverages the following features: * Standard markdown syntax rendering, including headings, emphasis, lists, links, images, tables, code blocks, blockquotes, and horizontal rules * Typographic replacements (smart quotes, em dashes, en dashes, ellipses) * Automatic URL-to-link conversion (linkification) +* Subscript (`H~2~O`) and superscript (`29^th^`) syntax +* Math expressions rendered with [KaTeX](https://katex.org/) (see [Math Expressions](#math-expressions)) * Offline capable * Conditional visibility support @@ -50,6 +54,13 @@ Optionally, you can configure the widget further: * Navigate to the **Label** section to add a label for the widget * Navigate to the **Conditional visibility** section to control when the widget is displayed +## Math Expressions {#math-expressions} + +The widget renders math expressions written in LaTeX syntax with KaTeX. Use one of the following notations: + +* **Inline math** – Wrap the expression in single dollar signs, for example `$E = mc^2$`. +* **Block math** – Wrap the expression in double dollar signs (`$$...$$`), write it as a LaTeX environment (`\begin{...}...\end{...}`), or place it in a fenced code block with the `math` language. + ## Styling The widget renders its content inside a container with the `widget-markdown` CSS class. The following default styles are applied: @@ -57,6 +68,7 @@ The widget renders its content inside a container with the `widget-markdown` CSS * **Tables** – Renders with borders, padding, and left-aligned text. Header cells have a light gray background. * **Images** – Renders at a maximum of 35% of the container width by default. * **Horizontal rules** – Spans the full width of the container. +* **Math expressions** – Uses the KaTeX stylesheet and fonts, which are included in the widget. You can override these styles by targeting the `.widget-markdown` class in your custom SCSS or theme. @@ -71,3 +83,4 @@ This widget has the following limitations: ## Read More * [markdown-it](https://github.com/markdown-it/markdown-it): the markdown parsing library used by this widget +* [KaTeX](https://katex.org/): the math typesetting library used by this widget diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/option-selector.md b/content/en/docs/marketplace/platform-supported-content/widgets/option-selector.md index 28bd8ef7fc1..96232a9f25b 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/option-selector.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/option-selector.md @@ -82,8 +82,10 @@ Use the database source type to set the value of a string, integer, long, or enu * **Selection type** – This determines how other [listen to widget](/refguide/listen-to-grid-source/) data sources perceive the data. * **Single** – This allows only one item to be selected from the options list (radio button list). * **Multi** – This allows multiple items to be selected from the options list (checkbox list). -* **Value** (under **Store value**) – The attribute of the selectable objects that holds the value to store. -* **Target attribute** (under **Store value**) – The attribute where the selected value is stored. +* **Value** (under **Store value**) – The attribute of the selectable objects that holds the value to store. This property is available when **Target attribute** is set. +* **Target attribute** (under **Store value**) – The string, integer, long, or enumeration attribute where the selected value is stored. + +The **Store value** properties are only available when **Selection type** is set to **Single**. ##### Static Values {#static} @@ -92,7 +94,7 @@ Use the static source type to set the value of an attribute with manually config * **Attribute** (required) – The attribute to set. It can be a string, enumeration, integer, long, Boolean, date and time, or decimal attribute. * **Values** (required)– The list of options. Each option has the following properties: * **Value** – An expression that returns the value to set. - * **Custom content** – Sets widgets to display instead of the caption. + * **Custom content** – Sets widgets to display instead of the caption. This property is available when **Custom content** in the [General](#general-section) section is set to **Yes**. * **Caption** – The text to display for the option. #### Caption @@ -104,15 +106,15 @@ For the **Association** and **Database** sources, the **Caption** section config * **Expression** – Uses an expression that returns a string. * **Caption** (required) – The attribute or expression that provides the caption. -#### General +#### General {#general-section} The **General** section configures general behavior and captions for the widget: * **No option text** – The text displayed when no options are available. The default is **No options available**. -* **Custom content** – This determines whether the widget displays custom widgets instead of text for each option (not available for **Static** sources, which configure custom content per value): +* **Custom content** – This determines whether the widget displays custom widgets instead of text for each option (not available for the **Enumeration** and **Boolean** types; for **Static** sources, you place the custom content in each value): * **Yes** – This displays the widgets that you place in the **Custom content** dropzone for each option. - * **No** – This displays the caption of each option. -* **Render type** – This determines the type of control that the widget displays. The options are **Checkbox** and **Radio button**. + * **No** (default) – This displays the caption of each option. +* **Render type** – This determines the type of control that the widget displays. The options are **Checkbox** (default) and **Radio button**. This property is only available when **Type** is set to **Boolean**. * **Group name** (optional) – This is an expression that returns the name for the group of associated inputs. #### Label @@ -127,28 +129,28 @@ For more information, see [Visibility Section](/refguide/common-widget-propertie The **Editability** section configures when users can change the selection. For more information, see [Editability Section](/refguide/common-widget-properties/#editability) in *Properties Common in the Page Editor*. -The following additional properties are available: +The following additional properties are available. **Editable** and **Condition** are only available for the **Database** source when no **Target attribute** is set; in that case, they replace the standard **Editable** property: * **Editable** – This determines when the widget is editable: - * **Default** – The widget is editable unless the context is read-only. + * **Default** (default) – The widget is editable unless the context is read-only. * **Never** – The widget is never editable. * **Conditionally** – The widget is editable when the **Condition** expression returns `true`. * **Condition** – The Boolean expression that determines editability when **Editable** is set to **Conditionally**. * **Read-only style** – This determines how the widget appears in read-only mode: - * **Control** – This displays the checkboxes or radio buttons as disabled controls, - * **Content only** – This displays only the selected items as text. + * **Control** – This displays the checkboxes or radio buttons as disabled controls. + * **Content only** (default) – This displays only the selected items as text. ### Events Tab {#events} The **Events** tab contains the following property: -* **On change action** – the action that runs when the selection changes. +* **On change action** – the action that runs when the selection changes. For the **Database** source, this action is linked to the **Selection type** property. ### Accessibility Tab {#accessibility} The **Accessibility** tab configures settings for the accessibility features of the widget: -* **Aria required** – An expression that returns whether the widget is required for assistive technologies or not. +* **Aria required** (default: `false`) – An expression that returns whether the widget is required for assistive technologies or not. * **Aria label** – A text template that provides an accessible label for the widget. ### Common Tab {#common} diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/popup-menu.md b/content/en/docs/marketplace/platform-supported-content/widgets/popup-menu.md index e703075af2a..13cbdd47379 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/popup-menu.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/popup-menu.md @@ -27,28 +27,48 @@ The **General** tab in the **Edit Menu Items Item** dialog box has the following * **Item type** – determines if the menu item is an action button or a divider for buttons * Default: **Button** - * Configurable when **Custom visualization** is set to **Yes** -* **Text** – the text value to be displayed in the button +* **Caption** – the text value to be displayed in the button * Configurable when the **Item type** is **Button** * **Visible** – a Boolean expression indicating whether the item is visible or not * Default: **true** + * Configurable when the **Item type** is **Button** * **On click action** – executes an action when the button is activated through mouse or keyboard. * Configurable when the **Item type** is **Button** -* **Style** – sets the button's brand style +* **Style** – sets the button's brand style: **Default**, **Inverse**, **Primary**, **Info**, **Success**, **Warning**, or **Danger** * Default: **Default** * Configurable when the **Item type** is **Button** + * Any style other than **Default** adds the `popupmenu-basic-item-[style]` class to the item, for example `popupmenu-basic-item-primary` Other main properties of the widget are as follows: +* **The area to open or close the menu.** – the widgets that toggle the menu (required) * **Open on** – determines whether hovering or clicking the trigger widgets displays the menu * Default: **Click** -* **Menu position** – determines the location of a visible menu relative to the trigger area +* **Close on** – determines when an open menu closes + * When **Open on** is **Click**, the options are **Click anywhere** (default), which closes the menu on a click anywhere on the page, and **Click outside**, which closes the menu only on a click outside the menu + * When **Open on** is **Hover**, the options are **Hover leave** (default), which closes the menu when the pointer leaves it, and **Click outside**, which keeps the menu open until a click outside the menu +* **Menu position** – determines the location of a visible menu relative to the trigger area: **Left**, **Right**, **Top**, or **Bottom** * Default: **Bottom** * **Clipping strategy** – determines the relative positioning of floating elements on the page. - * **Absolute** - positions the floating element relative to its nearest positioned ancestor. + * **Absolute** (default) - positions the floating element relative to its nearest positioned ancestor. * **Fixed** - positions the floating element relative to the viewport. It breaks the element out of any clipping ancestor. -If you want to use dynamic content, make sure to wrap the widget in a [data view](/refguide/data-view/) and set **Enable advanced options** to **Yes**. +### Advanced Options + +If you want to use dynamic content, make sure to wrap the widget in a [data view](/refguide/data-view/) and set **Enable advanced options** to **Yes**. With advanced options enabled, the **Menu items** property contains custom items instead of buttons and dividers. Each custom item has the following properties: + +* **Content** – the widgets to show as the menu item +* **Visible** – a Boolean expression indicating whether the item is visible or not + * Default: **true** +* **On click action** – executes an action when the item is clicked + +{{% alert color="info" %}} +To make sure the menu closes correctly after a click, do not place clickable widgets inside **Content**. Use the item's **On click action** instead. +{{% /alert %}} + +## Styling + +The widget styling is part of Atlas Core. For Pop-Up Menu version 4.0.0 and above, use Atlas Core version 3.15.0 or above (Studio Pro 10.6.0 and above) or version 3.12.5 or above (below Studio Pro 10.6.0) to keep the styling intact. ## Limitations diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/progress-bar.md b/content/en/docs/marketplace/platform-supported-content/widgets/progress-bar.md index c74e6a27637..1f734209e25 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/progress-bar.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/progress-bar.md @@ -19,26 +19,26 @@ The widget does the following: The Progress Bar widget requires three values: a **Minimum value** and **Maximum value** to describe the full range of progress as well as a **Current value** to indicate the progression on that range. -These values can be provided in three different ways: as a **Static** integer value, a **Dynamic** integer value, or an **Expression**. An On Click Action can be set onto the progress bar to trigger custom logic during click interactions. +These values can be provided in three different ways, set with the **Type** property: as a **Static** integer value (default), a **Dynamic** value from a Decimal, Integer, or Long attribute, or an **Expression** that returns a Decimal. The default static values are 0 for **Minimum value**, 100 for **Maximum value**, and 50 for **Current value**. An **On click** action can be set onto the progress bar in the **Events** section to trigger custom logic during click interactions. ### Label Configuring the label on the progress bar can be done on the **Progress Label** tab and has the following options: -* Whether to show a label or not -* The type of the label: - * **Text**: a custom text +* **Show label** – whether to show a label or not (default: **No**) +* **Label type** – the type of the label: + * **Text** (default): a custom text, set in **Label text** * **Percentage**: the **Current value** converted onto the configured range as a percentage. - * **Custom**: a custom widget + * **Custom**: a custom widget, placed in **Custom label** ### Styling Under the **Appearance** tab, the following styling properties can be adjusted for the progress bar: -* Striped bar: whether the bar should be striped or plain -* Bar color based on brand styling -* Size (small, medium, and large) - * Note that when the size is configured to small no label will be shown due to limited space, and text labels will be included as a tooltip that shows on hover +* **Striped bar**: whether the bar should be striped or plain +* **Bar color** based on brand styling: **Primary**, **Success**, **Warning**, or **Danger** +* **Size** (**Small**, **Medium**, and **Large**) + * Note that when the size is configured to small no label will be shown due to limited space: text and percentage labels are shown as a tooltip on hover, and custom labels are ignored ## Widgets Below Version 2.0.0 diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/progress-circle.md b/content/en/docs/marketplace/platform-supported-content/widgets/progress-circle.md index 30dbed587c7..e23fa7d9c8f 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/progress-circle.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/progress-circle.md @@ -18,24 +18,26 @@ The widget does the following: The Progress Circle widget requires three values: a **Minimum value** and **Maximum value** to describe the full range of progress as well as a **Current value** to indicate the progression on that range. -These values can be provided in three different ways: as a **Static** integer value, a **Dynamic** integer value, or an **Expression**. An On Click Action can be set onto the progress circle label to trigger custom logic during click interactions. +These values can be provided in three different ways, set with the **Type** property: as a **Static** integer value (default), a **Dynamic** value from a Decimal, Integer, or Long attribute, or an **Expression** that returns a Decimal. The default static values are 0 for **Minimum value**, 100 for **Maximum value**, and 50 for **Current value**. An **On click** action can be set onto the progress circle label in the **Events** section to trigger custom logic during click interactions. + +By default, the widget shows an error when the **Current value** is higher than the **Maximum value**. To allow such values, set **Allow values above maximum** to **Yes** (default: **No**). The circle then stays full, the percentage label shows the actual value (for example, 120%), and the widget gets the `widget-progress-circle-overflow` class so you can style it. The widget still shows an error when the **Current value** is lower than the **Minimum value**, or when the **Maximum value** is lower than the **Minimum value**. ### Label Configuring the label on the progress circle can be done on the **Progress Label** tab and has the following options: -* Whether to show a label or not -* The type of the label: - * **Text**: a custom text +* **Show label** – whether to show a label or not (default: **No**) +* **Label type** – the type of the label: + * **Text** (default): a custom text, set in **Label text** * **Percentage**: the **Current value** converted onto the configured range as a percentage. - * **Custom**: a custom widget + * **Custom**: a custom widget, placed in **Custom label** ### Styling Under the **Appearance** tab, the following styling properties can be adjusted for the progress circle: -* Bar and background color based on brand styling -* Size (small, medium, and large) +* **Bar color** based on brand styling: **Primary**, **Success**, **Warning**, or **Danger** +* **Size**, which sets the thickness of the circle (**Small**, **Medium**, and **Large**) ## Strict CSP Compatibility diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/range-slider.md b/content/en/docs/marketplace/platform-supported-content/widgets/range-slider.md index 734a026dd32..5c323b2ad44 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/range-slider.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/range-slider.md @@ -25,14 +25,18 @@ If the user needs to set one value, instead of a range, you should use the [Slid * Set a microflow that is executed when the user changes the range value on the slider * Show a tooltip when the user clicks or moves a slider handle -* Render the slider with different colors +* Render the slider with different colors using the **Style** design property (**Brand Primary**, **Brand Success**, **Brand Warning**, or **Brand Danger**) + +{{% alert color="warning" %}} +Range Slider version 3.0.0 updated the underlying slider library to a new major version. This might break custom styling that targets the widget's internal elements. +{{% /alert %}} ## Configuration To configure this widget, follow these steps: -1. In Studio Pro, place the Ranger Slider widget in the context of an object that has Integer or Decimal attributes to store the lower bound value and the upper bound value of the range -2. Double-click the Ranger Slider widget to open the **Edit Ranger Slider** dialog box. +1. In Studio Pro, place the Range Slider widget in the context of an object that has Integer, Long, or Decimal attributes to store the lower bound value and the upper bound value of the range +2. Double-click the Range Slider widget to open the **Edit Range Slider** dialog box. 3. Configure the widget using the properties described in the sections below. ### General Tab @@ -44,21 +48,22 @@ To configure this widget, follow these steps: #### General Section +* **Enable advanced options** – when set to **Yes**, shows the step size, tooltip, and **Track** tab properties in Studio Pro; when set to **No** (default), these properties are hidden and keep their current values * **Minimum value type** – sets the type of the value source for the **Minimum value** property * **Static** – if selected, the minimum value is a static value * **Dynamic** – if selected, the minimum value is a dynamic value * **Expression** – if selected, the minimum value is an [expression](/refguide/expressions/) -* **Minimum value** – sets the minimum value of the slider +* **Minimum value** – sets the minimum value of the slider (default static value: 0) * **Maximum value type** – sets the type of the value source for the **Maximum value** property * **Static** – if selected, the maximum value is a static value * **Dynamic** – if selected, the maximum value is a dynamic value * **Expression** – if selected, the maximum value is an [expression](/refguide/expressions/) -* **Maximum value** – sets the maximum value of the slider +* **Maximum value** – sets the maximum value of the slider (default static value: 100) * **Step size type** – sets the type of the value source for the **Step size** property * **Static** – if selected, the step size is a static value * **Dynamic** – if selected, the step size is a dynamic value * **Expression** – if selected, the step size is an [expression](/refguide/expressions/) -* **Step size** – sets the difference between two adjacent values on the slider +* **Step size** – sets the difference between two adjacent values on the slider (default static value: 1); the step size must be greater than zero, and the difference between the maximum and minimum values should be evenly divisible by it * **Show tooltip** * **Yes** (default) – if selected, a tooltip is displayed when the user clicks or moves a slider handle * **Lower bound tooltip type** – sets the tooltip type for the lower bound value @@ -92,15 +97,17 @@ To configure this widget, follow these steps: ### Track Tab -* **Number of markers** – sets the number of the markers that appear along the slider's track -* **Decimal places** – sets the number of decimal places for marker values +The properties on this tab are shown when **Enable advanced options** is set to **Yes**. + +* **Number of markers** – sets the number of the markers that appear along the slider's track; markers are shown when the value is larger than 0 (default: 1) +* **Decimal places** – sets the number of decimal places for marker values and tooltip values (default: 0); marker labels and tooltips use the decimal separator and digit grouping of the user's locale * **Orientation** – determines the orientation of the slider - * **Horizontal** – if selected, the orientation of the slider is horizontal + * **Horizontal** (default) – if selected, the orientation of the slider is horizontal * **Vertical** – if selected, the orientation of the slider is vertical and you must set **Height unit** and **Height** * **Height unit** – specifies the type of unit which is used for the **Height** property * **Percentage** (default) – if selected, the aspect ratio is used to specify the height * **Pixels** – if selected, an absolute value is used to specify the height - * **Height** – the height in pixels or percentage based on the setting of **Height unit** + * **Height** – the height in pixels or percentage based on the setting of **Height unit** (default: 100) ### Events Tab diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/rating.md b/content/en/docs/marketplace/platform-supported-content/widgets/rating.md index 53c2e338250..8cf688f3836 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/rating.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/rating.md @@ -17,12 +17,12 @@ To use this widget, place it in a [data container](/refguide/data-sources/) that The widget offers the following for configuration: -* An Integer, Long, or Decimal attribute to store the rating on user-interaction -* An action (such as microflow or nanoflow) to trigger when the value of rating changes -* An empty icon, to be shown when the value is not yet selected -* A selected icon, to be shown when the value is selected -* An amount to define the maximum amount of icons to be rendered -* Animation, to define whether the widget should animate when clicking on the desired icon +* An Integer, Long, or Decimal **Attribute** to store the rating on user-interaction +* An **On change** action (such as microflow or nanoflow), on the **Events** tab, to trigger when the value of rating changes +* An **Empty icon**, to be shown when the value is not yet selected +* A **Selected icon**, to be shown when the value is selected +* An **Amount** to define the maximum amount of icons to be rendered (default: 5) +* **Animation**, to define whether the widget should animate when clicking on the desired icon (default: **Yes**) * A **Size** design property with two options (`Small` and `Large`) influencing icon size * [Common properties](/refguide/common-widget-properties/) diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/richtext/_index.md b/content/en/docs/marketplace/platform-supported-content/widgets/richtext/_index.md index 051d4f8dd22..6d9db6a9cb5 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/richtext/_index.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/richtext/_index.md @@ -8,7 +8,7 @@ description: "Describes the configuration and usage of the Rich Text widget, whi ## Introduction {{% alert color="info" %}} -This documentation applies to Rich Text widget versions 4.0 and above. +This documentation applies to Rich Text widget versions 4.0 and above. Starting with version 5.0.0, the widget uses the Tiptap editor library instead of Quill. The content is still stored as HTML in the attribute. For documentation on Rich Text widget versions 3 with TinyMCE, see [Rich Text v3](/appstore/widgets/rich-text-v3/). For documentation on Rich Text widget versions 2 with CKEditor4, see [Rich Text v2](/appstore/widgets/rich-text-v2/). @@ -27,6 +27,8 @@ The [Rich Text](https://marketplace.mendix.com/link/component/74889/) widget pro * Sanitizes the user's input automatically * Supports spelling and grammar checker in the editor * Supports code highlight, which enables the user to insert code fragments and have a live preview with highlighted syntax +* Shows the editor's toolbar, dialogs, and help texts in the page language, with bundled translations for English, Dutch, German, French, and Spanish (other languages fall back to English); available in Rich Text version 5 and above +* Lets the user set the number that a numbered list starts at with the **Start at** field in the numbered list options; available in Rich Text version 5.2.0 and above {{% alert color="info" %}} Unlike Rich Text v3, this version no longer hosts the editor inside a sandboxed `iframe`. Thus, page styling will directly affect the rich text's styling. @@ -49,25 +51,28 @@ To configure this widget, follow these steps: * **Yes** – if selected, you can define the label caption. * **Label caption** – defines the label caption of the widget that is displayed on the page. * **No** (default) – if selected, there is no label for this widget on the page. - * **Enable status bar** display status bar on the bottom of the editor. + * **Enable status bar** – displays a status bar at the bottom of the editor with document metrics (default: **No**). Configure the metric with **Status bar content** on the **Advanced** tab. * **Toolbar** - * **Toolbar** display toolbar based on the selected location on the editor. - * **Basic** – if selected, the following menu will be shown: - * bold italic | numlist bullist | outdent indent | link | removeformat + * **Toolbar** – displays a toolbar preset; this property is not available when **Location** is set to **Hide**. + * **Basic** (default) – if selected, the following menu will be shown: + * bold italic underline strikethrough | bullist numlist checklist | outdent indent ltr/rtl | link image video | removeformat * **Standard** – if selected, the following menu will be shown: - * undo redo | bold italic underlined | bullist numlist loweralphalist | outdent indent | ltr rtl | alignleft aligncenter alignjustify alignright | fontfamily fontsize forecolor backcolor | link image | blockquote codesample codeblock (view/edit)code, removeformat + * undo redo | bold italic underline strikethrough | bullist numlist checklist | outdent indent ltr/rtl | alignleft aligncenter alignright alignjustify | fontfamily fontsize forecolor backcolor | link image video | blockquote code codeblock (view/edit)code | removeformat | table | fullscreen * **Full** – if selected, the following menu will be shown: - * undo redo | bold italic underlined strikethrough | superscript subscript | bullist numlist loweralphalist checklist | outdent indent | ltr rtl, alignleft aligncenter alignjustify alignright | fontfamily fontsize forecolor backcolor | link image video formula | heading | blockquote codesample codeblock (view/edit)code | removeformat - * **Custom** – allows you to make your own menubar selection based on the **full** selection list. + * undo redo | bold italic underline strikethrough | superscript subscript | bullist numlist checklist | outdent indent ltr/rtl | alignleft aligncenter alignright alignjustify | fontfamily fontsize forecolor backcolor | link image video | heading | blockquote code codeblock (view/edit)code | removeformat | table | fullscreen | keyboard shortcuts help + * **Custom** – allows you to make your own menubar selection on the **Custom toolbar** tab. + + {{% alert color="info" %}}The toolbar lists above apply to Rich Text version 5 and above. The numbered list button offers the **1, 2, 3**, **a, b, c**, and **i, ii, iii** list styles.{{% /alert %}} + * **Location** * **Sticky** – if selected, toolbar will be placed on the top of the editor and sticky position will apply upon scrolled. - * **Top** – if selected, toolbar will be placed on the top of the editor. + * **Top** (default) – if selected, toolbar will be placed on the top of the editor. * **Bottom** – if selected, toolbar will be placed on the bottom of the editor. * **Hide** – if selected, toolbar will be hidden or not shown. * **Editable** – determines when the user can edit content in the editor and when it is read-only. * **Read-only style** - determines the style of the rich text widget when set to read-only. - * **Rich Text** – shows disabled rich text with a similar look and feel as when it is enabled. + * **Rich text** (default) – shows disabled rich text with a similar look and feel as when it is enabled. * **Bordered** – shows content only with a surrounding border. * **Read panel** – shows only an HTML rendering of rich text content. @@ -78,26 +83,26 @@ To configure this widget, follow these steps: ### Custom Toolbar Tab -* **Custom** – allows you to make your toolbar with customized options. +* **Custom** – allows you to make your toolbar with customized options. The properties on this tab are available when **Toolbar** is set to **Custom**. * **Toolbar group** * **Basic** (default) – if selected, you can select which of the following toolbar groups are available in the toolbar: - * **Edit history** - items: undo, redo. + * **Edit History** - items: undo, redo. * **Font style** - items: bold, italic, underline, strikethrough. * **Font script** - items: superscript, subscript. - * **List** - items: bullist numlist loweralphalist checklist. + * **List** - items: bullist numlist checklist. * **Indentation** - items: outdent, indent, ltr rtl. - * **Embedded media** - items: link, image, video, formula. + * **Embedded media** - items: link, image, video. * **Alignment** - items: alignleft aligncenter alignjustify alignright. - * **Syntax** - items: blockquote, codesample, codeblock, (view/edit)code. + * **Syntax** - items: blockquote, code, codeblock, (view/edit)code. * **Font colors** - items: fontfamily, fontsize, forecolor, backcolor. * **Content type** - items: header. * **View** - items: fullscreen. * **Removal** - items: clear. * **Table** - items: table. - * **Help** - items: help dialog contains keyboard shortcuts (available in rich text version 5 and above). + * **Keyboard shortcuts** - items: a help button that opens a dialog listing the keyboard shortcuts (available in rich text version 5 and above). The button is only shown when all the other toolbar groups are enabled. * **Advanced** – if selected, you can configure buttons for different toolbar groups: - {{% alert color="info" %}}All the toolbar groups that you configure will be available in the toolbar. With vertical bars or separator options ("|"), you can separate different toolbar groups.{{% /alert %}} + {{% alert color="info" %}}All the toolbar groups that you configure will be available in the toolbar. With vertical bars or separator options ("|"), you can separate different toolbar groups. Each button is shown only once, even if it is added more than once. In Rich Text version 5 and above, the **Lower Alpha List** and **Formula** buttons are not shown; use the list style options of the **Ordered List** button instead of **Lower Alpha List**.{{% /alert %}} * **New** – opens the **Edit Advanced Groups Item** dialog box where you can add a new button to a toolbar group * **Button** – specifies the button to be included in the toolbar @@ -107,21 +112,29 @@ To configure this widget, follow these steps: ### Dimensions Tab * **Width unit** – the width of the widget. - * **Percentage** – specifies the width in relation to the rest of the elements on the page. + * **Percentage** (default) – specifies the width in relation to the rest of the elements on the page. * **Pixels** – specifies the width in pixels. -* **Width** – used as an appropriate CSS value. +* **Width** – used as an appropriate CSS value (default: 100). * **Height unit** – the height of the widget. - * **Percentage of width** – specifies the height in relation to the width. - * **Pixels** – specifies the height in pixels. - * **Percentage of parent** – specifies the width in relation to the rest of the elements on the page. -* **Height** – used as an appropriate CSS value. -* **Minimum height** – applicable if height is relative to parent's percentage. + * **Auto** – the height adjusts to the content, within the limits of the **Minimum height** and **Maximum height** properties. + * **Pixels** (default) – specifies the height in pixels. + * **Percentage** – specifies the height as a percentage of the parent's height. + * **Viewport** – specifies the height as a percentage of the viewport's height. +* **Height** – used as an appropriate CSS value (default: 250); not available when **Height unit** is set to **Auto**. + +The following properties are available when **Height unit** is set to **Auto**: + +* **Minimum Height unit** – the unit of the **Minimum height** property: **None**, **Pixels** (default), **Percentage**, or **Viewport**. +* **Minimum height** – the minimum height of the widget (default: 250); not available when **Minimum Height unit** is set to **None**. +* **Maximum Height unit** – the unit of the **Maximum height** property: **None** (default), **Pixels**, **Percentage**, or **Viewport**. +* **Maximum height** – the maximum height of the widget (default: 250); not available when **Maximum Height unit** is set to **None**. +* **Vertical Overflow** – determines what happens when the content is higher than the maximum height: **Auto** (default), **Scroll**, or **Hidden**; not available when **Maximum Height unit** is set to **None**. ### Events Tab * **On change** – specifies an action to execute when the user changes the value of the editor. - * **On change type** - specifies which type of event that will trigger the on change action. - * **When user leaves input field** - if selected, an on change action will be triggered when user moves focus out of the editor. + * **On change type** - specifies which type of event that will trigger the on change action. This property is available when an **On change** action is set. + * **When user leaves input field** (default) - if selected, an on change action will be triggered when user moves focus out of the editor. * **While user is entering data** - if selected, an on change action will be triggered each time a data change occurs. * **On enter** – specifies an action to execute when the user focuses on the editor. * **On leave** – specifies an action to execute when the user move focus out of the editor. @@ -129,19 +142,21 @@ To configure this widget, follow these steps: ### Advanced Tab -* **Enable spell checking** – configures to use the browser’s native spell checker. -* **Default font family** – configures initial selection of the font family shown in the dropdown toolbar if no fonts are set. This configuration is only to adjust the font toolbar display with page's default font-family. No value is being set to the editor's text directly. The value set should be the same with selected `font-name-value` in `data-value` variable of fonts. -* **Default font size** – configures initial font size to be shown in the dropdown of font size in the toolbar if no font sizes are set. This configuration only adjusts the font size toolbar with the page's default font size. No font size value is being set to the editor's text directly. The value set should be available in the font size toolbar selections. +* **Enable spell checking** – configures to use the browser’s native spell checker (default: **No**). +* **Enable link URL validation** – if enabled, only valid URLs are accepted in links (default: **Yes**). Disable it to allow non-standard URLs in links. Available in Rich Text version 4.12.0 and above. * **Custom fonts** – configures extra fonts selection for the font family. * **Selectable images** – configures image entity source to allow rich text to use images from entity instead of base64 string. -* **Enable default upload** – if enabled, it will keep the current image upload method using base64 string, otherwise it is hidden (default value: **true**). -* **Status bar content** - configures counter display on the status bar: - * **Word count** – displays the number of words in the status bar. +* **Enable default upload** – if enabled, the user can upload images from the device, using the upload tab of the image dialog, dragging and dropping image files onto the editor, or pasting images from the clipboard; uploaded images are embedded in the content as base64 strings (default: **Yes**). This property is available when **Selectable images** is set. +* **Status bar content** - configures counter display on the status bar; available when **Enable status bar** is set to **Yes**: + * **Word count** (default) – displays the number of words in the status bar. * **Character count (text only)** – displays the number of characters displayed in the editor. - * **Character count (includeing HTML)** – displays the number of characters saved into the attribute value. This includes the HTML tag inserted for the formatting of rich text. + * **Character count (including HTML)** – displays the number of characters saved into the attribute value. This includes the HTML tag inserted for the formatting of rich text. * **Style data format** - available from rich text version 5 and above. This allows user to use classnames for the styling of rich text's content. * **Inline** - uses inline styles on styling the HTML content. This is the current and default option. Inline styling is more reliable in styling the content. But using inline styles meant that the data cannot be parsed in [strict-CSP environment](/howto/security/csp/). * **Class** - uses class name to style the HTML content. Use this setting if rich text is deployed in a strict CSP environment. +* **Dialog style** – determines how the insert image, insert video, and insert link dialogs are presented; available in Rich Text version 5.1.0 and above. + * **Inline** (default) – anchors the dialog to the toolbar button it was opened from. + * **Focused** – shows the dialog centered on the screen over a dimmed page, and keeps the keyboard focus inside the dialog until it is closed. ### Common Tab @@ -187,11 +202,15 @@ To add a new custom font, simply click the **Advanced** tab and click new on cus The new font name will be display in the toolbar with data-value attribute as `data-value="your-font-name"`. The name will be derived from **Font name** configuration by set it to lower case, and replace all spaces (" ") with dashes ("-"). You can use this custom styling to display it correctly in the toolbar: ```css -.widget-rich-text .ql-toolbar [data-value=your-font-name]:before { +.widget-rich-text .toolbar-dropdown-item[data-value=your-font-name] { font-family: 'Your-font-family-name'; } ``` +{{% alert color="info" %}} +The selector above applies to Rich Text version 5 and above. In Rich Text version 4, use `.widget-rich-text .ql-toolbar [data-value=your-font-name]:before` instead. +{{% /alert %}} + ### Image From Entity {{% alert color="info" %}} @@ -298,6 +317,7 @@ This code will trigger a new event called **imageSelected** and bubble up the ev Formatting Paragraph History + Accessibility @@ -329,6 +349,14 @@ This code will trigger a new event called **imageSelected** and bubble up the ev RedoCtrl+Y + + + + + + +
ActionShortcut
Focus toolbarAlt+F10
Focus status barAlt+F11
Return to editor / exit fullscreenEscape
+ diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/richtext/rich-text-v2.md b/content/en/docs/marketplace/platform-supported-content/widgets/richtext/rich-text-v2.md index face00949b9..8fb97048a7c 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/richtext/rich-text-v2.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/richtext/rich-text-v2.md @@ -11,7 +11,7 @@ weight: 50 {{% alert color="info" %}} This documentation applies to Rich Text widget versions 2 which uses CKEditor4 library. -For documentation on Rich Text widget versions 4 with QuillV2, see [Rich Text](/appstore/widgets/rich-text/) documentation. +For documentation on Rich Text widget versions 4 (Quill V2) and 5 (Tiptap), see [Rich Text](/appstore/widgets/rich-text/) documentation. For documentation on Rich Text widget versions 3 with TinyMCE, see [Rich Text v3](/appstore/widgets/rich-text-v3/) documentation. {{% /alert %}} diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/richtext/rich-text-v3.md b/content/en/docs/marketplace/platform-supported-content/widgets/richtext/rich-text-v3.md index f051c67f883..af86bc6d4cf 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/richtext/rich-text-v3.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/richtext/rich-text-v3.md @@ -13,7 +13,7 @@ weight: 60 {{% alert color="info" %}} This documentation applies to Rich Text widget versions 3 that use the TinyMCE library. -For documentation on Rich Text widget versions 4 with QuillV2, see [Rich Text](/appstore/widgets/rich-text/) documentation. +For documentation on Rich Text widget versions 4 (Quill V2) and 5 (Tiptap), see [Rich Text](/appstore/widgets/rich-text/) documentation. For documentation on Rich Text widget versions 2 with CKEditor4, see [Rich Text v2](/appstore/widgets/rich-text-v2/). Due to TinyMCE changing its public license, we transitioned to the Quill V2 library in Rich Text 4. diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/signature.md b/content/en/docs/marketplace/platform-supported-content/widgets/signature.md index 9730c215344..7d501823711 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/signature.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/signature.md @@ -29,18 +29,65 @@ To use this widget, follow these steps: 1. Add an entity to the domain model that should inherit from the Mendix **system.image**. 2. Create a page with a data view, and place the widget inside the data view. -3. Optionally, on the **Canvas** properties tab, add the **Has signature** attribute to the entity in to toggle to clear the canvas. -4. On the **Pen** tab, customize the signature by selecting a pen **Type** and the **Color** (which is an HTML color code). -5. On the **Grid** tab, configure the following:
- 1. **Show background grid** – when set to yes, a grid is shown in the background of the writable area
- 1. **Cell width** – the width of the grid cell in pixels
- 1. **Cell height** – the height of the grid cell in pixels
- 1. **Line color** – the HTML color code of the grid lines
- 1. **Line width** – the width of the grid line border in pixels -6. On the **Appearance** tab in the **Common** section, custom CSS **Style** properties can be set for responsive design when the width and height are a percentage – for example: - `min-width: 200px;` - `max-width: 600px;` - `min-height: 200px;` - `max-height: 600px;` -7. Upon running the application, after signing on the canvas, the **Has signature** attribute is toggled to show that the canvas has a signature. The end-user can toggle to **No** in order to clear the signature data source. -8. When the form is submitted—which can be triggered by the start of a microflow or a save—the signature is captured and stored as an image. To view the result, the [Image](/appstore/widgets/image/) widget can be used. +3. Configure the widget using the properties described in the sections below. + +When the user finishes a stroke on the canvas, the widget stores the signature as a PNG image in the **Image value** property. To view the result, the [Image](/appstore/widgets/image/) widget can be used. + +{{% alert color="warning" %}} +Signature version 2.0.0 is a complete rewrite as a pluggable widget and requires Studio Pro 11.8.0 or above. It is not backward compatible with version 1.x, so existing Signature widgets must be reconfigured. The widget ID changed from `com.mendix.widget.custom.signature.Signature` to `com.mendix.widget.web.signature.Signature`, the widget category changed from **Add-ons** to **Input elements**, and the widget file changed from `Signature.mpk` to `com.mendix.widget.web.Signature.mpk`. This lets the old and new versions coexist during migration. After the migration is complete, remove the old `Signature.mpk` file from the `widgets` folder of your app manually. +{{% /alert %}} + +### General Tab + +#### Data Source Section + +* **Image value** (required) – the image in which the signature is stored +* **File name** – the file name (without extension) for the stored image; if empty, a file name is generated automatically based on the current date and time +* **Has signature** – an optional Boolean attribute that is set to true after the canvas is signed; when the attribute is set to false, the canvas is cleared, but the stored image is not cleared +* **Editable** – determines if the widget can be edited; for more information, see [Editability Section](/refguide/common-widget-properties/#editability) in *Properties Common in the Page Editor* + +#### Appearance Section + +* **Type** – the type of pen used to draw the signature + * **Fountain pen** (default) + * **Ball point pen** + * **Highlight marker** +* **Color** – the color of the line, as a color name or code such as `green`, `#00FF00`, or `rgb(0,255,0)` (default: `#000`) + +### Dimensions Tab + +* **Width unit** – the unit of the **Width** property + * **Pixels** + * **Percentage** (default) +* **Width** – the width of the canvas (default: 100) +* **Height unit** – the unit of the **Height** property + * **Auto** – the height adjusts automatically, within the limits of the **Minimum height** and **Maximum height** properties + * **Pixels** (default) + * **Percentage** – a percentage of the parent's height + * **Viewport** – a percentage of the viewport's height +* **Height** – the height of the canvas (default: 250); not available when **Height unit** is set to **Auto** + +The following properties are available when **Height unit** is set to **Auto**: + +* **Minimum Height unit** – the unit of the **Minimum height** property: **None**, **Pixels** (default), **Percentage**, or **Viewport** +* **Minimum height** – the minimum height of the canvas (default: 250); not available when **Minimum Height unit** is set to **None** +* **Maximum Height unit** – the unit of the **Maximum height** property: **None** (default), **Pixels**, **Percentage**, or **Viewport** +* **Maximum height** – the maximum height of the canvas (default: 250); not available when **Maximum Height unit** is set to **None** +* **Vertical Overflow** – determines what happens when the content is higher than the maximum height: **Auto** (default), **Scroll**, or **Hidden**; not available when **Maximum Height unit** is set to **None** + +### Events Tab + +**On sign end** – the action that is executed when the user finishes a stroke on the canvas; the action receives the signature image as a data URI in the **Signature Image Uri** String variable + +### Accessibility Tab + +* **Aria required** – an expression that determines whether the canvas is marked as required for assistive technologies (default: false) +* **Aria label** – the accessible label of the canvas (default: "Signature canvas") + +### Advanced Tab + +* **Show background grid** – when set to **Yes**, a grid is shown in the background of the writable area (default: **No**); the grid is not shown when the widget is read-only +* **Line color** – the HTML color code of the grid lines (default: `#D7D7D7`) +* **Cell height** – the height of the grid cell in pixels (default: 50) +* **Cell width** – the width of the grid cell in pixels (default: 50) +* **Line width** – the width of the grid line border in pixels (default: 1) diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/slider.md b/content/en/docs/marketplace/platform-supported-content/widgets/slider.md index 0ddf1365b76..36b51613b10 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/slider.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/slider.md @@ -25,13 +25,13 @@ If the user needs to set a range, instead of one value, you should use the [Rang * Set a microflow that is executed when the user changes the slider value * Show a tooltip when the user clicks or moves the slider handle -* Render the slider with colors +* Render the slider with colors using the **Style** design property (**Brand Primary**, **Brand Success**, **Brand Warning**, or **Brand Danger**) ## Configuration To configure this widget, follow these steps: -1. In Studio Pro, place the Slider widget in the context of an object that has an Integer or Decimal attribute to store the slider value. +1. In Studio Pro, place the Slider widget in the context of an object that has an Integer, Long, or Decimal attribute to store the slider value. 2. Double-click the Slider widget to open the **Edit Slider** dialog box. 3. Configure the widget using the properties described in the sections below. @@ -39,25 +39,26 @@ To configure this widget, follow these steps: #### Data Source Section -**Value attribute** – defines the attribute to store the value +**Value attribute** – defines the Integer, Long, or Decimal attribute to store the value #### General Section +* **Enable advanced options** – when set to **Yes**, shows the step size, tooltip, and **Track** tab properties in Studio Pro; when set to **No** (default), these properties are hidden and keep their current values * **Minimum value type** – sets the type of the value source for the **Minimum value** property * **Static** – if selected, the minimum value is a static value * **Dynamic** – if selected, the minimum value is a dynamic value * **Expression** – if selected, the minimum value is an [expression](/refguide/expressions/) -* **Minimum value** – sets the minimum value of the slider +* **Minimum value** – sets the minimum value of the slider (default static value: 0) * **Maximum value type** – sets the type of the value source for the **Maximum value** property * **Static** – if selected, the maximum value is a static value * **Dynamic** – if selected, the maximum value is a dynamic value * **Expression** – if selected, the maximum value is an [expression](/refguide/expressions/) -* **Maximum value** – sets the maximum value of the slider +* **Maximum value** – sets the maximum value of the slider (default static value: 100) * **Step size type** – sets the type of the value source for the **Step size** property * **Static** – if selected, the step size is a static value * **Dynamic** – if selected, the step size is a dynamic value * **Expression** – if selected, the step size is an [expression](/refguide/expressions/) -* **Step size** – sets the difference between two adjacent values on the slider +* **Step size** – sets the difference between two adjacent values on the slider (default static value: 1); the step size must be greater than zero, and the difference between the maximum and minimum values should be evenly divisible by it * **Show tooltip** * **Yes** (default) – if selected, a tooltip is displayed when the user clicks or moves the slider handle * **Tooltip type** – sets the tooltip type @@ -87,15 +88,17 @@ To configure this widget, follow these steps: ### Track Tab -* **Number of markers** – sets the number of the markers that appear along the slider's track -* **Decimal places** – sets the number of decimal places for marker values +The properties on this tab are shown when **Enable advanced options** is set to **Yes**. + +* **Number of markers** – sets the number of the markers that appear along the slider's track; markers are shown when the value is larger than 0 (default: 2) +* **Decimal places** – sets the number of decimal places for marker values and tooltip values (default: 0); marker labels and tooltips use the decimal separator and digit grouping of the user's locale * **Orientation** – determines the orientation of the slider - * **Horizontal** – if selected, the orientation of the slider is horizontal + * **Horizontal** (default) – if selected, the orientation of the slider is horizontal * **Vertical** – if selected, the orientation of the slider is vertical and you must set **Height unit** and **Height** * **Height unit** – specifies the type of unit which is used for the **Height** property * **Percentage** (default) – if selected, the aspect ratio is used to specify the height * **Pixels** – if selected, an absolute value is used to specify the height - * **Height** – the height in pixels or percentage based on the setting of **Height unit** + * **Height** – the height in pixels or percentage based on the setting of **Height unit** (default: 100) ### Events Tab diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/switch.md b/content/en/docs/marketplace/platform-supported-content/widgets/switch.md index f6044a432cf..5f40baf2a21 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/switch.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/switch.md @@ -15,12 +15,14 @@ To use this widget, place it in a [data container](/refguide/data-sources/) that The widget offers the following for configuration: -* A Boolean attribute to toggle on user-interaction -* An action (such as Microflow or Nanoflow) to trigger when the Switch is toggled -* A **Device style** design property with two options (`iOS` and `Android`) influencing the Switch's appearance -* A **Style** design property for brand styling, influencing the Switch's colors +* A **Boolean attribute** to toggle on user-interaction +* An **On change** action (such as Microflow or Nanoflow) to trigger when the Switch is toggled +* A **Device style** design property with two options (`iOS` and `Android`) influencing the Switch's appearance; when no option is selected, the iOS style is applied +* A **Style** design property for brand styling, influencing the Switch's colors, with the options **Brand Primary**, **Brand Secondary**, **Brand Success**, **Brand Warning**, and **Brand Danger** * [Common properties](/refguide/common-widget-properties/) +Clicking the widget's label also toggles the switch. + This widget is compatible with [Atlas Core](https://marketplace.mendix.com/link/component/117187). ## Widgets Below Version 3.0.0 diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/timeline.md b/content/en/docs/marketplace/platform-supported-content/widgets/timeline.md index 94dc1d345f7..cc923918e3b 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/timeline.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/timeline.md @@ -15,7 +15,7 @@ You can use the [Timeline](https://marketplace.mendix.com/link/component/115852/ For the sake of simplicity, there are two modes available to create a timeline: -* **Basic** – this is the default mode in which you can select the **Data source**, **Title**, **Description**, and **Time indication** on the **Data Source** tab and the **Icon** on the **General** tab to quickly implement a timeline in your app +* **Basic** – this is the default mode in which you can select the **Data source**, **Title**, **Description**, and **Time Indication** on the **Data Source** tab and the **Icon** on the **General** tab to quickly implement a timeline in your app * **Custom** – enable this mode by setting **Custom Visualization** to **Yes** on the **General** tab to freely model everything that will be shown in the timeline, such as the title, icon, group header/day divider, time indication, and content ### Selecting a Data Source @@ -26,7 +26,11 @@ Since the widget will try to group the events based on date, make sure there is ### Showing the Group Header {#group-header} -On the **General** tab for both basic and custom modes, you can opt to show a day divider by selecting **Yes** for **Group Events** and selecting a **Group Attribute**. +On the **General** tab for both basic and custom modes, you can opt to show a day divider by selecting **Yes** for **Group Events** (default) and selecting a **Group Attribute**. The **Group Attribute** must be a Date and time attribute, and it is required when **Group Events** is set to **Yes**. + +Use **Group by** to group events by **Day** (default), **Month**, or **Year**. + +Use **Ungrouped events position** to set where events without a date and time value are shown: **Beginning of the timeline** or **End of the timeline** (default). {{% alert color="info" %}} If you are using the basic mode, the values of the **Data source** field will be used as a group header via the **Group Attribute** property. @@ -40,20 +44,24 @@ In the basic mode, configure the following properties: * **Title** – required * **Description** -* **Time indication** -* **Icon** – you can use glyphicons and images from the connected data-source entity; if an **Icon** is not provided, it will be shown as a circle with a background color specified in `.widget-timeline-icon-circle` +* **Time Indication** +* **Icon** – you can use glyphicons and images; if an **Icon** is not provided, it will be shown as a circle with a background color specified in `.widget-timeline-icon-circle` -In the basic mode, you can show a group header in the following formats: +In the basic mode, you can show a group header in the following formats, set with **Group by** and **Format**: | Option | Explanation | Example | | --- | --- | --- | -| **Day** / **Day name** | This will show the full name of the weekday. | Monday | -| **Day** / **Day** number and **month** | This will show a zero-padded day number and the full name of the month. | 01 March | -| **Day** / **Day** number, **month**, and **year** | This will show the default date format based on the current language. | 31/12/2020 | -| **Month** / **Month** name | This will show the full name of the month. | April | -| **Month** / **Month** and **year** | This will show the short name of the month and the full year. | Apr 2020 | +| **Day** / **Day name** (default) | This will show the full name of the weekday. | Monday | +| **Day** / **Day and month** | This will show a zero-padded day number and the full name of the month. | 01 March | +| **Day** / **Day, month, year** | This will show the default date format based on the current language. | 31/12/2020 | +| **Month** / **Month** (default) | This will show the full name of the month. | April | +| **Month** / **Month and year** | This will show the short name of the month and the full year. | Apr 2020 | | **Year** | This will show the full year. | 2020 | ### Custom Mode-Specific Fields {#custom} In the custom mode, the widget will generate five drop-zones for the icon, group header, title, time indication, and content. Since none of these fields are required, feel free to create your own timeline with any combination. + +### Events + +On the **Events** tab, you can set an **On click** action that runs when an event in the timeline is clicked. Events with an action get the `clickable` class. diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/tooltip.md b/content/en/docs/marketplace/platform-supported-content/widgets/tooltip.md index d691c8dcb0e..aad2c0d5bc5 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/tooltip.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/tooltip.md @@ -29,13 +29,13 @@ Several options can be defined in the Tooltip widget. For more information, see For the sake of simplicity, there are two methods for creating a tooltip: -- **Text** (default) – this mode lets you can enter text with or without parameters to quickly implement a tooltip in your app -- **Custom** – enable this mode to freely design what will be shown in the tooltip such as the text, images, and widgets +- **Text** (default) – this mode lets you enter text with or without parameters in the **Tooltip** property to quickly implement a tooltip in your app +- **Custom** – enable this mode to freely design what will be shown in the tooltip such as the text, images, and widgets, using the **Tooltip content: place widgets here** region If the tooltip has no content, it does not open. This happens, for example, when the text contains only spaces, or when all the widgets in the custom content are hidden. {{% alert color="info" %}} -From version 1.6.0 and above, custom tooltip content loads together with the page instead of when the tooltip first opens. This allows screen readers to announce the content. Data sources inside custom content, such as a data view or a list view, run when the page loads even if the user never opens the tooltip. We recommend you avoid heavy data sources in tooltip content, because they can decrease page performance. +From version 1.6.0 and above, custom tooltip content loads together with the page instead of when the tooltip first opens. This allows screen readers to announce the content. Data sources inside custom content, such as a data view or a list view, run when the page loads even if the user never opens the tooltip. Avoid heavy data sources in tooltip content, because they can decrease page performance. {{% /alert %}} ### Tooltip Position @@ -44,7 +44,7 @@ You can define how to position the tooltip in relation to the trigger element. **Tooltip Position** options are as follows: -- Top +- Top (default) - Left - Bottom - Right @@ -56,7 +56,7 @@ With the new Tooltip widget you also can define how to position the tooltip arro **Arrow Position** options are as follows: - Start -- Center +- Center (default) - End ### Open On @@ -75,6 +75,10 @@ From version 1.6.0, new Tooltip widgets use **Hover,focus** by default, so keybo On mobile devices the **Hover** option will be triggered on touch. {{% /alert %}} +### Styling + +To show the widget as an inline element, set the **Show inline** design property to **Yes**. This adds the `widget-tooltip-inline` class to the widget. + ## Keyboard and Screen Reader Support {#keyboard-screen-reader} The sections below describe how the Tooltip widget works with the keyboard and with screen readers. This behavior applies from version 1.6.0 of the widget. diff --git a/content/en/docs/marketplace/platform-supported-content/widgets/video-player.md b/content/en/docs/marketplace/platform-supported-content/widgets/video-player.md index 02f2024976f..2b08c43845a 100644 --- a/content/en/docs/marketplace/platform-supported-content/widgets/video-player.md +++ b/content/en/docs/marketplace/platform-supported-content/widgets/video-player.md @@ -38,6 +38,34 @@ Configure the following properties: {{< figure src="/attachments/appstore/platform-supported-content/widgets/video-player/dimensions.jpg" class="no-border" >}} +### General Tab + +* **Type** – determines how the URLs are provided: **Dynamic** (default) uses text templates, and **Expression** uses String expressions +* **Video URL** (required) – the web address of the video: YouTube, Vimeo, Dailymotion, or MP4 +* **Poster URL** – the web address of a poster image, which is a custom preview image shown in the player until the user starts the video + +### Accessibility Tab + +* **Title** – describes the purpose of the video, for example "Video tutorial on accessibility"; it is set as the `title` of the embedded player to give a meaningful description of the video content + +### Controls Tab + +* **Auto start** – automatically starts playing the video when the page loads (default: **No**) +* **Show Controls** – displays the video controls, such as the control bar, display icons, and dock buttons; available for YouTube, Dailymotion, and external videos (default: **Yes**) +* **Muted** – starts the video on mute (default: **No**) +* **Loop** – loops the video after it finishes; available for YouTube, Vimeo, and external videos (default: **No**) + +### Dimensions Tab + +* **Width Unit** – **Percentage** (default) is a portion of the parent size, and **Pixels** is an absolute amount of pixels +* **Width** – default: **100** +* **Height unit** – one of the following options: + * **Aspect ratio** (default) – the ratio of width to height, set in **Aspect ratio**: **16:9** (default), **4:3**, **3:2**, **21:9**, or **1:1** + * **Percentage of parent** – a portion of the parent height + * **Percentage of width** – a portion of the width + * **Pixels** – an absolute amount of pixels +* **Height** – used when **Height unit** is not **Aspect ratio** (default: **500**) + ### Cordova Configuration If your are building a hybrid mobile app, you need to add the following lines to enable access to YouTube, Vimeo, and Dailymotion videos as well as MP4 extensions through your Sprint in **Apps** > **Mobile App** > [Custom Cordova Configuration](/developerportal/deploy/mobileapp/#custom):