@cxbox-ui/core 1.34.1
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/CONTRIBUTING.md +124 -0
- package/LICENSE +201 -0
- package/Provider.d.ts +63 -0
- package/README.md +82 -0
- package/actions/actions-utils.d.ts +48 -0
- package/actions/actions.d.ts +1132 -0
- package/actions/index.d.ts +2 -0
- package/api/api.d.ts +148 -0
- package/api/index.d.ts +1 -0
- package/assets/i18n/__tests__/getTextAssets.d.ts +1 -0
- package/assets/i18n/index.d.ts +25 -0
- package/components/ColumnTitle/ColumnFilter.d.ts +47 -0
- package/components/ColumnTitle/ColumnSort.d.ts +26 -0
- package/components/ColumnTitle/ColumnTitle.d.ts +31 -0
- package/components/ColumnTitle/__tests__/ColumnFilter.test.d.ts +1 -0
- package/components/ColumnTitle/__tests__/ColumnSort.test.d.ts +1 -0
- package/components/ColumnTitle/__tests__/ColumnTitle.test.d.ts +1 -0
- package/components/DebugPanel/DebugPanel.d.ts +7 -0
- package/components/DebugPanel/__tests__/DebugPanel.test.d.ts +1 -0
- package/components/DebugPanel/components/FormattedJSON.d.ts +6 -0
- package/components/DebugPanel/components/InfoLabel.d.ts +7 -0
- package/components/DebugPanel/components/ViewInfoLabel.d.ts +3 -0
- package/components/DebugPanel/components/WidgetInfoLabel.d.ts +5 -0
- package/components/DebugPanel/components/__tests__/FormattedJSON.test.d.ts +1 -0
- package/components/DebugPanel/components/__tests__/InfoLabel.test.d.ts +1 -0
- package/components/DebugPanel/components/__tests__/ViewInfoLabel.test.d.ts +1 -0
- package/components/DebugPanel/components/__tests__/WidgetInfoLabel.test.d.ts +1 -0
- package/components/DevToolsPanel/DevToolsPanel.d.ts +10 -0
- package/components/DevToolsPanel/DevToolsPanel.test.d.ts +1 -0
- package/components/DevToolsPanel/components/DebugModeButton.d.ts +9 -0
- package/components/DevToolsPanel/components/RefreshMetaButton.d.ts +9 -0
- package/components/DevToolsPanel/components/__tests__/DebugModeButton.test.d.ts +1 -0
- package/components/DevToolsPanel/components/__tests__/RefreshMetaButton.test.d.ts +1 -0
- package/components/Field/Field.d.ts +72 -0
- package/components/Field/Field.test.d.ts +1 -0
- package/components/FileUpload/FileUpload.d.ts +32 -0
- package/components/FileUploadPopup/FileUploadPopup.d.ts +10 -0
- package/components/FilterPopup/FilterPopup.d.ts +26 -0
- package/components/FilterPopup/FilterPopup.test.d.ts +1 -0
- package/components/FullHierarchyTable/FullHierarchyTable.d.ts +52 -0
- package/components/FullHierarchyTable/FullHierarchyTable.test.d.ts +1 -0
- package/components/FullHierarchyTable/utils/hierarchySearchCache.d.ts +37 -0
- package/components/FullHierarchyTable/utils/hierarchySearchCache.test.d.ts +1 -0
- package/components/FullHierarchyTable/utils/useExpandedKeys.d.ts +19 -0
- package/components/FullHierarchyTable/utils/useHierarchyCache.d.ts +12 -0
- package/components/HierarchyTable/HierarchyTable.d.ts +47 -0
- package/components/HierarchyTable/HierarchyTable.test.d.ts +1 -0
- package/components/InlinePickList/InlinePickList.d.ts +23 -0
- package/components/ModalInvoke/ModalInvoke.d.ts +18 -0
- package/components/ModalInvoke/ModalInvoke.test.d.ts +1 -0
- package/components/Multivalue/MultiValueListRecord.d.ts +15 -0
- package/components/Multivalue/MultivalueField.d.ts +31 -0
- package/components/Multivalue/MultivalueField.test.d.ts +1 -0
- package/components/PickListField/PickListField.d.ts +25 -0
- package/components/RowOperations/RowOperationsButton.d.ts +42 -0
- package/components/RowOperations/RowOperationsMenu.d.ts +29 -0
- package/components/RowOperations/__tests__/RowOperationsButton.test.d.ts +1 -0
- package/components/RowOperations/__tests__/RowOperationsMenu.test.d.ts +1 -0
- package/components/SameBcHierarchyTable/SameBcHierarchyTable.d.ts +40 -0
- package/components/TemplatedTitle/TemplatedTitle.d.ts +20 -0
- package/components/View/View.d.ts +26 -0
- package/components/View/__tests__/View.test.d.ts +1 -0
- package/components/Widget/Widget.d.ts +28 -0
- package/components/Widget/Widget.test.d.ts +1 -0
- package/components/WidgetErrorBoundary/WidgetErrorBoundary.d.ts +20 -0
- package/components/WidgetErrorBoundary/WidgetErrorBoundary.test.d.ts +1 -0
- package/components/WidgetErrorBoundary/components/RefreshButton.d.ts +4 -0
- package/components/WidgetErrorBoundary/components/RefreshButton.test.d.ts +1 -0
- package/components/index.d.ts +44 -0
- package/components/ui/ActionLink/ActionLink.d.ts +11 -0
- package/components/ui/CheckboxFilter/CheckboxFilter.d.ts +21 -0
- package/components/ui/CheckboxFilter/CheckboxFilter.test.d.ts +1 -0
- package/components/ui/CheckboxPicker/CheckboxPicker.d.ts +21 -0
- package/components/ui/CopyableText/CopyableText.d.ts +7 -0
- package/components/ui/CopyableText/__tests__/CopyableText.test.d.ts +1 -0
- package/components/ui/DashboardLayout/DashboardLayout.d.ts +21 -0
- package/components/ui/DashboardLayout/__tests__/DashboardLayout.test.d.ts +1 -0
- package/components/ui/DatePickerField/DatePickerField.d.ts +25 -0
- package/components/ui/Dictionary/Dictionary.d.ts +30 -0
- package/components/ui/Dictionary/Dictionary.test.d.ts +1 -0
- package/components/ui/ErrorPopup/ErrorPopup.d.ts +18 -0
- package/components/ui/ErrorPopup/ErrorPopup.test.d.ts +1 -0
- package/components/ui/FilterField/FilterField.d.ts +25 -0
- package/components/ui/FilterField/FilterField.test.d.ts +1 -0
- package/components/ui/FilterField/components/RangePicker.d.ts +11 -0
- package/components/ui/FilterField/components/RangePicker.test.d.ts +1 -0
- package/components/ui/HistoryField/HistoryField.d.ts +15 -0
- package/components/ui/InteractiveInput/InteractiveInput.d.ts +28 -0
- package/components/ui/Link/Link.d.ts +13 -0
- package/components/ui/MultiField/MultiField.d.ts +16 -0
- package/components/ui/Multivalue/MultivalueHover.d.ts +15 -0
- package/components/ui/Multivalue/MultivalueList.d.ts +17 -0
- package/components/ui/Multivalue/MultivalueTag.d.ts +24 -0
- package/components/ui/NavigationTabs/NavigationTabs.d.ts +7 -0
- package/components/ui/NavigationTabs/NavigationTabs.test.d.ts +1 -0
- package/components/ui/NumberInput/NumberInput.d.ts +17 -0
- package/components/ui/NumberInput/NumberInput.test.d.ts +1 -0
- package/components/ui/NumberInput/formaters.d.ts +31 -0
- package/components/ui/Pagination/Pagination.d.ts +51 -0
- package/components/ui/Pagination/Pagination.test.d.ts +1 -0
- package/components/ui/PickInput/PickInput.d.ts +15 -0
- package/components/ui/Popup/Popup.d.ts +29 -0
- package/components/ui/Popup/Popup.test.d.ts +1 -0
- package/components/ui/Popup/PopupFooter.d.ts +16 -0
- package/components/ui/RadioButton/RadioButton.d.ts +16 -0
- package/components/ui/RadioButton/RadioButton.test.d.ts +1 -0
- package/components/ui/ReadOnlyField/ReadOnlyField.d.ts +22 -0
- package/components/ui/SearchHightlight/SearchHightlight.d.ts +20 -0
- package/components/ui/Select/Select.d.ts +26 -0
- package/components/ui/TextArea/TextArea.d.ts +24 -0
- package/components/ui/TextArea/TextArea.test.d.ts +1 -0
- package/components/ui/TreeVirtualized/TreeVirtualized.d.ts +63 -0
- package/components/ui/TreeVirtualized/TreeVirtualizedNode.d.ts +67 -0
- package/components/ui/TreeVirtualized/__tests__/TreeVirtualized.test.d.ts +1 -0
- package/components/ui/TreeVirtualized/__tests__/TreeVirtualizedNode.test.d.ts +1 -0
- package/components/ui/TreeVirtualized/__tests__/useMatchingNodes.test.d.ts +1 -0
- package/components/ui/TreeVirtualized/__tests__/useSearchResult.test.d.ts +1 -0
- package/components/ui/TreeVirtualized/useMatchingNodes.d.ts +23 -0
- package/components/ui/TreeVirtualized/useSearchResult.d.ts +27 -0
- package/components/widgets/AssocListPopup/AssocListPopup.d.ts +58 -0
- package/components/widgets/AssocListPopup/AssocListPopup.test.d.ts +1 -0
- package/components/widgets/AssocListPopup/AssocTable.d.ts +35 -0
- package/components/widgets/AssocListPopup/AssocTable.test.d.ts +1 -0
- package/components/widgets/FlatTree/FlatTree.d.ts +53 -0
- package/components/widgets/FlatTree/FlatTreePopup.d.ts +31 -0
- package/components/widgets/FlatTree/__tests__/FlatTree.test.d.ts +1 -0
- package/components/widgets/FlatTree/__tests__/FlatTreePopup.test.d.ts +1 -0
- package/components/widgets/FlatTree/useMultipleSelect.d.ts +11 -0
- package/components/widgets/FlatTree/useSingleSelect.d.ts +10 -0
- package/components/widgets/FormWidget/FormWidget.d.ts +23 -0
- package/components/widgets/FormWidget/FormWidget.test.d.ts +1 -0
- package/components/widgets/InfoWidget/InfoWidget.d.ts +19 -0
- package/components/widgets/InfoWidget/__test__/InfoWidget.test.d.ts +1 -0
- package/components/widgets/InfoWidget/components/InfoCell.d.ts +15 -0
- package/components/widgets/InfoWidget/components/InfoRow.d.ts +16 -0
- package/components/widgets/InfoWidget/components/InfoValueWrapper.d.ts +10 -0
- package/components/widgets/InfoWidget/components/__tests__/InfoCell.test.d.ts +1 -0
- package/components/widgets/InfoWidget/components/__tests__/InfoRow.test.d.ts +1 -0
- package/components/widgets/InfoWidget/components/__tests__/InfoValueWrapper.test.d.ts +1 -0
- package/components/widgets/NavigationTabsWidget/NavigationTabsWidget.d.ts +8 -0
- package/components/widgets/NavigationTabsWidget/NavigationTabsWidget.test.d.ts +1 -0
- package/components/widgets/PickListPopup/PickListPopup.d.ts +43 -0
- package/components/widgets/PickListPopup/PickListPopup.test.d.ts +1 -0
- package/components/widgets/TableWidget/TableWidget.d.ts +88 -0
- package/components/widgets/TableWidget/TableWidget.test.d.ts +1 -0
- package/components/widgets/TextWidget/TextWidget.d.ts +15 -0
- package/components/widgets/TextWidget/TextWidget.test.d.ts +1 -0
- package/components/widgets/ViewNavigationWidget/ViewNavigationWidget.d.ts +6 -0
- package/components/widgets/ViewNavigationWidget/ViewNavigationWidget.test.d.ts +1 -0
- package/components/widgets/index.d.ts +4 -0
- package/cxbox-ui-core.js +148 -0
- package/cxbox-ui-core.js.map +1 -0
- package/epics/data/__tests__/bcCancelCreateDataEpic.test.d.ts +1 -0
- package/epics/data/__tests__/bcFetchData.test.d.ts +1 -0
- package/epics/data/__tests__/bcFetchRowMetaRequest.test.d.ts +1 -0
- package/epics/data/__tests__/bcNewDataEpic.test.d.ts +1 -0
- package/epics/data/__tests__/bcSaveData.test.d.ts +1 -0
- package/epics/data/__tests__/bcSelectDepthRecord.test.d.ts +1 -0
- package/epics/data/__tests__/removeMultivalueTag.test.d.ts +1 -0
- package/epics/data/__tests__/saveAssociationsActive.test.d.ts +1 -0
- package/epics/data/__tests__/selectView.test.d.ts +1 -0
- package/epics/data/bcCancelCreateDataEpic.d.ts +28 -0
- package/epics/data/bcFetchData.d.ts +21 -0
- package/epics/data/bcFetchRowMetaRequest.d.ts +50 -0
- package/epics/data/bcNewDataEpic.d.ts +37 -0
- package/epics/data/bcSaveData.d.ts +58 -0
- package/epics/data/bcSelectDepthRecord.d.ts +21 -0
- package/epics/data/removeMultivalueTag.d.ts +45 -0
- package/epics/data/saveAssociationsActive.d.ts +7 -0
- package/epics/data/selectView.d.ts +36 -0
- package/epics/data.d.ts +105 -0
- package/epics/index.d.ts +74 -0
- package/epics/router/__tests__/changeLocation.test.d.ts +1 -0
- package/epics/router/__tests__/drilldown.test.d.ts +1 -0
- package/epics/router/__tests__/handleRouter.test.d.ts +1 -0
- package/epics/router/__tests__/loginDone.test.d.ts +1 -0
- package/epics/router/__tests__/selectScreen.test.d.ts +1 -0
- package/epics/router/__tests__/selectScreenFail.test.d.ts +1 -0
- package/epics/router/__tests__/selectView.test.d.ts +1 -0
- package/epics/router/__tests__/selectViewFail.test.d.ts +1 -0
- package/epics/router/__tests__/userDrillDown.test.d.ts +1 -0
- package/epics/router/changeLocation.d.ts +11 -0
- package/epics/router/drilldown.d.ts +12 -0
- package/epics/router/handleRouter.d.ts +17 -0
- package/epics/router/loginDone.d.ts +20 -0
- package/epics/router/selectScreen.d.ts +19 -0
- package/epics/router/selectScreenFail.d.ts +17 -0
- package/epics/router/selectView.d.ts +19 -0
- package/epics/router/selectViewFail.d.ts +17 -0
- package/epics/router/userDrillDown.d.ts +29 -0
- package/epics/router.d.ts +11 -0
- package/epics/screen/__tests__/apiError.test.d.ts +1 -0
- package/epics/screen/__tests__/httpError401.test.d.ts +1 -0
- package/epics/screen/__tests__/httpError409.test.d.ts +1 -0
- package/epics/screen/__tests__/httpError418.test.d.ts +1 -0
- package/epics/screen/__tests__/httpError500.test.d.ts +1 -0
- package/epics/screen/__tests__/httpErrorDefault.test.d.ts +1 -0
- package/epics/screen/apiError.d.ts +13 -0
- package/epics/screen/httpError401.d.ts +12 -0
- package/epics/screen/httpError409.d.ts +12 -0
- package/epics/screen/httpError418.d.ts +12 -0
- package/epics/screen/httpError500.d.ts +12 -0
- package/epics/screen/httpErrorDefault.d.ts +14 -0
- package/epics/screen/processPostInvoke.d.ts +12 -0
- package/epics/screen.d.ts +35 -0
- package/epics/session/__tests__/loginByAnotherRoleEpic.test.d.ts +1 -0
- package/epics/session/__tests__/loginDone.test.d.ts +1 -0
- package/epics/session/__tests__/refreshMeta.test.d.ts +1 -0
- package/epics/session/__tests__/refreshMetaAndReloadPage.test.d.ts +1 -0
- package/epics/session/__tests__/switchRole.test.d.ts +1 -0
- package/epics/session/loginByAnotherRole.d.ts +27 -0
- package/epics/session/loginDone.d.ts +10 -0
- package/epics/session/refreshMeta.d.ts +9 -0
- package/epics/session/refreshMetaAndReloadPage.d.ts +2 -0
- package/epics/session/switchRole.d.ts +9 -0
- package/epics/session.d.ts +7 -0
- package/epics/utils.d.ts +4 -0
- package/epics/view/__tests__/fileUploadConfirm.test.d.ts +1 -0
- package/epics/view/__tests__/sendOperation.test.d.ts +1 -0
- package/epics/view/__tests__/sendOperationAssociate.test.d.ts +1 -0
- package/epics/view/__tests__/showAssocPopup.test.d.ts +1 -0
- package/epics/view/__tests__/showFileUploadPopup.test.d.ts +1 -0
- package/epics/view/fileUploadConfirm.d.ts +31 -0
- package/epics/view/sendOperation.d.ts +24 -0
- package/epics/view/sendOperationAssociate.d.ts +34 -0
- package/epics/view/showAssocPopup.d.ts +12 -0
- package/epics/view/showFileUploadPopup.d.ts +19 -0
- package/epics/view.d.ts +57 -0
- package/hooks/__tests__/useRowMenu.test.d.ts +1 -0
- package/hooks/__tests__/useViewTabs.test.d.ts +1 -0
- package/hooks/__tests__/useWidgetOperations.test.d.ts +1 -0
- package/hooks/index.d.ts +7 -0
- package/hooks/useAssocRecords.d.ts +11 -0
- package/hooks/useDebounce.d.ts +8 -0
- package/hooks/useDrillDownUrl.d.ts +10 -0
- package/hooks/useFlatFormFields.d.ts +9 -0
- package/hooks/useRowMenu.d.ts +42 -0
- package/hooks/useViewTabs.d.ts +13 -0
- package/hooks/useWidgetFilter.d.ts +15 -0
- package/hooks/useWidgetOperations.d.ts +34 -0
- package/imports/i18n.d.ts +8 -0
- package/imports/rxjs.d.ts +19 -0
- package/imports/shim.d.ts +6 -0
- package/index.d.ts +135 -0
- package/interfaces/bc.d.ts +78 -0
- package/interfaces/customEpics.d.ts +55 -0
- package/interfaces/customMiddlewares.d.ts +35 -0
- package/interfaces/data.d.ts +48 -0
- package/interfaces/filters.d.ts +32 -0
- package/interfaces/filters.js +2 -0
- package/interfaces/filters.js.map +1 -0
- package/interfaces/index.d.ts +22 -0
- package/interfaces/navigation.d.ts +48 -0
- package/interfaces/objectMap.d.ts +35 -0
- package/interfaces/objectMap.js +2 -0
- package/interfaces/objectMap.js.map +1 -0
- package/interfaces/operation.d.ts +330 -0
- package/interfaces/operation.js +2 -0
- package/interfaces/operation.js.map +1 -0
- package/interfaces/router.d.ts +16 -0
- package/interfaces/router.js +2 -0
- package/interfaces/router.js.map +1 -0
- package/interfaces/rowMeta.d.ts +74 -0
- package/interfaces/screen.d.ts +28 -0
- package/interfaces/session.d.ts +62 -0
- package/interfaces/store.d.ts +56 -0
- package/interfaces/tree.d.ts +66 -0
- package/interfaces/view.d.ts +202 -0
- package/interfaces/view.js +2 -0
- package/interfaces/view.js.map +1 -0
- package/interfaces/widget.d.ts +208 -0
- package/interfaces/widget.js +2 -0
- package/interfaces/widget.js.map +1 -0
- package/middlewares/__tests__/autosaveMiddleware.test.d.ts +1 -0
- package/middlewares/__tests__/preInvokeMiddleware.test.d.ts +1 -0
- package/middlewares/__tests__/requiredFieldsMiddleware.test.d.ts +1 -0
- package/middlewares/actionsHistoryMiddleware.d.ts +3 -0
- package/middlewares/autosaveMiddleware.d.ts +6 -0
- package/middlewares/index.d.ts +6 -0
- package/middlewares/preInvokeMiddleware.d.ts +8 -0
- package/middlewares/requiredFieldsMiddleware.d.ts +35 -0
- package/mocks/data/widgetMeta.d.ts +10 -0
- package/package.json +117 -0
- package/reducers/__tests__/data.test.d.ts +1 -0
- package/reducers/__tests__/forceActiveField.test.d.ts +1 -0
- package/reducers/__tests__/screen/bcAddFilter.test.d.ts +1 -0
- package/reducers/__tests__/session.test.d.ts +1 -0
- package/reducers/__tests__/view.test.d.ts +1 -0
- package/reducers/data.d.ts +13 -0
- package/reducers/depthData.d.ts +7 -0
- package/reducers/index.d.ts +3 -0
- package/reducers/router.d.ts +30 -0
- package/reducers/screen.d.ts +16 -0
- package/reducers/session.d.ts +15 -0
- package/reducers/view.d.ts +16 -0
- package/tests/assetsMock.d.ts +0 -0
- package/tests/mockStore.d.ts +6 -0
- package/tests/setup.d.ts +1 -0
- package/tests/testEpic.d.ts +14 -0
- package/utils/__tests__/autosave.test.d.ts +1 -0
- package/utils/__tests__/bc.test.d.ts +1 -0
- package/utils/__tests__/breadthFirst.test.d.ts +1 -0
- package/utils/__tests__/cancelRequestEpic.test.d.ts +1 -0
- package/utils/__tests__/combineEpics.test.d.ts +1 -0
- package/utils/__tests__/combineMiddlewares.test.d.ts +1 -0
- package/utils/__tests__/configureStore.test.d.ts +1 -0
- package/utils/__tests__/extendPopupWidgetTypes.test.d.ts +1 -0
- package/utils/__tests__/filters.test.d.ts +1 -0
- package/utils/__tests__/history.test.d.ts +1 -0
- package/utils/__tests__/notifications.test.d.ts +1 -0
- package/utils/__tests__/operations.test.d.ts +1 -0
- package/utils/__tests__/tree.test.d.ts +1 -0
- package/utils/__tests__/viewTabs.test.d.ts +1 -0
- package/utils/actionsHistory.d.ts +2 -0
- package/utils/api.d.ts +92 -0
- package/utils/autosave.d.ts +26 -0
- package/utils/bc.d.ts +27 -0
- package/utils/breadthFirst.d.ts +21 -0
- package/utils/cancelRequestEpic.d.ts +16 -0
- package/utils/combineEpics.d.ts +13 -0
- package/utils/combineMiddlewares.d.ts +3 -0
- package/utils/configureStore.d.ts +15 -0
- package/utils/exportState.d.ts +3 -0
- package/utils/extendPopupWidgetTypes.d.ts +8 -0
- package/utils/filters.d.ts +64 -0
- package/utils/hierarchy.d.ts +17 -0
- package/utils/highlightJson.d.ts +12 -0
- package/utils/history.d.ts +51 -0
- package/utils/index.d.ts +6 -0
- package/utils/notifications.d.ts +11 -0
- package/utils/operations.d.ts +21 -0
- package/utils/redux.d.ts +49 -0
- package/utils/strings.d.ts +43 -0
- package/utils/tree.d.ts +43 -0
- package/utils/viewTabs.d.ts +20 -0
package/package.json
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cxbox-ui/core",
|
|
3
|
+
"version": "1.34.1",
|
|
4
|
+
"main": "cxbox-ui-core.js",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": "./cxbox-ui-core.js",
|
|
7
|
+
"./interfaces/widget": "./interfaces/widget.js",
|
|
8
|
+
"./interfaces/filters": "./interfaces/filters.js",
|
|
9
|
+
"./interfaces/objectMap": "./interfaces/objectMap.js",
|
|
10
|
+
"./interfaces/operation": "./interfaces/operation.js",
|
|
11
|
+
"./interfaces/router": "./interfaces/router.js",
|
|
12
|
+
"./interfaces/view": "./interfaces/view.js"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://cxbox.io/",
|
|
15
|
+
"types": "index.d.ts",
|
|
16
|
+
"author": "cxbox",
|
|
17
|
+
"license": "Apache-2.0",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "webpack --mode=production",
|
|
20
|
+
"start": "webpack --watch",
|
|
21
|
+
"start:progress": "yarn start --progress --profile",
|
|
22
|
+
"build:stats": "webpack --env production --json > stats.json",
|
|
23
|
+
"test": "node --max_old_space_size=4096 ./node_modules/jest/bin/jest",
|
|
24
|
+
"test:coverage": "node --max_old_space_size=4096 ./node_modules/jest/bin/jest --coverage --coverageProvider=v8",
|
|
25
|
+
"lint": "yarn eslint ./src",
|
|
26
|
+
"check": "yarn run lint && yarn run test",
|
|
27
|
+
"doc:gen": "typedoc --out docs --categorizeByGroup src/index.ts src/interfaces/index.ts --categorizeByGroup false --readme none",
|
|
28
|
+
"gen:schema": "node ./node_modules/@cxbox-ui/schema/bin/build-schema"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/classnames": "2.2.6",
|
|
32
|
+
"@types/diff": "4.0.2",
|
|
33
|
+
"@types/enzyme": "3.10.7",
|
|
34
|
+
"@types/enzyme-adapter-react-16": "1.0.5",
|
|
35
|
+
"@types/history": "4.7.2",
|
|
36
|
+
"@types/jest": "26.0.24",
|
|
37
|
+
"@types/marked": "0.7.2",
|
|
38
|
+
"@types/query-string": "5.1.0",
|
|
39
|
+
"@types/react": "16.9.56",
|
|
40
|
+
"@types/react-dom": "^16.9.8",
|
|
41
|
+
"@types/react-redux": "7.1.9",
|
|
42
|
+
"@types/react-window": "^1.8.2",
|
|
43
|
+
"@types/uuid": "3.4.0",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "3.9.0",
|
|
45
|
+
"@typescript-eslint/eslint-plugin-tslint": "3.9.0",
|
|
46
|
+
"@typescript-eslint/parser": "3.9.0",
|
|
47
|
+
"antd": "3.26.18",
|
|
48
|
+
"axios": "0.19.0",
|
|
49
|
+
"clean-webpack-plugin": "3.0.0",
|
|
50
|
+
"copy-webpack-plugin": "5.0.4",
|
|
51
|
+
"coveralls": "3.0.13",
|
|
52
|
+
"css-loader": "1.0.0",
|
|
53
|
+
"enzyme": "3.11.0",
|
|
54
|
+
"enzyme-adapter-react-16": "1.15.2",
|
|
55
|
+
"eslint": "7.6.0",
|
|
56
|
+
"eslint-config-prettier": "7.0.0",
|
|
57
|
+
"eslint-plugin-file-progress": "1.1.0",
|
|
58
|
+
"eslint-plugin-import": "2.22.0",
|
|
59
|
+
"eslint-plugin-jsdoc": "30.2.1",
|
|
60
|
+
"eslint-plugin-prefer-arrow": "1.2.2",
|
|
61
|
+
"eslint-plugin-prettier": "3.3.0",
|
|
62
|
+
"eslint-plugin-progress": "0.0.1",
|
|
63
|
+
"eslint-plugin-react": "7.20.6",
|
|
64
|
+
"eslint-plugin-react-hooks": "4.0.8",
|
|
65
|
+
"identity-obj-proxy": "3.0.0",
|
|
66
|
+
"jest": "27.0.6",
|
|
67
|
+
"less": "3.8.1",
|
|
68
|
+
"less-loader": "4.1.0",
|
|
69
|
+
"prettier": "2.2.1",
|
|
70
|
+
"react": "16.13.1",
|
|
71
|
+
"react-dom": "16.13.1",
|
|
72
|
+
"react-redux": "7.2.1",
|
|
73
|
+
"redux": "^4.0.5",
|
|
74
|
+
"redux-observable": "0.14.1",
|
|
75
|
+
"rxjs": "5.5.12",
|
|
76
|
+
"style-loader": "0.23.0",
|
|
77
|
+
"svg-inline-loader": "0.8.0",
|
|
78
|
+
"ts-import-plugin": "1.5.4",
|
|
79
|
+
"ts-jest": "27.0.3",
|
|
80
|
+
"ts-loader": "6.2.2",
|
|
81
|
+
"tslint-eslint-rules": "5.4.0",
|
|
82
|
+
"typed-css-modules": "0.3.5",
|
|
83
|
+
"typedoc": "0.20.14",
|
|
84
|
+
"typescript": "~3.9.7",
|
|
85
|
+
"typings-for-css-modules-loader": "1.7.0",
|
|
86
|
+
"url-loader": "0.6.2",
|
|
87
|
+
"webpack": "4.44.0",
|
|
88
|
+
"webpack-cli": "3.1.0",
|
|
89
|
+
"webpack-rxjs-externals": "1.1.0"
|
|
90
|
+
},
|
|
91
|
+
"dependencies": {
|
|
92
|
+
"@cxbox-ui/schema": "0.6.1",
|
|
93
|
+
"classnames": "2.2.6",
|
|
94
|
+
"core-js": "3.1.4",
|
|
95
|
+
"diff": "4.0.2",
|
|
96
|
+
"history": "4.9.0",
|
|
97
|
+
"html-react-parser": "0.10.0",
|
|
98
|
+
"html2canvas": "1.0.0-rc.7",
|
|
99
|
+
"i18next": "19.0.1",
|
|
100
|
+
"marked": "0.8.0",
|
|
101
|
+
"query-string": "5.1.0",
|
|
102
|
+
"react-i18next": "11.2.5",
|
|
103
|
+
"react-window": "1.8.5",
|
|
104
|
+
"uuid": "3.4.0"
|
|
105
|
+
},
|
|
106
|
+
"peerDependencies": {
|
|
107
|
+
"antd": "^3.26.18",
|
|
108
|
+
"axios": "0.19.0",
|
|
109
|
+
"moment": "^2.24.0",
|
|
110
|
+
"react": "^16.13.1",
|
|
111
|
+
"react-dom": "^16.13.1",
|
|
112
|
+
"react-redux": "^7.2.1",
|
|
113
|
+
"redux": "^4.0.5",
|
|
114
|
+
"redux-observable": "^0.14.1",
|
|
115
|
+
"rxjs": "^5.5.12"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AnyAction } from '../actions/actions';
|
|
2
|
+
import { DataState } from '../interfaces/data';
|
|
3
|
+
/**
|
|
4
|
+
* Data reducer
|
|
5
|
+
*
|
|
6
|
+
* Stores data (i.e. records, rows) for Business Components
|
|
7
|
+
*
|
|
8
|
+
* @param state Data branch of Redux store
|
|
9
|
+
* @param action Redux action
|
|
10
|
+
* @param store Store instance for read-only access of different branches of Redux store
|
|
11
|
+
*/
|
|
12
|
+
export declare function data(state: DataState, action: AnyAction): DataState;
|
|
13
|
+
export default data;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AnyAction } from '../actions/actions';
|
|
2
|
+
import { Route } from '../interfaces/router';
|
|
3
|
+
/**
|
|
4
|
+
* Global instance
|
|
5
|
+
*
|
|
6
|
+
* @category Utils
|
|
7
|
+
*/
|
|
8
|
+
export declare const historyObj: import("history").History<any>;
|
|
9
|
+
/**
|
|
10
|
+
* TODO
|
|
11
|
+
*
|
|
12
|
+
* @param href
|
|
13
|
+
* @category Utils
|
|
14
|
+
*/
|
|
15
|
+
export declare function changeLocation(href: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* TODO
|
|
18
|
+
*/
|
|
19
|
+
export declare function initHistory(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Router reducer
|
|
22
|
+
*
|
|
23
|
+
* Stores information about currently active route
|
|
24
|
+
*
|
|
25
|
+
* @param state Router branch of Redux store
|
|
26
|
+
* @param action Redux action
|
|
27
|
+
* @param store Store instance for read-only access of different branches of Redux store
|
|
28
|
+
*/
|
|
29
|
+
export declare function router(state: Route, action: AnyAction): Route;
|
|
30
|
+
export default router;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AnyAction } from '../actions/actions';
|
|
2
|
+
import { ScreenState } from '../interfaces/screen';
|
|
3
|
+
import { Store } from 'interfaces/store';
|
|
4
|
+
export declare const initialState: ScreenState;
|
|
5
|
+
/**
|
|
6
|
+
* Screen reducer
|
|
7
|
+
*
|
|
8
|
+
* Stores information about currently active screen and various more persistent values which should be stored
|
|
9
|
+
* until we navitage to a different screen.
|
|
10
|
+
*
|
|
11
|
+
* @param state Screen branch of Redux store
|
|
12
|
+
* @param action Redux action
|
|
13
|
+
* @param store Store instance for read-only access of different branches of Redux store
|
|
14
|
+
*/
|
|
15
|
+
export declare function screen(state: ScreenState, action: AnyAction, store: Store): ScreenState;
|
|
16
|
+
export default screen;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AnyAction } from '../actions/actions';
|
|
2
|
+
import { Session } from '../interfaces/session';
|
|
3
|
+
export declare const initialState: Session;
|
|
4
|
+
/**
|
|
5
|
+
* Session reducer
|
|
6
|
+
*
|
|
7
|
+
* Stores information about currently active session and data that should be persistent during all period of
|
|
8
|
+
* user interaction with application.
|
|
9
|
+
*
|
|
10
|
+
* @param state Session branch of Redux store
|
|
11
|
+
* @param action Redux action
|
|
12
|
+
* @param store Store instance for read-only access of different branches of Redux store
|
|
13
|
+
*/
|
|
14
|
+
export declare function session(state: Session, action: AnyAction): Session;
|
|
15
|
+
export default session;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AnyAction } from '../actions/actions';
|
|
2
|
+
import { ViewState } from '../interfaces/view';
|
|
3
|
+
import { Store } from '../interfaces/store';
|
|
4
|
+
export declare const initialState: ViewState;
|
|
5
|
+
/**
|
|
6
|
+
* View reducer
|
|
7
|
+
*
|
|
8
|
+
* Stores information about currently active view and various fast-living pending values which should be stored
|
|
9
|
+
* until we navitage to a different view.
|
|
10
|
+
*
|
|
11
|
+
* @param state View branch of Redux store
|
|
12
|
+
* @param action Redux action
|
|
13
|
+
* @param store Store instance for read-only access of different branches of Redux store
|
|
14
|
+
*/
|
|
15
|
+
export declare function view(state: ViewState, action: AnyAction, store: Store): ViewState;
|
|
16
|
+
export default view;
|
|
File without changes
|
package/tests/setup.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility for simple unit-testing of epics
|
|
3
|
+
*
|
|
4
|
+
* TODO: Probably will not be needed after migration to redux-observable 1.* and RxJS 6.* with TestScheduler.run available
|
|
5
|
+
*/
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
import { AnyAction } from '../actions/actions';
|
|
8
|
+
/**
|
|
9
|
+
* Fires an epic and a callback with array of observables, returned from epic
|
|
10
|
+
*
|
|
11
|
+
* @param epic Epic chain to test
|
|
12
|
+
* @param callback Epic result callback
|
|
13
|
+
*/
|
|
14
|
+
export declare function testEpic(epic: Observable<AnyAction>, callback: (result: AnyAction[]) => void): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/utils/api.d.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Observable } from 'rxjs/Observable';
|
|
2
|
+
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
3
|
+
export interface ApiCallContext {
|
|
4
|
+
widgetName: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const HEADERS: {
|
|
7
|
+
Pragma: string;
|
|
8
|
+
'Cache-Control': string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @category Utils
|
|
12
|
+
*/
|
|
13
|
+
declare const axiosForApi: {
|
|
14
|
+
get: <ResponsePayload>(path: string, config: AxiosRequestConfig, callContext?: ApiCallContext) => Promise<AxiosResponse<ResponsePayload>>;
|
|
15
|
+
put: <ResponsePayload_1>(path: string, data: any, callContext?: ApiCallContext) => Promise<AxiosResponse<ResponsePayload_1>>;
|
|
16
|
+
post: <ResponsePayload_2>(path: string, data: any, config?: AxiosRequestConfig, callContext?: ApiCallContext) => Promise<AxiosResponse<ResponsePayload_2>>;
|
|
17
|
+
delete: <ResponsePayload_3>(path: string, callContext?: ApiCallContext) => Promise<AxiosResponse<ResponsePayload_3>>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* HTTP GET axios request wrapped into RxJS Observable.
|
|
21
|
+
* Can be interrupted by `redirectOccured` function.
|
|
22
|
+
*
|
|
23
|
+
* @param path Endpoint url
|
|
24
|
+
* @param headers Request headers
|
|
25
|
+
* @param callContext Call context
|
|
26
|
+
* @template ResponsePayload Response payload type
|
|
27
|
+
* @category Utils
|
|
28
|
+
*/
|
|
29
|
+
declare const axiosGet: <ResponsePayload>(path: string, config?: AxiosRequestConfig, callContext?: ApiCallContext) => Observable<ResponsePayload>;
|
|
30
|
+
/**
|
|
31
|
+
* HTTP POST axios request wrapped into RxJS Observable.
|
|
32
|
+
* Can be interrupted by `redirectOccured` function.
|
|
33
|
+
*
|
|
34
|
+
* @param path Endpoint url
|
|
35
|
+
* @param headers Request headers
|
|
36
|
+
* @param callContext Call context
|
|
37
|
+
* @template ResponsePayload Response payload type
|
|
38
|
+
* @category Utils
|
|
39
|
+
*/
|
|
40
|
+
declare const axiosPost: <ResponsePayload>(path: string, data: any, config?: AxiosRequestConfig, callContext?: ApiCallContext) => Observable<ResponsePayload>;
|
|
41
|
+
/**
|
|
42
|
+
* HTTP PUT axios request wrapped into RxJS Observable.
|
|
43
|
+
* Can be interrupted by `redirectOccured` function.
|
|
44
|
+
*
|
|
45
|
+
* @param path Endpoint url
|
|
46
|
+
* @param headers Request headers
|
|
47
|
+
* @param callContext Call context
|
|
48
|
+
* @template ResponsePayload Response payload type
|
|
49
|
+
* @category Utils
|
|
50
|
+
*/
|
|
51
|
+
declare const axiosPut: <ResponsePayload>(path: string, data: any, callContext?: ApiCallContext) => Observable<ResponsePayload>;
|
|
52
|
+
/**
|
|
53
|
+
* HTTP DELETE axios request wrapped into RxJS Observable.
|
|
54
|
+
* Can be interrupted by `redirectOccured` function.
|
|
55
|
+
*
|
|
56
|
+
* @param path Endpoint url
|
|
57
|
+
* @param headers Request headers
|
|
58
|
+
* @param callContext Call context
|
|
59
|
+
* @template ResponsePayload Response payload type
|
|
60
|
+
* @category Utils
|
|
61
|
+
*/
|
|
62
|
+
declare const axiosDelete: <ResponsePayload>(path: string, callContext?: ApiCallContext) => Observable<ResponsePayload>;
|
|
63
|
+
declare type QueryParamsMap = Record<string, string | number>;
|
|
64
|
+
/**
|
|
65
|
+
* Extends url with query parameters control symbol (`?` or `&`)
|
|
66
|
+
*
|
|
67
|
+
* @param url Url with or without `?` symbol
|
|
68
|
+
*/
|
|
69
|
+
export declare function addTailControlSequences(url: string): string;
|
|
70
|
+
/**
|
|
71
|
+
* Extends url with query parameters
|
|
72
|
+
*
|
|
73
|
+
* @param url Url to extend
|
|
74
|
+
* @param qso Query parameters dictionary
|
|
75
|
+
*/
|
|
76
|
+
export declare function applyParams(url: string, qso: QueryParamsMap): string;
|
|
77
|
+
/**
|
|
78
|
+
* TODO
|
|
79
|
+
*
|
|
80
|
+
* @param url
|
|
81
|
+
* @param qso
|
|
82
|
+
*/
|
|
83
|
+
export declare function applyRawParams(url: string, qso: Record<string, unknown>): string;
|
|
84
|
+
/**
|
|
85
|
+
* Get Cxbox API file upload endpoint based on baseURL of axios instance
|
|
86
|
+
*
|
|
87
|
+
* Handles empty baseURL and trailing slash
|
|
88
|
+
*
|
|
89
|
+
* @returns File upload endpoint
|
|
90
|
+
*/
|
|
91
|
+
export declare function getFileUploadEndpoint(): string;
|
|
92
|
+
export { axiosForApi, axiosGet, axiosPut, axiosDelete, axiosPost };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Store as CoreStore } from '../interfaces/store';
|
|
2
|
+
import { AnyAction, Dispatch, MiddlewareAPI } from 'redux';
|
|
3
|
+
/**
|
|
4
|
+
* Performs mechanism of autosave
|
|
5
|
+
*
|
|
6
|
+
* @param action
|
|
7
|
+
* @param store
|
|
8
|
+
* @param next
|
|
9
|
+
* @category Utils
|
|
10
|
+
*/
|
|
11
|
+
export declare function autosaveRoutine(action: AnyAction, store: MiddlewareAPI<Dispatch<AnyAction>, CoreStore>, next: Dispatch): AnyAction;
|
|
12
|
+
/**
|
|
13
|
+
* Checks presence of pending changes suitable for autosave
|
|
14
|
+
*
|
|
15
|
+
* @param store
|
|
16
|
+
* @param bcName
|
|
17
|
+
* @param cursor
|
|
18
|
+
*/
|
|
19
|
+
export declare function bcHasPendingAutosaveChanges(store: CoreStore, bcName: string, cursor: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Checks presence of unsaved data for specified BC
|
|
22
|
+
*
|
|
23
|
+
* @param store
|
|
24
|
+
* @param bcName
|
|
25
|
+
*/
|
|
26
|
+
export declare function checkUnsavedChangesOfBc(store: CoreStore, bcName: string): boolean;
|
package/utils/bc.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { WidgetMeta, WidgetShowCondition } from '../interfaces/widget';
|
|
2
|
+
import { BcMetaState } from '../interfaces/bc';
|
|
3
|
+
import { DataItem, PendingDataItem } from '../interfaces/data';
|
|
4
|
+
/**
|
|
5
|
+
* Find all widgets referencing or descendant from specified origin BC
|
|
6
|
+
*
|
|
7
|
+
* @param originBcName Origin business component name
|
|
8
|
+
* @param widgets Widgets to search through
|
|
9
|
+
* @param bcMap Business components dictionary
|
|
10
|
+
* @returns A dictionary of business components and widgets
|
|
11
|
+
*/
|
|
12
|
+
export declare function getBcChildren(originBcName: string, widgets: WidgetMeta[], bcMap: Record<string, BcMetaState>): Record<string, string[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Check specified show condition for the widget
|
|
15
|
+
*
|
|
16
|
+
* Condition is true (and widget is visible) if currently active record for condition business component has a value of the specific
|
|
17
|
+
* field matching the condition; pending values are also enough for the condition to be true.
|
|
18
|
+
* Condition is also true when it explicitly declared as default condition, if it's empty or of the legacy array format
|
|
19
|
+
*
|
|
20
|
+
* Otherwise the condition is false and the widget is hidden.
|
|
21
|
+
*
|
|
22
|
+
* @param condition Widget showCondition to check
|
|
23
|
+
* @param cursor Id of active record for business component in condition
|
|
24
|
+
* @param data An array of data items to check for condition
|
|
25
|
+
* @param pendingDataChanges Pending data changes of the currently active view
|
|
26
|
+
*/
|
|
27
|
+
export declare function checkShowCondition(condition: WidgetShowCondition, cursor: string, data: DataItem[], pendingDataChanges: Record<string, Record<string, PendingDataItem>>): boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search node matching the predicate on the current depth prior to moving to the next depth level
|
|
3
|
+
*
|
|
4
|
+
* @param root Tree root
|
|
5
|
+
* @param predicate Search condition for the target tree node
|
|
6
|
+
* @returns Matching node and a tree depth where this node was found
|
|
7
|
+
*/
|
|
8
|
+
export declare function breadthFirstSearch<T>(root: T, predicate: (current: any) => boolean, depth?: number, childrenProperty?: keyof T): BreadthFirstResult<T>;
|
|
9
|
+
/**
|
|
10
|
+
* Bredth-first search result
|
|
11
|
+
*/
|
|
12
|
+
export interface BreadthFirstResult<T> {
|
|
13
|
+
/**
|
|
14
|
+
* Matching node
|
|
15
|
+
*/
|
|
16
|
+
node: T;
|
|
17
|
+
/**
|
|
18
|
+
* Tree depth where this node was found
|
|
19
|
+
*/
|
|
20
|
+
depth: number;
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ActionPayloadTypes, ActionsObservable, AnyAction } from '../actions/actions';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Default list of action types which are triggers for request cancel
|
|
5
|
+
*/
|
|
6
|
+
export declare const cancelRequestActionTypes: ("logout" | "selectView")[];
|
|
7
|
+
/**
|
|
8
|
+
* Creator of request cancel epic
|
|
9
|
+
*
|
|
10
|
+
* @param action$ an observable input
|
|
11
|
+
* @param actionTypes list of action types which triggers cancel
|
|
12
|
+
* @param cancelFn a callback of request cancelation
|
|
13
|
+
* @param cancelActionCreator an action creator which called by request cancelation
|
|
14
|
+
* @param filterFn a callback function which filters come actions
|
|
15
|
+
*/
|
|
16
|
+
export declare function cancelRequestEpic(action$: ActionsObservable<AnyAction>, actionTypes: Array<keyof ActionPayloadTypes>, cancelFn: () => void, cancelActionCreator: AnyAction, filterFn?: (actions: AnyAction) => boolean): Observable<AnyAction>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import CustomEpics, { AnyEpic } from '../interfaces/customEpics';
|
|
2
|
+
/**
|
|
3
|
+
* Combine customEpics configuration with core epics.
|
|
4
|
+
* If customEpics have a slice with a name matching corresponding core slice, each epic in this slice will be handled:
|
|
5
|
+
* - if epic is set to null, core epic will be disabled
|
|
6
|
+
* - if epic is set to some implementation, this implementation will be used instead of core one
|
|
7
|
+
* Epics in slice without matching core epics (and slices without matching core slices) will be handled
|
|
8
|
+
* as new one and behave like in regular combineEpics
|
|
9
|
+
*
|
|
10
|
+
* @param customEpics
|
|
11
|
+
*/
|
|
12
|
+
export declare const combineEpics: (customEpics: CustomEpics) => AnyEpic;
|
|
13
|
+
export default combineEpics;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Middleware } from 'redux';
|
|
2
|
+
import { CustomMiddlewares, CoreMiddlewares } from '../interfaces/customMiddlewares';
|
|
3
|
+
export declare function combineMiddlewares(coreMiddlewares: CoreMiddlewares, customMiddlewares?: CustomMiddlewares): ((({ getState, dispatch }: import("redux").MiddlewareAPI<import("redux").Dispatch<import("redux").AnyAction>, import("../interfaces/store").Store>) => (next: import("redux").Dispatch<import("redux").AnyAction>) => (action: import("redux").AnyAction) => import("redux").AnyAction) | (({ getState, dispatch }: import("redux").MiddlewareAPI<import("redux").Dispatch<import("redux").AnyAction>, import("../interfaces/store").Store>) => (next: import("redux").Dispatch<import("redux").AnyAction>) => (action: import("redux").AnyAction) => import("redux").AnyAction) | Middleware<{}, any, import("redux").Dispatch<import("redux").AnyAction>>)[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action, Store } from 'redux';
|
|
2
|
+
import { Epic } from 'redux-observable';
|
|
3
|
+
import CustomEpics from '../interfaces/customEpics';
|
|
4
|
+
import { ClientReducersMapObject, Store as CoreStore } from '../interfaces/store';
|
|
5
|
+
import { CustomMiddlewares } from '../interfaces/customMiddlewares';
|
|
6
|
+
/**
|
|
7
|
+
* Configures Redux store by apply redux-observable epic middleware and custom version of `combineReducers` function
|
|
8
|
+
*
|
|
9
|
+
* @param customReducers Client application reducers
|
|
10
|
+
* @param customEpics Client application epics
|
|
11
|
+
* @param useEpics Can be set to `false` if client application does not provide redux-observable peer dependency
|
|
12
|
+
* and does not rely on Cxbox epics (e.g. importing only UI components)
|
|
13
|
+
* @param customMiddlewares Any additional middlewares provided by client application
|
|
14
|
+
*/
|
|
15
|
+
export declare function configureStore<ClientState, ClientActions extends Action<any>>(customReducers?: ClientReducersMapObject<ClientState, ClientActions>, customEpics?: CustomEpics | Epic<any, ClientState>, useEpics?: boolean, customMiddlewares?: CustomMiddlewares): Store<ClientState & CoreStore>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CustomWidgetDescriptor } from '../interfaces/widget';
|
|
2
|
+
/**
|
|
3
|
+
* Add new values to `PopupWidgetTypes` from client application
|
|
4
|
+
*
|
|
5
|
+
* @param customWidgets client's widgets
|
|
6
|
+
*/
|
|
7
|
+
declare function extendPopupWidgetTypes(customWidgets: Record<string, CustomWidgetDescriptor>): void;
|
|
8
|
+
export default extendPopupWidgetTypes;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { BcFilter, BcSorter, FilterType } from '../interfaces/filters';
|
|
2
|
+
import { FieldType } from '../interfaces/view';
|
|
3
|
+
/**
|
|
4
|
+
* Maps an input array of BcFilter objects into a dictionary of GET-request params
|
|
5
|
+
*
|
|
6
|
+
* Name of the param formed as field name and filter type, separated by dot,
|
|
7
|
+
* e.g. `${filter.fieldName}.${filter.type}`
|
|
8
|
+
*
|
|
9
|
+
* Value of the param is:
|
|
10
|
+
* - for non-array values, stringified filter value
|
|
11
|
+
* - for array values, a comma-separated list of stringified elements with each element enclosed in double quotes
|
|
12
|
+
*
|
|
13
|
+
* @see {@link parseFilters} Reverse function
|
|
14
|
+
*
|
|
15
|
+
* @param filters Filters for business components
|
|
16
|
+
* @returns Dictionary of query-params for GET-request
|
|
17
|
+
* @category Utils
|
|
18
|
+
*/
|
|
19
|
+
export declare function getFilters(filters: BcFilter[]): Record<string, string>;
|
|
20
|
+
/**
|
|
21
|
+
* Maps an input array of business component sorters into a dictionary of query params for
|
|
22
|
+
* Cxbox API, where values are field names and keys follows the template:
|
|
23
|
+
* `_sort.${index}.${item.direction}`
|
|
24
|
+
*
|
|
25
|
+
* @param sorters Array of business component sorters
|
|
26
|
+
* @returns Dictionary of query-params for GET-request
|
|
27
|
+
* @category Utils
|
|
28
|
+
*/
|
|
29
|
+
export declare function getSorters(sorters: BcSorter[]): Record<string, string>;
|
|
30
|
+
/**
|
|
31
|
+
* Function for parsing filters from string into BcFilter type
|
|
32
|
+
*
|
|
33
|
+
* @see {@link getFilters} Reverse function
|
|
34
|
+
* @param defaultFilters string representation of filters
|
|
35
|
+
* @category Utils
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseFilters(defaultFilters: string): BcFilter[];
|
|
38
|
+
/**
|
|
39
|
+
* Parse sorter string into separate sorter objects.
|
|
40
|
+
* String representation of sorters is url based:
|
|
41
|
+
* "_sort.{order}.{direction}={fieldKey}&_sort.{order}.{direction}"
|
|
42
|
+
*
|
|
43
|
+
* @param fieldKey Sort by field
|
|
44
|
+
* @param order Priority of this specfic sorter
|
|
45
|
+
* @param direction "asc" or "desc"
|
|
46
|
+
*
|
|
47
|
+
* i.e. "_sort.0.asc=firstName"
|
|
48
|
+
*
|
|
49
|
+
* @param sorters string representation of sorters
|
|
50
|
+
* @category Utils
|
|
51
|
+
*/
|
|
52
|
+
export declare function parseSorters(sorters: string): BcSorter[];
|
|
53
|
+
/**
|
|
54
|
+
* Returns appropriate filtration type for specified field type.
|
|
55
|
+
*
|
|
56
|
+
* - Text-based fields use `contains`
|
|
57
|
+
* - Checkbox fields use `specified` (boolean)
|
|
58
|
+
* - Dictionary fiels use `equalsOneOf`
|
|
59
|
+
*
|
|
60
|
+
* All other field types use strict `equals`
|
|
61
|
+
*
|
|
62
|
+
* @param fieldType Field type
|
|
63
|
+
*/
|
|
64
|
+
export declare function getFilterType(fieldType: FieldType): FilterType.equals | FilterType.contains | FilterType.specified | FilterType.equalsOneOf;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RowMetaField } from '../interfaces/rowMeta';
|
|
2
|
+
import { WidgetListField } from '../interfaces/widget';
|
|
3
|
+
/**
|
|
4
|
+
* Function of calculate hierarchy column width
|
|
5
|
+
*
|
|
6
|
+
* @param columnName Witch column is match
|
|
7
|
+
* @param depthLevel Hierarchy level
|
|
8
|
+
* @param fields Widget fields
|
|
9
|
+
* @param rowMetaFields Widget field meta
|
|
10
|
+
* @param maxDepth Maximum hierarchy depth level
|
|
11
|
+
* @param width Custom column width
|
|
12
|
+
*
|
|
13
|
+
* function return string value as number with 'px' or null
|
|
14
|
+
* example '100px'
|
|
15
|
+
* Last column dont math width and return null value
|
|
16
|
+
*/
|
|
17
|
+
export declare function getColumnWidth(columnName: string, depthLevel: number, fields: WidgetListField[], rowMetaFields: RowMetaField[], maxDepth: number, width?: number): string;
|