@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.
- package/README.md +1 -1
- package/dist/esm/types/component/action/HashChangeListener.d.ts +9 -0
- package/{lib/component/action/Hide.jsx → dist/esm/types/component/action/Hide.d.ts} +2 -6
- package/dist/esm/types/component/action/MessageListener.d.ts +9 -0
- package/dist/esm/types/component/action/Popover.d.ts +5 -0
- package/dist/esm/types/component/action/ReactOnEvent.d.ts +26 -0
- package/dist/esm/types/component/action/Redirect.d.ts +9 -0
- package/dist/esm/types/component/action/Tooltip.d.ts +5 -0
- package/{lib/component/action/VisuallyHide.jsx → dist/esm/types/component/action/VisuallyHide.d.ts} +1 -4
- package/dist/esm/types/component/element/form/CheckBoxField.d.ts +7 -0
- package/dist/esm/types/component/element/form/DateField.d.ts +2 -0
- package/dist/esm/types/component/element/form/NumberField.d.ts +7 -0
- package/dist/esm/types/component/element/form/SelectField.d.ts +7 -0
- package/dist/esm/types/component/element/form/TextAreaField.d.ts +6 -0
- package/dist/esm/types/component/element/form/TextField.d.ts +6 -0
- package/dist/esm/types/component/element/form/formElementsCommon.d.ts +23 -0
- package/dist/esm/types/component/element/html/AccordionItem.d.ts +16 -0
- package/dist/esm/types/component/element/html/FolderSortableTree.d.ts +6 -0
- package/dist/esm/types/component/element/html/FormatNumeral.d.ts +7 -0
- package/dist/esm/types/component/element/html/Html.d.ts +8 -0
- package/dist/esm/types/component/element/html/LabelFromValue.d.ts +22 -0
- package/dist/esm/types/component/element/html/Modal.d.ts +6 -0
- package/dist/esm/types/component/element/html/ModalForm.d.ts +9 -0
- package/dist/esm/types/component/element/html/Paragraph.d.ts +5 -0
- package/dist/esm/types/component/element/html/PreformattedMarkup.d.ts +7 -0
- package/dist/esm/types/component/element/html/SortableTreeItemCollapseButton.d.ts +9 -0
- package/dist/esm/types/component/element/html/Tabs.d.ts +18 -0
- package/dist/esm/types/component/element/special/BootstrapElement.d.ts +10 -0
- package/dist/esm/types/component/element/special/Count.d.ts +13 -0
- package/dist/esm/types/component/element/special/DataFilter.d.ts +11 -0
- package/dist/esm/types/component/element/special/DelayedActions.d.ts +25 -0
- package/dist/esm/types/component/element/special/PageControls.d.ts +9 -0
- package/dist/esm/types/component/element/special/Phantom.d.ts +17 -0
- package/dist/esm/types/component/element/special/Switch.d.ts +6 -0
- package/dist/esm/types/component/hook/usePagination.d.ts +30 -0
- package/dist/esm/types/component/index.d.ts +5 -0
- package/dist/esm/types/component/reaction/addData.d.ts +6 -0
- package/dist/esm/types/component/reaction/fetchData.d.ts +8 -0
- package/dist/esm/types/component/reaction/moveData.d.ts +6 -0
- package/dist/esm/types/component/reaction/postMessage.d.ts +6 -0
- package/dist/esm/types/component/reaction/redirectNow.d.ts +6 -0
- package/dist/esm/types/component/reaction/removeData.d.ts +6 -0
- package/dist/esm/types/component/reaction/setClipboardData.d.ts +6 -0
- package/dist/esm/types/component/reaction/setData.d.ts +6 -0
- package/dist/esm/types/component/reaction/submitData.d.ts +8 -0
- package/dist/esm/types/component/reaction/triggerEvent.d.ts +6 -0
- package/dist/esm/types/component/utility/formatString.d.ts +17 -0
- package/dist/esm/types/engine/Actions.d.ts +19 -0
- package/dist/esm/types/engine/ComponentCollector.d.ts +12 -0
- package/{lib/engine/EventDispatcherContext.jsx → dist/esm/types/engine/EventDispatcherContext.d.ts} +4 -7
- package/dist/esm/types/engine/EventDispatcherProvider.d.ts +16 -0
- package/{lib/engine/GlobalDataContext.jsx → dist/esm/types/engine/GlobalDataContext.d.ts} +1 -4
- package/dist/esm/types/engine/GlobalDataContextProvider.d.ts +11 -0
- package/{lib/engine/PaginationContext.jsx → dist/esm/types/engine/PaginationContext.d.ts} +3 -4
- package/dist/esm/types/engine/PaginationProvider.d.ts +12 -0
- package/dist/esm/types/engine/ReactiveJsonRoot.d.ts +28 -0
- package/{lib/engine/TemplateContext.jsx → dist/esm/types/engine/TemplateContext.d.ts} +1 -4
- package/dist/esm/types/engine/TemplateSystem.d.ts +89 -0
- package/dist/esm/types/engine/View.d.ts +7 -0
- package/dist/esm/types/index.d.ts +6 -0
- package/dist/esm/types/main.d.ts +10 -0
- package/dist/index.cjs.js +9201 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.esm.js +9180 -0
- package/dist/index.esm.js.map +1 -0
- package/package.json +26 -15
- package/dist/reactive-json.css +0 -5
- package/dist/reactive-json.js +0 -47707
- package/dist/reactive-json.js.map +0 -1
- package/dist/reactive-json.umd.cjs +0 -366
- package/dist/reactive-json.umd.cjs.map +0 -1
- package/lib/component/action/HashChangeListener.jsx +0 -66
- package/lib/component/action/MessageListener.jsx +0 -62
- package/lib/component/action/Popover.jsx +0 -53
- package/lib/component/action/ReactOnEvent.jsx +0 -118
- package/lib/component/action/Redirect.jsx +0 -26
- package/lib/component/action/Tooltip.jsx +0 -27
- package/lib/component/element/form/CheckBoxField.jsx +0 -215
- package/lib/component/element/form/DateField.jsx +0 -42
- package/lib/component/element/form/NumberField.jsx +0 -29
- package/lib/component/element/form/SelectField.jsx +0 -130
- package/lib/component/element/form/TextAreaField.jsx +0 -48
- package/lib/component/element/form/TextField.jsx +0 -65
- package/lib/component/element/form/formElementsCommon.jsx +0 -54
- package/lib/component/element/html/AccordionItem.jsx +0 -42
- package/lib/component/element/html/FolderSortableTree.jsx +0 -307
- package/lib/component/element/html/FormatNumeral.jsx +0 -118
- package/lib/component/element/html/Html.jsx +0 -107
- package/lib/component/element/html/LabelFromValue.jsx +0 -89
- package/lib/component/element/html/Modal.jsx +0 -77
- package/lib/component/element/html/ModalForm.jsx +0 -30
- package/lib/component/element/html/Paragraph.jsx +0 -10
- package/lib/component/element/html/PreformattedMarkup.jsx +0 -54
- package/lib/component/element/html/SortableTreeItemCollapseButton.jsx +0 -20
- package/lib/component/element/html/Tabs.jsx +0 -55
- package/lib/component/element/special/BootstrapElement.jsx +0 -32
- package/lib/component/element/special/Count.jsx +0 -46
- package/lib/component/element/special/DataFilter.jsx +0 -156
- package/lib/component/element/special/DelayedActions.jsx +0 -119
- package/lib/component/element/special/PageControls.jsx +0 -19
- package/lib/component/element/special/Phantom.jsx +0 -25
- package/lib/component/element/special/Switch.jsx +0 -131
- package/lib/component/hook/usePagination.jsx +0 -184
- package/lib/component/reaction/addData.jsx +0 -23
- package/lib/component/reaction/fetchData.jsx +0 -83
- package/lib/component/reaction/moveData.jsx +0 -52
- package/lib/component/reaction/postMessage.jsx +0 -43
- package/lib/component/reaction/redirectNow.jsx +0 -17
- package/lib/component/reaction/removeData.jsx +0 -48
- package/lib/component/reaction/setClipboardData.jsx +0 -20
- package/lib/component/reaction/setData.jsx +0 -23
- package/lib/component/reaction/submitData.jsx +0 -136
- package/lib/component/reaction/triggerEvent.jsx +0 -62
- package/lib/component/utility/formatString.jsx +0 -59
- package/lib/engine/Actions.jsx +0 -392
- package/lib/engine/ComponentCollector.js +0 -28
- package/lib/engine/EventDispatcherProvider.jsx +0 -80
- package/lib/engine/GlobalDataContextProvider.jsx +0 -33
- package/lib/engine/PaginationProvider.jsx +0 -61
- package/lib/engine/ReactiveJsonRoot.jsx +0 -318
- package/lib/engine/TemplateSystem.jsx +0 -302
- package/lib/engine/View.jsx +0 -248
- 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.
|
|
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,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;
|
package/{lib/component/action/VisuallyHide.jsx → dist/esm/types/component/action/VisuallyHide.d.ts}
RENAMED
|
@@ -8,8 +8,5 @@
|
|
|
8
8
|
* @returns {JSX.Element}
|
|
9
9
|
* @constructor
|
|
10
10
|
*/
|
|
11
|
-
const VisuallyHide
|
|
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,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,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,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,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,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,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,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,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,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
|
+
};
|
package/{lib/engine/EventDispatcherContext.jsx → dist/esm/types/engine/EventDispatcherContext.d.ts}
RENAMED
|
@@ -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
|
|
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
|
|
12
|
-
|
|
9
|
+
declare const GlobalDataContext: import("react").Context<{}>;
|
|
13
10
|
export default GlobalDataContext;
|