@ea-lab/reactive-json 0.0.19 → 0.0.21

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.
Files changed (124) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/types/component/action/HashChangeListener.d.ts +9 -0
  3. package/{lib/component/action/Hide.jsx → dist/esm/types/component/action/Hide.d.ts} +2 -6
  4. package/dist/esm/types/component/action/MessageListener.d.ts +9 -0
  5. package/dist/esm/types/component/action/Popover.d.ts +5 -0
  6. package/dist/esm/types/component/action/ReactOnEvent.d.ts +26 -0
  7. package/dist/esm/types/component/action/Redirect.d.ts +9 -0
  8. package/dist/esm/types/component/action/Tooltip.d.ts +5 -0
  9. package/{lib/component/action/VisuallyHide.jsx → dist/esm/types/component/action/VisuallyHide.d.ts} +1 -4
  10. package/dist/esm/types/component/element/form/CheckBoxField.d.ts +7 -0
  11. package/dist/esm/types/component/element/form/DateField.d.ts +2 -0
  12. package/dist/esm/types/component/element/form/NumberField.d.ts +7 -0
  13. package/dist/esm/types/component/element/form/SelectField.d.ts +7 -0
  14. package/dist/esm/types/component/element/form/TextAreaField.d.ts +6 -0
  15. package/dist/esm/types/component/element/form/TextField.d.ts +6 -0
  16. package/dist/esm/types/component/element/form/formElementsCommon.d.ts +23 -0
  17. package/dist/esm/types/component/element/html/AccordionItem.d.ts +16 -0
  18. package/dist/esm/types/component/element/html/FolderSortableTree.d.ts +6 -0
  19. package/dist/esm/types/component/element/html/FormatNumeral.d.ts +7 -0
  20. package/dist/esm/types/component/element/html/Html.d.ts +8 -0
  21. package/dist/esm/types/component/element/html/LabelFromValue.d.ts +22 -0
  22. package/dist/esm/types/component/element/html/Modal.d.ts +6 -0
  23. package/dist/esm/types/component/element/html/ModalForm.d.ts +9 -0
  24. package/dist/esm/types/component/element/html/Paragraph.d.ts +5 -0
  25. package/dist/esm/types/component/element/html/PreformattedMarkup.d.ts +7 -0
  26. package/dist/esm/types/component/element/html/SortableTreeItemCollapseButton.d.ts +9 -0
  27. package/dist/esm/types/component/element/html/Tabs.d.ts +18 -0
  28. package/dist/esm/types/component/element/special/BootstrapElement.d.ts +10 -0
  29. package/dist/esm/types/component/element/special/Count.d.ts +13 -0
  30. package/dist/esm/types/component/element/special/DataFilter.d.ts +11 -0
  31. package/dist/esm/types/component/element/special/DelayedActions.d.ts +25 -0
  32. package/dist/esm/types/component/element/special/PageControls.d.ts +9 -0
  33. package/dist/esm/types/component/element/special/Phantom.d.ts +17 -0
  34. package/dist/esm/types/component/element/special/Switch.d.ts +6 -0
  35. package/dist/esm/types/component/hook/usePagination.d.ts +30 -0
  36. package/dist/esm/types/component/index.d.ts +5 -0
  37. package/dist/esm/types/component/reaction/addData.d.ts +6 -0
  38. package/dist/esm/types/component/reaction/fetchData.d.ts +8 -0
  39. package/dist/esm/types/component/reaction/moveData.d.ts +6 -0
  40. package/dist/esm/types/component/reaction/postMessage.d.ts +6 -0
  41. package/dist/esm/types/component/reaction/redirectNow.d.ts +6 -0
  42. package/dist/esm/types/component/reaction/removeData.d.ts +6 -0
  43. package/dist/esm/types/component/reaction/setClipboardData.d.ts +6 -0
  44. package/dist/esm/types/component/reaction/setData.d.ts +6 -0
  45. package/dist/esm/types/component/reaction/submitData.d.ts +8 -0
  46. package/dist/esm/types/component/reaction/triggerEvent.d.ts +6 -0
  47. package/dist/esm/types/component/utility/formatString.d.ts +17 -0
  48. package/dist/esm/types/engine/Actions.d.ts +19 -0
  49. package/dist/esm/types/engine/ComponentCollector.d.ts +12 -0
  50. package/{lib/engine/EventDispatcherContext.jsx → dist/esm/types/engine/EventDispatcherContext.d.ts} +4 -7
  51. package/dist/esm/types/engine/EventDispatcherProvider.d.ts +16 -0
  52. package/{lib/engine/GlobalDataContext.jsx → dist/esm/types/engine/GlobalDataContext.d.ts} +1 -4
  53. package/dist/esm/types/engine/GlobalDataContextProvider.d.ts +11 -0
  54. package/{lib/engine/PaginationContext.jsx → dist/esm/types/engine/PaginationContext.d.ts} +3 -4
  55. package/dist/esm/types/engine/PaginationProvider.d.ts +12 -0
  56. package/dist/esm/types/engine/ReactiveJsonRoot.d.ts +28 -0
  57. package/{lib/engine/TemplateContext.jsx → dist/esm/types/engine/TemplateContext.d.ts} +1 -4
  58. package/dist/esm/types/engine/TemplateSystem.d.ts +89 -0
  59. package/dist/esm/types/engine/View.d.ts +7 -0
  60. package/dist/esm/types/index.d.ts +6 -0
  61. package/dist/esm/types/main.d.ts +10 -0
  62. package/dist/index.cjs.js +9201 -0
  63. package/dist/index.cjs.js.map +1 -0
  64. package/dist/index.d.ts +44 -0
  65. package/dist/index.esm.js +9180 -0
  66. package/dist/index.esm.js.map +1 -0
  67. package/package.json +26 -15
  68. package/dist/reactive-json.css +0 -5
  69. package/dist/reactive-json.js +0 -47707
  70. package/dist/reactive-json.js.map +0 -1
  71. package/dist/reactive-json.umd.cjs +0 -366
  72. package/dist/reactive-json.umd.cjs.map +0 -1
  73. package/lib/component/action/HashChangeListener.jsx +0 -66
  74. package/lib/component/action/MessageListener.jsx +0 -62
  75. package/lib/component/action/Popover.jsx +0 -53
  76. package/lib/component/action/ReactOnEvent.jsx +0 -118
  77. package/lib/component/action/Redirect.jsx +0 -26
  78. package/lib/component/action/Tooltip.jsx +0 -27
  79. package/lib/component/element/form/CheckBoxField.jsx +0 -215
  80. package/lib/component/element/form/DateField.jsx +0 -42
  81. package/lib/component/element/form/NumberField.jsx +0 -29
  82. package/lib/component/element/form/SelectField.jsx +0 -130
  83. package/lib/component/element/form/TextAreaField.jsx +0 -48
  84. package/lib/component/element/form/TextField.jsx +0 -65
  85. package/lib/component/element/form/formElementsCommon.jsx +0 -54
  86. package/lib/component/element/html/AccordionItem.jsx +0 -42
  87. package/lib/component/element/html/FolderSortableTree.jsx +0 -307
  88. package/lib/component/element/html/FormatNumeral.jsx +0 -118
  89. package/lib/component/element/html/Html.jsx +0 -107
  90. package/lib/component/element/html/LabelFromValue.jsx +0 -89
  91. package/lib/component/element/html/Modal.jsx +0 -77
  92. package/lib/component/element/html/ModalForm.jsx +0 -30
  93. package/lib/component/element/html/Paragraph.jsx +0 -10
  94. package/lib/component/element/html/PreformattedMarkup.jsx +0 -54
  95. package/lib/component/element/html/SortableTreeItemCollapseButton.jsx +0 -20
  96. package/lib/component/element/html/Tabs.jsx +0 -55
  97. package/lib/component/element/special/BootstrapElement.jsx +0 -32
  98. package/lib/component/element/special/Count.jsx +0 -46
  99. package/lib/component/element/special/DataFilter.jsx +0 -156
  100. package/lib/component/element/special/DelayedActions.jsx +0 -119
  101. package/lib/component/element/special/PageControls.jsx +0 -19
  102. package/lib/component/element/special/Phantom.jsx +0 -25
  103. package/lib/component/element/special/Switch.jsx +0 -131
  104. package/lib/component/hook/usePagination.jsx +0 -184
  105. package/lib/component/reaction/addData.jsx +0 -23
  106. package/lib/component/reaction/fetchData.jsx +0 -83
  107. package/lib/component/reaction/moveData.jsx +0 -52
  108. package/lib/component/reaction/postMessage.jsx +0 -43
  109. package/lib/component/reaction/redirectNow.jsx +0 -17
  110. package/lib/component/reaction/removeData.jsx +0 -48
  111. package/lib/component/reaction/setClipboardData.jsx +0 -20
  112. package/lib/component/reaction/setData.jsx +0 -23
  113. package/lib/component/reaction/submitData.jsx +0 -136
  114. package/lib/component/reaction/triggerEvent.jsx +0 -62
  115. package/lib/component/utility/formatString.jsx +0 -59
  116. package/lib/engine/Actions.jsx +0 -392
  117. package/lib/engine/ComponentCollector.js +0 -28
  118. package/lib/engine/EventDispatcherProvider.jsx +0 -80
  119. package/lib/engine/GlobalDataContextProvider.jsx +0 -33
  120. package/lib/engine/PaginationProvider.jsx +0 -61
  121. package/lib/engine/ReactiveJsonRoot.jsx +0 -318
  122. package/lib/engine/TemplateSystem.jsx +0 -302
  123. package/lib/engine/View.jsx +0 -248
  124. package/lib/main.jsx +0 -52
