@cxbox-ui/core 1.37.2 → 1.37.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.d.ts +1068 -0
- package/dist/api/ObservableApi.d.ts +53 -0
- package/dist/api/ObservableApiWrapper.d.ts +11 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/cxbox-ui-core.cjs.development.js +3645 -0
- package/dist/cxbox-ui-core.cjs.production.min.js +2 -0
- package/dist/cxbox-ui-core.esm.js +3609 -0
- package/dist/cxbox-ui-core.modern.development.js +3542 -0
- package/dist/cxbox-ui-core.modern.js +3542 -0
- package/dist/cxbox-ui-core.modern.production.min.js +2 -0
- package/dist/epics/data/bcCancelCreateDataEpic.d.ts +9 -0
- package/dist/epics/data/bcDeleteDataEpic.d.ts +2 -0
- package/dist/epics/data/bcFetchDataEpic.d.ts +15 -0
- package/dist/epics/data/bcFetchRowMetaRequestEpic.d.ts +17 -0
- package/dist/epics/data/bcLoadMoreEpic.d.ts +2 -0
- package/dist/epics/data/bcNewDataEpic.d.ts +14 -0
- package/dist/epics/data/bcSaveDataEpic.d.ts +24 -0
- package/dist/epics/data/bcSelectDepthRecordEpic.d.ts +2 -0
- package/dist/epics/data/bcSelectRecordEpic.d.ts +2 -0
- package/dist/epics/data/changeAssociationEpic.d.ts +2 -0
- package/dist/epics/data/changeAssociationFullEpic.d.ts +5 -0
- package/dist/epics/data/changeAssociationSameBcEpic.d.ts +5 -0
- package/dist/epics/data/changeChildrenAssociationsEpic.d.ts +2 -0
- package/dist/epics/data/changeChildrenAssociationsSameBcEpic.d.ts +2 -0
- package/dist/epics/data/changeDescendantsAssociationsFullEpic.d.ts +5 -0
- package/dist/epics/data/index.d.ts +20 -0
- package/dist/epics/data/inlinePickListFetchDataEpic.d.ts +2 -0
- package/dist/epics/data/removeMultivalueTagEpic.d.ts +17 -0
- package/{epics/data/saveAssociationsActive.d.ts → dist/epics/data/saveAssociationsActiveEpic.d.ts} +2 -2
- package/dist/epics/data/saveAssociationsPassiveEpic.d.ts +7 -0
- package/dist/epics/data/selectViewEpic.d.ts +11 -0
- package/dist/epics/index.d.ts +6 -0
- package/{epics/router/changeLocation.d.ts → dist/epics/router/changeLocationEpic.d.ts} +2 -3
- package/dist/epics/router/drilldownEpic.d.ts +2 -0
- package/dist/epics/router/handleRouterEpic.d.ts +2 -0
- package/dist/epics/router/index.d.ts +10 -0
- package/dist/epics/router/loginDoneEpic.d.ts +9 -0
- package/dist/epics/router/selectScreenEpic.d.ts +7 -0
- package/dist/epics/router/selectScreenFailEpic.d.ts +7 -0
- package/dist/epics/router/selectViewEpic.d.ts +7 -0
- package/dist/epics/router/selectViewFailEpic.d.ts +6 -0
- package/dist/epics/router/userDrillDownEpic.d.ts +6 -0
- package/dist/epics/router/userDrilldownChangeCursorsEpic.d.ts +2 -0
- package/dist/epics/screen/apiErrorEpic.d.ts +2 -0
- package/dist/epics/screen/downloadFileByUrlEpic.d.ts +2 -0
- package/dist/epics/screen/downloadFileEpic.d.ts +2 -0
- package/dist/epics/screen/httpError401Epic.d.ts +2 -0
- package/dist/epics/screen/httpError409Epic.d.ts +2 -0
- package/dist/epics/screen/httpError418Epic.d.ts +2 -0
- package/dist/epics/screen/httpError500Epic.d.ts +2 -0
- package/dist/epics/screen/httpErrorDefaultEpic.d.ts +2 -0
- package/dist/epics/screen/index.d.ts +10 -0
- package/dist/epics/screen/processPostInvokeConfirmEpic.d.ts +2 -0
- package/dist/epics/screen/processPostInvokeEpic.d.ts +2 -0
- package/dist/epics/session/index.d.ts +5 -0
- package/dist/epics/session/loginByAnotherRoleEpic.d.ts +5 -0
- package/dist/epics/session/loginDoneEpic.d.ts +6 -0
- package/dist/epics/session/refreshMetaAndReloadPageEpic.d.ts +2 -0
- package/dist/epics/session/refreshMetaEpic.d.ts +5 -0
- package/dist/epics/session/switchRoleEpic.d.ts +5 -0
- package/dist/epics/utils/postOperationRoutine.d.ts +13 -0
- package/dist/epics/view/clearPendingDataChangesAfterCursorChangeEpic.d.ts +7 -0
- package/dist/epics/view/fileUploadConfirmEpic.d.ts +11 -0
- package/dist/epics/view/getRowMetaByForceActiveEpic.d.ts +5 -0
- package/dist/epics/view/index.d.ts +9 -0
- package/dist/epics/view/selectTableCellInitEpic.d.ts +2 -0
- package/dist/epics/view/sendOperationAssociateEpic.d.ts +5 -0
- package/dist/epics/view/sendOperationEpic.d.ts +10 -0
- package/dist/epics/view/showAllTableRecordsInitEpic.d.ts +2 -0
- package/dist/epics/view/showAssocPopupEpic.d.ts +2 -0
- package/dist/epics/view/showFileUploadPopupEpic.d.ts +5 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +6 -0
- package/{interfaces → dist/interfaces}/bc.d.ts +7 -6
- package/dist/interfaces/customEpics.d.ts +15 -0
- package/{interfaces → dist/interfaces}/customMiddlewares.d.ts +5 -5
- package/{interfaces → dist/interfaces}/data.d.ts +4 -4
- package/dist/interfaces/index.d.ts +27 -0
- package/{interfaces → dist/interfaces}/navigation.d.ts +2 -2
- package/{interfaces → dist/interfaces}/objectMap.d.ts +3 -2
- package/{interfaces → dist/interfaces}/operation.d.ts +7 -6
- package/{interfaces → dist/interfaces}/session.d.ts +20 -0
- package/dist/interfaces/store.d.ts +14 -0
- package/{interfaces → dist/interfaces}/tree.d.ts +4 -4
- package/{interfaces → dist/interfaces}/view.d.ts +5 -5
- package/{interfaces → dist/interfaces}/widget.d.ts +12 -11
- package/dist/middlewares/autosaveMiddleware.d.ts +2 -0
- package/dist/middlewares/index.d.ts +6 -0
- package/dist/middlewares/popupMiddleware.d.ts +2 -0
- package/dist/middlewares/preInvokeMiddleware.d.ts +5 -0
- package/{middlewares → dist/middlewares}/requiredFieldsMiddleware.d.ts +6 -11
- package/dist/reducers/ReducerBuilderManager.d.ts +19 -0
- package/dist/reducers/data.d.ts +4 -0
- package/dist/reducers/depthData.d.ts +4 -0
- package/dist/reducers/index.d.ts +6 -0
- package/dist/reducers/router.d.ts +9 -0
- package/dist/reducers/screen.d.ts +10 -0
- package/dist/reducers/session.d.ts +10 -0
- package/dist/reducers/view.d.ts +10 -0
- package/dist/utils/api.d.ts +25 -0
- package/dist/utils/apiError.d.ts +19 -0
- package/{utils → dist/utils}/autosave.d.ts +13 -2
- package/{utils → dist/utils}/bc.d.ts +3 -3
- package/dist/utils/cancelRequestEpic.d.ts +17 -0
- package/dist/utils/combineMiddlewares.d.ts +3 -0
- package/dist/utils/deleteUndefinedFromObject.d.ts +1 -0
- package/{utils → dist/utils}/filters.d.ts +3 -4
- package/{utils → dist/utils}/history.d.ts +5 -7
- package/dist/utils/index.d.ts +10 -0
- package/{utils → dist/utils}/operations.d.ts +2 -2
- package/dist/utils/others.d.ts +6 -0
- package/{utils → dist/utils}/strings.d.ts +3 -2
- package/{utils → dist/utils}/tree.d.ts +2 -2
- package/package.json +66 -105
- package/CONTRIBUTING.md +0 -124
- package/Provider.d.ts +0 -63
- package/actions/actions-utils.d.ts +0 -48
- package/actions/actions.d.ts +0 -1144
- package/actions/index.d.ts +0 -2
- package/api/api.d.ts +0 -148
- package/api/index.d.ts +0 -1
- package/assets/i18n/__tests__/getTextAssets.d.ts +0 -1
- package/assets/i18n/index.d.ts +0 -25
- package/components/ColumnTitle/ColumnFilter.d.ts +0 -47
- package/components/ColumnTitle/ColumnSort.d.ts +0 -26
- package/components/ColumnTitle/ColumnTitle.d.ts +0 -31
- package/components/ColumnTitle/__tests__/ColumnFilter.test.d.ts +0 -1
- package/components/ColumnTitle/__tests__/ColumnSort.test.d.ts +0 -1
- package/components/ColumnTitle/__tests__/ColumnTitle.test.d.ts +0 -1
- package/components/DebugPanel/DebugPanel.d.ts +0 -7
- package/components/DebugPanel/__tests__/DebugPanel.test.d.ts +0 -1
- package/components/DebugPanel/components/FormattedJSON.d.ts +0 -6
- package/components/DebugPanel/components/InfoLabel.d.ts +0 -7
- package/components/DebugPanel/components/ViewInfoLabel.d.ts +0 -3
- package/components/DebugPanel/components/WidgetInfoLabel.d.ts +0 -5
- package/components/DebugPanel/components/__tests__/FormattedJSON.test.d.ts +0 -1
- package/components/DebugPanel/components/__tests__/InfoLabel.test.d.ts +0 -1
- package/components/DebugPanel/components/__tests__/ViewInfoLabel.test.d.ts +0 -1
- package/components/DebugPanel/components/__tests__/WidgetInfoLabel.test.d.ts +0 -1
- package/components/DevToolsPanel/DevToolsPanel.d.ts +0 -10
- package/components/DevToolsPanel/DevToolsPanel.test.d.ts +0 -1
- package/components/DevToolsPanel/components/DebugModeButton.d.ts +0 -9
- package/components/DevToolsPanel/components/RefreshMetaButton.d.ts +0 -9
- package/components/DevToolsPanel/components/__tests__/DebugModeButton.test.d.ts +0 -1
- package/components/DevToolsPanel/components/__tests__/RefreshMetaButton.test.d.ts +0 -1
- package/components/Field/Field.d.ts +0 -72
- package/components/Field/Field.test.d.ts +0 -1
- package/components/FileUpload/FileUpload.d.ts +0 -32
- package/components/FileUploadPopup/FileUploadPopup.d.ts +0 -10
- package/components/FilterPopup/FilterPopup.d.ts +0 -26
- package/components/FilterPopup/FilterPopup.test.d.ts +0 -1
- package/components/FullHierarchyTable/FullHierarchyTable.d.ts +0 -52
- package/components/FullHierarchyTable/FullHierarchyTable.test.d.ts +0 -1
- package/components/FullHierarchyTable/utils/hierarchySearchCache.d.ts +0 -37
- package/components/FullHierarchyTable/utils/hierarchySearchCache.test.d.ts +0 -1
- package/components/FullHierarchyTable/utils/useExpandedKeys.d.ts +0 -19
- package/components/FullHierarchyTable/utils/useHierarchyCache.d.ts +0 -12
- package/components/HierarchyTable/HierarchyTable.d.ts +0 -48
- package/components/HierarchyTable/HierarchyTable.test.d.ts +0 -1
- package/components/InlinePickList/InlinePickList.d.ts +0 -23
- package/components/ModalInvoke/ModalInvoke.d.ts +0 -18
- package/components/ModalInvoke/ModalInvoke.test.d.ts +0 -1
- package/components/Multivalue/MultiValueListRecord.d.ts +0 -15
- package/components/Multivalue/MultivalueField.d.ts +0 -31
- package/components/Multivalue/MultivalueField.test.d.ts +0 -1
- package/components/PickListField/PickListField.d.ts +0 -25
- package/components/RowOperations/RowOperationsButton.d.ts +0 -42
- package/components/RowOperations/RowOperationsMenu.d.ts +0 -29
- package/components/RowOperations/__tests__/RowOperationsButton.test.d.ts +0 -1
- package/components/RowOperations/__tests__/RowOperationsMenu.test.d.ts +0 -1
- package/components/SameBcHierarchyTable/SameBcHierarchyTable.d.ts +0 -41
- package/components/TemplatedTitle/TemplatedTitle.d.ts +0 -20
- package/components/View/View.d.ts +0 -27
- package/components/View/__tests__/View.test.d.ts +0 -1
- package/components/Widget/Widget.d.ts +0 -29
- package/components/Widget/Widget.test.d.ts +0 -1
- package/components/WidgetErrorBoundary/WidgetErrorBoundary.d.ts +0 -20
- package/components/WidgetErrorBoundary/WidgetErrorBoundary.test.d.ts +0 -1
- package/components/WidgetErrorBoundary/components/RefreshButton.d.ts +0 -4
- package/components/WidgetErrorBoundary/components/RefreshButton.test.d.ts +0 -1
- package/components/index.d.ts +0 -44
- package/components/ui/ActionLink/ActionLink.d.ts +0 -11
- package/components/ui/CheckboxFilter/CheckboxFilter.d.ts +0 -21
- package/components/ui/CheckboxFilter/CheckboxFilter.test.d.ts +0 -1
- package/components/ui/CheckboxPicker/CheckboxPicker.d.ts +0 -21
- package/components/ui/CopyableText/CopyableText.d.ts +0 -7
- package/components/ui/CopyableText/__tests__/CopyableText.test.d.ts +0 -1
- package/components/ui/DashboardLayout/DashboardLayout.d.ts +0 -22
- package/components/ui/DashboardLayout/__tests__/DashboardLayout.test.d.ts +0 -1
- package/components/ui/DatePickerField/DatePickerField.d.ts +0 -25
- package/components/ui/Dictionary/Dictionary.d.ts +0 -30
- package/components/ui/Dictionary/Dictionary.test.d.ts +0 -1
- package/components/ui/ErrorPopup/ErrorPopup.d.ts +0 -18
- package/components/ui/ErrorPopup/ErrorPopup.test.d.ts +0 -1
- package/components/ui/FilterField/FilterField.d.ts +0 -25
- package/components/ui/FilterField/FilterField.test.d.ts +0 -1
- package/components/ui/FilterField/components/RangePicker.d.ts +0 -11
- package/components/ui/FilterField/components/RangePicker.test.d.ts +0 -1
- package/components/ui/HistoryField/HistoryField.d.ts +0 -15
- package/components/ui/InteractiveInput/InteractiveInput.d.ts +0 -28
- package/components/ui/Link/Link.d.ts +0 -13
- package/components/ui/MultiField/MultiField.d.ts +0 -16
- package/components/ui/Multivalue/MultivalueHover.d.ts +0 -15
- package/components/ui/Multivalue/MultivalueList.d.ts +0 -17
- package/components/ui/Multivalue/MultivalueTag.d.ts +0 -24
- package/components/ui/NavigationTabs/NavigationTabs.d.ts +0 -7
- package/components/ui/NavigationTabs/NavigationTabs.test.d.ts +0 -1
- package/components/ui/NumberInput/NumberInput.d.ts +0 -17
- package/components/ui/NumberInput/NumberInput.test.d.ts +0 -1
- package/components/ui/NumberInput/formaters.d.ts +0 -31
- package/components/ui/Pagination/Pagination.d.ts +0 -51
- package/components/ui/Pagination/Pagination.test.d.ts +0 -1
- package/components/ui/PickInput/PickInput.d.ts +0 -15
- package/components/ui/Popup/Popup.d.ts +0 -29
- package/components/ui/Popup/Popup.test.d.ts +0 -1
- package/components/ui/Popup/PopupFooter.d.ts +0 -16
- package/components/ui/RadioButton/RadioButton.d.ts +0 -16
- package/components/ui/RadioButton/RadioButton.test.d.ts +0 -1
- package/components/ui/ReadOnlyField/ReadOnlyField.d.ts +0 -22
- package/components/ui/SearchHightlight/SearchHightlight.d.ts +0 -20
- package/components/ui/Select/Select.d.ts +0 -26
- package/components/ui/TextArea/TextArea.d.ts +0 -24
- package/components/ui/TextArea/TextArea.test.d.ts +0 -1
- package/components/ui/TreeVirtualized/TreeVirtualized.d.ts +0 -63
- package/components/ui/TreeVirtualized/TreeVirtualizedNode.d.ts +0 -67
- package/components/ui/TreeVirtualized/__tests__/TreeVirtualized.test.d.ts +0 -1
- package/components/ui/TreeVirtualized/__tests__/TreeVirtualizedNode.test.d.ts +0 -1
- package/components/ui/TreeVirtualized/__tests__/useMatchingNodes.test.d.ts +0 -1
- package/components/ui/TreeVirtualized/__tests__/useSearchResult.test.d.ts +0 -1
- package/components/ui/TreeVirtualized/useMatchingNodes.d.ts +0 -23
- package/components/ui/TreeVirtualized/useSearchResult.d.ts +0 -27
- package/components/widgets/AssocListPopup/AssocListPopup.d.ts +0 -58
- package/components/widgets/AssocListPopup/AssocListPopup.test.d.ts +0 -1
- package/components/widgets/AssocListPopup/AssocTable.d.ts +0 -35
- package/components/widgets/AssocListPopup/AssocTable.test.d.ts +0 -1
- package/components/widgets/FlatTree/FlatTree.d.ts +0 -53
- package/components/widgets/FlatTree/FlatTreePopup.d.ts +0 -31
- package/components/widgets/FlatTree/__tests__/FlatTree.test.d.ts +0 -1
- package/components/widgets/FlatTree/__tests__/FlatTreePopup.test.d.ts +0 -1
- package/components/widgets/FlatTree/useMultipleSelect.d.ts +0 -11
- package/components/widgets/FlatTree/useSingleSelect.d.ts +0 -10
- package/components/widgets/FormWidget/FormWidget.d.ts +0 -23
- package/components/widgets/FormWidget/FormWidget.test.d.ts +0 -1
- package/components/widgets/InfoWidget/InfoWidget.d.ts +0 -19
- package/components/widgets/InfoWidget/__test__/InfoWidget.test.d.ts +0 -1
- package/components/widgets/InfoWidget/components/InfoCell.d.ts +0 -15
- package/components/widgets/InfoWidget/components/InfoRow.d.ts +0 -16
- package/components/widgets/InfoWidget/components/InfoValueWrapper.d.ts +0 -10
- package/components/widgets/InfoWidget/components/__tests__/InfoCell.test.d.ts +0 -1
- package/components/widgets/InfoWidget/components/__tests__/InfoRow.test.d.ts +0 -1
- package/components/widgets/InfoWidget/components/__tests__/InfoValueWrapper.test.d.ts +0 -1
- package/components/widgets/NavigationTabsWidget/NavigationTabsWidget.d.ts +0 -8
- package/components/widgets/NavigationTabsWidget/NavigationTabsWidget.test.d.ts +0 -1
- package/components/widgets/PickListPopup/PickListPopup.d.ts +0 -43
- package/components/widgets/PickListPopup/PickListPopup.test.d.ts +0 -1
- package/components/widgets/TableWidget/TableWidget.d.ts +0 -88
- package/components/widgets/TableWidget/TableWidget.test.d.ts +0 -1
- package/components/widgets/TextWidget/TextWidget.d.ts +0 -15
- package/components/widgets/TextWidget/TextWidget.test.d.ts +0 -1
- package/components/widgets/ViewNavigationWidget/ViewNavigationWidget.d.ts +0 -6
- package/components/widgets/ViewNavigationWidget/ViewNavigationWidget.test.d.ts +0 -1
- package/components/widgets/index.d.ts +0 -4
- package/cxbox-ui-core.js +0 -148
- package/cxbox-ui-core.js.map +0 -1
- package/epics/data/__tests__/bcCancelCreateDataEpic.test.d.ts +0 -1
- package/epics/data/__tests__/bcFetchData.test.d.ts +0 -1
- package/epics/data/__tests__/bcFetchRowMetaRequest.test.d.ts +0 -1
- package/epics/data/__tests__/bcNewDataEpic.test.d.ts +0 -1
- package/epics/data/__tests__/bcSaveData.test.d.ts +0 -1
- package/epics/data/__tests__/bcSelectDepthRecord.test.d.ts +0 -1
- package/epics/data/__tests__/removeMultivalueTag.test.d.ts +0 -1
- package/epics/data/__tests__/saveAssociationsActive.test.d.ts +0 -1
- package/epics/data/__tests__/selectView.test.d.ts +0 -1
- package/epics/data/bcCancelCreateDataEpic.d.ts +0 -28
- package/epics/data/bcFetchData.d.ts +0 -21
- package/epics/data/bcFetchRowMetaRequest.d.ts +0 -50
- package/epics/data/bcNewDataEpic.d.ts +0 -37
- package/epics/data/bcSaveData.d.ts +0 -58
- package/epics/data/bcSelectDepthRecord.d.ts +0 -21
- package/epics/data/removeMultivalueTag.d.ts +0 -45
- package/epics/data/selectView.d.ts +0 -36
- package/epics/data.d.ts +0 -105
- package/epics/index.d.ts +0 -74
- package/epics/router/__tests__/changeLocation.test.d.ts +0 -1
- package/epics/router/__tests__/drilldown.test.d.ts +0 -1
- package/epics/router/__tests__/handleRouter.test.d.ts +0 -1
- package/epics/router/__tests__/loginDone.test.d.ts +0 -1
- package/epics/router/__tests__/selectScreen.test.d.ts +0 -1
- package/epics/router/__tests__/selectScreenFail.test.d.ts +0 -1
- package/epics/router/__tests__/selectView.test.d.ts +0 -1
- package/epics/router/__tests__/selectViewFail.test.d.ts +0 -1
- package/epics/router/__tests__/userDrillDown.test.d.ts +0 -1
- package/epics/router/drilldown.d.ts +0 -12
- package/epics/router/handleRouter.d.ts +0 -17
- package/epics/router/loginDone.d.ts +0 -20
- package/epics/router/selectScreen.d.ts +0 -19
- package/epics/router/selectScreenFail.d.ts +0 -17
- package/epics/router/selectView.d.ts +0 -19
- package/epics/router/selectViewFail.d.ts +0 -17
- package/epics/router/userDrillDown.d.ts +0 -29
- package/epics/router.d.ts +0 -11
- package/epics/screen/__tests__/apiError.test.d.ts +0 -1
- package/epics/screen/__tests__/httpError401.test.d.ts +0 -1
- package/epics/screen/__tests__/httpError409.test.d.ts +0 -1
- package/epics/screen/__tests__/httpError418.test.d.ts +0 -1
- package/epics/screen/__tests__/httpError500.test.d.ts +0 -1
- package/epics/screen/__tests__/httpErrorDefault.test.d.ts +0 -1
- package/epics/screen/apiError.d.ts +0 -13
- package/epics/screen/httpError401.d.ts +0 -12
- package/epics/screen/httpError409.d.ts +0 -12
- package/epics/screen/httpError418.d.ts +0 -12
- package/epics/screen/httpError500.d.ts +0 -12
- package/epics/screen/httpErrorDefault.d.ts +0 -14
- package/epics/screen/processPostInvoke.d.ts +0 -12
- package/epics/screen.d.ts +0 -35
- package/epics/session/__tests__/loginByAnotherRoleEpic.test.d.ts +0 -1
- package/epics/session/__tests__/loginDone.test.d.ts +0 -1
- package/epics/session/__tests__/refreshMeta.test.d.ts +0 -1
- package/epics/session/__tests__/refreshMetaAndReloadPage.test.d.ts +0 -1
- package/epics/session/__tests__/switchRole.test.d.ts +0 -1
- package/epics/session/loginByAnotherRole.d.ts +0 -27
- package/epics/session/loginDone.d.ts +0 -10
- package/epics/session/refreshMeta.d.ts +0 -9
- package/epics/session/refreshMetaAndReloadPage.d.ts +0 -2
- package/epics/session/switchRole.d.ts +0 -9
- package/epics/session.d.ts +0 -7
- package/epics/utils.d.ts +0 -4
- package/epics/view/__tests__/fileUploadConfirm.test.d.ts +0 -1
- package/epics/view/__tests__/sendOperation.test.d.ts +0 -1
- package/epics/view/__tests__/sendOperationAssociate.test.d.ts +0 -1
- package/epics/view/__tests__/showAssocPopup.test.d.ts +0 -1
- package/epics/view/__tests__/showFileUploadPopup.test.d.ts +0 -1
- package/epics/view/fileUploadConfirm.d.ts +0 -31
- package/epics/view/sendOperation.d.ts +0 -24
- package/epics/view/sendOperationAssociate.d.ts +0 -34
- package/epics/view/showAssocPopup.d.ts +0 -12
- package/epics/view/showFileUploadPopup.d.ts +0 -19
- package/epics/view.d.ts +0 -57
- package/hooks/__tests__/useRowMenu.test.d.ts +0 -1
- package/hooks/__tests__/useViewTabs.test.d.ts +0 -1
- package/hooks/__tests__/useWidgetOperations.test.d.ts +0 -1
- package/hooks/index.d.ts +0 -7
- package/hooks/useAssocRecords.d.ts +0 -11
- package/hooks/useDebounce.d.ts +0 -8
- package/hooks/useDrillDownUrl.d.ts +0 -10
- package/hooks/useFlatFormFields.d.ts +0 -9
- package/hooks/useRowMenu.d.ts +0 -42
- package/hooks/useViewTabs.d.ts +0 -13
- package/hooks/useWidgetFilter.d.ts +0 -15
- package/hooks/useWidgetOperations.d.ts +0 -34
- package/imports/i18n.d.ts +0 -8
- package/imports/rxjs.d.ts +0 -19
- package/imports/shim.d.ts +0 -6
- package/index.d.ts +0 -135
- package/interfaces/customEpics.d.ts +0 -55
- package/interfaces/filters.js +0 -2
- package/interfaces/filters.js.map +0 -1
- package/interfaces/index.d.ts +0 -22
- package/interfaces/objectMap.js +0 -2
- package/interfaces/objectMap.js.map +0 -1
- package/interfaces/operation.js +0 -2
- package/interfaces/operation.js.map +0 -1
- package/interfaces/router.js +0 -2
- package/interfaces/router.js.map +0 -1
- package/interfaces/store.d.ts +0 -56
- package/interfaces/view.js +0 -2
- package/interfaces/view.js.map +0 -1
- package/interfaces/widget.js +0 -2
- package/interfaces/widget.js.map +0 -1
- package/middlewares/__tests__/autosaveMiddleware.test.d.ts +0 -1
- package/middlewares/__tests__/preInvokeMiddleware.test.d.ts +0 -1
- package/middlewares/__tests__/requiredFieldsMiddleware.test.d.ts +0 -1
- package/middlewares/actionsHistoryMiddleware.d.ts +0 -3
- package/middlewares/autosaveMiddleware.d.ts +0 -6
- package/middlewares/index.d.ts +0 -6
- package/middlewares/preInvokeMiddleware.d.ts +0 -8
- package/mocks/data/widgetMeta.d.ts +0 -10
- package/reducers/__tests__/data.test.d.ts +0 -1
- package/reducers/__tests__/forceActiveField.test.d.ts +0 -1
- package/reducers/__tests__/screen/bcAddFilter.test.d.ts +0 -1
- package/reducers/__tests__/session.test.d.ts +0 -1
- package/reducers/__tests__/view.test.d.ts +0 -1
- package/reducers/data.d.ts +0 -13
- package/reducers/depthData.d.ts +0 -7
- package/reducers/index.d.ts +0 -3
- package/reducers/router.d.ts +0 -30
- package/reducers/screen.d.ts +0 -16
- package/reducers/session.d.ts +0 -15
- package/reducers/view.d.ts +0 -16
- package/tests/mockStore.d.ts +0 -6
- package/tests/setup.d.ts +0 -1
- package/tests/testEpic.d.ts +0 -14
- package/utils/__tests__/autosave.test.d.ts +0 -1
- package/utils/__tests__/bc.test.d.ts +0 -1
- package/utils/__tests__/breadthFirst.test.d.ts +0 -1
- package/utils/__tests__/cancelRequestEpic.test.d.ts +0 -1
- package/utils/__tests__/combineEpics.test.d.ts +0 -1
- package/utils/__tests__/combineMiddlewares.test.d.ts +0 -1
- package/utils/__tests__/configureStore.test.d.ts +0 -1
- package/utils/__tests__/extendPopupWidgetTypes.test.d.ts +0 -1
- package/utils/__tests__/filters.test.d.ts +0 -1
- package/utils/__tests__/history.test.d.ts +0 -1
- package/utils/__tests__/notifications.test.d.ts +0 -1
- package/utils/__tests__/operations.test.d.ts +0 -1
- package/utils/__tests__/tree.test.d.ts +0 -1
- package/utils/__tests__/viewTabs.test.d.ts +0 -1
- package/utils/actionsHistory.d.ts +0 -2
- package/utils/api.d.ts +0 -92
- package/utils/cancelRequestEpic.d.ts +0 -16
- package/utils/combineEpics.d.ts +0 -13
- package/utils/combineMiddlewares.d.ts +0 -3
- package/utils/configureStore.d.ts +0 -15
- package/utils/exportState.d.ts +0 -3
- package/utils/index.d.ts +0 -6
- package/utils/notifications.d.ts +0 -11
- package/utils/redux.d.ts +0 -49
- /package/{interfaces → dist/interfaces}/filters.d.ts +0 -0
- /package/{interfaces → dist/interfaces}/router.d.ts +0 -0
- /package/{interfaces → dist/interfaces}/rowMeta.d.ts +0 -0
- /package/{interfaces → dist/interfaces}/screen.d.ts +0 -0
- /package/{utils → dist/utils}/breadthFirst.d.ts +0 -0
- /package/{tests/assetsMock.d.ts → dist/utils/exportState.d.ts} +0 -0
- /package/{utils → dist/utils}/extendPopupWidgetTypes.d.ts +0 -0
- /package/{utils → dist/utils}/hierarchy.d.ts +0 -0
- /package/{utils → dist/utils}/highlightJson.d.ts +0 -0
- /package/{utils → dist/utils}/viewTabs.d.ts +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ScreenState } from '../interfaces';
|
|
2
|
+
import { ReducerBuilderManager } from './ReducerBuilderManager';
|
|
3
|
+
export declare const initialScreenState: ScreenState;
|
|
4
|
+
/**
|
|
5
|
+
* Screen reducer
|
|
6
|
+
*
|
|
7
|
+
* Stores information about currently active screen and various more persistent values which should be stored
|
|
8
|
+
* until we navitage to a different screen.
|
|
9
|
+
*/
|
|
10
|
+
export declare const createScreenReducerBuilderManager: <S extends ScreenState>(initialState: S) => ReducerBuilderManager<S>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Session } from '../interfaces';
|
|
2
|
+
import { ReducerBuilderManager } from './ReducerBuilderManager';
|
|
3
|
+
export declare const initialSessionState: Session;
|
|
4
|
+
/**
|
|
5
|
+
* Session reducer
|
|
6
|
+
*
|
|
7
|
+
* Stores information about currently active session and dataEpics.ts that should be persistent during all period of
|
|
8
|
+
* user interaction with application.
|
|
9
|
+
*/
|
|
10
|
+
export declare const createSessionReducerBuilderManager: <S extends Session>(initialState: S) => ReducerBuilderManager<S>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ViewState } from '../interfaces';
|
|
2
|
+
import { ReducerBuilderManager } from './ReducerBuilderManager';
|
|
3
|
+
export declare const initialViewState: ViewState;
|
|
4
|
+
/**
|
|
5
|
+
* View reducer
|
|
6
|
+
*
|
|
7
|
+
* Stores information about currently active view and various fast-living pending values which should be stored
|
|
8
|
+
* until we navitage to a different view.
|
|
9
|
+
*/
|
|
10
|
+
export declare const createViewReducerBuilderManager: <S extends ViewState>(initialState: S) => ReducerBuilderManager<S>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface ApiCallContext {
|
|
2
|
+
widgetName: string;
|
|
3
|
+
}
|
|
4
|
+
type QueryParamsMap = Record<string, string | number>;
|
|
5
|
+
/**
|
|
6
|
+
* Extends url with query parameters control symbol (`?` or `&`)
|
|
7
|
+
*
|
|
8
|
+
* @param url Url with or without `?` symbol
|
|
9
|
+
*/
|
|
10
|
+
export declare function addTailControlSequences(url: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Extends url with query parameters
|
|
13
|
+
*
|
|
14
|
+
* @param url Url to extend
|
|
15
|
+
* @param qso Query parameters dictionary
|
|
16
|
+
*/
|
|
17
|
+
export declare function applyParams(url: string, qso?: QueryParamsMap): string;
|
|
18
|
+
/**
|
|
19
|
+
* TODO
|
|
20
|
+
*
|
|
21
|
+
* @param url
|
|
22
|
+
* @param qso
|
|
23
|
+
*/
|
|
24
|
+
export declare function applyRawParams(url: string, qso: Record<string, any>): string;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AxiosError } from 'axios';
|
|
2
|
+
interface ApiCallContext {
|
|
3
|
+
widgetName: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function createApiError(error: AxiosError, context?: ApiCallContext): {
|
|
6
|
+
payload: {
|
|
7
|
+
error: AxiosError<unknown, any>;
|
|
8
|
+
callContext: import("./api").ApiCallContext;
|
|
9
|
+
};
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function createApiErrorObservable(error: AxiosError, context?: ApiCallContext): import("rxjs").Observable<{
|
|
13
|
+
payload: {
|
|
14
|
+
error: AxiosError<unknown, any>;
|
|
15
|
+
callContext: import("./api").ApiCallContext;
|
|
16
|
+
};
|
|
17
|
+
type: string;
|
|
18
|
+
}>;
|
|
19
|
+
export {};
|
|
@@ -8,7 +8,18 @@ import { AnyAction, Dispatch, MiddlewareAPI } from 'redux';
|
|
|
8
8
|
* @param next
|
|
9
9
|
* @category Utils
|
|
10
10
|
*/
|
|
11
|
-
export declare function autosaveRoutine(action: AnyAction, store: MiddlewareAPI<Dispatch<AnyAction>, CoreStore>, next: Dispatch): AnyAction
|
|
11
|
+
export declare function autosaveRoutine(action: AnyAction, store: MiddlewareAPI<Dispatch<AnyAction>, CoreStore>, next: Dispatch): AnyAction | {
|
|
12
|
+
payload: {
|
|
13
|
+
bcName: string;
|
|
14
|
+
operationType: string;
|
|
15
|
+
widgetName: string;
|
|
16
|
+
onSuccessAction?: AnyAction;
|
|
17
|
+
confirm?: string;
|
|
18
|
+
bcKey?: string;
|
|
19
|
+
confirmOperation?: import("../interfaces/operation").OperationPreInvoke;
|
|
20
|
+
};
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
12
23
|
/**
|
|
13
24
|
* Checks presence of pending changes suitable for autosave
|
|
14
25
|
*
|
|
@@ -18,7 +29,7 @@ export declare function autosaveRoutine(action: AnyAction, store: MiddlewareAPI<
|
|
|
18
29
|
*/
|
|
19
30
|
export declare function bcHasPendingAutosaveChanges(store: CoreStore, bcName: string, cursor: string): boolean;
|
|
20
31
|
/**
|
|
21
|
-
* Checks presence of unsaved data for specified BC
|
|
32
|
+
* Checks presence of unsaved data.ts for specified BC
|
|
22
33
|
*
|
|
23
34
|
* @param store
|
|
24
35
|
* @param bcName
|
|
@@ -21,7 +21,7 @@ export declare function getBcChildren(originBcName: string, widgets: WidgetMeta[
|
|
|
21
21
|
*
|
|
22
22
|
* @param condition Widget showCondition to check
|
|
23
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
|
|
24
|
+
* @param data An array of data.ts items to check for condition
|
|
25
|
+
* @param pendingDataChanges Pending data.ts changes of the currently active view
|
|
26
26
|
*/
|
|
27
|
-
export declare function checkShowCondition(condition: WidgetShowCondition, cursor: string, data: DataItem[], pendingDataChanges: Record<string, Record<string, PendingDataItem>>): boolean;
|
|
27
|
+
export declare function checkShowCondition(condition: WidgetShowCondition | undefined, cursor: string, data: DataItem[], pendingDataChanges: Record<string, Record<string, PendingDataItem>>): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { AnyAction } from 'redux';
|
|
3
|
+
import { isAnyOf } from '@reduxjs/toolkit';
|
|
4
|
+
/**
|
|
5
|
+
* Default list of action types which are triggers for request cancel
|
|
6
|
+
*/
|
|
7
|
+
export declare const cancelRequestActionTypes: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<import("../interfaces").ViewMetaResponse, string>[];
|
|
8
|
+
/**
|
|
9
|
+
* Creator of request cancel epic
|
|
10
|
+
*
|
|
11
|
+
* @param action$ an observable input
|
|
12
|
+
* @param actionTypes list of action types which triggers cancel
|
|
13
|
+
* @param cancelFn a callback of request cancelation
|
|
14
|
+
* @param cancelActionCreator an action creator which called by request cancelation
|
|
15
|
+
* @param filterFn a callback function which filters come actions
|
|
16
|
+
*/
|
|
17
|
+
export declare function cancelRequestEpic(action$: Observable<AnyAction>, actionTypes: Parameters<typeof isAnyOf>, cancelFn: (() => void) | undefined, cancelActionCreator: AnyAction, filterFn?: (actions: AnyAction) => boolean): Observable<AnyAction>;
|
|
@@ -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): Middleware<{}, any, import("redux").Dispatch<import("redux").AnyAction>>[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function deleteUndefinedFromObject(obj: Record<string, any>): void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BcFilter, BcSorter, FilterType } from '../interfaces
|
|
2
|
-
import { FieldType } from '../interfaces/view';
|
|
1
|
+
import { BcFilter, BcSorter, FilterType, FieldType } from '../interfaces';
|
|
3
2
|
/**
|
|
4
3
|
* Maps an input array of BcFilter objects into a dictionary of GET-request params
|
|
5
4
|
*
|
|
@@ -34,7 +33,7 @@ export declare function getSorters(sorters: BcSorter[]): Record<string, string>;
|
|
|
34
33
|
* @param defaultFilters string representation of filters
|
|
35
34
|
* @category Utils
|
|
36
35
|
*/
|
|
37
|
-
export declare function parseFilters(defaultFilters
|
|
36
|
+
export declare function parseFilters(defaultFilters?: string): BcFilter[];
|
|
38
37
|
/**
|
|
39
38
|
* Parse sorter string into separate sorter objects.
|
|
40
39
|
* String representation of sorters is url based:
|
|
@@ -49,7 +48,7 @@ export declare function parseFilters(defaultFilters: string): BcFilter[];
|
|
|
49
48
|
* @param sorters string representation of sorters
|
|
50
49
|
* @category Utils
|
|
51
50
|
*/
|
|
52
|
-
export declare function parseSorters(sorters
|
|
51
|
+
export declare function parseSorters(sorters?: string): BcSorter[];
|
|
53
52
|
/**
|
|
54
53
|
* Returns appropriate filtration type for specified field type.
|
|
55
54
|
*
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Utilities for urls and browser history
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import { Route } from '../interfaces/router';
|
|
4
|
+
import { Route } from '../interfaces';
|
|
6
5
|
/**
|
|
7
6
|
* Appends '/' in front of `absoluteUrl` argument.
|
|
8
7
|
* If `absoluteUrl` alredy starts with `/` then argument returned without changes.
|
|
@@ -34,18 +33,17 @@ export declare function buildUrl(literals: TemplateStringsArray, ...placeholders
|
|
|
34
33
|
* - {@link RouteType.router | RouteType.router}, i.e. an url without information about entity that should be handled on server side. Example: `/router/server-entity`
|
|
35
34
|
* - {@link RouteType.default | RouteType.default}, i.e. an url that leads to default entity of the application. Example: `/`
|
|
36
35
|
*
|
|
37
|
-
* Reverse function is {@link
|
|
36
|
+
* Reverse function is {@link defaultBuildURL}.
|
|
38
37
|
*
|
|
39
|
-
* @param loc Location compatible with `history` module
|
|
40
38
|
* @category Utils
|
|
41
39
|
*/
|
|
42
|
-
export declare function
|
|
40
|
+
export declare function defaultParseURL(url: URL): Route;
|
|
43
41
|
/**
|
|
44
42
|
* Transform {@link Route | Cxbox UI route} to string url.
|
|
45
43
|
*
|
|
46
|
-
* Reverse function is {@link
|
|
44
|
+
* Reverse function is {@link defaultParseURL}.
|
|
47
45
|
*
|
|
48
46
|
* @param route Cxbox UI route
|
|
49
47
|
* @category Utils
|
|
50
48
|
*/
|
|
51
|
-
export declare function
|
|
49
|
+
export declare function defaultBuildURL(route: Route): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './api';
|
|
2
|
+
export * from './apiError';
|
|
3
|
+
export * from './strings';
|
|
4
|
+
export * from './history';
|
|
5
|
+
export * from './filters';
|
|
6
|
+
export * from './operations';
|
|
7
|
+
export * from './bc';
|
|
8
|
+
export * from './tree';
|
|
9
|
+
export * from './breadthFirst';
|
|
10
|
+
export * from './deleteUndefinedFromObject';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Operation, OperationGroup, OperationTypeCrud } from '../interfaces/operation';
|
|
2
2
|
import { Store } from '../interfaces/store';
|
|
3
|
-
import {
|
|
3
|
+
import { sendOperation } from '../actions';
|
|
4
4
|
/**
|
|
5
5
|
* Extract operations from all operations groups and return them as an array of flat operations
|
|
6
6
|
*
|
|
@@ -18,4 +18,4 @@ export declare function flattenOperations(operations: Array<Operation | Operatio
|
|
|
18
18
|
* @param store Store instance
|
|
19
19
|
* @category Utils
|
|
20
20
|
*/
|
|
21
|
-
export declare function matchOperationRole(role: OperationTypeCrud | 'none' | string, payload:
|
|
21
|
+
export declare function matchOperationRole(role: OperationTypeCrud | 'none' | string, payload: ReturnType<typeof sendOperation>['payload'], store: Store): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldType, MultivalueFieldMeta, PickListFieldMeta } from '@cxbox-ui/schema';
|
|
2
|
+
export declare function isMultivalueField(fieldType: FieldType): boolean;
|
|
3
|
+
export declare function getPopupAssocKeys(fieldMeta: MultivalueFieldMeta | PickListFieldMeta): {
|
|
4
|
+
assocValueKey: string;
|
|
5
|
+
associateFieldKey: string;
|
|
6
|
+
};
|
|
@@ -13,10 +13,11 @@ export declare function getTemplate(literals: TemplateStringsArray, ...placehold
|
|
|
13
13
|
*
|
|
14
14
|
* @param bcName Business component name
|
|
15
15
|
* @param includeSelf If result hierarchy should include target bc or only ancestors
|
|
16
|
-
* @param
|
|
16
|
+
* @param state
|
|
17
17
|
* @category Utils
|
|
18
18
|
*/
|
|
19
|
-
export declare function buildBcUrl(bcName: string, includeSelf
|
|
19
|
+
export declare function buildBcUrl(bcName: string, includeSelf: boolean, state: Store): string;
|
|
20
|
+
export declare function splitBcUrl(bcUrl: string): string[];
|
|
20
21
|
/**
|
|
21
22
|
* If there is a template in the field name then returns the formatted string
|
|
22
23
|
*
|
|
@@ -36,8 +36,8 @@ export declare function buildSearchResultTree<T extends TreeNodeBidirectional =
|
|
|
36
36
|
* Items with level `1` considered to be root-level items.
|
|
37
37
|
*
|
|
38
38
|
* Notice: not very performant and almost always wasted as Cxbox API mostly returns already
|
|
39
|
-
* sorted data.
|
|
39
|
+
* sorted data.ts.
|
|
40
40
|
*
|
|
41
|
-
* @param data Unsorted data
|
|
41
|
+
* @param data Unsorted data.ts
|
|
42
42
|
*/
|
|
43
43
|
export declare function presort(data: TreeNodeBidirectional[]): TreeNodeBidirectional[];
|
package/package.json
CHANGED
|
@@ -1,117 +1,78 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cxbox-ui/core",
|
|
3
|
-
"version": "1.37.
|
|
4
|
-
"
|
|
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.org/",
|
|
15
|
-
"types": "index.d.ts",
|
|
3
|
+
"version": "1.37.3-alpha.0",
|
|
4
|
+
"description": "CXBox RTK business logic",
|
|
16
5
|
"author": "cxbox",
|
|
17
6
|
"license": "Apache-2.0",
|
|
7
|
+
"homepage": "https://cxbox.org/",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"module": "dist/cxbox-ui-core.esm.js",
|
|
11
|
+
"unpkg": "dist/cxbox-ui-core.umd.min.js",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist/**/*.js",
|
|
14
|
+
"dist/**/*.map.js",
|
|
15
|
+
"dist/**/*.d.ts"
|
|
16
|
+
],
|
|
18
17
|
"scripts": {
|
|
19
|
-
"build": "
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"build
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"lint": "
|
|
26
|
-
"
|
|
27
|
-
"
|
|
18
|
+
"build-ci": "yarn rimraf dist && yarn tsc && yarn lint && node scripts/cli.js --skipExtraction",
|
|
19
|
+
"build-prepare": "npm run build-ci",
|
|
20
|
+
"build": "yarn rimraf dist && yarn tsc && node scripts/cli.js --local --skipExtraction",
|
|
21
|
+
"build-only": "yarn rimraf dist && yarn tsc && node scripts/cli.js --skipExtraction",
|
|
22
|
+
"format": "prettier --write \"(src|examples)/**/*.{ts,tsx}\" \"**/*.md\"",
|
|
23
|
+
"format:check": "prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"",
|
|
24
|
+
"lint": "eslint src",
|
|
25
|
+
"test": "jest --runInBand",
|
|
26
|
+
"type-tests": "yarn tsc -p src/tests/tsconfig.typetests.json",
|
|
27
|
+
"prepack": "npm run build-prepare",
|
|
28
28
|
"gen:schema": "node ./node_modules/@cxbox-ui/schema/bin/build-schema"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
33
|
-
"@types/
|
|
34
|
-
"@types/
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
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",
|
|
31
|
+
"@cxbox-ui/schema": "0.7.1",
|
|
32
|
+
"@reduxjs/toolkit": "1.9.6",
|
|
33
|
+
"@types/convert-source-map": "^2.0.1",
|
|
34
|
+
"@types/react-redux": "7.1.27",
|
|
35
|
+
"@typescript-eslint/eslint-plugin": "6.7.4",
|
|
36
|
+
"@typescript-eslint/parser": "6.7.4",
|
|
37
|
+
"axios": "1.5.0",
|
|
38
|
+
"convert-source-map": "^2.0.0",
|
|
39
|
+
"esbuild": "^0.19.4",
|
|
40
|
+
"eslint": "8.50.0",
|
|
41
|
+
"eslint-config-prettier": "9.0.0",
|
|
42
|
+
"eslint-plugin-file-progress": "1.3.0",
|
|
43
|
+
"eslint-plugin-import": "2.28.1",
|
|
44
|
+
"eslint-plugin-jsdoc": "46.8.2",
|
|
45
|
+
"eslint-plugin-prefer-arrow": "1.2.3",
|
|
46
|
+
"eslint-plugin-prettier": "5.0.0",
|
|
62
47
|
"eslint-plugin-progress": "0.0.1",
|
|
63
|
-
"eslint-plugin-react": "7.
|
|
64
|
-
"eslint-plugin-react-hooks": "4.0
|
|
65
|
-
"
|
|
48
|
+
"eslint-plugin-react": "7.33.2",
|
|
49
|
+
"eslint-plugin-react-hooks": "4.6.0",
|
|
50
|
+
"fs-extra": "^11.1.1",
|
|
66
51
|
"jest": "27.0.6",
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
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.7.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"
|
|
52
|
+
"merge-source-map": "^1.1.0",
|
|
53
|
+
"prettier": "3.0.3",
|
|
54
|
+
"react-redux": "8.1.3",
|
|
55
|
+
"redux-observable": "2.0.0",
|
|
56
|
+
"reselect": "4.1.7",
|
|
57
|
+
"rimraf": "^5.0.5",
|
|
58
|
+
"rollup": "^4.0.2",
|
|
59
|
+
"rxjs": "7.8.1",
|
|
60
|
+
"source-map": "^0.7.4",
|
|
61
|
+
"terser": "^5.21.0",
|
|
62
|
+
"typescript": "5.2.2",
|
|
63
|
+
"yargs": "^17.7.2"
|
|
105
64
|
},
|
|
106
65
|
"peerDependencies": {
|
|
107
|
-
"
|
|
108
|
-
"axios": "
|
|
109
|
-
"
|
|
110
|
-
"react": "^
|
|
111
|
-
"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
66
|
+
"@reduxjs/toolkit": "^1.9.5",
|
|
67
|
+
"axios": "^1.5.0",
|
|
68
|
+
"react": "^16.9.0 || ^17.0.0 || ^18",
|
|
69
|
+
"react-redux": "^7.2.1 || ^8.0.2",
|
|
70
|
+
"rxjs": "^7"
|
|
71
|
+
},
|
|
72
|
+
"sideEffects": false,
|
|
73
|
+
"packageManager": "yarn@3.6.3",
|
|
74
|
+
"engines": {
|
|
75
|
+
"node": "18.17.1"
|
|
76
|
+
},
|
|
77
|
+
"stableVersion": "1.37.1"
|
|
78
|
+
}
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
# Versioning
|
|
2
|
-
|
|
3
|
-
Cxbox UI follows [semver](https://semver.org/), e.g. MAJOR.MINOR.PATCH.
|
|
4
|
-
All significant changes are documented in our [changelog file](./CHANGELOG.md).
|
|
5
|
-
Backwards incompatible changes are denoted with `[BREAKING CHANGE]` mark.
|
|
6
|
-
|
|
7
|
-
# Branch organization
|
|
8
|
-
|
|
9
|
-
Realeses are build from main branch, marked with a corresponding tag.
|
|
10
|
-
Minor versions and patches are merged into "develop" branch first.
|
|
11
|
-
Features and bugfixes should be named in `feat/issue-number` and `fix/issue-number` format.
|
|
12
|
-
|
|
13
|
-
# Development
|
|
14
|
-
|
|
15
|
-
All changes by internal team or external contributors should be performed via public pull request.
|
|
16
|
-
All commits should be reasonably squashed before pull request will be merged (multiple commits for a single feature are not
|
|
17
|
-
encouraged but acceptable when they are helpful)
|
|
18
|
-
All commits should contain a commit message with a gist of reasoning behind the change. Full description should be provided via pull
|
|
19
|
-
request description.
|
|
20
|
-
All changes should correlate with our style guide, pass lint and test checks:
|
|
21
|
-
```sh
|
|
22
|
-
yarn check
|
|
23
|
-
```
|
|
24
|
-
When submitting a bugfix, unit test should be provided.
|
|
25
|
-
|
|
26
|
-
# Proposing a change
|
|
27
|
-
|
|
28
|
-
If you come up with a feature that looks more attractive as a library component rather than customization layer of your application, please open an issue with your proposal.
|
|
29
|
-
|
|
30
|
-
# Style guide
|
|
31
|
-
|
|
32
|
-
Before commit launch prettier and eslint checks:
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
yarn lint --fix
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Naming, documentation and folder structure
|
|
39
|
-
|
|
40
|
-
* Test files should be named as <testedModule>.tests.ts or <TestedComponent>.tests.ts
|
|
41
|
-
* Multiple files component should store corresponding tests inside __tests__ folder. Single file component could store their test near them.
|
|
42
|
-
* Reusable UI components without dependencies on Cxbox UI functionality (not connected) should be placed inside `components/ui` folder
|
|
43
|
-
* Widgets should be placed inside `components/widgets` folder
|
|
44
|
-
* All exportable components should be specified inside `components/index.ts` file
|
|
45
|
-
* Use JSDoc comments to describe interfaces and functions when possible
|
|
46
|
-
|
|
47
|
-
## React
|
|
48
|
-
|
|
49
|
-
* Use React hooks to manage component state
|
|
50
|
-
* Always use functional form for components. Following templates are recommended:
|
|
51
|
-
|
|
52
|
-
```tsx
|
|
53
|
-
// Connected component template
|
|
54
|
-
import React, { useCallback } from 'react'
|
|
55
|
-
import { useDispatch, useSelector } from 'react-redux'
|
|
56
|
-
import cn from 'classnames'
|
|
57
|
-
import { $do } from '../../actions/actions'
|
|
58
|
-
import { Store } from '../../interfaces/store'
|
|
59
|
-
import styles from './Component.less'
|
|
60
|
-
|
|
61
|
-
export interface ComponentProps {
|
|
62
|
-
className?: string
|
|
63
|
-
bcName: string
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export const Component = ({
|
|
67
|
-
className,
|
|
68
|
-
bcName
|
|
69
|
-
}: ComponentProps) => {
|
|
70
|
-
|
|
71
|
-
const cursor = useSelector((store: Store) => store.screen.bo.bc[bcName].cursor)
|
|
72
|
-
const dispatch = useDispatch()
|
|
73
|
-
|
|
74
|
-
const handleEmptyAction = useCallback(() => {
|
|
75
|
-
dispatch($do.emptyAction(null)
|
|
76
|
-
}, [dispatch])
|
|
77
|
-
|
|
78
|
-
const handleAction = React.useCallback(() => {
|
|
79
|
-
dispatch($do.someAction({ test: 'Test' }))
|
|
80
|
-
}, [dispatch])
|
|
81
|
-
|
|
82
|
-
return <div className={cn(styles.container, className)}>
|
|
83
|
-
<h2>Cursor - {cursor}</h2>
|
|
84
|
-
<button onClick={handleEmptyAction}>
|
|
85
|
-
Empty action
|
|
86
|
-
</button>
|
|
87
|
-
<button onClick={handleAction}>
|
|
88
|
-
Action with args
|
|
89
|
-
</button>
|
|
90
|
-
</div>
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
```tsx
|
|
95
|
-
// Non-connected component template
|
|
96
|
-
import React from 'react'
|
|
97
|
-
import cn from 'classnames'
|
|
98
|
-
|
|
99
|
-
export interface ComponentProps {
|
|
100
|
-
className?: string
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export const Component: FunctionComponent<ComponentProps> = ({ className }: ComponentProps) => {
|
|
104
|
-
return <div className={cn(styles.container, props.className)}>
|
|
105
|
-
Test
|
|
106
|
-
</div>
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export default React.memo(Component)
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
* Always use relative paths for import statements
|
|
113
|
-
* Use cn helper for complex or conditional classnames
|
|
114
|
-
* Visual components should accept className as a property and apply it to the root element
|
|
115
|
-
* Always specify `key` property when you render an array of components
|
|
116
|
-
* Helper functions for component should be located below render function
|
|
117
|
-
* Avoid renderComponentPart functions, prefer render on site or extraction into different component
|
|
118
|
-
|
|
119
|
-
## CSS/LESS
|
|
120
|
-
|
|
121
|
-
* Avoid nested selectors when possible
|
|
122
|
-
* Avoid `!important` statement
|
|
123
|
-
* Avoid id selectors, tag selectors or universal * selectors - prefer class selectors
|
|
124
|
-
* Put more specific selector on the right side for complex selectors as CSS selectors checked from right to left
|
package/Provider.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Action, Store } from 'redux';
|
|
3
|
-
import { Route } from './interfaces/router';
|
|
4
|
-
import { ClientReducersMapObject, Store as CoreStore } from './interfaces/store';
|
|
5
|
-
import { Location } from 'history';
|
|
6
|
-
import { AxiosInstance } from 'axios';
|
|
7
|
-
import { Resource, i18n } from 'i18next';
|
|
8
|
-
import CustomEpics, { AnyEpic } from './interfaces/customEpics';
|
|
9
|
-
import { CustomMiddlewares } from './interfaces/customMiddlewares';
|
|
10
|
-
import { CustomWidgetDescriptor } from './interfaces/widget';
|
|
11
|
-
export interface ProviderProps<ClientState, ClientActions> {
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
customReducers?: ClientReducersMapObject<ClientState, ClientActions>;
|
|
14
|
-
customActions?: any;
|
|
15
|
-
customEpics?: CustomEpics | AnyEpic;
|
|
16
|
-
customMiddlewares?: CustomMiddlewares;
|
|
17
|
-
axiosInstance?: AxiosInstance;
|
|
18
|
-
customWidgets?: Record<string, CustomWidgetDescriptor>;
|
|
19
|
-
parseLocation?: (loc: Location<any>) => Route;
|
|
20
|
-
buildLocation?: (route: Route) => string;
|
|
21
|
-
useEpics?: boolean;
|
|
22
|
-
lang?: string;
|
|
23
|
-
langDictionary?: Resource;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @category Utils
|
|
27
|
-
*/
|
|
28
|
-
export declare let store: Store<CoreStore>;
|
|
29
|
-
export declare let axiosInstance: AxiosInstance;
|
|
30
|
-
export declare let parseLocation: (loc: Location<any>) => Route;
|
|
31
|
-
export declare let buildLocation: (route: Route) => string;
|
|
32
|
-
export declare let localeProviderInstance: i18n;
|
|
33
|
-
/**
|
|
34
|
-
* TODO
|
|
35
|
-
*
|
|
36
|
-
* @category Utils
|
|
37
|
-
*/
|
|
38
|
-
export declare function getStoreInstance(): Store<CoreStore, import("redux").AnyAction>;
|
|
39
|
-
/**
|
|
40
|
-
* TODO
|
|
41
|
-
*
|
|
42
|
-
* @param storeInstance
|
|
43
|
-
*/
|
|
44
|
-
export declare function setStoreInstance(storeInstance: Store<CoreStore>): void;
|
|
45
|
-
/**
|
|
46
|
-
* TODO
|
|
47
|
-
*/
|
|
48
|
-
export declare function getParseLocationInstance(): (loc: Location<any>) => Route;
|
|
49
|
-
/**
|
|
50
|
-
* TODO
|
|
51
|
-
*/
|
|
52
|
-
export declare function getBuildLocationInstance(): (route: Route) => string;
|
|
53
|
-
/**
|
|
54
|
-
* @category Utils
|
|
55
|
-
*/
|
|
56
|
-
export declare function getLocaleProviderInstance(): i18n;
|
|
57
|
-
/**
|
|
58
|
-
*
|
|
59
|
-
* @param props
|
|
60
|
-
* @category Components
|
|
61
|
-
*/
|
|
62
|
-
declare const Provider: <ClientState extends Partial<CoreStore>, ClientActions extends Action<any>>(props: ProviderProps<ClientState, ClientActions>) => JSX.Element;
|
|
63
|
-
export default Provider;
|