@pega/lists-core 8.0.0-build.27.14
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/LICENSE +185 -0
- package/README.md +80 -0
- package/SECURITY.md +11 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +14 -0
- package/lib/index.js.map +1 -0
- package/lib/src/core/RsCore.d.ts +37 -0
- package/lib/src/core/RsCore.d.ts.map +1 -0
- package/lib/src/core/RsCore.js +48 -0
- package/lib/src/core/RsCore.js.map +1 -0
- package/lib/src/core/RsInternal.d.ts +85 -0
- package/lib/src/core/RsInternal.d.ts.map +1 -0
- package/lib/src/core/RsInternal.js +104 -0
- package/lib/src/core/RsInternal.js.map +1 -0
- package/lib/src/core/RsProps.d.ts +52 -0
- package/lib/src/core/RsProps.d.ts.map +1 -0
- package/lib/src/core/RsProps.js +47 -0
- package/lib/src/core/RsProps.js.map +1 -0
- package/lib/src/core/RsStore.d.ts +62 -0
- package/lib/src/core/RsStore.d.ts.map +1 -0
- package/lib/src/core/RsStore.js +59 -0
- package/lib/src/core/RsStore.js.map +1 -0
- package/lib/src/core/StateResolver.d.ts +45 -0
- package/lib/src/core/StateResolver.d.ts.map +1 -0
- package/lib/src/core/StateResolver.js +276 -0
- package/lib/src/core/StateResolver.js.map +1 -0
- package/lib/src/core/a11y/BaseA11y.d.ts +161 -0
- package/lib/src/core/a11y/BaseA11y.d.ts.map +1 -0
- package/lib/src/core/a11y/BaseA11y.js +549 -0
- package/lib/src/core/a11y/BaseA11y.js.map +1 -0
- package/lib/src/core/actions/actionConstants.d.ts +77 -0
- package/lib/src/core/actions/actionConstants.d.ts.map +1 -0
- package/lib/src/core/actions/actionConstants.js +79 -0
- package/lib/src/core/actions/actionConstants.js.map +1 -0
- package/lib/src/core/actions/actions.d.ts +400 -0
- package/lib/src/core/actions/actions.d.ts.map +1 -0
- package/lib/src/core/actions/actions.js +537 -0
- package/lib/src/core/actions/actions.js.map +1 -0
- package/lib/src/core/actions/actions.types.d.ts +504 -0
- package/lib/src/core/actions/actions.types.d.ts.map +1 -0
- package/lib/src/core/actions/actions.types.js +5 -0
- package/lib/src/core/actions/actions.types.js.map +1 -0
- package/lib/src/core/config/config.d.ts +9 -0
- package/lib/src/core/config/config.d.ts.map +1 -0
- package/lib/src/core/config/config.js +93 -0
- package/lib/src/core/config/config.js.map +1 -0
- package/lib/src/core/config/filterConfig.d.ts +123 -0
- package/lib/src/core/config/filterConfig.d.ts.map +1 -0
- package/lib/src/core/config/filterConfig.js +238 -0
- package/lib/src/core/config/filterConfig.js.map +1 -0
- package/lib/src/core/constants.d.ts +146 -0
- package/lib/src/core/constants.d.ts.map +1 -0
- package/lib/src/core/constants.js +124 -0
- package/lib/src/core/constants.js.map +1 -0
- package/lib/src/core/features/featureFactory.d.ts +52 -0
- package/lib/src/core/features/featureFactory.d.ts.map +1 -0
- package/lib/src/core/features/featureFactory.js +118 -0
- package/lib/src/core/features/featureFactory.js.map +1 -0
- package/lib/src/core/features/uIFeatures/afterRender/animation.d.ts +24 -0
- package/lib/src/core/features/uIFeatures/afterRender/animation.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/afterRender/animation.js +157 -0
- package/lib/src/core/features/uIFeatures/afterRender/animation.js.map +1 -0
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.d.ts +29 -0
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.js +114 -0
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.js.map +1 -0
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.d.ts +38 -0
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js +157 -0
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js.map +1 -0
- package/lib/src/core/features/uIFeatures/afterRender/customizeParentContainer/index.d.ts +16 -0
- package/lib/src/core/features/uIFeatures/afterRender/customizeParentContainer/index.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/afterRender/customizeParentContainer/index.js +32 -0
- package/lib/src/core/features/uIFeatures/afterRender/customizeParentContainer/index.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeight.d.ts +25 -0
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeight.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeight.js +139 -0
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeight.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeightToFitRecords.d.ts +18 -0
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeightToFitRecords.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeightToFitRecords.js +46 -0
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeightToFitRecords.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/adjustMaxHeight.d.ts +13 -0
- package/lib/src/core/features/uIFeatures/beforeRender/adjustMaxHeight.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/adjustMaxHeight.js +38 -0
- package/lib/src/core/features/uIFeatures/beforeRender/adjustMaxHeight.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/aggregation.d.ts +11 -0
- package/lib/src/core/features/uIFeatures/beforeRender/aggregation.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/aggregation.js +48 -0
- package/lib/src/core/features/uIFeatures/beforeRender/aggregation.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/animation.d.ts +25 -0
- package/lib/src/core/features/uIFeatures/beforeRender/animation.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/animation.js +106 -0
- package/lib/src/core/features/uIFeatures/beforeRender/animation.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.d.ts +18 -0
- package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.js +56 -0
- package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/changePersonalisation.d.ts +7 -0
- package/lib/src/core/features/uIFeatures/beforeRender/changePersonalisation.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/changePersonalisation.js +34 -0
- package/lib/src/core/features/uIFeatures/beforeRender/changePersonalisation.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnAlias.d.ts +10 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnAlias.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnAlias.js +72 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnAlias.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnDisplayMode.d.ts +9 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnDisplayMode.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnDisplayMode.js +26 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnDisplayMode.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnFormatter.d.ts +9 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnFormatter.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnFormatter.js +29 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnFormatter.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnOrder.d.ts +11 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnOrder.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnOrder.js +38 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnOrder.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.d.ts +11 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.js +199 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/index.d.ts +5 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/index.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/index.js +29 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/index.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.d.ts +14 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.js +118 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnSort.d.ts +8 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnSort.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnSort.js +25 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnSort.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnToggle.d.ts +9 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnToggle.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnToggle.js +26 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnToggle.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnVisualOrder.d.ts +12 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnVisualOrder.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnVisualOrder.js +57 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnVisualOrder.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/conditionalStyleFormat.d.ts +9 -0
- package/lib/src/core/features/uIFeatures/beforeRender/conditionalStyleFormat.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/conditionalStyleFormat.js +36 -0
- package/lib/src/core/features/uIFeatures/beforeRender/conditionalStyleFormat.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/customColumn.d.ts +9 -0
- package/lib/src/core/features/uIFeatures/beforeRender/customColumn.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/customColumn.js +70 -0
- package/lib/src/core/features/uIFeatures/beforeRender/customColumn.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/edit.d.ts +12 -0
- package/lib/src/core/features/uIFeatures/beforeRender/edit.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/edit.js +94 -0
- package/lib/src/core/features/uIFeatures/beforeRender/edit.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/errorColumn.d.ts +9 -0
- package/lib/src/core/features/uIFeatures/beforeRender/errorColumn.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/errorColumn.js +26 -0
- package/lib/src/core/features/uIFeatures/beforeRender/errorColumn.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/filter.d.ts +10 -0
- package/lib/src/core/features/uIFeatures/beforeRender/filter.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/filter.js +36 -0
- package/lib/src/core/features/uIFeatures/beforeRender/filter.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/freeze.d.ts +15 -0
- package/lib/src/core/features/uIFeatures/beforeRender/freeze.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/freeze.js +119 -0
- package/lib/src/core/features/uIFeatures/beforeRender/freeze.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/grouping.d.ts +38 -0
- package/lib/src/core/features/uIFeatures/beforeRender/grouping.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/grouping.js +451 -0
- package/lib/src/core/features/uIFeatures/beforeRender/grouping.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/groupsorting.d.ts +7 -0
- package/lib/src/core/features/uIFeatures/beforeRender/groupsorting.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/groupsorting.js +36 -0
- package/lib/src/core/features/uIFeatures/beforeRender/groupsorting.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/moveListRecords.d.ts +7 -0
- package/lib/src/core/features/uIFeatures/beforeRender/moveListRecords.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/moveListRecords.js +76 -0
- package/lib/src/core/features/uIFeatures/beforeRender/moveListRecords.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/personalization.d.ts +16 -0
- package/lib/src/core/features/uIFeatures/beforeRender/personalization.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/personalization.js +306 -0
- package/lib/src/core/features/uIFeatures/beforeRender/personalization.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.d.ts +7 -0
- package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.js +59 -0
- package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/prepareRows.d.ts +7 -0
- package/lib/src/core/features/uIFeatures/beforeRender/prepareRows.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/prepareRows.js +30 -0
- package/lib/src/core/features/uIFeatures/beforeRender/prepareRows.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/refresh.d.ts +15 -0
- package/lib/src/core/features/uIFeatures/beforeRender/refresh.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/refresh.js +40 -0
- package/lib/src/core/features/uIFeatures/beforeRender/refresh.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/renderHeader.d.ts +7 -0
- package/lib/src/core/features/uIFeatures/beforeRender/renderHeader.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/renderHeader.js +21 -0
- package/lib/src/core/features/uIFeatures/beforeRender/renderHeader.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/resetFetch.d.ts +7 -0
- package/lib/src/core/features/uIFeatures/beforeRender/resetFetch.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/resetFetch.js +55 -0
- package/lib/src/core/features/uIFeatures/beforeRender/resetFetch.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.d.ts +7 -0
- package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.js +24 -0
- package/lib/src/core/features/uIFeatures/beforeRender/resizeGroupedDragDropColumn.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.d.ts +9 -0
- package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.js +232 -0
- package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/rowHeight.d.ts +7 -0
- package/lib/src/core/features/uIFeatures/beforeRender/rowHeight.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/rowHeight.js +18 -0
- package/lib/src/core/features/uIFeatures/beforeRender/rowHeight.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/rowSelect.d.ts +23 -0
- package/lib/src/core/features/uIFeatures/beforeRender/rowSelect.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/rowSelect.js +135 -0
- package/lib/src/core/features/uIFeatures/beforeRender/rowSelect.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/scrollToTop.d.ts +14 -0
- package/lib/src/core/features/uIFeatures/beforeRender/scrollToTop.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/scrollToTop.js +36 -0
- package/lib/src/core/features/uIFeatures/beforeRender/scrollToTop.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.d.ts +19 -0
- package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.js +157 -0
- package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.d.ts +29 -0
- package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.js +214 -0
- package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/toggleHeaderIcons.d.ts +11 -0
- package/lib/src/core/features/uIFeatures/beforeRender/toggleHeaderIcons.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/toggleHeaderIcons.js +26 -0
- package/lib/src/core/features/uIFeatures/beforeRender/toggleHeaderIcons.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/toggleSelectAllCheckbox.d.ts +12 -0
- package/lib/src/core/features/uIFeatures/beforeRender/toggleSelectAllCheckbox.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/toggleSelectAllCheckbox.js +51 -0
- package/lib/src/core/features/uIFeatures/beforeRender/toggleSelectAllCheckbox.js.map +1 -0
- package/lib/src/core/features/uIFeatures/index.d.ts +55 -0
- package/lib/src/core/features/uIFeatures/index.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/index.js +95 -0
- package/lib/src/core/features/uIFeatures/index.js.map +1 -0
- package/lib/src/core/generators/ColumnGenerator.d.ts +349 -0
- package/lib/src/core/generators/ColumnGenerator.d.ts.map +1 -0
- package/lib/src/core/generators/ColumnGenerator.js +725 -0
- package/lib/src/core/generators/ColumnGenerator.js.map +1 -0
- package/lib/src/core/generators/ColumnGenerator.types.d.ts +149 -0
- package/lib/src/core/generators/ColumnGenerator.types.d.ts.map +1 -0
- package/lib/src/core/generators/ColumnGenerator.types.js +2 -0
- package/lib/src/core/generators/ColumnGenerator.types.js.map +1 -0
- package/lib/src/core/generators/GroupGenerator.d.ts +59 -0
- package/lib/src/core/generators/GroupGenerator.d.ts.map +1 -0
- package/lib/src/core/generators/GroupGenerator.js +64 -0
- package/lib/src/core/generators/GroupGenerator.js.map +1 -0
- package/lib/src/core/generators/RowGenerator.d.ts +97 -0
- package/lib/src/core/generators/RowGenerator.d.ts.map +1 -0
- package/lib/src/core/generators/RowGenerator.js +285 -0
- package/lib/src/core/generators/RowGenerator.js.map +1 -0
- package/lib/src/core/generators/RowGenerator.types.d.ts +95 -0
- package/lib/src/core/generators/RowGenerator.types.d.ts.map +1 -0
- package/lib/src/core/generators/RowGenerator.types.js +2 -0
- package/lib/src/core/generators/RowGenerator.types.js.map +1 -0
- package/lib/src/core/generators/ViewGenerator.d.ts +280 -0
- package/lib/src/core/generators/ViewGenerator.d.ts.map +1 -0
- package/lib/src/core/generators/ViewGenerator.js +585 -0
- package/lib/src/core/generators/ViewGenerator.js.map +1 -0
- package/lib/src/core/generators/ViewGenerator.types.d.ts +180 -0
- package/lib/src/core/generators/ViewGenerator.types.d.ts.map +1 -0
- package/lib/src/core/generators/ViewGenerator.types.js +2 -0
- package/lib/src/core/generators/ViewGenerator.types.js.map +1 -0
- package/lib/src/core/generators/__tests__/viewUtilityMockSetup.d.ts +69 -0
- package/lib/src/core/generators/__tests__/viewUtilityMockSetup.d.ts.map +1 -0
- package/lib/src/core/generators/__tests__/viewUtilityMockSetup.js +16 -0
- package/lib/src/core/generators/__tests__/viewUtilityMockSetup.js.map +1 -0
- package/lib/src/core/generators/viewUtilityMethods.d.ts +316 -0
- package/lib/src/core/generators/viewUtilityMethods.d.ts.map +1 -0
- package/lib/src/core/generators/viewUtilityMethods.js +542 -0
- package/lib/src/core/generators/viewUtilityMethods.js.map +1 -0
- package/lib/src/core/index.d.ts +7 -0
- package/lib/src/core/index.d.ts.map +1 -0
- package/lib/src/core/index.js +80 -0
- package/lib/src/core/index.js.map +1 -0
- package/lib/src/core/pubSub/events.d.ts +6 -0
- package/lib/src/core/pubSub/events.d.ts.map +1 -0
- package/lib/src/core/pubSub/events.js +6 -0
- package/lib/src/core/pubSub/events.js.map +1 -0
- package/lib/src/core/pubSub/index.d.ts +7 -0
- package/lib/src/core/pubSub/index.d.ts.map +1 -0
- package/lib/src/core/pubSub/index.js +35 -0
- package/lib/src/core/pubSub/index.js.map +1 -0
- package/lib/src/core/reducers/aggregation.d.ts +5 -0
- package/lib/src/core/reducers/aggregation.d.ts.map +1 -0
- package/lib/src/core/reducers/aggregation.js +35 -0
- package/lib/src/core/reducers/aggregation.js.map +1 -0
- package/lib/src/core/reducers/bootstrap.d.ts +5 -0
- package/lib/src/core/reducers/bootstrap.d.ts.map +1 -0
- package/lib/src/core/reducers/bootstrap.js +12 -0
- package/lib/src/core/reducers/bootstrap.js.map +1 -0
- package/lib/src/core/reducers/columnAlias.d.ts +5 -0
- package/lib/src/core/reducers/columnAlias.d.ts.map +1 -0
- package/lib/src/core/reducers/columnAlias.js +28 -0
- package/lib/src/core/reducers/columnAlias.js.map +1 -0
- package/lib/src/core/reducers/conditionalStyleFormat.d.ts +5 -0
- package/lib/src/core/reducers/conditionalStyleFormat.d.ts.map +1 -0
- package/lib/src/core/reducers/conditionalStyleFormat.js +13 -0
- package/lib/src/core/reducers/conditionalStyleFormat.js.map +1 -0
- package/lib/src/core/reducers/customColumn.d.ts +5 -0
- package/lib/src/core/reducers/customColumn.d.ts.map +1 -0
- package/lib/src/core/reducers/customColumn.js +40 -0
- package/lib/src/core/reducers/customColumn.js.map +1 -0
- package/lib/src/core/reducers/dragDrop.d.ts +6 -0
- package/lib/src/core/reducers/dragDrop.d.ts.map +1 -0
- package/lib/src/core/reducers/dragDrop.js +100 -0
- package/lib/src/core/reducers/dragDrop.js.map +1 -0
- package/lib/src/core/reducers/edit.d.ts +5 -0
- package/lib/src/core/reducers/edit.d.ts.map +1 -0
- package/lib/src/core/reducers/edit.js +65 -0
- package/lib/src/core/reducers/edit.js.map +1 -0
- package/lib/src/core/reducers/error.d.ts +69 -0
- package/lib/src/core/reducers/error.d.ts.map +1 -0
- package/lib/src/core/reducers/error.js +21 -0
- package/lib/src/core/reducers/error.js.map +1 -0
- package/lib/src/core/reducers/externalState.d.ts +5 -0
- package/lib/src/core/reducers/externalState.d.ts.map +1 -0
- package/lib/src/core/reducers/externalState.js +20 -0
- package/lib/src/core/reducers/externalState.js.map +1 -0
- package/lib/src/core/reducers/filter.d.ts +5 -0
- package/lib/src/core/reducers/filter.d.ts.map +1 -0
- package/lib/src/core/reducers/filter.js +29 -0
- package/lib/src/core/reducers/filter.js.map +1 -0
- package/lib/src/core/reducers/forceUpdate.d.ts +5 -0
- package/lib/src/core/reducers/forceUpdate.d.ts.map +1 -0
- package/lib/src/core/reducers/forceUpdate.js +25 -0
- package/lib/src/core/reducers/forceUpdate.js.map +1 -0
- package/lib/src/core/reducers/freeze.d.ts +5 -0
- package/lib/src/core/reducers/freeze.d.ts.map +1 -0
- package/lib/src/core/reducers/freeze.js +36 -0
- package/lib/src/core/reducers/freeze.js.map +1 -0
- package/lib/src/core/reducers/grouping.d.ts +5 -0
- package/lib/src/core/reducers/grouping.d.ts.map +1 -0
- package/lib/src/core/reducers/grouping.js +142 -0
- package/lib/src/core/reducers/grouping.js.map +1 -0
- package/lib/src/core/reducers/index.d.ts +5 -0
- package/lib/src/core/reducers/index.d.ts.map +1 -0
- package/lib/src/core/reducers/index.js +77 -0
- package/lib/src/core/reducers/index.js.map +1 -0
- package/lib/src/core/reducers/moveRecords.d.ts +5 -0
- package/lib/src/core/reducers/moveRecords.d.ts.map +1 -0
- package/lib/src/core/reducers/moveRecords.js +10 -0
- package/lib/src/core/reducers/moveRecords.js.map +1 -0
- package/lib/src/core/reducers/notificationsReducer.d.ts +4 -0
- package/lib/src/core/reducers/notificationsReducer.d.ts.map +1 -0
- package/lib/src/core/reducers/notificationsReducer.js +49 -0
- package/lib/src/core/reducers/notificationsReducer.js.map +1 -0
- package/lib/src/core/reducers/paginations.d.ts +5 -0
- package/lib/src/core/reducers/paginations.d.ts.map +1 -0
- package/lib/src/core/reducers/paginations.js +19 -0
- package/lib/src/core/reducers/paginations.js.map +1 -0
- package/lib/src/core/reducers/personalizationDirtyReducer.d.ts +5 -0
- package/lib/src/core/reducers/personalizationDirtyReducer.d.ts.map +1 -0
- package/lib/src/core/reducers/personalizationDirtyReducer.js +46 -0
- package/lib/src/core/reducers/personalizationDirtyReducer.js.map +1 -0
- package/lib/src/core/reducers/personalizationReducer.d.ts +5 -0
- package/lib/src/core/reducers/personalizationReducer.d.ts.map +1 -0
- package/lib/src/core/reducers/personalizationReducer.js +238 -0
- package/lib/src/core/reducers/personalizationReducer.js.map +1 -0
- package/lib/src/core/reducers/refresh.d.ts +5 -0
- package/lib/src/core/reducers/refresh.d.ts.map +1 -0
- package/lib/src/core/reducers/refresh.js +16 -0
- package/lib/src/core/reducers/refresh.js.map +1 -0
- package/lib/src/core/reducers/renderFormatter.d.ts +5 -0
- package/lib/src/core/reducers/renderFormatter.d.ts.map +1 -0
- package/lib/src/core/reducers/renderFormatter.js +22 -0
- package/lib/src/core/reducers/renderFormatter.js.map +1 -0
- package/lib/src/core/reducers/resize.d.ts +5 -0
- package/lib/src/core/reducers/resize.d.ts.map +1 -0
- package/lib/src/core/reducers/resize.js +32 -0
- package/lib/src/core/reducers/resize.js.map +1 -0
- package/lib/src/core/reducers/rowSelect.d.ts +5 -0
- package/lib/src/core/reducers/rowSelect.d.ts.map +1 -0
- package/lib/src/core/reducers/rowSelect.js +86 -0
- package/lib/src/core/reducers/rowSelect.js.map +1 -0
- package/lib/src/core/reducers/sanitize.d.ts +5 -0
- package/lib/src/core/reducers/sanitize.d.ts.map +1 -0
- package/lib/src/core/reducers/sanitize.js +21 -0
- package/lib/src/core/reducers/sanitize.js.map +1 -0
- package/lib/src/core/reducers/search.d.ts +5 -0
- package/lib/src/core/reducers/search.d.ts.map +1 -0
- package/lib/src/core/reducers/search.js +13 -0
- package/lib/src/core/reducers/search.js.map +1 -0
- package/lib/src/core/reducers/showHeaderIcons.d.ts +5 -0
- package/lib/src/core/reducers/showHeaderIcons.d.ts.map +1 -0
- package/lib/src/core/reducers/showHeaderIcons.js +13 -0
- package/lib/src/core/reducers/showHeaderIcons.js.map +1 -0
- package/lib/src/core/reducers/smallScreen.d.ts +5 -0
- package/lib/src/core/reducers/smallScreen.d.ts.map +1 -0
- package/lib/src/core/reducers/smallScreen.js +22 -0
- package/lib/src/core/reducers/smallScreen.js.map +1 -0
- package/lib/src/core/reducers/sort.d.ts +5 -0
- package/lib/src/core/reducers/sort.d.ts.map +1 -0
- package/lib/src/core/reducers/sort.js +71 -0
- package/lib/src/core/reducers/sort.js.map +1 -0
- package/lib/src/core/reducers/versioning/index.d.ts +16 -0
- package/lib/src/core/reducers/versioning/index.d.ts.map +1 -0
- package/lib/src/core/reducers/versioning/index.js +46 -0
- package/lib/src/core/reducers/versioning/index.js.map +1 -0
- package/lib/src/core/reducers/versioning/v1.d.ts +136 -0
- package/lib/src/core/reducers/versioning/v1.d.ts.map +1 -0
- package/lib/src/core/reducers/versioning/v1.js +156 -0
- package/lib/src/core/reducers/versioning/v1.js.map +1 -0
- package/lib/src/core/reducers/visibility.d.ts +5 -0
- package/lib/src/core/reducers/visibility.d.ts.map +1 -0
- package/lib/src/core/reducers/visibility.js +49 -0
- package/lib/src/core/reducers/visibility.js.map +1 -0
- package/lib/src/core/test/junitMocks.d.ts +756 -0
- package/lib/src/core/test/junitMocks.d.ts.map +1 -0
- package/lib/src/core/test/junitMocks.js +2923 -0
- package/lib/src/core/test/junitMocks.js.map +1 -0
- package/lib/src/core/test/samples/a11ySample.d.ts +8 -0
- package/lib/src/core/test/samples/a11ySample.d.ts.map +1 -0
- package/lib/src/core/test/samples/a11ySample.js +1131 -0
- package/lib/src/core/test/samples/a11ySample.js.map +1 -0
- package/lib/src/core/test/samples/a11ySampleWithLoaders.d.ts +8 -0
- package/lib/src/core/test/samples/a11ySampleWithLoaders.d.ts.map +1 -0
- package/lib/src/core/test/samples/a11ySampleWithLoaders.js +1134 -0
- package/lib/src/core/test/samples/a11ySampleWithLoaders.js.map +1 -0
- package/lib/src/core/test/samples/utils.d.ts +2 -0
- package/lib/src/core/test/samples/utils.d.ts.map +1 -0
- package/lib/src/core/test/samples/utils.js +9 -0
- package/lib/src/core/test/samples/utils.js.map +1 -0
- package/lib/src/core/test/utils/rowDragDropUtils.d.ts +20 -0
- package/lib/src/core/test/utils/rowDragDropUtils.d.ts.map +1 -0
- package/lib/src/core/test/utils/rowDragDropUtils.js +98 -0
- package/lib/src/core/test/utils/rowDragDropUtils.js.map +1 -0
- package/lib/src/core/utils/condition-utils.d.ts +15 -0
- package/lib/src/core/utils/condition-utils.d.ts.map +1 -0
- package/lib/src/core/utils/condition-utils.js +114 -0
- package/lib/src/core/utils/condition-utils.js.map +1 -0
- package/lib/src/core/utils/util.d.ts +380 -0
- package/lib/src/core/utils/util.d.ts.map +1 -0
- package/lib/src/core/utils/util.js +912 -0
- package/lib/src/core/utils/util.js.map +1 -0
- package/lib/src/core/utils/util.types.d.ts +43 -0
- package/lib/src/core/utils/util.types.d.ts.map +1 -0
- package/lib/src/core/utils/util.types.js +2 -0
- package/lib/src/core/utils/util.types.js.map +1 -0
- package/lib/types/ApiContext.types.d.ts +392 -0
- package/lib/types/ApiContext.types.d.ts.map +1 -0
- package/lib/types/ApiContext.types.js +2 -0
- package/lib/types/ApiContext.types.js.map +1 -0
- package/lib/types/Meta.types.d.ts +705 -0
- package/lib/types/Meta.types.d.ts.map +1 -0
- package/lib/types/Meta.types.js +37 -0
- package/lib/types/Meta.types.js.map +1 -0
- package/lib/types/RsCoreBootArgs.types.d.ts +103 -0
- package/lib/types/RsCoreBootArgs.types.d.ts.map +1 -0
- package/lib/types/RsCoreBootArgs.types.js +2 -0
- package/lib/types/RsCoreBootArgs.types.js.map +1 -0
- package/lib/types/State.types.d.ts +374 -0
- package/lib/types/State.types.d.ts.map +1 -0
- package/lib/types/State.types.js +5 -0
- package/lib/types/State.types.js.map +1 -0
- package/lib/types.d.ts +30 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/package.json +30 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
Cosmos License
|
|
2
|
+
Version 1.0, September 2020
|
|
3
|
+
This is a proprietary license that is based on the Apache 2.0 license and
|
|
4
|
+
is intended to provide a similar set of rights with the exception that any and
|
|
5
|
+
all Cosmos components shall be used only with Pegasystems Software.
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the work.
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
"Pegasystems" (or "Pega") shall mean Pegasystems Inc., a Massachusetts
|
|
68
|
+
Corporation, having an office at One Rogers Street, Cambridge, MA 02142.
|
|
69
|
+
|
|
70
|
+
"Pegasystems Software" shall mean duly licensed Pegasystems software
|
|
71
|
+
and/or subscription services including but not limited to the Pega
|
|
72
|
+
Platform.
|
|
73
|
+
|
|
74
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
78
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
79
|
+
Work and such Derivative Works in Source or Object form solely for
|
|
80
|
+
use with Pegasystems Software.
|
|
81
|
+
|
|
82
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
83
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
84
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
85
|
+
(except as stated in this section) patent license to make, have made,
|
|
86
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
87
|
+
where such license applies only to those patent claims licensable
|
|
88
|
+
by such Contributor that are necessarily infringed by their
|
|
89
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
90
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
91
|
+
institute patent litigation against any entity (including a
|
|
92
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
93
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
94
|
+
or contributory patent infringement, then any patent licenses
|
|
95
|
+
granted to You under this License for that Work shall terminate
|
|
96
|
+
as of the date such litigation is filed.
|
|
97
|
+
|
|
98
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
99
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
100
|
+
modifications, and in Source or Object form, provided that You
|
|
101
|
+
meet the following conditions:
|
|
102
|
+
|
|
103
|
+
(a) You must give any other recipients of the Work or
|
|
104
|
+
Derivative Works a copy of this License; and
|
|
105
|
+
|
|
106
|
+
(b) You must cause any modified files to carry prominent notices
|
|
107
|
+
stating that You changed the files; and
|
|
108
|
+
|
|
109
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
110
|
+
that You distribute, all copyright, patent, trademark, and
|
|
111
|
+
attribution notices from the Source form of the Work,
|
|
112
|
+
excluding those notices that do not pertain to any part of
|
|
113
|
+
the Derivative Works; and
|
|
114
|
+
|
|
115
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
116
|
+
distribution, then any Derivative Works that You distribute must
|
|
117
|
+
include a readable copy of the attribution notices contained
|
|
118
|
+
within such NOTICE file, excluding those notices that do not
|
|
119
|
+
pertain to any part of the Derivative Works, in at least one
|
|
120
|
+
of the following places: within a NOTICE text file distributed
|
|
121
|
+
as part of the Derivative Works; within the Source form or
|
|
122
|
+
documentation, if provided along with the Derivative Works; or,
|
|
123
|
+
within a display generated by the Derivative Works, if and
|
|
124
|
+
wherever such third-party notices normally appear. The contents
|
|
125
|
+
of the NOTICE file are for informational purposes only and
|
|
126
|
+
do not modify the License. You may add Your own attribution
|
|
127
|
+
notices within Derivative Works that You distribute, alongside
|
|
128
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
129
|
+
that such additional attribution notices cannot be construed
|
|
130
|
+
as modifying the License.
|
|
131
|
+
|
|
132
|
+
You may add Your own copyright statement to Your modifications and
|
|
133
|
+
may provide additional or different license terms and conditions
|
|
134
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
135
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
136
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
137
|
+
the conditions stated in this License including the limitation that
|
|
138
|
+
the Work be used only with Pegasystems Software.
|
|
139
|
+
|
|
140
|
+
5. Submission of Contributions. Any Contribution intentionally submitted
|
|
141
|
+
for inclusion in the Work by You to the Licensor shall be under the
|
|
142
|
+
terms and conditions of this License, without any additional terms or
|
|
143
|
+
conditions. Notwithstanding the above, nothing herein shall supersede
|
|
144
|
+
or modify the terms of any separate license agreement you may have
|
|
145
|
+
executed with Licensor regarding such Contributions.
|
|
146
|
+
|
|
147
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
148
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
149
|
+
except as required for reasonable and customary use in describing the
|
|
150
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
151
|
+
|
|
152
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
153
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
154
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
155
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
156
|
+
implied, including, without limitation, any warranties or conditions
|
|
157
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
158
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
159
|
+
appropriateness of using or redistributing the Work and assume any
|
|
160
|
+
risks associated with Your exercise of permissions under this License.
|
|
161
|
+
|
|
162
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
163
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
164
|
+
unless required by applicable law (such as deliberate and grossly
|
|
165
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
166
|
+
liable to You for damages, including any direct, indirect, special,
|
|
167
|
+
incidental, or consequential damages of any character arising as a
|
|
168
|
+
result of this License or out of the use or inability to use the
|
|
169
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
170
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
171
|
+
other commercial damages or losses), even if such Contributor
|
|
172
|
+
has been advised of the possibility of such damages.
|
|
173
|
+
|
|
174
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
175
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
176
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
177
|
+
or other liability obligations and/or rights consistent with this
|
|
178
|
+
License. However, in accepting such obligations, You may act only
|
|
179
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
180
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
181
|
+
defend, and hold each Contributor harmless for any liability
|
|
182
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
183
|
+
of your accepting any such warranty or additional liability.
|
|
184
|
+
|
|
185
|
+
END OF TERMS AND CONDITIONS
|
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
## Tasks
|
|
2
|
+
|
|
3
|
+
- [x] Create new package for core library
|
|
4
|
+
- [x] Move Actions, reducers, features to new package
|
|
5
|
+
- [x] Add new rsCore layer to core
|
|
6
|
+
- [x] Add StateResolver to core
|
|
7
|
+
- [x] Remove defaultComponent import from generators and util.js in core library
|
|
8
|
+
- [x] Remove the unnecessary functions from the library util methods. Remove util imports from core in the ui layer.
|
|
9
|
+
- [x] Visit what from the filterConfig should be part of core library. (duplicated the file in core for now)
|
|
10
|
+
- [x] Visit the constants file (duplicated the file in core for now)
|
|
11
|
+
- [ ] Remove useTranslate hook usage from core. Think of internationalization implementation.
|
|
12
|
+
- [x] Update features to new dependencies
|
|
13
|
+
- [ ] Make state in ViewGenerator in sync with the output state
|
|
14
|
+
- [-] Add typings to core
|
|
15
|
+
- [x] Setup jest for testing
|
|
16
|
+
- [x] Update unit tests in core library
|
|
17
|
+
- [x] Update unit tests in view layer
|
|
18
|
+
- [ ] The core library should be able to render table without virtualizer. Make the features failsafe to work without virtualizer.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Terminologies
|
|
23
|
+
|
|
24
|
+
1. `rsCore` - rsCore refers to the core library itself that is present in the RepeatingStructuresCore folder. This library is can be used to creating different repeating structures like table, gallery etc.
|
|
25
|
+
2. `rsInternal` - rsInternal is an object that represents the internal state of the core library. This is a singleton object and this is not exposed to the consumers of the rsCore library. As per requirement, the properties available on this object are made available to different building blocks of the core library like generators, reducers, middlewares(features), stateResolver.
|
|
26
|
+
3. `rsProps` - rsProps object is used to store values which never change. This should be treated as a read only object. E.g. `apiContext`, `formatters` etc.
|
|
27
|
+
4. `rsStore` - rsStore object can be used to store values which the features need to store without triggering a state update and these values change over time. E.g. `autosizeTriggered`, `meta`, ref for events like `rowDragDropRef`.
|
|
28
|
+
5. `generators` - These are the objects that form the `view` object that the consumers of the core library are going to use to write their repeating structure component like table. Generators like view, row and column provides API methods that the end user can use to trigger state changes and getting updated view object in the core layer.
|
|
29
|
+
6. `reducers` - reducers are used to update the state of the core library depending on the user action.
|
|
30
|
+
7. `middlewares` or `features` - middlewares are the features that are responsible for creating or updating properties on the view object. Middlewares run in sync and for each action the `middlewares` are run. We have memoization on the features where we describe the properties whose change should execute the feature. If there is no change in the mentioned dependencies of the feature, the feature will not execute.
|
|
31
|
+
8. `stateResolver` - StateResolver is responsible for orchestrating the data flow of the core library. It takes actions from the generator objects, run reducers to make state updates, run middlewares, implement the queue mechanism for the dispatch actions, fetch data and emit the final state to the external store. This is a singleton object and an instance of this is maintined on `rsInternal` object as `rsStateResolver`.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Initialization
|
|
36
|
+
|
|
37
|
+
1. Core library exposes method `initializeRsCore(args)` that accepts constructor arguments that the consumer will call to get instance of core library.
|
|
38
|
+
2. During initialization, the building blocks like `reducers`, `middlewares`, `StateResolver` are initialized and the first `view` object is constructured. The instances of these building blocks are set on the internal state of the core library `rsInternal`.
|
|
39
|
+
3. From the `rsInternal` object, new object of type `RsCore` is created that contains only the publicly available methods to the consumer and this object is returned as a result of `initializeRsCore` method call. The consumer will be responsible for maintain the `rsCore` instance object.
|
|
40
|
+
4. `rsCore` object can be used to get access to the view using `rsCore.getView()` or pubSubUtils by `rsCore.getPubSubUtils().publish()` etc.
|
|
41
|
+
5. The consumer must set the parent container HTML Element under which RS is rendered via `setDomContainer` in `rsCore.getView()`. The dom container is used by RS core while executing dom related features like autosizing, animation etc.
|
|
42
|
+
6. The consumer must set the header row HTML Element under which header cells are rendered via `setItemElement` in `rsCore.getView()`. The item element is used by RS core while executing dom related features like animation.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
### Data Flow
|
|
47
|
+
|
|
48
|
+
1. After the initialization of the core library, the consumer has access to the view using `rsCore.getView()` which can be used to construct the view.
|
|
49
|
+
2. The view object has APIs available on it which can be used to dispatch available user actions to the library. The view object has columns and rows objects which also has API methods available. The user can call these APIs with the required payload. e.g. `view.type.applyFilter(params)`.
|
|
50
|
+
3. The generator object will dispatch a corresponding action to the `StateResolver`.
|
|
51
|
+
4. StateResolver will push the newly dispatched action to a `queue` and start the executing the actions availabel on the queue one by one.
|
|
52
|
+
5. For each `action`, first the `reducers` will run to generate new state. The reducers will receive 3 parameters - (`state, action, getView`) - where state represents the current state, action represents the newly dispatched action with payload and getView will give the latest view. getView is required as some reducers require the meta and columns. The reducers will return the updated state.
|
|
53
|
+
6. After the reducers, the `middlewares` will run with the updated state. The middlewares(feature files) will receive argument - `getView, getRsStore, getRsProps, getState, getOriginalState, dispatch, queuedActions`. As of now, we don't have any use case for `getOriginalState` but this is exposed for future use cases.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Notable differences due to architecture changes
|
|
58
|
+
|
|
59
|
+
1. Core library moved to separate package `RepeatingStructuresCore`. This includes moving Reducers, Actions, Features, PubSub, some constants, utils and configs to the new package.
|
|
60
|
+
2. Hide away direct access to ViewGenerator from the consumer. Instead `initializeRsCore(args)` is exposed that has to be used to initialize the core repo. This method internally will initialize the view object.
|
|
61
|
+
3. Broke down `instance` variable and created new internal state of the core library `rsInternal` and exposed `rsProps` and `rsStore` for specific purposes on the internal instance.
|
|
62
|
+
4. Broke `useRepeat` and moved the initialization of `beforeRender`, `afterRender` features and reducers to the core library. Moved `apiContext.fetchData` api call to the core.
|
|
63
|
+
5. Broke `useThunkReducer` and moved the dispatch, state management and queue mechanism to the `StateResolver`. useThunkReducer is still available as it will act as an external store and StateResolver will emit state to the useThunkReducer to trigger state update.
|
|
64
|
+
6. Defined featureProps to the features - `getView, getRsStore, getRsProps, getState, getOriginalState, dispatch, queuedActions` - with each prop serving a specific purpose. Earlier we were using instance variable to store anything and access as well. We are now restricting what is available to the features.
|
|
65
|
+
7. Removed `getComponent()` from the ViewGenerator and ColumnGenerator as it's not core layer's responsibility to render the components. The core layer should only give the value for the cell, formatted value and the context of the cell to the consumer. The consumer can use these available values to render component in any framework of their choice.
|
|
66
|
+
8. Moved generators out of Features folder to a separate folder for the Generators. Created new features `prepareRows` and `prepareColumns` which are inside Features folder.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Development Guidelines:
|
|
71
|
+
|
|
72
|
+
1. RepeatingStructureCore is is a library that is implemented on the `headlessUI` pattern which means the library is only concerned about implementing the business logic, state management and exposing the necessary APIs for the consumers. The consumer is then responsible for creating their own UI using the library. Whenever you implement any features in the core library, think if you are making generic changes and not creating coupling between the view layer and the library.
|
|
73
|
+
2. Don't import any framework specific code in core.
|
|
74
|
+
3. Don't import anything from the RepeatingStructures view layer.
|
|
75
|
+
4. Generators should not have rsCore specific internal methods like rsStore, rsProps etc assigned directly on `this` variable. This will expose the internals of the core library to the consumers. Instead use private properties in JS with #. E.g. `this.#rsProps`
|
|
76
|
+
5. Similarly, anything that is put directly on the Row, Column and View generators using `this` variable becomes part of the library API contract as it will be exposed to outer world. Use private variables in JS to store any local values.
|
|
77
|
+
6. For the Feature files that have an `execute` method, the will receive featureProps from the StateResolver. Use only the featureProps to run the feature files. rsInternal object shouldn't be used.
|
|
78
|
+
7. For the feature files that rely on `pubSub`, rsInternal object can be used since these features are not executed by StateResolver and won't receive the featureProps.
|
|
79
|
+
|
|
80
|
+
---
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Reporting Security Issues
|
|
2
|
+
|
|
3
|
+
Pegasystems takes security seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
|
|
4
|
+
|
|
5
|
+
To report a security issue, [email us](mailto:opensource@pega.com;security@pega.com) and include the word "SECURITY" in the subject line.
|
|
6
|
+
|
|
7
|
+
The Pega team will send a response indicating the next steps in handling your report. We may ask for additional information or guidance.
|
|
8
|
+
|
|
9
|
+
## Learning More About Security
|
|
10
|
+
|
|
11
|
+
To learn more about securing a Pega application or our security capabilities, please see the [security article](https://community.pega.com/knowledgebase/capabilities/security) on Pega Community and the [Pega Trust Center](https://www.pega.com/products/cloud/pega-trust-center).
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { default as initializeRsCore } from './src/core/index';
|
|
2
|
+
export { convertMetaIntoState } from './src/core/features/uIFeatures/beforeRender/stateHydration';
|
|
3
|
+
export { filterParams, typeMap, comparatorMap } from './src/core/config/filterConfig';
|
|
4
|
+
export { getVisibileFields, dateFunctionLabels, getScrollbarWidth, getScrollerElem, getRowContextData, getFilterInitializers, getFilterConditions, isFilterApplied, addFilter, getFilters, removeEmptyValues, isEmpty, normalizeMeta } from './src/core/utils/util';
|
|
5
|
+
export { ACTION_FIELD_TYPE, expandCollapseAllMeta, rowErrorColumnMeta, rowDragDropColumnMeta } from './src/core/constants';
|
|
6
|
+
export declare const UPDATE_DEBUG_INFO: "updateDebugInfo", TOGGLE_DISABLE_SELECTION: "toggleDisableSelection", TOGGLE_REQUIRED: "toggleRequired", NOTIFY_DATA_REFRESH: "notifyDataRefresh", CLEAR_DATA_REFRESH_NOTIFICATION: "clearDataRefreshNotification", USER_CONFIRMATION_ACTION: "userConfirmationAction", SET_IN_EXTERNAL_STATE: "setInExternalState", UPDATE_SELECTED_ROWS: "updateSelectedRows";
|
|
7
|
+
export { getMockColumn } from './src/core/test/junitMocks';
|
|
8
|
+
export { getGroupKey, getGroupFromKey } from './src/core/utils/util';
|
|
9
|
+
export { default as BaseA11y } from './src/core/a11y/BaseA11y';
|
|
10
|
+
export type { RsCoreTypes } from './types';
|
|
11
|
+
export { ROW_DENSITY } from './types/Meta.types';
|
|
12
|
+
export { sanitizeConditionalStyleFormats } from './src/core/features/uIFeatures/beforeRender/stateSanitization';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAG/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAElG,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEtF,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,OAAO,EACP,aAAa,EACd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,eAAO,MACL,iBAAiB,qBACjB,wBAAwB,4BACxB,eAAe,oBACf,mBAAmB,uBACnB,+BAA+B,kCAC/B,wBAAwB,4BACxB,qBAAqB,wBACrB,oBAAoB,sBACP,CAAC;AAEhB,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAE/D,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,+BAA+B,EAAE,MAAM,+DAA+D,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import ActionTypes from './src/core/actions/actionConstants';
|
|
2
|
+
export { default as initializeRsCore } from './src/core/index';
|
|
3
|
+
// FIXME: revisit below exports
|
|
4
|
+
export { convertMetaIntoState } from './src/core/features/uIFeatures/beforeRender/stateHydration';
|
|
5
|
+
export { filterParams, typeMap, comparatorMap } from './src/core/config/filterConfig';
|
|
6
|
+
export { getVisibileFields, dateFunctionLabels, getScrollbarWidth, getScrollerElem, getRowContextData, getFilterInitializers, getFilterConditions, isFilterApplied, addFilter, getFilters, removeEmptyValues, isEmpty, normalizeMeta } from './src/core/utils/util';
|
|
7
|
+
export { ACTION_FIELD_TYPE, expandCollapseAllMeta, rowErrorColumnMeta, rowDragDropColumnMeta } from './src/core/constants';
|
|
8
|
+
export const { UPDATE_DEBUG_INFO, TOGGLE_DISABLE_SELECTION, TOGGLE_REQUIRED, NOTIFY_DATA_REFRESH, CLEAR_DATA_REFRESH_NOTIFICATION, USER_CONFIRMATION_ACTION, SET_IN_EXTERNAL_STATE, UPDATE_SELECTED_ROWS } = ActionTypes;
|
|
9
|
+
export { getMockColumn } from './src/core/test/junitMocks';
|
|
10
|
+
export { getGroupKey, getGroupFromKey } from './src/core/utils/util';
|
|
11
|
+
export { default as BaseA11y } from './src/core/a11y/BaseA11y';
|
|
12
|
+
export { ROW_DENSITY } from './types/Meta.types';
|
|
13
|
+
export { sanitizeConditionalStyleFormats } from './src/core/features/uIFeatures/beforeRender/stateSanitization';
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAE7D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,+BAA+B;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAElG,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEtF,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,OAAO,EACP,aAAa,EACd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,MAAM,CAAC,MAAM,EACX,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,+BAA+B,EAC/B,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACrB,GAAG,WAAW,CAAC;AAEhB,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAI/D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,+BAA+B,EAAE,MAAM,+DAA+D,CAAC","sourcesContent":["import ActionTypes from './src/core/actions/actionConstants';\n\nexport { default as initializeRsCore } from './src/core/index';\n\n// FIXME: revisit below exports\nexport { convertMetaIntoState } from './src/core/features/uIFeatures/beforeRender/stateHydration';\n\nexport { filterParams, typeMap, comparatorMap } from './src/core/config/filterConfig';\n\nexport {\n getVisibileFields,\n dateFunctionLabels,\n getScrollbarWidth,\n getScrollerElem,\n getRowContextData,\n getFilterInitializers,\n getFilterConditions,\n isFilterApplied,\n addFilter,\n getFilters,\n removeEmptyValues,\n isEmpty,\n normalizeMeta\n} from './src/core/utils/util';\n\nexport {\n ACTION_FIELD_TYPE,\n expandCollapseAllMeta,\n rowErrorColumnMeta,\n rowDragDropColumnMeta\n} from './src/core/constants';\nexport const {\n UPDATE_DEBUG_INFO,\n TOGGLE_DISABLE_SELECTION,\n TOGGLE_REQUIRED,\n NOTIFY_DATA_REFRESH,\n CLEAR_DATA_REFRESH_NOTIFICATION,\n USER_CONFIRMATION_ACTION,\n SET_IN_EXTERNAL_STATE,\n UPDATE_SELECTED_ROWS\n} = ActionTypes;\n\nexport { getMockColumn } from './src/core/test/junitMocks';\nexport { getGroupKey, getGroupFromKey } from './src/core/utils/util';\n\nexport { default as BaseA11y } from './src/core/a11y/BaseA11y';\n\nexport type { RsCoreTypes } from './types';\n\nexport { ROW_DENSITY } from './types/Meta.types';\n\nexport { sanitizeConditionalStyleFormats } from './src/core/features/uIFeatures/beforeRender/stateSanitization';\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ApiContext } from '../../types/ApiContext.types';
|
|
2
|
+
import type RsInternal from './RsInternal';
|
|
3
|
+
/**
|
|
4
|
+
* Represents the public interface of the core library.
|
|
5
|
+
* On the initialization of core library, an instance of this class will be returned to the consumer
|
|
6
|
+
* and they can use the available methods to interact with the library.
|
|
7
|
+
*/
|
|
8
|
+
export default class RsCore {
|
|
9
|
+
#private;
|
|
10
|
+
/**
|
|
11
|
+
* Constructs an instance of RsCore.
|
|
12
|
+
* @param rsCoreInternal RsInternal object.
|
|
13
|
+
*/
|
|
14
|
+
constructor(rsCoreInternal: RsInternal);
|
|
15
|
+
/**
|
|
16
|
+
* @param {*} args - args whose reference is changing after initialization of rsCore
|
|
17
|
+
*/
|
|
18
|
+
updateInitArgs(args: {
|
|
19
|
+
apiContext: ApiContext;
|
|
20
|
+
}): void;
|
|
21
|
+
/**
|
|
22
|
+
* Get the latest view object. This object can be used to construct the repeating structure view.
|
|
23
|
+
*/
|
|
24
|
+
getView: () => import("./generators/ViewGenerator").default;
|
|
25
|
+
/**
|
|
26
|
+
* Notify the core library about the view related events. The library will do run some features or do some cleanup based on the events.
|
|
27
|
+
*/
|
|
28
|
+
notifyViewEvent: () => {
|
|
29
|
+
/** Notify when the component has mounted for the first time. */
|
|
30
|
+
mount: () => void;
|
|
31
|
+
/** Notify when the component is unmounting. */
|
|
32
|
+
unmount: () => void;
|
|
33
|
+
/** Notify every time the component has finished rendering. Core library might run some features that need the latest DOM to run. */
|
|
34
|
+
afterRender: () => void;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=RsCore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RsCore.d.ts","sourceRoot":"","sources":["../../../src/core/RsCore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAG3C;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,MAAM;;IAGzB;;;OAGG;gBACS,cAAc,EAAE,UAAU;IAKtC;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE;QAAE,UAAU,EAAE,UAAU,CAAA;KAAE;IAK/C;;OAEG;IACH,OAAO,qDAEL;IAEF;;OAEG;IACH,eAAe;QACb,gEAAgE;;QAIhE,+CAA+C;;QAI/C,oIAAoI;;MAInI;CACJ"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { MOUNT, UNMOUNT, AFTER_RENDER } from './pubSub/events';
|
|
2
|
+
/**
|
|
3
|
+
* Represents the public interface of the core library.
|
|
4
|
+
* On the initialization of core library, an instance of this class will be returned to the consumer
|
|
5
|
+
* and they can use the available methods to interact with the library.
|
|
6
|
+
*/
|
|
7
|
+
export default class RsCore {
|
|
8
|
+
#rsInternal;
|
|
9
|
+
/**
|
|
10
|
+
* Constructs an instance of RsCore.
|
|
11
|
+
* @param rsCoreInternal RsInternal object.
|
|
12
|
+
*/
|
|
13
|
+
constructor(rsCoreInternal) {
|
|
14
|
+
this.#rsInternal = rsCoreInternal;
|
|
15
|
+
}
|
|
16
|
+
// TODO: enrich this to take other args like meta as well
|
|
17
|
+
/**
|
|
18
|
+
* @param {*} args - args whose reference is changing after initialization of rsCore
|
|
19
|
+
*/
|
|
20
|
+
updateInitArgs(args) {
|
|
21
|
+
const { apiContext } = args;
|
|
22
|
+
this.#rsInternal.getRsProps().apiContext = apiContext;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get the latest view object. This object can be used to construct the repeating structure view.
|
|
26
|
+
*/
|
|
27
|
+
getView = () => {
|
|
28
|
+
return this.#rsInternal.getView();
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Notify the core library about the view related events. The library will do run some features or do some cleanup based on the events.
|
|
32
|
+
*/
|
|
33
|
+
notifyViewEvent = () => ({
|
|
34
|
+
/** Notify when the component has mounted for the first time. */
|
|
35
|
+
mount: () => {
|
|
36
|
+
this.#rsInternal.getPubSubUtils().publish(MOUNT);
|
|
37
|
+
},
|
|
38
|
+
/** Notify when the component is unmounting. */
|
|
39
|
+
unmount: () => {
|
|
40
|
+
this.#rsInternal.getPubSubUtils().publish(UNMOUNT);
|
|
41
|
+
},
|
|
42
|
+
/** Notify every time the component has finished rendering. Core library might run some features that need the latest DOM to run. */
|
|
43
|
+
afterRender: () => {
|
|
44
|
+
this.#rsInternal.getPubSubUtils().publish(AFTER_RENDER);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=RsCore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RsCore.js","sourceRoot":"","sources":["../../../src/core/RsCore.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,WAAW,CAAa;IAExB;;;OAGG;IACH,YAAY,cAA0B;QACpC,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC;IACpC,CAAC;IAED,yDAAyD;IACzD;;OAEG;IACH,cAAc,CAAC,IAAgC;QAC7C,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,UAAU,GAAG,UAAU,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,OAAO,GAAG,GAAG,EAAE;QACb,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;IACpC,CAAC,CAAC;IAEF;;OAEG;IACH,eAAe,GAAG,GAAG,EAAE,CAAC,CAAC;QACvB,gEAAgE;QAChE,KAAK,EAAE,GAAG,EAAE;YACV,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnD,CAAC;QACD,+CAA+C;QAC/C,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACrD,CAAC;QACD,oIAAoI;QACpI,WAAW,EAAE,GAAG,EAAE;YAChB,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC1D,CAAC;KACF,CAAC,CAAC;CACJ","sourcesContent":["import type { ApiContext } from '../../types/ApiContext.types';\n\nimport type RsInternal from './RsInternal';\nimport { MOUNT, UNMOUNT, AFTER_RENDER } from './pubSub/events';\n\n/**\n * Represents the public interface of the core library.\n * On the initialization of core library, an instance of this class will be returned to the consumer\n * and they can use the available methods to interact with the library.\n */\nexport default class RsCore {\n #rsInternal: RsInternal;\n\n /**\n * Constructs an instance of RsCore.\n * @param rsCoreInternal RsInternal object.\n */\n constructor(rsCoreInternal: RsInternal) {\n this.#rsInternal = rsCoreInternal;\n }\n\n // TODO: enrich this to take other args like meta as well\n /**\n * @param {*} args - args whose reference is changing after initialization of rsCore\n */\n updateInitArgs(args: { apiContext: ApiContext }) {\n const { apiContext } = args;\n this.#rsInternal.getRsProps().apiContext = apiContext;\n }\n\n /**\n * Get the latest view object. This object can be used to construct the repeating structure view.\n */\n getView = () => {\n return this.#rsInternal.getView();\n };\n\n /**\n * Notify the core library about the view related events. The library will do run some features or do some cleanup based on the events.\n */\n notifyViewEvent = () => ({\n /** Notify when the component has mounted for the first time. */\n mount: () => {\n this.#rsInternal.getPubSubUtils().publish(MOUNT);\n },\n /** Notify when the component is unmounting. */\n unmount: () => {\n this.#rsInternal.getPubSubUtils().publish(UNMOUNT);\n },\n /** Notify every time the component has finished rendering. Core library might run some features that need the latest DOM to run. */\n afterRender: () => {\n this.#rsInternal.getPubSubUtils().publish(AFTER_RENDER);\n }\n });\n}\n"]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type View from './generators/ViewGenerator';
|
|
2
|
+
import type StateResolver from './StateResolver';
|
|
3
|
+
import type RsStore from './RsStore';
|
|
4
|
+
import type RsProps from './RsProps';
|
|
5
|
+
type SubscriberCallback = () => void;
|
|
6
|
+
type Subscribers = {
|
|
7
|
+
[eventName: string]: SubscriberCallback[];
|
|
8
|
+
};
|
|
9
|
+
type PubSubUtils = {
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @param eventName - A unique event name that needs to be published
|
|
13
|
+
* @param args - Any optional extra arguments of type functions to be passed to subscriber callbacks.
|
|
14
|
+
* @returns void
|
|
15
|
+
*/
|
|
16
|
+
publish: (eventName: string, ...args: (() => void)[]) => void;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param eventName eventName - A unique event name which needs to be subscribed.
|
|
20
|
+
* @param callback Any optional extra arguments of type functions passed by publisher.
|
|
21
|
+
* @returns - an unsubscribe callback.
|
|
22
|
+
*/
|
|
23
|
+
subscribe: (eventName: string, callback: () => void) => {
|
|
24
|
+
unsubscribe: () => void;
|
|
25
|
+
} | undefined;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Represents the internal state of the core library.
|
|
29
|
+
* The building blocks like features, state resolver, reducers will receive getter methods for properties from this class.
|
|
30
|
+
*/
|
|
31
|
+
export default class RsInternal {
|
|
32
|
+
#private;
|
|
33
|
+
/** A unique identifier */
|
|
34
|
+
id: string;
|
|
35
|
+
constructor();
|
|
36
|
+
/** Returns the uuid for the rsInternal instance. */
|
|
37
|
+
getRsID(): string;
|
|
38
|
+
/** Get the latest view object */
|
|
39
|
+
getView: () => View;
|
|
40
|
+
/** Update the newly generated view on the internal state and attach additional methods and callback to the view. */
|
|
41
|
+
updateView: (latestView: View) => void;
|
|
42
|
+
setRsStore: (rsStore: RsStore) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Get the rsStore object that can be used to store properties which are not supposed to trigger state change,
|
|
45
|
+
* references or any intermediate values that the features might need.
|
|
46
|
+
*
|
|
47
|
+
* @returns reference to rsStore object
|
|
48
|
+
*/
|
|
49
|
+
getRsStore: () => RsStore;
|
|
50
|
+
setRsProps: (rsProps: RsProps) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Get the rsProps object that is used to store readOnly props like apiContext, formatters etc.
|
|
53
|
+
*
|
|
54
|
+
* @returns reference to rsProps object
|
|
55
|
+
*/
|
|
56
|
+
getRsProps: () => RsProps;
|
|
57
|
+
setPubSubUtils: (pubSubUtils: PubSubUtils) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Returns the pubSub utility methods that can be used to publish/subscribe to events like MOUNT, BEFORE_FETCH, AFTER_FETCH etc.
|
|
60
|
+
*
|
|
61
|
+
* @returns pubSub utils
|
|
62
|
+
*/
|
|
63
|
+
getPubSubUtils: () => PubSubUtils;
|
|
64
|
+
setAfterRenderFeatures: (afterRenderFeatures: () => void) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Returns the array of features like autosize that will run after the rendering has completed.
|
|
67
|
+
*
|
|
68
|
+
* @returns afterRender features
|
|
69
|
+
*/
|
|
70
|
+
getAfterRenderFeatures: () => (() => void);
|
|
71
|
+
setSubscribers: (subscribers: Subscribers) => void;
|
|
72
|
+
/**
|
|
73
|
+
* Returns the list of subscribers for respective events.
|
|
74
|
+
* @returns - {@link Subscribers}
|
|
75
|
+
*/
|
|
76
|
+
getSubscribers: () => Subscribers;
|
|
77
|
+
setRsStateResolver: (rsStateResolver: StateResolver) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Returns the instance of StateResolver.
|
|
80
|
+
* @returns rsStateResolver instance
|
|
81
|
+
*/
|
|
82
|
+
getRsStateResolver: () => StateResolver;
|
|
83
|
+
}
|
|
84
|
+
export {};
|
|
85
|
+
//# sourceMappingURL=RsInternal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RsInternal.d.ts","sourceRoot":"","sources":["../../../src/core/RsInternal.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,KAAK,kBAAkB,GAAG,MAAM,IAAI,CAAC;AACrC,KAAK,WAAW,GAAG;IACjB,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAAC;CAC3C,CAAC;AACF,KAAK,WAAW,GAAG;IACjB;;;;;OAKG;IACH,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC;IAC9D;;;;;OAKG;IACH,SAAS,EAAE,CACT,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,IAAI,KAElB;QACE,WAAW,EAAE,MAAM,IAAI,CAAC;KACzB,GACD,SAAS,CAAC;CACf,CAAC;AACF;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;;IAgB7B,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAC;;IAOX,oDAAoD;IACpD,OAAO;IAIP,iCAAiC;IACjC,OAAO,aAEL;IAEF,oHAAoH;IACpH,UAAU,eAAgB,IAAI,UAI5B;IAEF,UAAU,YAAa,OAAO,UAE5B;IAEF;;;;;OAKG;IACH,UAAU,QAAO,OAAO,CAEtB;IAEF,UAAU,YAAa,OAAO,UAE5B;IAEF;;;;OAIG;IACH,UAAU,QAAO,OAAO,CAEtB;IAEF,cAAc,gBAAiB,WAAW,UAExC;IAEF;;;;OAIG;IACH,cAAc,QAAO,WAAW,CAE9B;IAEF,sBAAsB,wBAAyB,MAAM,IAAI,UAEvD;IAEF;;;;OAIG;IACH,sBAAsB,QAAO,CAAC,MAAM,IAAI,CAAC,CAEvC;IAEF,cAAc,gBAAiB,WAAW,UAExC;IAEF;;;OAGG;IACH,cAAc,QAAO,WAAW,CAE9B;IAEF,kBAAkB,oBAAqB,aAAa,UAElD;IAEF;;;OAGG;IACH,kBAAkB,sBAEhB;CACH"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { v4 as uuidV4 } from 'uuid';
|
|
2
|
+
import viewUtilityMethods from './generators/viewUtilityMethods';
|
|
3
|
+
/**
|
|
4
|
+
* Represents the internal state of the core library.
|
|
5
|
+
* The building blocks like features, state resolver, reducers will receive getter methods for properties from this class.
|
|
6
|
+
*/
|
|
7
|
+
export default class RsInternal {
|
|
8
|
+
#rsStore = {};
|
|
9
|
+
#rsProps = {};
|
|
10
|
+
#view;
|
|
11
|
+
#subscribers = {};
|
|
12
|
+
#pubSubUtils;
|
|
13
|
+
#rsStateResolver;
|
|
14
|
+
#afterRenderFeatures;
|
|
15
|
+
/** A set of utility functions avaliable on view using view.type */
|
|
16
|
+
#viewUtilityMethods;
|
|
17
|
+
/** A unique identifier */
|
|
18
|
+
id;
|
|
19
|
+
constructor() {
|
|
20
|
+
this.id = uuidV4();
|
|
21
|
+
// TODO: check we have a better way to initialize the util methods on the view
|
|
22
|
+
this.#viewUtilityMethods = viewUtilityMethods(this);
|
|
23
|
+
}
|
|
24
|
+
/** Returns the uuid for the rsInternal instance. */
|
|
25
|
+
getRsID() {
|
|
26
|
+
return this.id;
|
|
27
|
+
}
|
|
28
|
+
/** Get the latest view object */
|
|
29
|
+
getView = () => {
|
|
30
|
+
return this.#view;
|
|
31
|
+
};
|
|
32
|
+
/** Update the newly generated view on the internal state and attach additional methods and callback to the view. */
|
|
33
|
+
updateView = (latestView) => {
|
|
34
|
+
this.#view = latestView;
|
|
35
|
+
this.#view.addUtilityFunctions(this.#viewUtilityMethods);
|
|
36
|
+
this.#view.setViewUpdateCallback(this.updateView);
|
|
37
|
+
};
|
|
38
|
+
setRsStore = (rsStore) => {
|
|
39
|
+
this.#rsStore = rsStore;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Get the rsStore object that can be used to store properties which are not supposed to trigger state change,
|
|
43
|
+
* references or any intermediate values that the features might need.
|
|
44
|
+
*
|
|
45
|
+
* @returns reference to rsStore object
|
|
46
|
+
*/
|
|
47
|
+
getRsStore = () => {
|
|
48
|
+
return this.#rsStore;
|
|
49
|
+
};
|
|
50
|
+
setRsProps = (rsProps) => {
|
|
51
|
+
this.#rsProps = rsProps;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Get the rsProps object that is used to store readOnly props like apiContext, formatters etc.
|
|
55
|
+
*
|
|
56
|
+
* @returns reference to rsProps object
|
|
57
|
+
*/
|
|
58
|
+
getRsProps = () => {
|
|
59
|
+
return this.#rsProps;
|
|
60
|
+
};
|
|
61
|
+
setPubSubUtils = (pubSubUtils) => {
|
|
62
|
+
this.#pubSubUtils = pubSubUtils;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Returns the pubSub utility methods that can be used to publish/subscribe to events like MOUNT, BEFORE_FETCH, AFTER_FETCH etc.
|
|
66
|
+
*
|
|
67
|
+
* @returns pubSub utils
|
|
68
|
+
*/
|
|
69
|
+
getPubSubUtils = () => {
|
|
70
|
+
return this.#pubSubUtils;
|
|
71
|
+
};
|
|
72
|
+
setAfterRenderFeatures = (afterRenderFeatures) => {
|
|
73
|
+
this.#afterRenderFeatures = afterRenderFeatures;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Returns the array of features like autosize that will run after the rendering has completed.
|
|
77
|
+
*
|
|
78
|
+
* @returns afterRender features
|
|
79
|
+
*/
|
|
80
|
+
getAfterRenderFeatures = () => {
|
|
81
|
+
return this.#afterRenderFeatures;
|
|
82
|
+
};
|
|
83
|
+
setSubscribers = (subscribers) => {
|
|
84
|
+
this.#subscribers = subscribers;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Returns the list of subscribers for respective events.
|
|
88
|
+
* @returns - {@link Subscribers}
|
|
89
|
+
*/
|
|
90
|
+
getSubscribers = () => {
|
|
91
|
+
return this.#subscribers;
|
|
92
|
+
};
|
|
93
|
+
setRsStateResolver = (rsStateResolver) => {
|
|
94
|
+
this.#rsStateResolver = rsStateResolver;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Returns the instance of StateResolver.
|
|
98
|
+
* @returns rsStateResolver instance
|
|
99
|
+
*/
|
|
100
|
+
getRsStateResolver = () => {
|
|
101
|
+
return this.#rsStateResolver;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=RsInternal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RsInternal.js","sourceRoot":"","sources":["../../../src/core/RsInternal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAGpC,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AAiCjE;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,QAAQ,GAAG,EAAa,CAAC;IAEzB,QAAQ,GAAG,EAAa,CAAC;IAEzB,KAAK,CAAQ;IAEb,YAAY,GAAgB,EAAE,CAAC;IAE/B,YAAY,CAAe;IAE3B,gBAAgB,CAAiB;IAEjC,oBAAoB,CAAc;IAClC,mEAAmE;IACnE,mBAAmB,CAAmB;IACtC,0BAA0B;IAC1B,EAAE,CAAS;IACX;QACE,IAAI,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC;QACnB,8EAA8E;QAC9E,IAAI,CAAC,mBAAmB,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IAED,oDAAoD;IACpD,OAAO;QACL,OAAO,IAAI,CAAC,EAAE,CAAC;IACjB,CAAC;IAED,iCAAiC;IACjC,OAAO,GAAG,GAAG,EAAE;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC,CAAC;IAEF,oHAAoH;IACpH,UAAU,GAAG,CAAC,UAAgB,EAAE,EAAE;QAChC,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC;QACxB,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QACzD,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpD,CAAC,CAAC;IAEF,UAAU,GAAG,CAAC,OAAgB,EAAE,EAAE;QAChC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC,CAAC;IAEF;;;;;OAKG;IACH,UAAU,GAAG,GAAY,EAAE;QACzB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC,CAAC;IAEF,UAAU,GAAG,CAAC,OAAgB,EAAE,EAAE;QAChC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC,CAAC;IAEF;;;;OAIG;IACH,UAAU,GAAG,GAAY,EAAE;QACzB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC,CAAC;IAEF,cAAc,GAAG,CAAC,WAAwB,EAAE,EAAE;QAC5C,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IAClC,CAAC,CAAC;IAEF;;;;OAIG;IACH,cAAc,GAAG,GAAgB,EAAE;QACjC,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC,CAAC;IAEF,sBAAsB,GAAG,CAAC,mBAA+B,EAAE,EAAE;QAC3D,IAAI,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;IAClD,CAAC,CAAC;IAEF;;;;OAIG;IACH,sBAAsB,GAAG,GAAiB,EAAE;QAC1C,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACnC,CAAC,CAAC;IAEF,cAAc,GAAG,CAAC,WAAwB,EAAE,EAAE;QAC5C,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IAClC,CAAC,CAAC;IAEF;;;OAGG;IACH,cAAc,GAAG,GAAgB,EAAE;QACjC,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC,CAAC;IAEF,kBAAkB,GAAG,CAAC,eAA8B,EAAE,EAAE;QACtD,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;IAC1C,CAAC,CAAC;IAEF;;;OAGG;IACH,kBAAkB,GAAG,GAAG,EAAE;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC,CAAC;CACH","sourcesContent":["import { v4 as uuidV4 } from 'uuid';\n\nimport type { UtilityFunctions } from './generators/viewUtilityMethods';\nimport viewUtilityMethods from './generators/viewUtilityMethods';\nimport type View from './generators/ViewGenerator';\nimport type StateResolver from './StateResolver';\nimport type RsStore from './RsStore';\nimport type RsProps from './RsProps';\n\ntype SubscriberCallback = () => void;\ntype Subscribers = {\n [eventName: string]: SubscriberCallback[];\n};\ntype PubSubUtils = {\n /**\n *\n * @param eventName - A unique event name that needs to be published\n * @param args - Any optional extra arguments of type functions to be passed to subscriber callbacks.\n * @returns void\n */\n publish: (eventName: string, ...args: (() => void)[]) => void;\n /**\n *\n * @param eventName eventName - A unique event name which needs to be subscribed.\n * @param callback Any optional extra arguments of type functions passed by publisher.\n * @returns - an unsubscribe callback.\n */\n subscribe: (\n eventName: string,\n callback: () => void\n ) =>\n | {\n unsubscribe: () => void;\n }\n | undefined;\n};\n/**\n * Represents the internal state of the core library.\n * The building blocks like features, state resolver, reducers will receive getter methods for properties from this class.\n */\nexport default class RsInternal {\n #rsStore = {} as RsStore;\n\n #rsProps = {} as RsProps;\n\n #view!: View;\n\n #subscribers: Subscribers = {};\n\n #pubSubUtils!: PubSubUtils;\n\n #rsStateResolver!: StateResolver;\n\n #afterRenderFeatures!: () => void;\n /** A set of utility functions avaliable on view using view.type */\n #viewUtilityMethods: UtilityFunctions;\n /** A unique identifier */\n id: string;\n constructor() {\n this.id = uuidV4();\n // TODO: check we have a better way to initialize the util methods on the view\n this.#viewUtilityMethods = viewUtilityMethods(this);\n }\n\n /** Returns the uuid for the rsInternal instance. */\n getRsID() {\n return this.id;\n }\n\n /** Get the latest view object */\n getView = () => {\n return this.#view;\n };\n\n /** Update the newly generated view on the internal state and attach additional methods and callback to the view. */\n updateView = (latestView: View) => {\n this.#view = latestView;\n this.#view.addUtilityFunctions(this.#viewUtilityMethods);\n this.#view.setViewUpdateCallback(this.updateView);\n };\n\n setRsStore = (rsStore: RsStore) => {\n this.#rsStore = rsStore;\n };\n\n /**\n * Get the rsStore object that can be used to store properties which are not supposed to trigger state change,\n * references or any intermediate values that the features might need.\n *\n * @returns reference to rsStore object\n */\n getRsStore = (): RsStore => {\n return this.#rsStore;\n };\n\n setRsProps = (rsProps: RsProps) => {\n this.#rsProps = rsProps;\n };\n\n /**\n * Get the rsProps object that is used to store readOnly props like apiContext, formatters etc.\n *\n * @returns reference to rsProps object\n */\n getRsProps = (): RsProps => {\n return this.#rsProps;\n };\n\n setPubSubUtils = (pubSubUtils: PubSubUtils) => {\n this.#pubSubUtils = pubSubUtils;\n };\n\n /**\n * Returns the pubSub utility methods that can be used to publish/subscribe to events like MOUNT, BEFORE_FETCH, AFTER_FETCH etc.\n *\n * @returns pubSub utils\n */\n getPubSubUtils = (): PubSubUtils => {\n return this.#pubSubUtils;\n };\n\n setAfterRenderFeatures = (afterRenderFeatures: () => void) => {\n this.#afterRenderFeatures = afterRenderFeatures;\n };\n\n /**\n * Returns the array of features like autosize that will run after the rendering has completed.\n *\n * @returns afterRender features\n */\n getAfterRenderFeatures = (): (() => void) => {\n return this.#afterRenderFeatures;\n };\n\n setSubscribers = (subscribers: Subscribers) => {\n this.#subscribers = subscribers;\n };\n\n /**\n * Returns the list of subscribers for respective events.\n * @returns - {@link Subscribers}\n */\n getSubscribers = (): Subscribers => {\n return this.#subscribers;\n };\n\n setRsStateResolver = (rsStateResolver: StateResolver) => {\n this.#rsStateResolver = rsStateResolver;\n };\n\n /**\n * Returns the instance of StateResolver.\n * @returns rsStateResolver instance\n */\n getRsStateResolver = () => {\n return this.#rsStateResolver;\n };\n}\n"]}
|