package/README.md CHANGED
@@ -127,7 +127,7 @@ Generic reusable code.
127
127
 
128
128
  Contains the core functionality of *reactive-json*.
129
129
 
130
- This is where `ReactiveJsonRoot.jsx` is.
130
+ This is where `ReactiveJsonRoot.tsx` is.
131
131
 
132
132
  Usually, you won't need to edit its content. (But feel free to inspect it if you
133
133
  want to contribute!)
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Listens to hash changes (URL fragment) on the window object and executes a reaction function in response.
3
+ *
4
+ * @param {{}} props
5
+ * @returns {JSX.Element}
6
+ * @constructor
7
+ */
8
+ declare const HashChangeListener: (props: any) => import("react/jsx-runtime").JSX.Element;
9
+ export default HashChangeListener;
@@ -2,13 +2,9 @@
2
2
  * Action which will not render the children.
3
3
  *
4
4
  * This will also cancel any subsequent actions.
5
- *
5
+ *
6
6
  * @returns {null}
7
7
  * @constructor
8
8
  */
9
- const Hide = () => {
10
- // Simply don't render the children.
11
- return null;
12
- };
13
-
9
+ declare const Hide: () => null;
14
10
  export default Hide;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Listens to messages on the window object and executes a reaction function in response.
3
+ *
4
+ * @param {{}} props
5
+ * @returns {JSX.Element}
6
+ * @constructor
7
+ */
8
+ declare const MessageListener: (props: any) => import("react/jsx-runtime").JSX.Element;
9
+ export default MessageListener;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Action which will append a popover when the current component is hovered.
3
+ */
4
+ declare const Popover: (props: any) => import("react/jsx-runtime").JSX.Element;
5
+ export default Popover;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Functions that will be executed on specific events.
3
+ *
4
+ * @type {{}}
5
+ */
6
+ export declare const reactionFunctions: {
7
+ addData: (props: any) => void;
8
+ fetchData: (props: any) => void;
9
+ moveData: (props: any) => void;
10
+ postMessage: (props: any) => void;
11
+ redirectNow: (props: any) => void;
12
+ removeData: (props: any) => void;
13
+ setClipboardData: (props: any) => Promise<void>;
14
+ setData: (props: any) => void;
15
+ submitData: (props: any) => void;
16
+ triggerEvent: (props: any) => void;
17
+ };
18
+ /**
19
+ * Action component which will append one or more event listeners on the element.
20
+ *
21
+ * @param {Object} props
22
+ *
23
+ * @constructor
24
+ */
25
+ declare const ReactOnEvent: (props: any) => import("react/jsx-runtime").JSX.Element;
26
+ export default ReactOnEvent;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Redirects when the conditions are valid.
3
+ *
4
+ * @param {{actionProps: {to}}} props Action props.
5
+ *
6
+ * @constructor
7
+ */
8
+ declare const Redirect: (props: any) => void;
9
+ export default Redirect;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Action which will append a tooltip when the current component is hovered.
3
+ */
4
+ declare const Tooltip: (props: any) => import("react/jsx-runtime").JSX.Element;
5
+ export default Tooltip;
@@ -8,8 +8,5 @@
8
8
  * @returns {JSX.Element}
