@pega/lists-core 9.0.0-build.9.9 → 9.0.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/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -2
- package/lib/index.js.map +1 -1
- package/lib/src/core/RsCore.d.ts +1 -1
- package/lib/src/core/RsCore.js +1 -1
- package/lib/src/core/RsCore.js.map +1 -1
- package/lib/src/core/RsInternal.d.ts +23 -0
- package/lib/src/core/RsInternal.d.ts.map +1 -1
- package/lib/src/core/RsInternal.js +18 -2
- package/lib/src/core/RsInternal.js.map +1 -1
- package/lib/src/core/RsProps.d.ts +0 -7
- package/lib/src/core/RsProps.d.ts.map +1 -1
- package/lib/src/core/RsProps.js +0 -7
- package/lib/src/core/RsProps.js.map +1 -1
- package/lib/src/core/RsStore.d.ts +5 -1
- package/lib/src/core/RsStore.d.ts.map +1 -1
- package/lib/src/core/RsStore.js +12 -0
- package/lib/src/core/RsStore.js.map +1 -1
- package/lib/src/core/StateResolver.d.ts +0 -1
- package/lib/src/core/StateResolver.d.ts.map +1 -1
- package/lib/src/core/StateResolver.js +19 -9
- package/lib/src/core/StateResolver.js.map +1 -1
- package/lib/src/core/a11y/BaseA11y.d.ts +25 -6
- package/lib/src/core/a11y/BaseA11y.d.ts.map +1 -1
- package/lib/src/core/a11y/BaseA11y.js +39 -8
- package/lib/src/core/a11y/BaseA11y.js.map +1 -1
- package/lib/src/core/actions/actionConstants.d.ts +7 -4
- package/lib/src/core/actions/actionConstants.d.ts.map +1 -1
- package/lib/src/core/actions/actionConstants.js +8 -5
- package/lib/src/core/actions/actionConstants.js.map +1 -1
- package/lib/src/core/actions/actions.d.ts +35 -34
- package/lib/src/core/actions/actions.d.ts.map +1 -1
- package/lib/src/core/actions/actions.js +47 -40
- package/lib/src/core/actions/actions.js.map +1 -1
- package/lib/src/core/actions/actions.types.d.ts +34 -27
- package/lib/src/core/actions/actions.types.d.ts.map +1 -1
- package/lib/src/core/actions/actions.types.js.map +1 -1
- package/lib/src/core/config/config.d.ts +1 -1
- package/lib/src/core/config/config.d.ts.map +1 -1
- package/lib/src/core/config/config.js +5 -2
- package/lib/src/core/config/config.js.map +1 -1
- package/lib/src/core/constants.d.ts +4 -0
- package/lib/src/core/constants.d.ts.map +1 -1
- package/lib/src/core/constants.js +22 -5
- package/lib/src/core/constants.js.map +1 -1
- package/lib/src/core/defaultTranslations.d.ts +6 -1
- package/lib/src/core/defaultTranslations.d.ts.map +1 -1
- package/lib/src/core/defaultTranslations.js +6 -1
- package/lib/src/core/defaultTranslations.js.map +1 -1
- package/lib/src/core/features/featureFactory.d.ts +6 -2
- package/lib/src/core/features/featureFactory.d.ts.map +1 -1
- package/lib/src/core/features/featureFactory.js +9 -8
- package/lib/src/core/features/featureFactory.js.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/animation.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/animation.js +11 -2
- package/lib/src/core/features/uIFeatures/afterRender/animation.js.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.d.ts +2 -16
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.js +48 -89
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/autoSize.js.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.d.ts +3 -4
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js +83 -45
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/customizeParentContainer/index.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/customizeParentContainer/index.js +2 -2
- package/lib/src/core/features/uIFeatures/afterRender/customizeParentContainer/index.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeight.d.ts +4 -1
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeight.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeight.js +15 -14
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeight.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeightToFitRecords.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeightToFitRecords.js +10 -2
- package/lib/src/core/features/uIFeatures/beforeRender/adjustHeightToFitRecords.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/aggregation.d.ts +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/aggregation.js +2 -2
- package/lib/src/core/features/uIFeatures/beforeRender/aggregation.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/animation.d.ts +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/animation.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/animation.js +5 -4
- package/lib/src/core/features/uIFeatures/beforeRender/animation.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.d.ts +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.js +2 -2
- package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/changePersonalisation.js +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/changePersonalisation.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/changeTemplate.d.ts +13 -0
- package/lib/src/core/features/uIFeatures/beforeRender/changeTemplate.d.ts.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/changeTemplate.js +40 -0
- package/lib/src/core/features/uIFeatures/beforeRender/changeTemplate.js.map +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnAlias.d.ts +2 -0
- package/lib/src/core/features/uIFeatures/beforeRender/columnAlias.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnAlias.js +14 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnAlias.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnFormatter.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnFormatter.js +7 -5
- package/lib/src/core/features/uIFeatures/beforeRender/columnFormatter.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnOrder.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnOrder.js +13 -5
- package/lib/src/core/features/uIFeatures/beforeRender/columnOrder.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.d.ts +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.js +20 -17
- package/lib/src/core/features/uIFeatures/beforeRender/columnReOrder.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.d.ts +2 -4
- package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.js +61 -40
- package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnSort.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnSort.js +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnSort.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnToggle.d.ts +2 -2
- package/lib/src/core/features/uIFeatures/beforeRender/columnToggle.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnToggle.js +10 -5
- package/lib/src/core/features/uIFeatures/beforeRender/columnToggle.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnVisualOrder.d.ts +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/columnVisualOrder.js +4 -4
- package/lib/src/core/features/uIFeatures/beforeRender/columnVisualOrder.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/conditionalStyleFormat.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/conditionalStyleFormat.js +9 -8
- package/lib/src/core/features/uIFeatures/beforeRender/conditionalStyleFormat.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/customColumn.d.ts +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/customColumn.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/customColumn.js +22 -8
- package/lib/src/core/features/uIFeatures/beforeRender/customColumn.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/errorColumn.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/errorColumn.js +9 -6
- package/lib/src/core/features/uIFeatures/beforeRender/errorColumn.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/filter.d.ts +1 -0
- package/lib/src/core/features/uIFeatures/beforeRender/filter.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/filter.js +13 -3
- package/lib/src/core/features/uIFeatures/beforeRender/filter.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/freeze.d.ts +2 -2
- package/lib/src/core/features/uIFeatures/beforeRender/freeze.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/freeze.js +14 -9
- package/lib/src/core/features/uIFeatures/beforeRender/freeze.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/grouping.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/grouping.js +23 -24
- package/lib/src/core/features/uIFeatures/beforeRender/grouping.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.d.ts +32 -1
- package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.js +128 -32
- package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/prepareRows.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/prepareRows.js +4 -4
- package/lib/src/core/features/uIFeatures/beforeRender/prepareRows.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.js +14 -10
- package/lib/src/core/features/uIFeatures/beforeRender/rowDragDrop.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.d.ts +16 -4
- package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.js +124 -72
- package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.d.ts +2 -2
- package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.js +116 -37
- package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.js.map +1 -1
- package/lib/src/core/features/uIFeatures/index.d.ts +2 -3
- package/lib/src/core/features/uIFeatures/index.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/index.js +2 -4
- package/lib/src/core/features/uIFeatures/index.js.map +1 -1
- package/lib/src/core/generators/ColumnGenerator.d.ts +15 -21
- package/lib/src/core/generators/ColumnGenerator.d.ts.map +1 -1
- package/lib/src/core/generators/ColumnGenerator.js +32 -95
- package/lib/src/core/generators/ColumnGenerator.js.map +1 -1
- package/lib/src/core/generators/ColumnGenerator.types.d.ts +16 -13
- package/lib/src/core/generators/ColumnGenerator.types.d.ts.map +1 -1
- package/lib/src/core/generators/ColumnGenerator.types.js.map +1 -1
- package/lib/src/core/generators/GroupGenerator.d.ts +5 -1
- package/lib/src/core/generators/GroupGenerator.d.ts.map +1 -1
- package/lib/src/core/generators/GroupGenerator.js +20 -0
- package/lib/src/core/generators/GroupGenerator.js.map +1 -1
- package/lib/src/core/generators/RowGenerator.d.ts +2 -2
- package/lib/src/core/generators/RowGenerator.d.ts.map +1 -1
- package/lib/src/core/generators/RowGenerator.js +3 -4
- package/lib/src/core/generators/RowGenerator.js.map +1 -1
- package/lib/src/core/generators/RowGenerator.types.d.ts +2 -1
- package/lib/src/core/generators/RowGenerator.types.d.ts.map +1 -1
- package/lib/src/core/generators/RowGenerator.types.js.map +1 -1
- package/lib/src/core/generators/ViewGenerator.d.ts +42 -28
- package/lib/src/core/generators/ViewGenerator.d.ts.map +1 -1
- package/lib/src/core/generators/ViewGenerator.js +101 -61
- package/lib/src/core/generators/ViewGenerator.js.map +1 -1
- package/lib/src/core/generators/ViewGenerator.types.d.ts +13 -1
- package/lib/src/core/generators/ViewGenerator.types.d.ts.map +1 -1
- package/lib/src/core/generators/ViewGenerator.types.js.map +1 -1
- package/lib/src/core/generators/__tests__/viewUtilityMockSetup.d.ts +3 -0
- package/lib/src/core/generators/__tests__/viewUtilityMockSetup.d.ts.map +1 -1
- package/lib/src/core/generators/viewUtilityMethods.d.ts +23 -10
- package/lib/src/core/generators/viewUtilityMethods.d.ts.map +1 -1
- package/lib/src/core/generators/viewUtilityMethods.js +50 -11
- package/lib/src/core/generators/viewUtilityMethods.js.map +1 -1
- package/lib/src/core/index.d.ts.map +1 -1
- package/lib/src/core/index.js +1 -2
- package/lib/src/core/index.js.map +1 -1
- package/lib/src/core/reducers/changeTemplate.d.ts +5 -0
- package/lib/src/core/reducers/changeTemplate.d.ts.map +1 -0
- package/lib/src/core/reducers/changeTemplate.js +14 -0
- package/lib/src/core/reducers/changeTemplate.js.map +1 -0
- package/lib/src/core/reducers/dragDrop.d.ts.map +1 -1
- package/lib/src/core/reducers/dragDrop.js +5 -4
- package/lib/src/core/reducers/dragDrop.js.map +1 -1
- package/lib/src/core/reducers/error.d.ts +8 -4
- package/lib/src/core/reducers/error.d.ts.map +1 -1
- package/lib/src/core/reducers/{edit.d.ts → galleryView.d.ts} +1 -1
- package/lib/src/core/reducers/galleryView.d.ts.map +1 -0
- package/lib/src/core/reducers/galleryView.js +11 -0
- package/lib/src/core/reducers/galleryView.js.map +1 -0
- package/lib/src/core/reducers/grouping.d.ts.map +1 -1
- package/lib/src/core/reducers/grouping.js +7 -0
- package/lib/src/core/reducers/grouping.js.map +1 -1
- package/lib/src/core/reducers/index.d.ts +8 -4
- package/lib/src/core/reducers/index.d.ts.map +1 -1
- package/lib/src/core/reducers/index.js +5 -3
- package/lib/src/core/reducers/index.js.map +1 -1
- package/lib/src/core/reducers/personalizationDirtyReducer.d.ts.map +1 -1
- package/lib/src/core/reducers/personalizationDirtyReducer.js +8 -4
- package/lib/src/core/reducers/personalizationDirtyReducer.js.map +1 -1
- package/lib/src/core/reducers/personalizationReducer.d.ts +3 -2
- package/lib/src/core/reducers/personalizationReducer.d.ts.map +1 -1
- package/lib/src/core/reducers/personalizationReducer.js +12 -4
- package/lib/src/core/reducers/personalizationReducer.js.map +1 -1
- package/lib/src/core/reducers/renderFormatter.d.ts.map +1 -1
- package/lib/src/core/reducers/renderFormatter.js +13 -3
- package/lib/src/core/reducers/renderFormatter.js.map +1 -1
- package/lib/src/core/reducers/rowSelect.d.ts.map +1 -1
- package/lib/src/core/reducers/rowSelect.js +0 -8
- package/lib/src/core/reducers/rowSelect.js.map +1 -1
- package/lib/src/core/reducers/versioning/index.d.ts +1 -1
- package/lib/src/core/reducers/versioning/index.d.ts.map +1 -1
- package/lib/src/core/reducers/versioning/index.js +1 -1
- package/lib/src/core/reducers/versioning/index.js.map +1 -1
- package/lib/src/core/reducers/visibility.d.ts +2 -1
- package/lib/src/core/reducers/visibility.d.ts.map +1 -1
- package/lib/src/core/reducers/visibility.js +69 -19
- package/lib/src/core/reducers/visibility.js.map +1 -1
- package/lib/src/core/test/junitMocks.d.ts +1322 -0
- package/lib/src/core/test/junitMocks.d.ts.map +1 -1
- package/lib/src/core/test/junitMocks.js +32 -51
- package/lib/src/core/test/junitMocks.js.map +1 -1
- package/lib/src/core/utils/condition-utils.d.ts +1 -1
- package/lib/src/core/utils/condition-utils.d.ts.map +1 -1
- package/lib/src/core/utils/condition-utils.js +5 -3
- package/lib/src/core/utils/condition-utils.js.map +1 -1
- package/lib/src/core/utils/util.d.ts +58 -9
- package/lib/src/core/utils/util.d.ts.map +1 -1
- package/lib/src/core/utils/util.js +151 -18
- package/lib/src/core/utils/util.js.map +1 -1
- package/lib/types/ApiContext.types.d.ts +69 -7
- package/lib/types/ApiContext.types.d.ts.map +1 -1
- package/lib/types/ApiContext.types.js.map +1 -1
- package/lib/types/Meta.types.d.ts +153 -11
- package/lib/types/Meta.types.d.ts.map +1 -1
- package/lib/types/Meta.types.js +7 -1
- package/lib/types/Meta.types.js.map +1 -1
- package/lib/types/RsCoreBootArgs.types.d.ts +11 -13
- package/lib/types/RsCoreBootArgs.types.d.ts.map +1 -1
- package/lib/types/RsCoreBootArgs.types.js.map +1 -1
- package/lib/types/State.types.d.ts +32 -30
- package/lib/types/State.types.d.ts.map +1 -1
- package/lib/types/State.types.js.map +1 -1
- package/lib/types.d.ts +10 -2
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +6 -8
- package/lib/src/core/features/uIFeatures/beforeRender/edit.d.ts +0 -12
- package/lib/src/core/features/uIFeatures/beforeRender/edit.d.ts.map +0 -1
- package/lib/src/core/features/uIFeatures/beforeRender/edit.js +0 -94
- package/lib/src/core/features/uIFeatures/beforeRender/edit.js.map +0 -1
- package/lib/src/core/features/uIFeatures/beforeRender/toggleSelectAllCheckbox.d.ts +0 -12
- package/lib/src/core/features/uIFeatures/beforeRender/toggleSelectAllCheckbox.d.ts.map +0 -1
- package/lib/src/core/features/uIFeatures/beforeRender/toggleSelectAllCheckbox.js +0 -51
- package/lib/src/core/features/uIFeatures/beforeRender/toggleSelectAllCheckbox.js.map +0 -1
- package/lib/src/core/reducers/edit.d.ts.map +0 -1
- package/lib/src/core/reducers/edit.js +0 -65
- package/lib/src/core/reducers/edit.js.map +0 -1
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"","sourcesContent":["import type RsCoreClass from './src/core/RsCore';\nimport type { ApiContext as ApiContextType, RsApi as RsApiType } from './types/ApiContext.types';\nimport type {
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"","sourcesContent":["import type RsCoreClass from './src/core/RsCore';\nimport type { ApiContext as ApiContextType, RsApi as RsApiType } from './types/ApiContext.types';\nimport type {\n Meta as MetaType,\n ActionConfig as ActionConfigType,\n FieldDef as FieldDefType,\n HeroImagePlacement as HeroImagePlacementType,\n FieldReference as FieldReferenceType,\n ConstantValue as ConstantValueType,\n HeroImage as HeroImageType\n} from './types/Meta.types';\nimport type {\n State as StateType,\n Group as GroupType,\n PersonalizedState as PersonalizedStateType,\n Errors as StateErrors,\n GroupAdditionalField as GroupAdditionalFieldType\n} from './types/State.types';\nimport type { RowData as RowDataType } from './src/core/generators/RowGenerator.types';\nimport type RowType from './src/core/generators/RowGenerator';\nimport type ViewType from './src/core/generators/ViewGenerator';\nimport type { WarningDetail as WarningDetailType } from './src/core/generators/ViewGenerator.types';\nimport type {\n ColumnRenderingEngineProps as ColumnRenderingEnginePropsType,\n ColumnContext as ColumnContextType\n} from './src/core/generators/ColumnGenerator.types';\nimport type ColumnType from './src/core/generators/ColumnGenerator';\nimport type RsCoreBootArgs from './types/RsCoreBootArgs.types';\nimport type { RenderFactoryWithProps as RenderFactoryWithPropsType } from './types/RsCoreBootArgs.types';\nimport type GroupGeneratorType from './src/core/generators/GroupGenerator';\n\nexport declare namespace RsCoreTypes {\n /** Arguments to the rsCore initialization */\n export type ApiContext = ApiContextType;\n export type Meta = MetaType;\n export type ActionConfig = ActionConfigType;\n export type State = StateType;\n export type Group = GroupType;\n export type GroupAdditionalField = GroupAdditionalFieldType;\n export type PersonalizedState = PersonalizedStateType;\n export type FieldDef = FieldDefType;\n export type RenderFactoryWithProps = RenderFactoryWithPropsType;\n export type ColumnRenderingEngineProps = ColumnRenderingEnginePropsType;\n export type RsCoreInitArgs = RsCoreBootArgs;\n export type RsApi = RsApiType;\n\n export type RsCore = RsCoreClass;\n\n export type Column = ColumnType;\n export type ColumnContext = ColumnContextType;\n export type Row = RowType;\n export type View = ViewType;\n export type RowData = RowDataType;\n export type Errors = StateErrors;\n export type GroupGenerator = GroupGeneratorType;\n\n export type HeroImagePlacement = HeroImagePlacementType;\n export type FieldReference = FieldReferenceType;\n export type ConstantValue = ConstantValueType;\n export type HeroImage = HeroImageType;\n export type WarningDetail = WarningDetailType;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/lists-core",
|
|
3
|
-
"version": "9.0.0
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Core headless UI library that the users can use to write their own UI and create repeating structures like table, gallery, timeline etc.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Pegasystems",
|
|
@@ -14,16 +14,14 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-condition-builder": "9.0.0
|
|
18
|
-
"@pega/cosmos-react-core": "9.0.0
|
|
19
|
-
"@types/lodash
|
|
20
|
-
"@types/uuid": "^9.0.0",
|
|
17
|
+
"@pega/cosmos-react-condition-builder": "9.0.0",
|
|
18
|
+
"@pega/cosmos-react-core": "9.0.0",
|
|
19
|
+
"@types/lodash-es": "^4.17.12",
|
|
21
20
|
"dayjs": "^1.11.13",
|
|
22
21
|
"fast-deep-equal": "^3.1.3",
|
|
23
|
-
"lodash
|
|
24
|
-
"uuid": "^9.0.0"
|
|
22
|
+
"lodash-es": "^4.18.1"
|
|
25
23
|
},
|
|
26
24
|
"devDependencies": {
|
|
27
|
-
"typescript": "~5.
|
|
25
|
+
"typescript": "~5.9.3"
|
|
28
26
|
}
|
|
29
27
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { BeforeRenderFeatureProps } from '../../featureFactory';
|
|
2
|
-
/**
|
|
3
|
-
* Manages the inline edit functionality for RS, performing the following actions:
|
|
4
|
-
* - Copies the modified data from {@link State.changeSet} to {@link View.data}.
|
|
5
|
-
* - Invokes the {@link ApiContext.submitData} API to submit the modified data stored in {@link State.changeSet}.
|
|
6
|
-
* - Updates {@link View.data} with the new data returned by the {@link ApiContext.submitData} API, or reverts to the previous data if no new data is returned.
|
|
7
|
-
*
|
|
8
|
-
* This functionality is triggered when {@link State.changeSet} is updated.
|
|
9
|
-
*/
|
|
10
|
-
declare const _default: () => (featureProps: BeforeRenderFeatureProps) => undefined;
|
|
11
|
-
export default _default;
|
|
12
|
-
//# sourceMappingURL=edit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../../../src/core/features/uIFeatures/beforeRender/edit.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAwHrE;;;;;;;GAOG;+BAGuB,cAAc,wBAAwB;AAFhE,wBAOE"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { deepCopy, withMemoization } from '../../../utils/util';
|
|
2
|
-
import { actionClearChangeSet, actionSubmitChangeSet, actionUpdateChangeSet } from '../../../actions/actions';
|
|
3
|
-
function getSubmitData(changeSet, action) {
|
|
4
|
-
const { name, key } = action.payload;
|
|
5
|
-
const dataToSubmit = { [key]: {} };
|
|
6
|
-
if (changeSet[key]) {
|
|
7
|
-
if (name && changeSet[key][name]) {
|
|
8
|
-
if (changeSet[key][name].status !== 'inProgress') {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
dataToSubmit[key][name] = changeSet[key][name].value;
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
Object.keys(changeSet[key]).forEach(k => {
|
|
15
|
-
// @ts-expect-error changeSet[key][k] returns an object and here it is comparing with status value.
|
|
16
|
-
if (changeSet[key][k] === 'inProgress') {
|
|
17
|
-
// @ts-expect-error See above.
|
|
18
|
-
dataToSubmit[key][k] = changeSet[key][k].value;
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return Object.keys(dataToSubmit[key]).length > 0 ? dataToSubmit : null;
|
|
24
|
-
}
|
|
25
|
-
function updateInProgressData(rowData, action, changeSet) {
|
|
26
|
-
if (!changeSet || !rowData)
|
|
27
|
-
return;
|
|
28
|
-
const editedRows = Object.keys(changeSet).filter(k => k === action.payload.key);
|
|
29
|
-
if (editedRows && editedRows.length > 0) {
|
|
30
|
-
const editedData = changeSet[editedRows[0]];
|
|
31
|
-
Object.keys(rowData).forEach(key => {
|
|
32
|
-
if (editedData[key]) {
|
|
33
|
-
const prop = editedData[key];
|
|
34
|
-
if (prop.status === 'inProgress') {
|
|
35
|
-
rowData[key] = prop.value;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function updateDataRecord(rowData, getView, action, revert, changeSet) {
|
|
42
|
-
const rowIndex = getView().data.findIndex(row => row[getView().meta.itemKey] === action.payload.key);
|
|
43
|
-
if (rowIndex > -1) {
|
|
44
|
-
if (!rowData) {
|
|
45
|
-
rowData = {
|
|
46
|
-
// Please don't mutate input param.
|
|
47
|
-
...getView().data[rowIndex],
|
|
48
|
-
...{ [action.payload.name]: revert ? action.payload.oldValue : action.payload.newValue }
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
if (!revert) {
|
|
52
|
-
updateInProgressData(rowData, action, changeSet);
|
|
53
|
-
}
|
|
54
|
-
getView().setProp('data', [
|
|
55
|
-
...getView().data.slice(0, rowIndex),
|
|
56
|
-
rowData,
|
|
57
|
-
...getView().data.slice(rowIndex + 1)
|
|
58
|
-
]);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
async function edit([{ getView, getState, queuedActions: [action], getRsProps, dispatch }]) {
|
|
62
|
-
const { changeSet } = getState();
|
|
63
|
-
const { apiContext } = getRsProps();
|
|
64
|
-
if (!changeSet) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
const dataToSubmit = getSubmitData(changeSet, action);
|
|
68
|
-
if (dataToSubmit) {
|
|
69
|
-
// Update data immediately to show entered
|
|
70
|
-
updateDataRecord(null, getView, action);
|
|
71
|
-
const response = await apiContext.submitData(deepCopy(getState()), getView().meta, dataToSubmit);
|
|
72
|
-
const { rowData } = response;
|
|
73
|
-
// Update data which is communicated from server or revert edited values on error (if rowData is not present in response)
|
|
74
|
-
updateDataRecord(rowData, getView, action, !rowData, changeSet);
|
|
75
|
-
dispatch(actionClearChangeSet(action.payload));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Manages the inline edit functionality for RS, performing the following actions:
|
|
80
|
-
* - Copies the modified data from {@link State.changeSet} to {@link View.data}.
|
|
81
|
-
* - Invokes the {@link ApiContext.submitData} API to submit the modified data stored in {@link State.changeSet}.
|
|
82
|
-
* - Updates {@link View.data} with the new data returned by the {@link ApiContext.submitData} API, or reverts to the previous data if no new data is returned.
|
|
83
|
-
*
|
|
84
|
-
* This functionality is triggered when {@link State.changeSet} is updated.
|
|
85
|
-
*/
|
|
86
|
-
export default () => {
|
|
87
|
-
const memoizedEdit = withMemoization(edit);
|
|
88
|
-
return function execute(featureProps) {
|
|
89
|
-
const state = featureProps.getState();
|
|
90
|
-
memoizedEdit([featureProps], [state.changeSet]);
|
|
91
|
-
return undefined;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
//# sourceMappingURL=edit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edit.js","sourceRoot":"","sources":["../../../../../../src/core/features/uIFeatures/beforeRender/edit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AAalC,SAAS,aAAa,CAAC,SAAwB,EAAE,MAA4B;IAC3E,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC;IACrC,MAAM,YAAY,GAId,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;IAElB,IAAI,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;QACnB,IAAI,IAAI,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;YACjC,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,YAAY,EAAE,CAAC;gBACjD,OAAO,IAAI,CAAC;YACd,CAAC;YACD,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;QACvD,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBACtC,mGAAmG;gBACnG,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,EAAE,CAAC;oBACvC,8BAA8B;oBAC9B,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;gBACjD,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CA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Q,CAAC,QAAQ,EAAE,CAAC,EACpB,OAAO,EAAE,CAAC,IAAI,EACd,YAAY,CACb,CAAC;QACF,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAC;QAC7B,yHAAyH;QACzH,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,MAA8B,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACxF,QAAQ,CAAC,oBAAoB,CAAE,MAA+B,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,eAAe,GAAG,EAAE;IAClB,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAC3C,OAAO,SAAS,OAAO,CAAC,YAAsC;QAC5D,MAAM,KAAK,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;QACtC,YAAY,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;QAChD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { deepCopy, withMemoization } from '../../../utils/util';\nimport {\n actionClearChangeSet,\n actionSubmitChangeSet,\n actionUpdateChangeSet\n} from '../../../actions/actions';\nimport type { BeforeRenderFeatureProps } from '../../featureFactory';\nimport type { RowData } from '../../../generators/RowGenerator.types';\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport type { EditChangeSet, State } from '../../../../../types/State.types';\nimport type View from '../../../generators/ViewGenerator';\nimport type { ApiContext } from '../../../../../types/ApiContext.types';\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\ntype EditChangeSetActions = ReturnType<\n typeof actionUpdateChangeSet | typeof actionSubmitChangeSet | typeof actionClearChangeSet\n>;\n\nfunction getSubmitData(changeSet: EditChangeSet, action: EditChangeSetActions) {\n const { name, key } = action.payload;\n const dataToSubmit: {\n [itemKey: string]: {\n [fieldName: string]: string | number | boolean | Date;\n };\n } = { [key]: {} };\n\n if (changeSet[key]) {\n if (name && changeSet[key][name]) {\n if (changeSet[key][name].status !== 'inProgress') {\n return null;\n }\n dataToSubmit[key][name] = changeSet[key][name].value;\n } else {\n Object.keys(changeSet[key]).forEach(k => {\n // @ts-expect-error changeSet[key][k] returns an object and here it is comparing with status value.\n if (changeSet[key][k] === 'inProgress') {\n // @ts-expect-error See above.\n dataToSubmit[key][k] = changeSet[key][k].value;\n }\n });\n }\n }\n\n return Object.keys(dataToSubmit[key]).length > 0 ? dataToSubmit : null;\n}\n\nfunction updateInProgressData(\n rowData: RowData | null,\n action: EditChangeSetActions,\n changeSet?: EditChangeSet\n) {\n if (!changeSet || !rowData) return;\n const editedRows = Object.keys(changeSet).filter(k => k === action.payload.key);\n if (editedRows && editedRows.length > 0) {\n const editedData = changeSet[editedRows[0]];\n Object.keys(rowData).forEach(key => {\n if (editedData[key]) {\n const prop = editedData[key];\n if (prop.status === 'inProgress') {\n rowData[key] = prop.value;\n }\n }\n });\n }\n}\n\nfunction updateDataRecord(\n rowData: RowData | null,\n getView: BeforeRenderFeatureProps['getView'],\n action: EditChangeSetActions,\n revert?: boolean,\n changeSet?: EditChangeSet\n) {\n const rowIndex = getView().data!.findIndex(\n row => row[getView().meta.itemKey] === action.payload.key\n );\n\n if (rowIndex > -1) {\n if (!rowData) {\n rowData = {\n // Please don't mutate input param.\n ...getView().data![rowIndex],\n ...{ [action.payload.name]: revert ? action.payload.oldValue : action.payload.newValue }\n };\n }\n if (!revert) {\n updateInProgressData(rowData, action, changeSet);\n }\n getView().setProp('data', [\n ...getView().data!.slice(0, rowIndex),\n rowData,\n ...getView().data!.slice(rowIndex + 1)\n ]);\n }\n}\n\nasync function edit([\n {\n getView,\n getState,\n queuedActions: [action],\n getRsProps,\n dispatch\n }\n]: [featureProps: BeforeRenderFeatureProps]) {\n const { changeSet } = getState();\n const { apiContext } = getRsProps();\n if (!changeSet) {\n return;\n }\n const dataToSubmit = getSubmitData(changeSet, action as EditChangeSetActions);\n if (dataToSubmit) {\n // Update data immediately to show entered\n updateDataRecord(null, getView, action as EditChangeSetActions);\n const response = await apiContext.submitData!(\n deepCopy(getState()),\n getView().meta,\n dataToSubmit\n );\n const { rowData } = response;\n // Update data which is communicated from server or revert edited values on error (if rowData is not present in response)\n updateDataRecord(rowData, getView, action as EditChangeSetActions, !rowData, changeSet);\n dispatch(actionClearChangeSet((action as EditChangeSetActions).payload));\n }\n}\n\n/**\n * Manages the inline edit functionality for RS, performing the following actions:\n * - Copies the modified data from {@link State.changeSet} to {@link View.data}.\n * - Invokes the {@link ApiContext.submitData} API to submit the modified data stored in {@link State.changeSet}.\n * - Updates {@link View.data} with the new data returned by the {@link ApiContext.submitData} API, or reverts to the previous data if no new data is returned.\n *\n * This functionality is triggered when {@link State.changeSet} is updated.\n */\nexport default () => {\n const memoizedEdit = withMemoization(edit);\n return function execute(featureProps: BeforeRenderFeatureProps) {\n const state = featureProps.getState();\n memoizedEdit([featureProps], [state.changeSet]);\n return undefined;\n };\n};\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { BeforeRenderFeatureProps } from '../../featureFactory';
|
|
2
|
-
/**
|
|
3
|
-
* Toggles `showSelectAllCheckbox` {@link State.showSelectAllCheckbox state} and in {@link Column.showSelectAllCheckbox row selection column}.
|
|
4
|
-
* It is triggered when any pf the following properties are changed:
|
|
5
|
-
* - On bootstraping of `RSCore`
|
|
6
|
-
* - {@link View.resultsCount}
|
|
7
|
-
* - {@link State.showSelectAllCheckbox}
|
|
8
|
-
* - {@link State.selectedRows}
|
|
9
|
-
*/
|
|
10
|
-
declare const _default: () => (featureProps: BeforeRenderFeatureProps) => void;
|
|
11
|
-
export default _default;
|
|
12
|
-
//# sourceMappingURL=toggleSelectAllCheckbox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toggleSelectAllCheckbox.d.ts","sourceRoot":"","sources":["../../../../../../src/core/features/uIFeatures/beforeRender/toggleSelectAllCheckbox.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAqDrE;;;;;;;GAOG;+BAKuB,cAAc,wBAAwB;AAJhE,wBAeE"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { withMemoization } from '../../../utils/util';
|
|
2
|
-
import { SUPPORTED_MODES_FOR_SELECTALL, rowSelectColumnMeta } from '../../../constants';
|
|
3
|
-
import { actionToggleSelectAllCheckbox } from '../../../actions/actions';
|
|
4
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
5
|
-
const toggleSelectAllCheckbox = ([{ getView, dispatch }]) => {
|
|
6
|
-
if (!(getView().meta.selectionMode &&
|
|
7
|
-
SUPPORTED_MODES_FOR_SELECTALL.includes(getView().meta.selectionMode))) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
let bShowSelectAllCheckbox = false;
|
|
11
|
-
if (getView().resultsCount > 0 &&
|
|
12
|
-
getView().resultsCount <= getView().meta.selectionCountThreshold &&
|
|
13
|
-
!getView().hasMoreResults) {
|
|
14
|
-
bShowSelectAllCheckbox = true;
|
|
15
|
-
}
|
|
16
|
-
dispatch(actionToggleSelectAllCheckbox({ showSelectAllCheckbox: bShowSelectAllCheckbox }));
|
|
17
|
-
};
|
|
18
|
-
const updateSelectAllCheckboxColumn = ([{ getView, getState }]) => {
|
|
19
|
-
if (!(getView().meta.selectionMode &&
|
|
20
|
-
SUPPORTED_MODES_FOR_SELECTALL.includes(getView().meta.selectionMode))) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const { showSelectAllCheckbox } = getState();
|
|
24
|
-
let column = getView().columns.find(col => col.field.id === rowSelectColumnMeta.field.id);
|
|
25
|
-
if (column) {
|
|
26
|
-
column = column.setProp({
|
|
27
|
-
// @ts-expect-error `showSelectAllCheckbox` does not exist on `Column`.
|
|
28
|
-
showSelectAllCheckbox,
|
|
29
|
-
// setting a dummy prop refresh to re-render the column
|
|
30
|
-
refresh: getView().state.selectedRows?.length
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Toggles `showSelectAllCheckbox` {@link State.showSelectAllCheckbox state} and in {@link Column.showSelectAllCheckbox row selection column}.
|
|
36
|
-
* It is triggered when any pf the following properties are changed:
|
|
37
|
-
* - On bootstraping of `RSCore`
|
|
38
|
-
* - {@link View.resultsCount}
|
|
39
|
-
* - {@link State.showSelectAllCheckbox}
|
|
40
|
-
* - {@link State.selectedRows}
|
|
41
|
-
*/
|
|
42
|
-
export default () => {
|
|
43
|
-
const memoizedToggleSelectAllCheckbox = withMemoization(toggleSelectAllCheckbox);
|
|
44
|
-
const memoizedUpdateSelectAllCheckboxColumn = withMemoization(updateSelectAllCheckboxColumn);
|
|
45
|
-
return function execute(featureProps) {
|
|
46
|
-
const state = featureProps.getState();
|
|
47
|
-
memoizedToggleSelectAllCheckbox([featureProps], [featureProps.getView().meta, featureProps.getView().resultsCount]);
|
|
48
|
-
memoizedUpdateSelectAllCheckboxColumn([featureProps], [state.showSelectAllCheckbox, state.selectedRows]);
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=toggleSelectAllCheckbox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toggleSelectAllCheckbox.js","sourceRoot":"","sources":["../../../../../../src/core/features/uIFeatures/beforeRender/toggleSelectAllCheckbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAMzE,qDAAqD;AAErD,MAAM,uBAAuB,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAEtD,EAAE,EAAE;IACH,IACE,CAAC,CACC,OAAO,EAAE,CAAC,IA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AAe,GAAG,EAAE;IAClB,MAAM,+BAA+B,GAAG,eAAe,CAAC,uBAAuB,CAAC,CAAC;IACjF,MAAM,qCAAqC,GAAG,eAAe,CAAC,6BAA6B,CAAC,CAAC;IAE7F,OAAO,SAAS,OAAO,CAAC,YAAsC;QAC5D,MAAM,KAAK,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;QACtC,+BAA+B,CAC7B,CAAC,YAAY,CAAC,EACd,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE,CAAC,YAAY,CAAC,CACnE,CAAC;QACF,qCAAqC,CACnC,CAAC,YAAY,CAAC,EACd,CAAC,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,YAAY,CAAC,CAClD,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { withMemoization } from '../../../utils/util';\nimport { SUPPORTED_MODES_FOR_SELECTALL, rowSelectColumnMeta } from '../../../constants';\nimport { actionToggleSelectAllCheckbox } from '../../../actions/actions';\nimport type { BeforeRenderFeatureProps } from '../../featureFactory';\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport type View from '../../../generators/ViewGenerator';\nimport type Column from '../../../generators/ColumnGenerator';\nimport type { State } from '../../../../../types/State.types';\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\nconst toggleSelectAllCheckbox = ([{ getView, dispatch }]: [\n featureProps: BeforeRenderFeatureProps\n]) => {\n if (\n !(\n getView().meta.selectionMode &&\n SUPPORTED_MODES_FOR_SELECTALL.includes(getView().meta.selectionMode!)\n )\n ) {\n return;\n }\n let bShowSelectAllCheckbox = false;\n if (\n getView().resultsCount! > 0 &&\n getView().resultsCount! <= getView().meta.selectionCountThreshold! &&\n !getView().hasMoreResults\n ) {\n bShowSelectAllCheckbox = true;\n }\n\n dispatch(actionToggleSelectAllCheckbox({ showSelectAllCheckbox: bShowSelectAllCheckbox }));\n};\n\nconst updateSelectAllCheckboxColumn = ([{ getView, getState }]: [\n featureProps: BeforeRenderFeatureProps\n]) => {\n if (\n !(\n getView().meta.selectionMode &&\n SUPPORTED_MODES_FOR_SELECTALL.includes(getView().meta.selectionMode!)\n )\n ) {\n return;\n }\n const { showSelectAllCheckbox } = getState();\n let column = getView().columns!.find(col => col.field.id === rowSelectColumnMeta.field.id);\n if (column) {\n column = column.setProp({\n // @ts-expect-error `showSelectAllCheckbox` does not exist on `Column`.\n showSelectAllCheckbox,\n // setting a dummy prop refresh to re-render the column\n refresh: getView().state.selectedRows?.length\n });\n }\n};\n\n/**\n * Toggles `showSelectAllCheckbox` {@link State.showSelectAllCheckbox state} and in {@link Column.showSelectAllCheckbox row selection column}.\n * It is triggered when any pf the following properties are changed:\n * - On bootstraping of `RSCore`\n * - {@link View.resultsCount}\n * - {@link State.showSelectAllCheckbox}\n * - {@link State.selectedRows}\n */\nexport default () => {\n const memoizedToggleSelectAllCheckbox = withMemoization(toggleSelectAllCheckbox);\n const memoizedUpdateSelectAllCheckboxColumn = withMemoization(updateSelectAllCheckboxColumn);\n\n return function execute(featureProps: BeforeRenderFeatureProps) {\n const state = featureProps.getState();\n memoizedToggleSelectAllCheckbox(\n [featureProps],\n [featureProps.getView().meta, featureProps.getView().resultsCount]\n );\n memoizedUpdateSelectAllCheckboxColumn(\n [featureProps],\n [state.showSelectAllCheckbox, state.selectedRows]\n );\n };\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/core/reducers/edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,KAAK,EAAE,MAAM,EAA0B,MAAM,0BAA0B,CAAC;yBA0B/D,OAAO,KAAK,EAAE,QAAQ,MAAM;AAA5C,wBA4CE"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import ActionTypes from '../actions/actionConstants';
|
|
2
|
-
function updateStatus(changeSet, payload) {
|
|
3
|
-
const { key, name, status } = payload;
|
|
4
|
-
if (name && changeSet[key][name]) {
|
|
5
|
-
changeSet[key][name].status = status;
|
|
6
|
-
}
|
|
7
|
-
else {
|
|
8
|
-
Object.keys(changeSet[key]).forEach(k => {
|
|
9
|
-
changeSet[key][k].status = status;
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
function clearChangeSet(changeSet, payload) {
|
|
14
|
-
const { key, name } = payload;
|
|
15
|
-
if (name && changeSet[key][name]) {
|
|
16
|
-
delete changeSet[key][name];
|
|
17
|
-
if (Object.keys(changeSet[key]).length === 0) {
|
|
18
|
-
delete changeSet[key];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
delete changeSet[key];
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export default (state, action) => {
|
|
26
|
-
const { type } = action;
|
|
27
|
-
switch (type) {
|
|
28
|
-
case ActionTypes.CHANGE_CELL_MODE: {
|
|
29
|
-
return { ...state, editInfo: action.payload };
|
|
30
|
-
}
|
|
31
|
-
case ActionTypes.UPDATE_CHANGE_SET: {
|
|
32
|
-
const { newValue, status, key, name } = action.payload;
|
|
33
|
-
const changeSet = { ...(state.changeSet || {}) };
|
|
34
|
-
const rowData = changeSet[key];
|
|
35
|
-
if (rowData) {
|
|
36
|
-
rowData[name] = { value: newValue, status };
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
changeSet[key] = { [name]: { value: newValue, status } };
|
|
40
|
-
}
|
|
41
|
-
return { ...state, changeSet };
|
|
42
|
-
}
|
|
43
|
-
case ActionTypes.SUBMIT_CHANGE_SET: {
|
|
44
|
-
const { key, name } = action.payload;
|
|
45
|
-
const changeSet = { ...state.changeSet };
|
|
46
|
-
if (!changeSet || !changeSet[key] || (name && !changeSet[key][name])) {
|
|
47
|
-
return state;
|
|
48
|
-
}
|
|
49
|
-
updateStatus(changeSet, action.payload);
|
|
50
|
-
return { ...state, changeSet };
|
|
51
|
-
}
|
|
52
|
-
case ActionTypes.CLEAR_CHANGE_SET: {
|
|
53
|
-
const { key, name } = action.payload;
|
|
54
|
-
const changeSet = { ...(state.changeSet || null) };
|
|
55
|
-
if (!changeSet || !changeSet[key] || (name && !changeSet[key][name])) {
|
|
56
|
-
return state;
|
|
57
|
-
}
|
|
58
|
-
clearChangeSet(changeSet, action.payload);
|
|
59
|
-
return { ...state, changeSet };
|
|
60
|
-
}
|
|
61
|
-
default:
|
|
62
|
-
return state;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=edit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edit.js","sourceRoot":"","sources":["../../../../src/core/reducers/edit.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAGrD,SAAS,YAAY,CAAC,SAA0C,EAAE,OAA+B;IAC/F,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IACtC,IAAI,IAAI,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QACjC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;IACvC,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACtC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AACD,SAAS,cAAc,CACrB,SAA0C,EAC1C,OAA+B;IAE/B,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAC9B,IAAI,IAAI,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QACjC,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iB,CAAC,CAAC,CAAC;YACnC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC;YACrC,MAAM,SAAS,GAAG,EAAE,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;YACzC,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;gBACrE,OAAO,KAAK,CAAC;YACf,CAAC;YACD,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;YACxC,OAAO,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,CAAC;QACjC,CAAC;QACD,KAAK,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC;YAClC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC;YACrC,MAAM,SAAS,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,EAAE,CAAC;YACnD,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;gBACrE,OAAO,KAAK,CAAC;YACf,CAAC;YACD,cAAc,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;YAE1C,OAAO,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,CAAC;QACjC,CAAC;QACD;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import type { State } from '../../../types/State.types';\nimport ActionTypes from '../actions/actionConstants';\nimport type { Action, SubmitChangeSetPayload } from '../actions/actions.types';\n\nfunction updateStatus(changeSet: NonNullable<State['changeSet']>, payload: SubmitChangeSetPayload) {\n const { key, name, status } = payload;\n if (name && changeSet[key][name]) {\n changeSet[key][name].status = status;\n } else {\n Object.keys(changeSet[key]).forEach(k => {\n changeSet[key][k].status = status;\n });\n }\n}\nfunction clearChangeSet(\n changeSet: NonNullable<State['changeSet']>,\n payload: SubmitChangeSetPayload\n) {\n const { key, name } = payload;\n if (name && changeSet[key][name]) {\n delete changeSet[key][name];\n if (Object.keys(changeSet[key]).length === 0) {\n delete changeSet[key];\n }\n } else {\n delete changeSet[key];\n }\n}\nexport default (state: State, action: Action) => {\n const { type } = action;\n\n switch (type) {\n case ActionTypes.CHANGE_CELL_MODE: {\n return { ...state, editInfo: action.payload };\n }\n\n case ActionTypes.UPDATE_CHANGE_SET: {\n const { newValue, status, key, name } = action.payload;\n\n const changeSet = { ...(state.changeSet || {}) };\n const rowData = changeSet[key];\n if (rowData) {\n rowData[name] = { value: newValue, status };\n } else {\n changeSet[key] = { [name]: { value: newValue, status } };\n }\n\n return { ...state, changeSet };\n }\n\n case ActionTypes.SUBMIT_CHANGE_SET: {\n const { key, name } = action.payload;\n const changeSet = { ...state.changeSet };\n if (!changeSet || !changeSet[key] || (name && !changeSet[key][name])) {\n return state;\n }\n updateStatus(changeSet, action.payload);\n return { ...state, changeSet };\n }\n case ActionTypes.CLEAR_CHANGE_SET: {\n const { key, name } = action.payload;\n const changeSet = { ...(state.changeSet || null) };\n if (!changeSet || !changeSet[key] || (name && !changeSet[key][name])) {\n return state;\n }\n clearChangeSet(changeSet, action.payload);\n\n return { ...state, changeSet };\n }\n default:\n return state;\n }\n};\n"]}
|