xmlui 0.9.59 → 0.9.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/{apiInterceptorWorker-BYU_Trhx.mjs → apiInterceptorWorker-DBv1IaN7.mjs} +1 -1
- package/dist/lib/{index-JqY6G28u.mjs → index-C9AUt7Ay.mjs} +3316 -3299
- package/dist/lib/index.css +1 -1
- package/dist/lib/language-server-web-worker.mjs +1 -1
- package/dist/lib/language-server.mjs +1 -1
- package/dist/lib/{metadata-utils-BXdiMJQN.mjs → metadata-utils-DJM8orNd.mjs} +1 -1
- package/dist/lib/{server-common-DGglaqCL.mjs → server-common-D0VA8gIv.mjs} +2 -2
- package/dist/lib/{transform-BboeJCuA.mjs → transform-BdB0APqE.mjs} +1203 -1109
- package/dist/lib/xmlui-parser.d.ts +45 -247
- package/dist/lib/xmlui-parser.mjs +2 -2
- package/dist/lib/{xmlui-serializer-D0p6Hyum.mjs → xmlui-serializer-COAfRndx.mjs} +1 -1
- package/dist/lib/xmlui.d.ts +52 -673
- package/dist/lib/xmlui.mjs +2 -2
- package/dist/metadata/{apiInterceptorWorker-CqXRCP46.mjs → apiInterceptorWorker-Bu81HvQB.mjs} +1 -1
- package/dist/metadata/{collectedComponentMetadata-BA6d7xt-.mjs → collectedComponentMetadata-Dzn97vOS.mjs} +6006 -5896
- package/dist/metadata/style.css +1 -1
- package/dist/metadata/xmlui-metadata.mjs +1 -1
- package/dist/metadata/xmlui-metadata.umd.js +94 -97
- package/dist/scripts/package.json +1 -1
- package/dist/scripts/src/abstractions/ComponentDefs.js +0 -8
- package/dist/scripts/src/abstractions/ThemingDefs.js +0 -9
- package/dist/scripts/src/components/APICall/APICall.js +30 -18
- package/dist/scripts/src/components/Accordion/Accordion.js +4 -3
- package/dist/scripts/src/components/Accordion/AccordionItem.js +10 -4
- package/dist/scripts/src/components/App/App.js +4 -3
- package/dist/scripts/src/components/AppHeader/AppHeader.js +1 -2
- package/dist/scripts/src/components/AppState/AppState.js +3 -3
- package/dist/scripts/src/components/AutoComplete/AutoComplete.js +6 -7
- package/dist/scripts/src/components/Avatar/Avatar.js +3 -3
- package/dist/scripts/src/components/Backdrop/Backdrop.js +1 -2
- package/dist/scripts/src/components/Badge/Badge.js +1 -2
- package/dist/scripts/src/components/Bookmark/Bookmark.js +2 -2
- package/dist/scripts/src/components/Breakout/Breakout.js +2 -2
- package/dist/scripts/src/components/Button/Button.js +1 -2
- package/dist/scripts/src/components/Card/Card.js +1 -2
- package/dist/scripts/src/components/Carousel/Carousel.js +6 -7
- package/dist/scripts/src/components/Carousel/CarouselItem.js +2 -2
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +1 -2
- package/dist/scripts/src/components/Charts/BarChart/BarChart.js +2 -2
- package/dist/scripts/src/components/Charts/DonutChart/DonutChart.js +2 -2
- package/dist/scripts/src/components/Charts/LabelList/LabelList.js +2 -2
- package/dist/scripts/src/components/Charts/Legend/Legend.js +2 -2
- package/dist/scripts/src/components/Charts/LineChart/LineChart.js +6 -6
- package/dist/scripts/src/components/Charts/PieChart/PieChart.js +3 -3
- package/dist/scripts/src/components/Checkbox/Checkbox.js +1 -2
- package/dist/scripts/src/components/CodeBlock/CodeBlock.js +2 -2
- package/dist/scripts/src/components/ColorPicker/ColorPicker.js +1 -2
- package/dist/scripts/src/components/Column/Column.js +2 -2
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +2 -2
- package/dist/scripts/src/components/DatePicker/DatePicker.js +2 -3
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +6 -7
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +2 -3
- package/dist/scripts/src/components/ExpandableItem/ExpandableItem.js +6 -7
- package/dist/scripts/src/components/FileInput/FileInput.js +14 -15
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +4 -4
- package/dist/scripts/src/components/FlowLayout/FlowLayout.js +2 -2
- package/dist/scripts/src/components/Footer/Footer.js +2 -2
- package/dist/scripts/src/components/Form/Form.js +12 -13
- package/dist/scripts/src/components/FormItem/FormItem.js +7 -8
- package/dist/scripts/src/components/FormSection/FormSection.js +7 -29
- package/dist/scripts/src/components/Heading/Heading.js +11 -11
- package/dist/scripts/src/components/HelloWorld/HelloWorld.js +1 -2
- package/dist/scripts/src/components/HoverCard/HoverCard.js +1 -2
- package/dist/scripts/src/components/HtmlTags/HtmlTags.js +297 -297
- package/dist/scripts/src/components/Icon/Icon.js +5 -5
- package/dist/scripts/src/components/Image/Image.js +4 -5
- package/dist/scripts/src/components/InspectButton/InspectButton.js +2 -2
- package/dist/scripts/src/components/Items/Items.js +2 -3
- package/dist/scripts/src/components/Link/Link.js +3 -4
- package/dist/scripts/src/components/List/List.js +15 -16
- package/dist/scripts/src/components/Logo/Logo.js +2 -2
- package/dist/scripts/src/components/Markdown/Markdown.js +3 -3
- package/dist/scripts/src/components/Markdown/MarkdownNative.js +1 -2
- package/dist/scripts/src/components/Markdown/parse-binding-expr.js +1 -1
- package/dist/scripts/src/components/Markdown/utils.js +16 -6
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +9 -9
- package/dist/scripts/src/components/NavGroup/NavGroup.js +2 -3
- package/dist/scripts/src/components/NavLink/NavLink.js +3 -4
- package/dist/scripts/src/components/NavPanel/NavPanel.js +1 -2
- package/dist/scripts/src/components/NestedApp/AppWithCodeView.js +2 -2
- package/dist/scripts/src/components/NestedApp/AppWithCodeViewNative.js +5 -7
- package/dist/scripts/src/components/NestedApp/NestedApp.js +7 -3
- package/dist/scripts/src/components/NestedApp/NestedAppNative.js +4 -2
- package/dist/scripts/src/components/NoResult/NoResult.js +1 -2
- package/dist/scripts/src/components/NumberBox/NumberBox.js +5 -6
- package/dist/scripts/src/components/NumberBox/NumberBox2.js +5 -6
- package/dist/scripts/src/components/Option/Option.js +5 -5
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +2 -2
- package/dist/scripts/src/components/Pages/Pages.js +3 -4
- package/dist/scripts/src/components/PositionedContainer/PositionedContainer.js +3 -3
- package/dist/scripts/src/components/ProgressBar/ProgressBar.js +2 -2
- package/dist/scripts/src/components/Queue/Queue.js +16 -16
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +1 -2
- package/dist/scripts/src/components/RadioGroup/RadioItem.js +2 -2
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +3 -3
- package/dist/scripts/src/components/Redirect/Redirect.js +2 -2
- package/dist/scripts/src/components/Select/Select.js +6 -7
- package/dist/scripts/src/components/SelectionStore/SelectionStore.js +2 -2
- package/dist/scripts/src/components/Slider/Slider.js +4 -5
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.js +2 -2
- package/dist/scripts/src/components/Spinner/Spinner.js +2 -2
- package/dist/scripts/src/components/Splitter/Splitter.js +2 -3
- package/dist/scripts/src/components/Stack/Stack.js +1 -2
- package/dist/scripts/src/components/StickyBox/StickyBox.js +2 -2
- package/dist/scripts/src/components/Switch/Switch.js +1 -2
- package/dist/scripts/src/components/Table/Table.js +19 -20
- package/dist/scripts/src/components/TableOfContents/TableOfContents.js +2 -2
- package/dist/scripts/src/components/Tabs/TabItem.js +1 -2
- package/dist/scripts/src/components/Tabs/Tabs.js +4 -4
- package/dist/scripts/src/components/Text/Text.js +4 -4
- package/dist/scripts/src/components/TextArea/TextArea.js +4 -5
- package/dist/scripts/src/components/TextBox/TextBox.js +3 -4
- package/dist/scripts/src/components/Theme/Theme.js +4 -4
- package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.js +2 -2
- package/dist/scripts/src/components/Tree/TreeComponent.js +1 -2
- package/dist/scripts/src/components/TreeDisplay/TreeDisplay.js +2 -2
- package/dist/scripts/src/components/metadata-helpers.js +8 -0
- package/dist/scripts/src/components-core/Fragment.js +2 -2
- package/dist/scripts/src/components-core/LoaderComponent.js +1 -1
- package/dist/scripts/src/components-core/RestApiProxy.js +1 -1
- package/dist/scripts/src/components-core/Slot.js +3 -3
- package/dist/scripts/src/components-core/loader/ApiLoader.js +4 -4
- package/dist/scripts/src/components-core/loader/DataLoader.js +20 -20
- package/dist/scripts/src/components-core/loader/ExternalDataLoader.js +6 -6
- package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +4 -4
- package/dist/scripts/src/components-core/rendering/AppContent.js +2 -2
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +1 -1
- package/dist/scripts/src/components-core/rendering/Container.js +2 -2
- package/dist/scripts/src/components-core/rendering/StateContainer.js +2 -2
- package/dist/scripts/src/components-core/rendering/reducer.js +1 -1
- package/dist/scripts/src/components-core/script-runner/ScriptingSourceTree.js +45 -0
- package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +1 -1
- package/dist/scripts/src/components-core/script-runner/eval-tree-common.js +1 -1
- package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +1 -1
- package/dist/scripts/src/components-core/script-runner/process-statement-async.js +1 -1
- package/dist/scripts/src/components-core/script-runner/process-statement-common.js +1 -1
- package/dist/scripts/src/components-core/script-runner/process-statement-sync.js +1 -1
- package/dist/scripts/src/components-core/script-runner/visitors.js +1 -1
- package/dist/scripts/src/components-core/theming/ThemeProvider.js +2 -2
- package/dist/scripts/src/components-core/theming/utils.js +31 -0
- package/dist/scripts/src/components-core/utils/statementUtils.js +1 -1
- package/dist/scripts/src/parsers/scripting/Parser.js +1 -1
- package/dist/scripts/src/parsers/scripting/code-behind-collect.js +1 -1
- package/dist/scripts/src/parsers/scripting/modules.js +1 -1
- package/dist/scripts/src/parsers/scripting/tree-visitor.js +1 -1
- package/dist/standalone/xmlui-standalone.es.d.ts +52 -673
- package/dist/standalone/xmlui-standalone.umd.js +215 -218
- package/package.json +1 -1
- /package/dist/scripts/src/components-core/{abstractions → rendering}/containers.js +0 -0
- /package/dist/scripts/src/{abstractions/scripting/ScriptingSourceTree.js → parsers/scripting/ScriptingNodeTypes.js} +0 -0
|
@@ -9,7 +9,6 @@ const react_1 = require("react");
|
|
|
9
9
|
const immer_1 = __importDefault(require("immer"));
|
|
10
10
|
const Table_module_scss_1 = __importDefault(require("./Table.module.scss"));
|
|
11
11
|
require("./react-table-config.d.ts");
|
|
12
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
13
12
|
const renderers_1 = require("../../components-core/renderers");
|
|
14
13
|
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
15
14
|
const constants_1 = require("../../components-core/constants");
|
|
@@ -18,35 +17,35 @@ const TableContext_1 = require("../Column/TableContext");
|
|
|
18
17
|
const SelectionStoreNative_1 = require("../SelectionStore/SelectionStoreNative");
|
|
19
18
|
const TableNative_1 = require("./TableNative");
|
|
20
19
|
const COMP = "Table";
|
|
21
|
-
exports.TableMd = (0,
|
|
20
|
+
exports.TableMd = (0, metadata_helpers_1.createMetadata)({
|
|
22
21
|
description: "`Table` presents structured data for viewing, sorting, selection, and interaction.",
|
|
23
22
|
props: {
|
|
24
23
|
items: (0, metadata_helpers_1.dInternal)(`You can use \`items\` as an alias for the \`data\` property. ` +
|
|
25
24
|
`When you bind the table to a data source (e.g. an API endpoint), ` +
|
|
26
25
|
`the \`data\` acts as the property that accepts a URL to fetch information from an API. ` +
|
|
27
26
|
`When both \`items\` and \`data\` are used, \`items\` has priority.`),
|
|
28
|
-
data: (0,
|
|
27
|
+
data: (0, metadata_helpers_1.d)(`The component receives data via this property. The \`data\` property is a list of items ` +
|
|
29
28
|
`that the \`Table\` can display.`),
|
|
30
29
|
isPaginated: {
|
|
31
30
|
description: `This property adds pagination controls to the \`${COMP}\`.`,
|
|
32
31
|
valueType: "boolean",
|
|
33
32
|
defaultValue: TableNative_1.defaultProps.isPaginated,
|
|
34
33
|
},
|
|
35
|
-
loading: (0,
|
|
34
|
+
loading: (0, metadata_helpers_1.d)(`This boolean property indicates if the component is fetching (or processing) data. This ` +
|
|
36
35
|
`property is useful when data is loaded conditionally or receiving it takes some time.`),
|
|
37
|
-
headerHeight: (0,
|
|
38
|
-
rowsSelectable: (0,
|
|
36
|
+
headerHeight: (0, metadata_helpers_1.d)(`This optional property is used to specify the height of the table header.`),
|
|
37
|
+
rowsSelectable: (0, metadata_helpers_1.d)(`Indicates whether the rows are selectable (\`true\`) or not (\`false\`).`),
|
|
39
38
|
pageSizes: {
|
|
40
39
|
description: "This property holds an array of page sizes (numbers) the user can select for " +
|
|
41
40
|
"pagination. If this property is not defined, the component allows only a page size of 10 items.",
|
|
42
41
|
},
|
|
43
|
-
rowDisabledPredicate: (0,
|
|
42
|
+
rowDisabledPredicate: (0, metadata_helpers_1.d)(`This property defines a predicate function with a return value that determines if the ` +
|
|
44
43
|
`row should be disabled. The function retrieves the item to display and should return ` +
|
|
45
44
|
`a Boolean-like value.`),
|
|
46
45
|
noDataTemplate: (0, metadata_helpers_1.dComponent)(`A property to customize what to display if the table does not contain any data.`),
|
|
47
|
-
sortBy: (0,
|
|
46
|
+
sortBy: (0, metadata_helpers_1.d)("This property is used to determine which data property to sort by. If not defined, " +
|
|
48
47
|
"the data is not sorted"),
|
|
49
|
-
sortDirection: (0,
|
|
48
|
+
sortDirection: (0, metadata_helpers_1.d)("This property determines the sort order to be \`ascending\` or \`descending\`. This " +
|
|
50
49
|
"property only works if the [\`sortBy\`](#sortby) property is also set. By default " +
|
|
51
50
|
"ascending order is used."),
|
|
52
51
|
autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
|
|
@@ -55,13 +54,13 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
55
54
|
valueType: "boolean",
|
|
56
55
|
defaultValue: TableNative_1.defaultProps.hideHeader,
|
|
57
56
|
},
|
|
58
|
-
iconNoSort: (0,
|
|
57
|
+
iconNoSort: (0, metadata_helpers_1.d)(`Allows setting an alternate icon displayed in the ${COMP} column header when sorting is ` +
|
|
59
58
|
`enabled, but the column remains unsorted. You can change the default icon for all ${COMP} ` +
|
|
60
59
|
`instances with the "icon.nosort:Table" declaration in the app configuration file.`),
|
|
61
|
-
iconSortAsc: (0,
|
|
60
|
+
iconSortAsc: (0, metadata_helpers_1.d)(`Allows setting an alernate icon displayed in the ${COMP} column header when sorting is enabled, ` +
|
|
62
61
|
`and the column is sorted in ascending order. You can change the default icon for all ${COMP} ` +
|
|
63
62
|
`instances with the "icon.sortasc:Table" declaration in the app configuration file.`),
|
|
64
|
-
iconSortDesc: (0,
|
|
63
|
+
iconSortDesc: (0, metadata_helpers_1.d)(`Allows setting an alternate icon displayed in the ${COMP} column header when sorting is enabled, ` +
|
|
65
64
|
`and the column is sorted in descending order. You can change the default icon for all ${COMP} ` +
|
|
66
65
|
`instances with the "icon.sortdesc:Table" declaration in the app configuration file.`),
|
|
67
66
|
enableMultiRowSelection: {
|
|
@@ -86,22 +85,22 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
86
85
|
},
|
|
87
86
|
},
|
|
88
87
|
events: {
|
|
89
|
-
sortingDidChange: (0,
|
|
88
|
+
sortingDidChange: (0, metadata_helpers_1.d)(`This event is fired when the table data sorting has changed. It has two arguments: ` +
|
|
90
89
|
`the column's name and the sort direction. When the column name is empty, the table ` +
|
|
91
90
|
`displays the data list as it received it.`),
|
|
92
|
-
willSort: (0,
|
|
91
|
+
willSort: (0, metadata_helpers_1.d)(`This event is fired before the table data is sorted. It has two arguments: the ` +
|
|
93
92
|
`column's name and the sort direction. When the method returns a literal \`false\` ` +
|
|
94
93
|
`value (and not any other falsy one), the method indicates that the sorting should be aborted.`),
|
|
95
|
-
selectionDidChange: (0,
|
|
94
|
+
selectionDidChange: (0, metadata_helpers_1.d)(`This event is triggered when the table's current selection (the rows selected) changes. ` +
|
|
96
95
|
`Its parameter is an array of the selected table row items. `),
|
|
97
96
|
},
|
|
98
97
|
apis: {
|
|
99
|
-
clearSelection: (0,
|
|
100
|
-
getSelectedItems: (0,
|
|
101
|
-
getSelectedIds: (0,
|
|
102
|
-
selectAll: (0,
|
|
98
|
+
clearSelection: (0, metadata_helpers_1.d)("This method clears the list of currently selected table rows."),
|
|
99
|
+
getSelectedItems: (0, metadata_helpers_1.d)(`This method returns the list of currently selected table rows items.`),
|
|
100
|
+
getSelectedIds: (0, metadata_helpers_1.d)(`This method returns the list of currently selected table rows IDs.`),
|
|
101
|
+
selectAll: (0, metadata_helpers_1.d)(`This method selects all the rows in the table. This method has no effect if the ` +
|
|
103
102
|
`rowsSelectable property is set to \`false\`.`),
|
|
104
|
-
selectId: (0,
|
|
103
|
+
selectId: (0, metadata_helpers_1.d)(`This method selects the row with the specified ID. This method has no effect if the ` +
|
|
105
104
|
`\`rowsSelectable\` property is set to \`false\`. The method argument can be a ` +
|
|
106
105
|
`single id or an array of them.`),
|
|
107
106
|
},
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.tableOfContentsRenderer = exports.TableOfContentsMd = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const TableOfContents_module_scss_1 = __importDefault(require("./TableOfContents.module.scss"));
|
|
9
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
9
|
const renderers_1 = require("../../components-core/renderers");
|
|
11
10
|
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
11
|
const TableOfContentsNative_1 = require("./TableOfContentsNative");
|
|
13
12
|
const IndexerContext_1 = require("../App/IndexerContext");
|
|
13
|
+
const metadata_helpers_1 = require("../metadata-helpers");
|
|
14
14
|
const COMP = "TableOfContents";
|
|
15
15
|
const COMP_CHILD = "TableOfContentsItem";
|
|
16
|
-
exports.TableOfContentsMd = (0,
|
|
16
|
+
exports.TableOfContentsMd = (0, metadata_helpers_1.createMetadata)({
|
|
17
17
|
status: "experimental",
|
|
18
18
|
description: "`TableOfContents` component collects [Heading](/components/Heading) and " +
|
|
19
19
|
"[Bookmark](/components/Bookmark) within the current page and displays them in a navigable tree.",
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.tabItemComponentRenderer = exports.TabItemMd = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
6
5
|
const renderers_1 = require("../../components-core/renderers");
|
|
7
6
|
const TabItemNative_1 = require("./TabItemNative");
|
|
8
7
|
const metadata_helpers_1 = require("../metadata-helpers");
|
|
9
8
|
const COMP = "TabItem";
|
|
10
|
-
exports.TabItemMd = (0,
|
|
9
|
+
exports.TabItemMd = (0, metadata_helpers_1.createMetadata)({
|
|
11
10
|
description: "`TabItem` defines individual tabs within a [Tabs](/components/Tabs) component, " +
|
|
12
11
|
"providing both the tab header label and the content that displays when the tab " +
|
|
13
12
|
"is selected. As a non-visual structural component, it serves as a container that " +
|
|
@@ -6,20 +6,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.tabsComponentRenderer = exports.TabsMd = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const Tabs_module_scss_1 = __importDefault(require("./Tabs.module.scss"));
|
|
9
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
9
|
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
11
10
|
const renderers_1 = require("../../components-core/renderers");
|
|
12
11
|
const container_helpers_1 = require("../container-helpers");
|
|
13
12
|
const TabsNative_1 = require("./TabsNative");
|
|
13
|
+
const metadata_helpers_1 = require("../metadata-helpers");
|
|
14
14
|
const COMP = "Tabs";
|
|
15
|
-
exports.TabsMd = (0,
|
|
15
|
+
exports.TabsMd = (0, metadata_helpers_1.createMetadata)({
|
|
16
16
|
status: "experimental",
|
|
17
17
|
description: "`Tabs` enables users to switch among content panels using clickable tab headers. " +
|
|
18
18
|
"It provides an efficient way to present multiple related sections in a single " +
|
|
19
19
|
"interface area, with each tab containing distinct content defined by " +
|
|
20
20
|
"[TabItem](/components/TabItem) components.",
|
|
21
21
|
props: {
|
|
22
|
-
activeTab: (0,
|
|
22
|
+
activeTab: (0, metadata_helpers_1.d)(`This property indicates the index of the active tab. The indexing starts from 0, ` +
|
|
23
23
|
`representing the starting (leftmost) tab. If not set, the first tab is selected by default.`),
|
|
24
24
|
orientation: {
|
|
25
25
|
description: `This property indicates the orientation of the component. In horizontal orientation, ` +
|
|
@@ -36,7 +36,7 @@ exports.TabsMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
apis: {
|
|
39
|
-
next: (0,
|
|
39
|
+
next: (0, metadata_helpers_1.d)(`This method selects the next tab.`),
|
|
40
40
|
},
|
|
41
41
|
themeVars: (0, themeVars_1.parseScssVar)(Tabs_module_scss_1.default.themeVars),
|
|
42
42
|
defaultThemeVars: {
|
|
@@ -17,17 +17,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.textComponentRenderer = exports.TextMd = void 0;
|
|
18
18
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
19
|
const Text_module_scss_1 = __importDefault(require("./Text.module.scss"));
|
|
20
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
21
20
|
const renderers_1 = require("../../components-core/renderers");
|
|
22
21
|
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
23
22
|
const abstractions_1 = require("../abstractions");
|
|
24
23
|
const TextNative_1 = require("./TextNative");
|
|
24
|
+
const metadata_helpers_1 = require("../metadata-helpers");
|
|
25
25
|
const COMP = "Text";
|
|
26
|
-
exports.TextMd = (0,
|
|
26
|
+
exports.TextMd = (0, metadata_helpers_1.createMetadata)({
|
|
27
27
|
description: `The \`${COMP}\` component displays textual information in a number of optional ` +
|
|
28
28
|
`styles and variants.`,
|
|
29
29
|
props: {
|
|
30
|
-
value: (0,
|
|
30
|
+
value: (0, metadata_helpers_1.d)(`The text to be displayed. This value can also be set via nesting the text into ` +
|
|
31
31
|
`the \`${COMP}\` component.`),
|
|
32
32
|
variant: {
|
|
33
33
|
description: "An optional string value that provides named presets for text variants with a " +
|
|
@@ -35,7 +35,7 @@ exports.TextMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
35
35
|
"If not defined, the text uses the current style of its context.",
|
|
36
36
|
availableValues: abstractions_1.variantOptionsMd,
|
|
37
37
|
},
|
|
38
|
-
maxLines: (0,
|
|
38
|
+
maxLines: (0, metadata_helpers_1.d)("This property determines the maximum number of lines the component can wrap to. " +
|
|
39
39
|
"If there is no space to display all the contents, the component displays up to as " +
|
|
40
40
|
"many lines as specified in this property. When the value is not defined, there is " +
|
|
41
41
|
"no limit on the displayed lines."),
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.textAreaComponentRenderer = exports.TextAreaMd = exports.resizeOptionsMd = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const TextArea_module_scss_1 = __importDefault(require("./TextArea.module.scss"));
|
|
9
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
9
|
const renderers_1 = require("../../components-core/renderers");
|
|
11
10
|
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
11
|
const metadata_helpers_1 = require("../metadata-helpers");
|
|
@@ -18,7 +17,7 @@ exports.resizeOptionsMd = [
|
|
|
18
17
|
{ value: "vertical", description: "Can only resize vertically" },
|
|
19
18
|
{ value: "both", description: "Can resize in both dimensions" },
|
|
20
19
|
];
|
|
21
|
-
exports.TextAreaMd = (0,
|
|
20
|
+
exports.TextAreaMd = (0, metadata_helpers_1.createMetadata)({
|
|
22
21
|
status: "stable",
|
|
23
22
|
description: "`TextArea` provides a multiline text input area.",
|
|
24
23
|
props: {
|
|
@@ -34,9 +33,9 @@ exports.TextAreaMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
34
33
|
valueType: "boolean",
|
|
35
34
|
defaultValue: false,
|
|
36
35
|
},
|
|
37
|
-
maxRows: (0,
|
|
36
|
+
maxRows: (0, metadata_helpers_1.d)(`This optional property sets the maximum number of text rows the \`${COMP}\` ` +
|
|
38
37
|
"can grow. If not set, the number of rows is unlimited."),
|
|
39
|
-
minRows: (0,
|
|
38
|
+
minRows: (0, metadata_helpers_1.d)(`This optional property sets the minimum number of text rows the \`${COMP}\` can shrink. ` +
|
|
40
39
|
`If not set, the minimum number of rows is 1.`),
|
|
41
40
|
rows: {
|
|
42
41
|
description: `Specifies the number of rows the component initially has.`,
|
|
@@ -74,7 +73,7 @@ exports.TextAreaMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
74
73
|
},
|
|
75
74
|
apis: {
|
|
76
75
|
focus: (0, metadata_helpers_1.dFocus)(COMP),
|
|
77
|
-
value: (0,
|
|
76
|
+
value: (0, metadata_helpers_1.d)(`You can query the component's value. If no value is set, it will retrieve \`undefined\`.`),
|
|
78
77
|
setValue: (0, metadata_helpers_1.dSetValueApi)(),
|
|
79
78
|
},
|
|
80
79
|
themeVars: (0, themeVars_1.parseScssVar)(TextArea_module_scss_1.default.themeVars),
|
|
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.passwordInputComponentRenderer = exports.PasswordMd = exports.textBoxComponentRenderer = exports.TextBoxMd = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const TextBox_module_scss_1 = __importDefault(require("./TextBox.module.scss"));
|
|
9
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
9
|
const renderers_1 = require("../../components-core/renderers");
|
|
11
10
|
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
11
|
const metadata_helpers_1 = require("../metadata-helpers");
|
|
13
12
|
const TextBoxNative_1 = require("./TextBoxNative");
|
|
14
13
|
const COMP = "TextBox";
|
|
15
|
-
exports.TextBoxMd = (0,
|
|
14
|
+
exports.TextBoxMd = (0, metadata_helpers_1.createMetadata)({
|
|
16
15
|
status: "stable",
|
|
17
16
|
description: "`TextBox` captures user text input for forms, search fields, and data entry " +
|
|
18
17
|
"with support for validation, icons, and formatting hints.",
|
|
@@ -45,7 +44,7 @@ exports.TextBoxMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
45
44
|
},
|
|
46
45
|
apis: {
|
|
47
46
|
focus: (0, metadata_helpers_1.dFocus)(COMP),
|
|
48
|
-
value: (0,
|
|
47
|
+
value: (0, metadata_helpers_1.d)(`You can query the component's value. If no value is set, it will retrieve \`undefined\`.`),
|
|
49
48
|
setValue: (0, metadata_helpers_1.dSetValueApi)(),
|
|
50
49
|
},
|
|
51
50
|
themeVars: (0, themeVars_1.parseScssVar)(TextBox_module_scss_1.default.themeVars),
|
|
@@ -85,7 +84,7 @@ function renderTextBox(layoutCss, state, updateState, extractValue, node, lookup
|
|
|
85
84
|
exports.textBoxComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.TextBoxMd, ({ node, state, updateState, lookupEventHandler, extractValue, layoutCss, registerComponentApi, }) => {
|
|
86
85
|
return renderTextBox(layoutCss, state, updateState, extractValue, node, lookupEventHandler, registerComponentApi);
|
|
87
86
|
});
|
|
88
|
-
exports.PasswordMd = (0,
|
|
87
|
+
exports.PasswordMd = (0, metadata_helpers_1.createMetadata)(Object.assign(Object.assign({}, exports.TextBoxMd), { description: "`Password` is a specialized [TextBox](/components/TextBox) that enables users " +
|
|
89
88
|
"to input and edit passwords." }));
|
|
90
89
|
exports.passwordInputComponentRenderer = (0, renderers_1.createComponentRenderer)("PasswordInput", exports.PasswordMd, ({ node, state, updateState, lookupEventHandler, extractValue, layoutCss, registerComponentApi, }) => {
|
|
91
90
|
return renderTextBox(layoutCss, state, updateState, extractValue, node, lookupEventHandler, registerComponentApi, "password");
|
|
@@ -13,23 +13,23 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.themeComponentRenderer = exports.ThemeMd = void 0;
|
|
15
15
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
17
16
|
const renderers_1 = require("../../components-core/renderers");
|
|
17
|
+
const metadata_helpers_1 = require("../metadata-helpers");
|
|
18
18
|
const ThemeNative_1 = require("./ThemeNative");
|
|
19
19
|
const COMP = "Theme";
|
|
20
|
-
exports.ThemeMd = (0,
|
|
20
|
+
exports.ThemeMd = (0, metadata_helpers_1.createMetadata)({
|
|
21
21
|
description: "`Theme` creates styling contexts to customize the appearance of nested " +
|
|
22
22
|
"components without using CSS.",
|
|
23
23
|
allowArbitraryProps: true,
|
|
24
24
|
props: {
|
|
25
|
-
themeId: (0,
|
|
25
|
+
themeId: (0, metadata_helpers_1.d)(`This property specifies which theme to use by setting the theme's id.`),
|
|
26
26
|
tone: {
|
|
27
27
|
description: "This property allows the setting of the current theme's tone.",
|
|
28
28
|
availableValues: ["light", "dark"],
|
|
29
29
|
valueType: "string",
|
|
30
30
|
defaultValue: "light",
|
|
31
31
|
},
|
|
32
|
-
root: (0,
|
|
32
|
+
root: (0, metadata_helpers_1.d)(`This property indicates whether the component is at the root of the application.`, undefined, "boolean", ThemeNative_1.defaultProps.root),
|
|
33
33
|
},
|
|
34
34
|
opaque: true,
|
|
35
35
|
});
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.toneChangerButtonComponentRenderer = exports.ToneChangerButtonMd = exports.defaultProps = void 0;
|
|
4
4
|
exports.ToneChangerButton = ToneChangerButton;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
7
6
|
const ThemeContext_1 = require("../../components-core/theming/ThemeContext");
|
|
8
7
|
const renderers_1 = require("../../components-core/renderers");
|
|
9
8
|
const ButtonNative_1 = require("../Button/ButtonNative");
|
|
10
9
|
const IconNative_1 = require("../Icon/IconNative");
|
|
10
|
+
const metadata_helpers_1 = require("../metadata-helpers");
|
|
11
11
|
const COMP = "ToneChangerButton";
|
|
12
12
|
const LIGHT_TO_DARK_ICON = "lightToDark:ToneChangerButton";
|
|
13
13
|
const DARK_TO_LIGHT_ICON = "darkToLight:ToneChangerButton";
|
|
@@ -15,7 +15,7 @@ exports.defaultProps = {
|
|
|
15
15
|
lightToDarkIcon: LIGHT_TO_DARK_ICON,
|
|
16
16
|
darkToLightIcon: DARK_TO_LIGHT_ICON,
|
|
17
17
|
};
|
|
18
|
-
exports.ToneChangerButtonMd = (0,
|
|
18
|
+
exports.ToneChangerButtonMd = (0, metadata_helpers_1.createMetadata)({
|
|
19
19
|
status: "stable",
|
|
20
20
|
description: "`ToneChangerButton` enables the user to switch between light and dark modes.",
|
|
21
21
|
props: {
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.treeComponentRenderer = exports.TreeMd = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
6
5
|
const renderers_1 = require("../../components-core/renderers");
|
|
7
6
|
const container_helpers_1 = require("../container-helpers");
|
|
8
7
|
const metadata_helpers_1 = require("../metadata-helpers");
|
|
9
8
|
const TreeNative_1 = require("./TreeNative");
|
|
10
9
|
const COMP = "Tree";
|
|
11
|
-
exports.TreeMd = (0,
|
|
10
|
+
exports.TreeMd = (0, metadata_helpers_1.createMetadata)({
|
|
12
11
|
status: "in progress",
|
|
13
12
|
description: `The \`${COMP}\` component is a virtualized tree component that displays hierarchical data.`,
|
|
14
13
|
props: {
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.treeDisplayComponentRenderer = exports.TreeDisplayMd = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const TreeDisplay_module_scss_1 = __importDefault(require("./TreeDisplay.module.scss"));
|
|
9
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
9
|
const renderers_1 = require("../../components-core/renderers");
|
|
11
10
|
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
11
|
const TreeDisplayNative_1 = require("./TreeDisplayNative");
|
|
12
|
+
const metadata_helpers_1 = require("../metadata-helpers");
|
|
13
13
|
const COMP = "TreeDisplay";
|
|
14
|
-
exports.TreeDisplayMd = (0,
|
|
14
|
+
exports.TreeDisplayMd = (0, metadata_helpers_1.createMetadata)({
|
|
15
15
|
status: "stable",
|
|
16
16
|
description: `The \`${COMP}\` component displays hierarchical data in a tree structure. ` +
|
|
17
17
|
`It accepts an indented text format where each line is an entry in the tree, and ` +
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createMetadata = createMetadata;
|
|
4
|
+
exports.d = d;
|
|
3
5
|
exports.dInternal = dInternal;
|
|
4
6
|
exports.dClick = dClick;
|
|
5
7
|
exports.dGotFocus = dGotFocus;
|
|
@@ -36,6 +38,12 @@ exports.dDidClose = dDidClose;
|
|
|
36
38
|
exports.dTriggerTemplate = dTriggerTemplate;
|
|
37
39
|
exports.dOrientation = dOrientation;
|
|
38
40
|
const abstractions_1 = require("./abstractions");
|
|
41
|
+
function createMetadata(metadata) {
|
|
42
|
+
return metadata;
|
|
43
|
+
}
|
|
44
|
+
function d(description, availableValues, valueType, defaultValue, isValid, isRequired) {
|
|
45
|
+
return { description, isRequired, availableValues, valueType, defaultValue, isValid };
|
|
46
|
+
}
|
|
39
47
|
function dInternal(description) {
|
|
40
48
|
return {
|
|
41
49
|
description: description !== null && description !== void 0 ? description : `This property is for internal use only.`,
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.fragmentComponentRenderer = exports.FragmentMd = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const ComponentDefs_1 = require("../abstractions/ComponentDefs");
|
|
7
6
|
const renderers_1 = require("./renderers");
|
|
7
|
+
const metadata_helpers_1 = require("../components/metadata-helpers");
|
|
8
8
|
const COMP = "Fragment";
|
|
9
|
-
exports.FragmentMd = (0,
|
|
9
|
+
exports.FragmentMd = (0, metadata_helpers_1.createMetadata)({
|
|
10
10
|
description: "`Fragment` provides conditional rendering. You can use `when=` on any " +
|
|
11
11
|
"component to render it conditionally, use `Fragment` to apply `when` to a group of components.",
|
|
12
12
|
opaque: true,
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LoaderComponent = LoaderComponent;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const ComponentRegistryContext_1 = require("../components/ComponentRegistryContext");
|
|
6
|
-
const containers_1 = require("./
|
|
6
|
+
const containers_1 = require("./rendering/containers");
|
|
7
7
|
const valueExtractor_1 = require("./rendering/valueExtractor");
|
|
8
8
|
const hooks_1 = require("./utils/hooks");
|
|
9
9
|
function LoaderComponent({ node, state, dispatch, lookupAction, lookupSyncCallback, registerComponentApi, onUnmount, appContext, memoedVarsRef, }) {
|
|
@@ -43,7 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
45
|
const lodash_es_1 = require("lodash-es");
|
|
46
|
-
const ScriptingSourceTree_1 = require("
|
|
46
|
+
const ScriptingSourceTree_1 = require("./script-runner/ScriptingSourceTree");
|
|
47
47
|
const extractParam_1 = require("./utils/extractParam");
|
|
48
48
|
const misc_1 = require("./utils/misc");
|
|
49
49
|
const EngineError_1 = require("./EngineError");
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SlotHolder = exports.SlotMd = void 0;
|
|
4
|
-
const
|
|
4
|
+
const metadata_helpers_1 = require("../components/metadata-helpers");
|
|
5
5
|
const renderers_1 = require("./renderers");
|
|
6
6
|
const COMP = "Slot";
|
|
7
|
-
exports.SlotMd = (0,
|
|
7
|
+
exports.SlotMd = (0, metadata_helpers_1.createMetadata)({
|
|
8
8
|
status: "experimental",
|
|
9
9
|
description: "Placeholder in a reusable component. " +
|
|
10
10
|
"Signs the slot where the component's injected children should be rendered.",
|
|
11
11
|
props: {
|
|
12
|
-
name: (0,
|
|
12
|
+
name: (0, metadata_helpers_1.d)(`This optional property defines the name of the slot.`),
|
|
13
13
|
},
|
|
14
14
|
allowArbitraryProps: true,
|
|
15
15
|
opaque: true
|
|
@@ -12,12 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.apiLoaderRenderer = void 0;
|
|
13
13
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
14
14
|
const react_1 = require("react");
|
|
15
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
16
15
|
const misc_1 = require("../utils/misc");
|
|
17
16
|
const extractParam_1 = require("../utils/extractParam");
|
|
18
17
|
const renderers_1 = require("../renderers");
|
|
19
18
|
const AppContext_1 = require("../AppContext");
|
|
20
19
|
const Loader_1 = require("./Loader");
|
|
20
|
+
const metadata_helpers_1 = require("../../components/metadata-helpers");
|
|
21
21
|
/**
|
|
22
22
|
* Represents a non-displayed React component, which handles the specified API loader
|
|
23
23
|
*/
|
|
@@ -41,11 +41,11 @@ function ApiLoader({ loader, loaderInProgressChanged, loaderIsRefetchingChanged,
|
|
|
41
41
|
}), [doNotRemoveNulls, loadable, loader.props.raw, url]);
|
|
42
42
|
return ((0, jsx_runtime_1.jsx)(Loader_1.Loader, { state: state, loader: loader, loaderInProgressChanged: loaderInProgressChanged, loaderIsRefetchingChanged: loaderIsRefetchingChanged, loaderLoaded: loaderLoaded, loaderError: loaderError, loaderFn: doLoad, structuralSharing: structuralSharing }));
|
|
43
43
|
}
|
|
44
|
-
const ApiLoaderMd = (0,
|
|
44
|
+
const ApiLoaderMd = (0, metadata_helpers_1.createMetadata)({
|
|
45
45
|
description: `Represents a loader that calls an API through an HTTP/HTTPS GET request`,
|
|
46
46
|
props: {
|
|
47
|
-
url: (0,
|
|
48
|
-
raw: (0,
|
|
47
|
+
url: (0, metadata_helpers_1.d)("URL segment to use in the GET request"),
|
|
48
|
+
raw: (0, metadata_helpers_1.d)("If true, the loader returns the raw text response instead of parsing it as JSON"),
|
|
49
49
|
},
|
|
50
50
|
});
|
|
51
51
|
exports.apiLoaderRenderer = (0, renderers_1.createLoaderRenderer)("ApiLoader", ({ loader, state, loaderInProgressChanged, loaderIsRefetchingChanged, loaderLoaded, loaderError }) => {
|
|
@@ -17,7 +17,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
17
17
|
const react_1 = require("react");
|
|
18
18
|
const react_hot_toast_1 = __importDefault(require("react-hot-toast"));
|
|
19
19
|
const papaparse_1 = __importDefault(require("papaparse"));
|
|
20
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
21
20
|
const renderers_1 = require("../renderers");
|
|
22
21
|
const RestApiProxy_1 = __importDefault(require("../RestApiProxy"));
|
|
23
22
|
const extractParam_1 = require("../utils/extractParam");
|
|
@@ -27,6 +26,7 @@ const Loader_1 = require("../loader/Loader");
|
|
|
27
26
|
const AppContext_1 = require("../AppContext");
|
|
28
27
|
const hooks_1 = require("../utils/hooks");
|
|
29
28
|
const IndexerContext_1 = require("../../components/App/IndexerContext");
|
|
29
|
+
const metadata_helpers_1 = require("../../components/metadata-helpers");
|
|
30
30
|
function DataLoader({ loader, state, registerComponentApi, onLoaded, onError, loaderInProgressChanged, loaderIsRefetchingChanged, loaderLoaded, loaderError, transformResult, structuralSharing = true, }) {
|
|
31
31
|
const appContext = (0, AppContext_1.useAppContext)();
|
|
32
32
|
const url = (0, extractParam_1.extractParam)(state, loader.props.url, appContext);
|
|
@@ -293,29 +293,29 @@ function DataLoader({ loader, state, registerComponentApi, onLoaded, onError, lo
|
|
|
293
293
|
const pollIntervalInSeconds = (0, extractParam_1.extractParam)(state, loader.props.pollIntervalInSeconds, appContext);
|
|
294
294
|
return hasPaging ? ((0, jsx_runtime_1.jsx)(PageableLoader_1.PageableLoader, { queryId: queryId, state: state, loader: loader, loaderInProgressChanged: inProgress, loaderIsRefetchingChanged: loaderIsRefetchingChanged, loaderLoaded: loaded, loaderError: error, loaderFn: doLoad, registerComponentApi: registerComponentApi, pollIntervalInSeconds: pollIntervalInSeconds, onLoaded: onLoaded, transformResult: transformResult, structuralSharing: structuralSharing }, queryId === null || queryId === void 0 ? void 0 : queryId.join(""))) : ((0, jsx_runtime_1.jsx)(Loader_1.Loader, { queryId: queryId, state: state, loader: loader, loaderInProgressChanged: inProgress, loaderIsRefetchingChanged: loaderIsRefetchingChanged, loaderLoaded: loaded, loaderError: error, loaderFn: doLoad, pollIntervalInSeconds: pollIntervalInSeconds, registerComponentApi: registerComponentApi, onLoaded: onLoaded, transformResult: transformResult, structuralSharing: structuralSharing }, queryId === null || queryId === void 0 ? void 0 : queryId.join("")));
|
|
295
295
|
}
|
|
296
|
-
exports.DataLoaderMd = (0,
|
|
296
|
+
exports.DataLoaderMd = (0, metadata_helpers_1.createMetadata)({
|
|
297
297
|
description: "This component manages data fetching from a web API",
|
|
298
298
|
props: {
|
|
299
|
-
method: (0,
|
|
300
|
-
url: (0,
|
|
301
|
-
rawBody: (0,
|
|
302
|
-
body: (0,
|
|
303
|
-
queryParams: (0,
|
|
304
|
-
headers: (0,
|
|
305
|
-
pollIntervalInSeconds: (0,
|
|
306
|
-
resultSelector: (0,
|
|
307
|
-
prevPageSelector: (0,
|
|
308
|
-
nextPageSelector: (0,
|
|
309
|
-
inProgressNotificationMessage: (0,
|
|
310
|
-
completedNotificationMessage: (0,
|
|
311
|
-
errorNotificationMessage: (0,
|
|
312
|
-
transformResult: (0,
|
|
313
|
-
dataType: (0,
|
|
314
|
-
structuralSharing: (0,
|
|
299
|
+
method: (0, metadata_helpers_1.d)("The HTTP method to use"),
|
|
300
|
+
url: (0, metadata_helpers_1.d)("The URL to fetch data from"),
|
|
301
|
+
rawBody: (0, metadata_helpers_1.d)("The raw body of the request"),
|
|
302
|
+
body: (0, metadata_helpers_1.d)("The body of the request to be sent as JSON"),
|
|
303
|
+
queryParams: (0, metadata_helpers_1.d)("Query parameters to send with the request"),
|
|
304
|
+
headers: (0, metadata_helpers_1.d)("Headers to send with the request"),
|
|
305
|
+
pollIntervalInSeconds: (0, metadata_helpers_1.d)("The interval in seconds to poll the API for refreshing data"),
|
|
306
|
+
resultSelector: (0, metadata_helpers_1.d)("An expression to extract the result from the response"),
|
|
307
|
+
prevPageSelector: (0, metadata_helpers_1.d)("An expression to extract the previous page parameter from the response"),
|
|
308
|
+
nextPageSelector: (0, metadata_helpers_1.d)("An expression to extract the next page parameter from the response"),
|
|
309
|
+
inProgressNotificationMessage: (0, metadata_helpers_1.d)("The message to show when the loader is in progress"),
|
|
310
|
+
completedNotificationMessage: (0, metadata_helpers_1.d)("The message to show when the loader completes"),
|
|
311
|
+
errorNotificationMessage: (0, metadata_helpers_1.d)("The message to show when an error occurs"),
|
|
312
|
+
transformResult: (0, metadata_helpers_1.d)("Function for transforming the datasource result"),
|
|
313
|
+
dataType: (0, metadata_helpers_1.d)("Type of data to fetch (default: json, or csv, or sql)"),
|
|
314
|
+
structuralSharing: (0, metadata_helpers_1.d)("Whether to use structural sharing for the data"),
|
|
315
315
|
},
|
|
316
316
|
events: {
|
|
317
|
-
loaded: (0,
|
|
318
|
-
error: (0,
|
|
317
|
+
loaded: (0, metadata_helpers_1.d)("Event to trigger when the data is loaded"),
|
|
318
|
+
error: (0, metadata_helpers_1.d)("This event fires when an error occurs while fetching data"),
|
|
319
319
|
},
|
|
320
320
|
});
|
|
321
321
|
function IndexAwareDataLoader(props) {
|
|
@@ -12,12 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.externalDataLoaderRenderer = exports.ExternalDataLoaderMd = void 0;
|
|
13
13
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
14
14
|
const react_1 = require("react");
|
|
15
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
16
15
|
const misc_1 = require("../utils/misc");
|
|
17
16
|
const extractParam_1 = require("../utils/extractParam");
|
|
18
17
|
const renderers_1 = require("../renderers");
|
|
19
18
|
const AppContext_1 = require("../AppContext");
|
|
20
19
|
const Loader_1 = require("./Loader");
|
|
20
|
+
const metadata_helpers_1 = require("../../components/metadata-helpers");
|
|
21
21
|
/**
|
|
22
22
|
* Represents a non-displayed React component, which handles the specified API loader
|
|
23
23
|
*/
|
|
@@ -45,13 +45,13 @@ function ExternalDataLoader({ loader, loaderInProgressChanged, loaderIsRefetchin
|
|
|
45
45
|
}), [urlLoadable, headers, data, url, method, doNotRemoveNulls]);
|
|
46
46
|
return ((0, jsx_runtime_1.jsx)(Loader_1.Loader, { state: state, loader: loader, loaderInProgressChanged: loaderInProgressChanged, loaderIsRefetchingChanged: loaderIsRefetchingChanged, loaderLoaded: loaderLoaded, loaderError: loaderError, loaderFn: doLoad, structuralSharing: structuralSharing }));
|
|
47
47
|
}
|
|
48
|
-
exports.ExternalDataLoaderMd = (0,
|
|
48
|
+
exports.ExternalDataLoaderMd = (0, metadata_helpers_1.createMetadata)({
|
|
49
49
|
description: `Represents a loader that calls an API through an HTTP/HTTPS GET request`,
|
|
50
50
|
props: {
|
|
51
|
-
url: (0,
|
|
52
|
-
method: (0,
|
|
53
|
-
headers: (0,
|
|
54
|
-
data: (0,
|
|
51
|
+
url: (0, metadata_helpers_1.d)("URL segment to use in the GET request"),
|
|
52
|
+
method: (0, metadata_helpers_1.d)("The HTTP method to use"),
|
|
53
|
+
headers: (0, metadata_helpers_1.d)("Headers to send with the request"),
|
|
54
|
+
data: (0, metadata_helpers_1.d)("The body of the request to be sent as JSON"),
|
|
55
55
|
},
|
|
56
56
|
});
|
|
57
57
|
exports.externalDataLoaderRenderer = (0, renderers_1.createLoaderRenderer)("ExternalDataLoader", ({ loader, state, loaderInProgressChanged, loaderIsRefetchingChanged, loaderError, loaderLoaded }) => {
|
|
@@ -12,12 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.mockLoaderRenderer = exports.MockLoaderMd = void 0;
|
|
13
13
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
14
14
|
const react_1 = require("react");
|
|
15
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
16
15
|
const misc_1 = require("../utils/misc");
|
|
17
16
|
const extractParam_1 = require("../utils/extractParam");
|
|
18
17
|
const renderers_1 = require("../renderers");
|
|
19
18
|
const AppContext_1 = require("../AppContext");
|
|
20
19
|
const Loader_1 = require("./Loader");
|
|
20
|
+
const metadata_helpers_1 = require("../../components/metadata-helpers");
|
|
21
21
|
function MockLoader({ loader, loaderInProgressChanged, loaderIsRefetchingChanged, loaderError, loaderLoaded, state, structuralSharing }) {
|
|
22
22
|
const appContext = (0, AppContext_1.useAppContext)();
|
|
23
23
|
const waitTime = (0, extractParam_1.extractParam)(state, loader.props.waitTime, appContext);
|
|
@@ -28,11 +28,11 @@ function MockLoader({ loader, loaderInProgressChanged, loaderIsRefetchingChanged
|
|
|
28
28
|
}), [responseObj, waitTime]);
|
|
29
29
|
return ((0, jsx_runtime_1.jsx)(Loader_1.Loader, { state: state, loader: loader, loaderInProgressChanged: loaderInProgressChanged, loaderIsRefetchingChanged: loaderIsRefetchingChanged, loaderLoaded: loaderLoaded, loaderError: loaderError, loaderFn: doLoad, structuralSharing: structuralSharing }));
|
|
30
30
|
}
|
|
31
|
-
exports.MockLoaderMd = (0,
|
|
31
|
+
exports.MockLoaderMd = (0, metadata_helpers_1.createMetadata)({
|
|
32
32
|
description: "A loader that simulates a delay and returns a predefined response",
|
|
33
33
|
props: {
|
|
34
|
-
waitTime: (0,
|
|
35
|
-
data: (0,
|
|
34
|
+
waitTime: (0, metadata_helpers_1.d)("The time to wait before returning the response"),
|
|
35
|
+
data: (0, metadata_helpers_1.d)("The data to return"),
|
|
36
36
|
},
|
|
37
37
|
});
|
|
38
38
|
exports.mockLoaderRenderer = (0, renderers_1.createLoaderRenderer)("MockLoader", ({ loader, state, loaderInProgressChanged, loaderLoaded, loaderError }) => {
|
|
@@ -26,7 +26,7 @@ const AppContext_1 = require("../AppContext");
|
|
|
26
26
|
const renderChild_1 = require("./renderChild");
|
|
27
27
|
const AppRoot_1 = require("./AppRoot");
|
|
28
28
|
const react_2 = require("@remix-run/react");
|
|
29
|
-
const
|
|
29
|
+
const utils_1 = require("../theming/utils");
|
|
30
30
|
/**
|
|
31
31
|
* This component wraps the entire app into a container with these particular
|
|
32
32
|
* responsibilities:
|
|
@@ -53,7 +53,7 @@ function AppContent({ rootContainer, routerBaseName, globalProps, standalone, tr
|
|
|
53
53
|
}
|
|
54
54
|
// --- Alt + Ctrl + Shift + O changes the current theme tone
|
|
55
55
|
if (event.code === "KeyO" && event.altKey && event.ctrlKey && event.shiftKey) {
|
|
56
|
-
setActiveThemeTone(
|
|
56
|
+
setActiveThemeTone(utils_1.ThemeToneKeys[(utils_1.ThemeToneKeys.indexOf(activeThemeTone) + 1) % utils_1.ThemeToneKeys.length]);
|
|
57
57
|
}
|
|
58
58
|
// --- Alt + Ctrl + Shift + S toggles the current state view
|
|
59
59
|
if (event.code === "KeyS" && event.altKey && event.ctrlKey && event.shiftKey) {
|