9
9
  * @constructor
10
10
  */
11
- const VisuallyHide = (props) => {
12
- return <visually-hidden style={{"display": "none"}}>{props.children}</visually-hidden>;
13
- };
14
-
11
+ declare const VisuallyHide: (props: any) => import("react/jsx-runtime").JSX.Element;
15
12
  export default VisuallyHide;
@@ -0,0 +1,7 @@
1
+ declare const CheckBoxField: ({ props, currentData, datafield, path }: {
2
+ props: any;
3
+ currentData: any;
4
+ datafield: any;
5
+ path: any;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default CheckBoxField;
@@ -0,0 +1,2 @@
1
+ declare const DateField: (componentProps: any) => import("react/jsx-runtime").JSX.Element;
2
+ export default DateField;
@@ -0,0 +1,7 @@
1
+ declare const NumberField: ({ props, currentData, datafield, path }: {
2
+ props: any;
3
+ currentData: any;
4
+ datafield: any;
5
+ path: any;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default NumberField;
@@ -0,0 +1,7 @@
1
+ declare const SelectField: ({ props, data, path, datafield }: {
2
+ props: any;
3
+ data: any;
4
+ path: any;
5
+ datafield: any;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default SelectField;
@@ -0,0 +1,6 @@
1
+ declare const TextAreaField: ({ props, datafield, path }: {
2
+ props: any;
3
+ datafield: any;
4
+ path: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export default TextAreaField;
@@ -0,0 +1,6 @@
1
+ declare const TextField: ({ props, datafield, path }: {
2
+ props: any;
3
+ datafield: any;
4
+ path: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export default TextField;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Gets the path and the data for the specified dataLocation and contexts.
3
+ *
4
+ * @param {string} currentPath The current path of the component calling this function.
5
+ * @param {string} datafield The datafield (field name) of the component calling this function.
6
+ * @param {string|undefined} dataLocation The dataLocation value set in the component structure.
7
+ * @param {any} defaultValue The default value set in the component structure.
8
+ * @param {{}} globalDataContext The global data context of the component calling this function.
9
+ * @param {{}} templateContext The template context of the component calling this function.
10
+ *
11
+ * @returns {{formDataPath: undefined, formData: undefined}}
12
+ */
13
+ export declare const propsDataLocationToPathAndValue: ({ currentPath, datafield, dataLocation, defaultValue, globalDataContext, templateContext }: {
14
+ currentPath: any;
15
+ datafield: any;
16
+ dataLocation: any;
17
+ defaultValue: any;
18
+ globalDataContext: any;
19
+ templateContext: any;
20
+ }) => {
21
+ formData: undefined;
22
+ formDataPath: undefined;
23
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * To use with the BsAccordion component.
3
+ *
4
+ * To use this, use the BsAccordion component, and add
5
+ * AccordionItem in the content.
6
+ *
7
+ * You can of course use the Switch component to map to
8
+ * dynamic data.
9
+ */
10
+ declare const AccordionItem: ({ props, path, currentData, datafield }: {
11
+ props: any;
12
+ path: any;
13
+ currentData: any;
14
+ datafield: any;
15
+ }) => import("react/jsx-runtime").JSX.Element;
16
+ export default AccordionItem;
@@ -0,0 +1,6 @@
1
+ declare const FolderSortableTree: ({ props, path, datafield }: {
2
+ props: any;
3
+ path: any;
4
+ datafield: any;
5
+ }) => import("react/jsx-runtime").JSX.Element | null;
6
+ export default FolderSortableTree;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Transforms a number into a numeral of a specific language: roman, upper latin, lower latin, ... and custom.
3
+ */
4
+ declare const FormatNumeral: ({ props }: {
5
+ props: any;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default FormatNumeral;
@@ -0,0 +1,8 @@
1
+ export declare const normalizeAttributesForReactJsx: (maybeAttributesObj: any) => {};
2
+ declare const Html: ({ props, currentData, datafield, path }: {
3
+ props: any;
4
+ currentData: any;
5
+ datafield: any;
6
+ path: any;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ export default Html;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Shows the label associated to a value.
3
+ *
4
+ * Uses an option-like structure as data source.
5
+ * Thus, it's compatible with SelectField, CheckBoxField...
6
+ *
7
+ * E.g.: [{"label": "Public name", "value": "option value"}].
8
+ *
9
+ * @param currentData
10
+ * @param datafield
11
+ * @param path
12
+ * @param props
13
+ * @returns {JSX.Element}
14
+ * @constructor
15
+ */
16
+ declare const LabelFromValue: ({ currentData, datafield, path, props }: {
17
+ currentData: any;
18
+ datafield: any;
19
+ path: any;
20
+ props: any;
21
+ }) => import("react/jsx-runtime").JSX.Element | null;
22
+ export default LabelFromValue;
@@ -0,0 +1,6 @@
1
+ declare const Modal: ({ currentData, path, props }: {
2
+ currentData: any;
3
+ path: any;
4
+ props: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export default Modal;
@@ -0,0 +1,9 @@
1
+ declare function ModalForm({ show, path, handleClose, handleSave, form, currentData }: {
2
+ show: any;
3
+ path: any;
4
+ handleClose: any;
5
+ handleSave: any;
6
+ form: any;
7
+ currentData: any;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export default ModalForm;
@@ -0,0 +1,5 @@
1
+ declare const Paragraph: ({ props, currentData }: {
2
+ props: any;
3
+ currentData: any;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default Paragraph;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Preformatted markup component that takes content and inserts it as HTML.
3
+ */
4
+ declare const PreformattedMarkup: ({ props }: {
5
+ props: any;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default PreformattedMarkup;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This is the collapse button for the sortable tree.
3
+ *
4
+ * It's used when SortableTree is used with a manualDrag option.
5
+ */
6
+ declare const SortableTreeItemCollapseButton: ({ props }: {
7
+ props: any;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ export default SortableTreeItemCollapseButton;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Tabs component using the simple Tabs component from react-bootstrap.
3
+ *
4
+ * The react-bootstrap's Tabs component is special as it requires a very
5
+ * specific structure with <Tabs> directly underneath.
6
+ *
7
+ * @param currentData
8
+ * @param path
9
+ * @param props
10
+ * @returns {JSX.Element}
11
+ * @constructor
12
+ */
13
+ declare const Tabs: ({ currentData, path, props }: {
14
+ currentData: any;
15
+ path: any;
16
+ props: any;
17
+ }) => import("react/jsx-runtime").JSX.Element;
18
+ export default Tabs;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Wraps a React Bootstrap component.
3
+ */
4
+ declare function BootstrapElement({ props, currentData, path, bsComponent }: {
5
+ props: any;
6
+ currentData: any;
7
+ path: any;
8
+ bsComponent: any;
9
+ }): import("react/jsx-runtime").JSX.Element | null;
10
+ export default BootstrapElement;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Returns a count for something to count.
3
+ *
4
+ * @param props Component build data.
5
+ *
6
+ * @returns {null|*}
7
+ *
8
+ * @constructor
9
+ */
10
+ declare const Count: ({ props }: {
11
+ props: any;
12
+ }) => any;
13
+ export default Count;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Use DataFilter to filter data from the global or template data.
3
+ *
4
+ * @param args Component build data.
5
+ *
6
+ * @returns {JSX.Element}
7
+ *
8
+ * @constructor
9
+ */
10
+ declare const DataFilter: (args: any) => import("react/jsx-runtime").JSX.Element;
11
+ export default DataFilter;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Provides a way to execute actions after a delay, at intervals, etc.
3
+ *
4
+ * @param {{}} props Build data.
5
+ * @param currentData Current data.
6
+ * @param path Element path.
7
+ *
8
+ * @constructor
9
+ */
10
+ declare const DelayedActions: ({ props, currentData, path }: {
11
+ props: any;
12
+ currentData: any;
13
+ path: any;
14
+ }) => import("react/jsx-runtime").JSX.Element;
15
+ /**
16
+ * Gets the reaction functions to execute.
17
+ *
18
+ * This is a specific adaptation of getActionsToExecute from the Actions core functionality.
19
+ *
20
+ * @param {Array} actions
21
+ * @param {object} templateContexts
22
+ * @returns {*[]} The list of reaction function properties. The structure is simpler than getActionsToExecute.
23
+ */
24
+ export declare const getReactionFunctionsToExecute: (actions: any, templateContexts: any) => never[];
25
+ export default DelayedActions;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Displays the PageControls found in the PaginationContext, if any.
3
+ *
4
+ * @returns {JSX.Element|null}
5
+ *
6
+ * @constructor
7
+ */
8
+ declare const PageControls: () => import("react/jsx-runtime").JSX.Element | null;
9
+ export default PageControls;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Phantom element without DOM output.
3
+ *
4
+ * Use this if you want actions without a DOM element.
5
+ *
6
+ * @param {{}} props Build data.
7
+ * @param currentData Current data.
8
+ * @param path Element path.
9
+ *
10
+ * @constructor
11
+ */
12
+ declare const Phantom: ({ props, currentData, path }: {
13
+ props: any;
14
+ currentData: any;
15
+ path: any;
16
+ }) => import("react/jsx-runtime").JSX.Element;
17
+ export default Phantom;
@@ -0,0 +1,6 @@
1
+ declare const Switch: ({ props, currentData, path }: {
2
+ props: any;
3
+ currentData: any;
4
+ path: any;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export default Switch;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Use this hook to create paginations.
3
+ *
4
+ * @param [Array] dataToPaginate The complete data to paginate.
5
+ * @param [int] forcePaginationDisplay Set to true to force the pagination even when having less than 2 pages.
6
+ * @param [int] maxPageButtonsCount The maximum page buttons count. Must be at least 1. Defaults to 5 when undefined.
7
+ * @param [int] pageMaxItemCount The maximum item count per page. Defaults to 10 when undefined.
8
+ *
9
+ * @returns {{
10
+ * firstShownItemIndex: number,
11
+ * getPageCountForContent: (function(Array): number),
12
+ * maxShownItemIndexExcluded: number,
13
+ * PageControls: (function({pageCount: *})),
14
+ * pageMaxItemCount: number,
15
+ * sliceVisibleContent: ((function(Array): *)|*),
16
+ * }}
17
+ */
18
+ export declare const usePagination: ({ dataToPaginate, forcePaginationDisplay, maxPageButtonsCount, pageMaxItemCount, }: {
19
+ dataToPaginate?: never[] | undefined;
20
+ forcePaginationDisplay?: boolean | undefined;
21
+ maxPageButtonsCount?: number | undefined;
22
+ pageMaxItemCount?: number | undefined;
23
+ }) => {
24
+ firstShownItemIndex: number;
25
+ getPageCountForContent: (contentSource: any) => number;
26
+ maxShownItemIndexExcluded: number;
27
+ PageControls: () => import("react/jsx-runtime").JSX.Element | null;
28
+ pageMaxItemCount: number;
29
+ sliceVisibleContent: (contentToSlice: any) => any;
30
+ };
@@ -0,0 +1,5 @@
1
+ export * from "./action";
2
+ export * from "./element";
3
+ export * from "./hook";
4
+ export * from "./reaction";
5
+ export * from "./utility";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Adds data at the specified path.
3
+ *
4
+ * @param {{}} props
5
+ */
6
+ export declare const addData: (props: any) => void;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Fetches data. Similar to submitData, but for GET requests.
3
+ *
4
+ * Will reload the app content if refreshAppOnResponse is true.
5
+ *
6
+ * @param {{args: {refreshAppOnResponse, url}, event, globalDataContext, templateContext}} props Reaction function props.
7
+ */
8
+ export declare const fetchData: (props: any) => void;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Moves data at the specified path.
3
+ *
4
+ * @param {{}} props
5
+ */
6
+ export declare const moveData: (props: any) => void;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Posts a message to the specified target.
3
+ *
4
+ * @param {{args: {includeChangedValue, message, messageTarget, on, targetOrigin}, event, globalDataContext, templateContext}} props
5
+ */
6
+ export declare const postMessage: (props: any) => void;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Redirects to the specified URL.
3
+ *
4
+ * @param {{}} props
5
+ */
6
+ export declare const redirectNow: (props: any) => void;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Removes data at the specified path.
3
+ *
4
+ * @param {{}} props
5
+ */
6
+ export declare const removeData: (props: any) => void;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copies data to the clipboard.
3
+ *
4
+ * @param {{}} props
5
+ */
6
+ export declare const setClipboardData: (props: any) => Promise<void>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Sets data at the specified path.
3
+ *
4
+ * @param {{}} props
5
+ */
6
+ export declare const setData: (props: any) => void;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Submits the current state of this app data.
3
+ *
4
+ * Will reload the app content if refreshAppOnResponse is true.
5
+ *
6
+ * @param {{args: {data, httpMethod, refreshAppOnResponse, submitSilently, url}, event, globalDataContext, templateContext}} props Reaction function props.
7
+ */
8
+ export declare const submitData: (props: any) => void;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reaction function which will trigger an event on an element identified by the given selector.
3
+ *
4
+ * @param {{args:{selector, selectorBase, eventName}, event}} props Reaction function props.
5
+ */
6
+ export declare const triggerEvent: (props: any) => void;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Formats the given string with replacement arguments.
3
+ *
4
+ * @param {{globalDataContext: {}, templateContext: {}}} templateContexts Template contexts.
5
+ * @param {string} toFormat The string to format.
6
+ * @param {...string} argv The replacement arguments.
7
+ */
8
+ export declare const formatString: ({ templateContexts }: {
9
+ templateContexts: any;
10
+ }, toFormat: any, ...argv: any[]) => any;
11
+ /**
12
+ * Formats the given data with replacement arguments if possible.
13
+ *
14
+ * @param {{templateContexts: {globalDataContext: {}, templateContext: {}}}} options Template contexts.
15
+ * @param {*} toFormat The data to format.
16
+ */
17
+ export declare const maybeFormatString: (options: any, toFormat: any) => any;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Checks whether the conditions are fulfilled.
3
+ * @param {{andConditions, containedBy, containedByNot, contains, containsNot, is, isNot, orConditions, when, whenDataCountOf, ">", "<", ">=", "<=", compareAsDates}} condition
4
+ * @param {object} templateContexts
5
+ * @param {Map} additionalConditionHandlers
6
+ * @returns {*}
7
+ */
8
+ export declare const isValid: (condition: any, templateContexts: any, additionalConditionHandlers: any) => any;
9
+ /**
10
+ * Component that executes actions before rendering its children.
11
+ *
12
+ * Actions include a system to hide.
13
+ *
14
+ * @param props The props that served to build an action dependant component.
15
+ * @returns {*}
16
+ * @constructor
17
+ */
18
+ declare const ActionDependant: (props: any) => any;
19
+ export default ActionDependant;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Merges component collections (aka plugins).
3
+ * @param {[{}]} collections Array of plugin collections.
4
+ * @return {{hook: {}, reaction: {}, action: {}, utility: {}, element: {}}}
5
+ */
6
+ export declare function mergeComponentCollections(collections: any): {
7
+ action: {};
8
+ element: {};
9
+ hook: {};
10
+ reaction: {};
11
+ utility: {};
12
+ };
@@ -1,5 +1,3 @@
1
- import {createContext} from "react";
2
-
3
1
  /**
4
2
  * A context for "globalizing" event dispatchers.
5
3
  *
@@ -8,9 +6,8 @@ import {createContext} from "react";
8
6
  *
9
7
  * @type {React.Context<{removeEventListener: removeEventListener, addEventListener: addEventListener}>}
10
8
  */
11
- const EventDispatcherContext = createContext({
12
- addEventListener: null,
13
- removeEventListener: null,
14
- });
15
-
9
+ declare const EventDispatcherContext: import("react").Context<{
10
+ addEventListener: null;
11
+ removeEventListener: null;
12
+ }>;
16
13
  export default EventDispatcherContext;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Adds the listener to registered listeners.
3
+ *
4
+ * @param {string} type The event type.
5
+ * @param {Function} listener The event listener.
6
+ */
7
+ export declare const addEventListener: (type: any, listener: any) => void;
8
+ /**
9
+ * Removes the specified listener.
10
+ *
11
+ * @param {string} type Event type.
12
+ * @param {Function} listener Event listener.
13
+ */
14
+ export declare const removeEventListener: (type: any, listener: any) => void;
15
+ declare const _default: import("react").MemoExoticComponent<(props: any) => import("react/jsx-runtime").JSX.Element>;
16
+ export default _default;
@@ -1,5 +1,3 @@
1
- import { createContext } from 'react';
2
-
3
1
  /**
4
2
  * This context contains all the build data for the current app.
5
3
  *
@@ -8,6 +6,5 @@ import { createContext } from 'react';
8
6
  *
9
7
  * @type {React.Context<{}>}
10
8
  */
11
- const GlobalDataContext = createContext({});
12
-
9
+ declare const GlobalDataContext: import("react").Context<{}>;
13
10
  export default GlobalDataContext;