@pega/lists-core 9.0.0-build.9.8 → 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
|
@@ -3,7 +3,7 @@ import type { State } from '../../../types/State.types';
|
|
|
3
3
|
import type { FieldDef } from '../../../types/Meta.types';
|
|
4
4
|
import type { Formatters } from '../../../types/RsCoreBootArgs.types';
|
|
5
5
|
import type View from './ViewGenerator';
|
|
6
|
-
export type ViewConfig = Partial<Pick<View, 'data' | 'columns' | 'rows' | 'groupHeaders' | 'resultsCount' | 'hasMoreResults' | 'showCount' | 'totalItemCount' | 'selectedRecordsCount' | 'bodyHeight' | 'bodyMaxHeight' | 'rowHeight' | 'rowHeightClass' | 'isFilterApplied' | 'isLoading' | 'freezeLine' | 'state' | 'domContainer' | 'scrollerNode' | 'itemElement' | 'virtualizeElements' | 'debugInfo' | 'requiredDef' | 'hierarchicalGroupEnabled' | 'confirmationActionDetails' | 'externalStateKeys' | 'isCountUpdateRequired' | 'countGeneratedInternally' | 'isInstantRender' | 'viewHeight' | 'refreshNotification' | 'announceCount'>> & Pick<View, 'meta'> & {
|
|
6
|
+
export type ViewConfig = Partial<Pick<View, 'data' | 'columns' | 'rows' | 'groupHeaders' | 'resultsCount' | 'hasMoreResults' | 'showCount' | 'totalItemCount' | 'selectedRecordsCount' | 'bodyHeight' | 'bodyMaxHeight' | 'rowHeight' | 'rowHeightClass' | 'isFilterApplied' | 'isLoading' | 'freezeLine' | 'state' | 'domContainer' | 'scrollerNode' | 'itemElement' | 'virtualizeElements' | 'debugInfo' | 'requiredDef' | 'hierarchicalGroupEnabled' | 'confirmationActionDetails' | 'externalStateKeys' | 'isCountUpdateRequired' | 'countGeneratedInternally' | 'isInstantRender' | 'viewHeight' | 'refreshNotification' | 'announceCount' | 'enableGlobalSearch' | 'warningMessages' | 'template'>> & Pick<View, 'meta'> & {
|
|
7
7
|
singleSelectionRowKey?: string;
|
|
8
8
|
};
|
|
9
9
|
export type ViewContext = {
|
|
@@ -19,10 +19,14 @@ export type ViewContext = {
|
|
|
19
19
|
selectedRecordsCount: View['selectedRecordsCount'];
|
|
20
20
|
/** Returns the {@link View.resultsCount resultsCount} */
|
|
21
21
|
resultsCount: View['resultsCount'];
|
|
22
|
+
/** Returns the {@link View.hasMoreResults hasMoreResults} */
|
|
23
|
+
hasMoreResults: View['hasMoreResults'];
|
|
22
24
|
/** Returns the {@link View.requiredDef requiredDef} */
|
|
23
25
|
getRequiredDef: () => View['requiredDef'];
|
|
24
26
|
/** Returns the {@link View.getRowDensity getRowDensity} */
|
|
25
27
|
getRowDensity: View['getRowDensity'];
|
|
28
|
+
/** Returns the {@link View.getVisibleColumns getVisibleColumns} */
|
|
29
|
+
getVisibleColumns: View['getVisibleColumns'];
|
|
26
30
|
};
|
|
27
31
|
/** Interface exposed for confirmation dialogue */
|
|
28
32
|
export interface ConfirmationActionDetails {
|
|
@@ -106,6 +110,14 @@ export interface RequiredDefinition {
|
|
|
106
110
|
required: boolean;
|
|
107
111
|
validatemessage: string;
|
|
108
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Warning detail structure from DX API responses.
|
|
115
|
+
* Contains message information that can be localized and displayed to users.
|
|
116
|
+
*/
|
|
117
|
+
export interface WarningDetail {
|
|
118
|
+
/** Localized Message */
|
|
119
|
+
message?: string;
|
|
120
|
+
}
|
|
109
121
|
/** UI props to be set on the view for A11Y purpose */
|
|
110
122
|
export interface UIProps {
|
|
111
123
|
/** This attribute conveys the number of columns in the repeating structures to screen readers. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewGenerator.types.d.ts","sourceRoot":"","sources":["../../../../src/core/generators/ViewGenerator.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEtE,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAGxC,MAAM,MAAM,UAAU,GAAG,OAAO,CAC9B,IAAI,CACF,IAAI,EACF,MAAM,GACN,SAAS,GACT,MAAM,GACN,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,WAAW,GACX,gBAAgB,GAChB,sBAAsB,GACtB,YAAY,GACZ,eAAe,GACf,WAAW,GACX,gBAAgB,GAChB,iBAAiB,GACjB,WAAW,GACX,YAAY,GACZ,OAAO,GACP,cAAc,GACd,cAAc,GACd,aAAa,GACb,oBAAoB,GACpB,WAAW,GACX,aAAa,GACb,0BAA0B,GAC1B,2BAA2B,GAC3B,mBAAmB,GACnB,uBAAuB,GACvB,0BAA0B,GAC1B,iBAAiB,GACjB,YAAY,GACZ,qBAAqB,GACrB,eAAe,
|
|
1
|
+
{"version":3,"file":"ViewGenerator.types.d.ts","sourceRoot":"","sources":["../../../../src/core/generators/ViewGenerator.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEtE,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAGxC,MAAM,MAAM,UAAU,GAAG,OAAO,CAC9B,IAAI,CACF,IAAI,EACF,MAAM,GACN,SAAS,GACT,MAAM,GACN,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,WAAW,GACX,gBAAgB,GAChB,sBAAsB,GACtB,YAAY,GACZ,eAAe,GACf,WAAW,GACX,gBAAgB,GAChB,iBAAiB,GACjB,WAAW,GACX,YAAY,GACZ,OAAO,GACP,cAAc,GACd,cAAc,GACd,aAAa,GACb,oBAAoB,GACpB,WAAW,GAC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AE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,mDAAmD;AACnD,UAAU,kBAAkB;IAC1B,qCAAqC;IACrC,UAAU,EAAE,WAAW,CAAC;IAExB,qHAAqH;IACrH,gBAAgB,EAAE,MAAM,CAAC;IAEzB,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;IAEnB,uCAAuC;IACvC,UAAU,EAAE,WAAW,CAAC;IAExB,uCAAuC;IACvC,KAAK,EAAE,mBAAmB,CAAC;IAE3B,oCAAoC;IACpC,UAAU,EAAE,WAAW,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,kBAAkB,EAAE,MAAM,WAAW,CAAC;IAEtC,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IAEX,2DAA2D;IAC3D,WAAW,EAAE,MAAM,IAAI,CAAC;IAExB,6DAA6D;IAC7D,EAAE,EAAE,kBAAkB,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAC;CAChC;AAED,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,MAAM,UAAU,CAAC,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC,kFAAkF;IAClF,EAAE,EAAE,MAAM,CAAC;IACX,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,kBAAkB,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewGenerator.types.js","sourceRoot":"","sources":["../../../../src/core/generators/ViewGenerator.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { OmitStrict } from '@pega/cosmos-react-core';\n\nimport type { State } from '../../../types/State.types';\nimport type { FieldDef } from '../../../types/Meta.types';\nimport type { Formatters } from '../../../types/RsCoreBootArgs.types';\n\nimport type View from './ViewGenerator';\n\n// @ts-check findout which are the mandatory properties in View options.\nexport type ViewConfig = Partial<\n Pick<\n View,\n | 'data'\n | 'columns'\n | 'rows'\n | 'groupHeaders'\n | 'resultsCount'\n | 'hasMoreResults'\n | 'showCount'\n | 'totalItemCount'\n | 'selectedRecordsCount'\n | 'bodyHeight'\n | 'bodyMaxHeight'\n | 'rowHeight'\n | 'rowHeightClass'\n | 'isFilterApplied'\n | 'isLoading'\n | 'freezeLine'\n | 'state'\n | 'domContainer'\n | 'scrollerNode'\n | 'itemElement'\n | 'virtualizeElements'\n | 'debugInfo'\n | 'requiredDef'\n | 'hierarchicalGroupEnabled'\n | 'confirmationActionDetails'\n | 'externalStateKeys'\n | 'isCountUpdateRequired'\n | 'countGeneratedInternally'\n | 'isInstantRender'\n | 'viewHeight'\n | 'refreshNotification'\n | 'announceCount'\n >\n> &\n Pick<View, 'meta'> & { singleSelectionRowKey?: string };\nexport type ViewContext = {\n /** Returns the {@link View.meta meta} */\n getMeta: () => View['meta'];\n /** Returns the {@link View.state state} */\n getState: () => View['state'];\n /** Returns the {@link View.columns columns} */\n getColumns: () => View['columns'];\n /** Returns the {@link View.getRenderingEnginePropsById getRenderingEnginePropsById} */\n getRenderingEnginePropsById: View['getRenderingEnginePropsById'];\n /** Returns the {@link View.selectedRecordsCount selectedRecordsCount} */\n selectedRecordsCount: View['selectedRecordsCount'];\n /** Returns the {@link View.resultsCount resultsCount} */\n resultsCount: View['resultsCount'];\n /** Returns the {@link View.requiredDef requiredDef} */\n getRequiredDef: () => View['requiredDef'];\n /** Returns the {@link View.getRowDensity getRowDensity} */\n getRowDensity: View['getRowDensity'];\n};\n\n/** Interface exposed for confirmation dialogue */\nexport interface ConfirmationActionDetails {\n /** Labels for the confirmation dialogue */\n labels: {\n /** Header of the confirmation dialogue pop up */\n heading: string;\n\n /** Description of the confirmation dialogue pop up */\n description: string;\n\n /** Label of the submit button inside confirmation dialogue pop up */\n submitButtonLabel: string;\n\n /** Label of the cancel button inside confirmation dialogue pop up */\n cancelButtonLabel: string;\n };\n\n /** Boolean to toggle the show/visibility */\n showConfirmationAction: boolean;\n\n /** Function to be executed upon submission of the concerned modal */\n onSubmit: (value?: any) => void;\n\n /** Function to be executed upon cancellation of the concerned modal */\n onCancel: (reason?: any) => void;\n}\n\n/** Interface for displaying API stats on the view */\nexport interface DebugInfo {\n /** Class name of the data page */\n className: string;\n\n /** Name of the data page */\n dataPage: string;\n\n /** Source of the data page */\n dataSource?: string;\n\n /** Unique identifier for the insight */\n insightId?: string;\n\n /** Time taken by the API */\n timeTaken?: string;\n}\n\n/** Style interface for freezeline */\nexport interface FreezeLine {\n styles: {\n left: string;\n };\n}\n\n/** An interface used for group headers, consisting of grouping and hierarchical grouping properties */\nexport interface GroupHeader {\n /** Applied aggregation to be displayed in group header */\n aggregation: { [key: FieldDef['name']]: { [key: string]: number } };\n\n /** Count to be displayed in group header */\n count: number;\n\n /** Data */\n data: object;\n\n /** End index of the rows in a particular group */\n endIndex: number;\n\n /** group-key: Computed using getGroupKey utility */\n groupBy: string;\n\n /** String array denoting hierarchy */\n hierarchy: string[];\n\n /** Hierarchical grouping info object */\n info: object;\n\n /** Indicates expanded state */\n isExpanded: boolean;\n\n /** Indicates if its hierarchical grouping */\n isHierarchical: boolean;\n\n /** Indicates if it is a leaf node. */\n isLeafNode: boolean;\n\n /** Indicates visibility */\n isVisible: boolean;\n\n /** Label of the group header to be displayed on UI */\n label: string;\n\n /** Level denoting the nesting level of a group header */\n level: number;\n\n /** Name attribute on a group header */\n name: string;\n\n /** Boolean to toggle displaying the hierarchical footer */\n showHierarchicalFooter: boolean;\n\n /** End index of the rows in a particular group */\n startIndex: number;\n}\n\nexport interface RequiredDefinition {\n required: boolean;\n validatemessage: string;\n}\n\n/** UI props to be set on the view for A11Y purpose */\nexport interface UIProps {\n /** This attribute conveys the number of columns in the repeating structures to screen readers. */\n 'aria-colcount': number;\n\n /** This attribute conveys the label of the repeating structures to screen readers. */\n 'aria-label': string;\n\n /** This attribute conveys the number of rows in the repeating structures to screen readers. */\n 'aria-rowcount': number;\n\n /** HTML role attribute for the view.\n * @default 'grid'\n */\n role: string;\n}\n\nexport type ViewState = OmitStrict<\n State,\n | 'groupFilters'\n | 'forceUpdateFeatures'\n | 'template'\n | 'presetId'\n | 'version'\n | 'renderFormatter'\n | 'hierarchicalGroup'\n> & { searchText?: string };\n\n/** Personalization information object */\ninterface PersonalizationInfo {\n /** Coordinates of current row index. */\n existingItemBoundingBox: DOMRect;\n\n /** Common visible item in view before and after paint (previous and next paint) */\n currentRowIndex: number;\n\n /** Possible index on view top */\n topRowIndex: number;\n\n /** Buffer coordinates while pagination. */\n bufferOldCords: DOMRect;\n\n /** Buffer coordinates while pagination is in progress and user scroll. */\n bufferNewCords: DOMRect;\n\n /** View object containing start index and end index */\n view: {\n startIndex: number;\n endIndex: number;\n };\n}\n\n/** Interface structure for virtualizer instance */\ninterface VirtualizeInstance {\n /** DOM element for body container */\n bContainer: HTMLElement;\n\n /** Multiplier to be used when calculating the buffer rows to be loaded, bufferRows = bufferMultiplier * totalrows */\n bufferMultiplier: number;\n\n /** Number denoting the row height */\n itemHeight: number;\n\n /** DOM element for parent container */\n pContainer: HTMLElement;\n\n /** Virtualizer specific information */\n pInfo: PersonalizationInfo;\n\n /** DOM element for row container */\n rContainer: HTMLElement;\n}\n\n/**\n * Attributes of the virtualizer being used\n */\nexport interface RootVirtualizer {\n /**\n * Returns the parent container pContainer set on the virtualizer\n * @returns div with id pContainer\n */\n getParentContainer: () => HTMLElement;\n\n /** Unique identifier of the virtualizer */\n id: string;\n\n /** Function to execute to scroll the virtualizer to top */\n scrollToTop: () => void;\n\n /** Additional information set on the virtualizer instance */\n vi: VirtualizeInstance;\n}\n\nexport interface VirtualizeElement {\n [key: string]: RootVirtualizer;\n}\n\nexport type FormatterFunction = Formatters[keyof Formatters];\n\nexport interface RefreshNotification {\n /** A unique identifier for a refresh notification published by consumer of RS. */\n id: number;\n /** The message that needs to be displayed as refresh notification */\n message: string;\n /** The label for the refresh action button. */\n refreshActionLabel: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ViewGenerator.types.js","sourceRoot":"","sources":["../../../../src/core/generators/ViewGenerator.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { OmitStrict } from '@pega/cosmos-react-core';\n\nimport type { State } from '../../../types/State.types';\nimport type { FieldDef } from '../../../types/Meta.types';\nimport type { Formatters } from '../../../types/RsCoreBootArgs.types';\n\nimport type View from './ViewGenerator';\n\n// @ts-check findout which are the mandatory properties in View options.\nexport type ViewConfig = Partial<\n Pick<\n View,\n | 'data'\n | 'columns'\n | 'rows'\n | 'groupHeaders'\n | 'resultsCount'\n | 'hasMoreResults'\n | 'showCount'\n | 'totalItemCount'\n | 'selectedRecordsCount'\n | 'bodyHeight'\n | 'bodyMaxHeight'\n | 'rowHeight'\n | 'rowHeightClass'\n | 'isFilterApplied'\n | 'isLoading'\n | 'freezeLine'\n | 'state'\n | 'domContainer'\n | 'scrollerNode'\n | 'itemElement'\n | 'virtualizeElements'\n | 'debugInfo'\n | 'requiredDef'\n | 'hierarchicalGroupEnabled'\n | 'confirmationActionDetails'\n | 'externalStateKeys'\n | 'isCountUpdateRequired'\n | 'countGeneratedInternally'\n | 'isInstantRender'\n | 'viewHeight'\n | 'refreshNotification'\n | 'announceCount'\n | 'enableGlobalSearch'\n | 'warningMessages'\n | 'template'\n >\n> &\n Pick<View, 'meta'> & { singleSelectionRowKey?: string };\nexport type ViewContext = {\n /** Returns the {@link View.meta meta} */\n getMeta: () => View['meta'];\n /** Returns the {@link View.state state} */\n getState: () => View['state'];\n /** Returns the {@link View.columns columns} */\n getColumns: () => View['columns'];\n /** Returns the {@link View.getRenderingEnginePropsById getRenderingEnginePropsById} */\n getRenderingEnginePropsById: View['getRenderingEnginePropsById'];\n /** Returns the {@link View.selectedRecordsCount selectedRecordsCount} */\n selectedRecordsCount: View['selectedRecordsCount'];\n /** Returns the {@link View.resultsCount resultsCount} */\n resultsCount: View['resultsCount'];\n /** Returns the {@link View.hasMoreResults hasMoreResults} */\n hasMoreResults: View['hasMoreResults'];\n /** Returns the {@link View.requiredDef requiredDef} */\n getRequiredDef: () => View['requiredDef'];\n /** Returns the {@link View.getRowDensity getRowDensity} */\n getRowDensity: View['getRowDensity'];\n /** Returns the {@link View.getVisibleColumns getVisibleColumns} */\n getVisibleColumns: View['getVisibleColumns'];\n};\n\n/** Interface exposed for confirmation dialogue */\nexport interface ConfirmationActionDetails {\n /** Labels for the confirmation dialogue */\n labels: {\n /** Header of the confirmation dialogue pop up */\n heading: string;\n\n /** Description of the confirmation dialogue pop up */\n description: string;\n\n /** Label of the submit button inside confirmation dialogue pop up */\n submitButtonLabel: string;\n\n /** Label of the cancel button inside confirmation dialogue pop up */\n cancelButtonLabel: string;\n };\n\n /** Boolean to toggle the show/visibility */\n showConfirmationAction: boolean;\n\n /** Function to be executed upon submission of the concerned modal */\n onSubmit: (value?: any) => void;\n\n /** Function to be executed upon cancellation of the concerned modal */\n onCancel: (reason?: any) => void;\n}\n\n/** Interface for displaying API stats on the view */\nexport interface DebugInfo {\n /** Class name of the data page */\n className: string;\n\n /** Name of the data page */\n dataPage: string;\n\n /** Source of the data page */\n dataSource?: string;\n\n /** Unique identifier for the insight */\n insightId?: string;\n\n /** Time taken by the API */\n timeTaken?: string;\n}\n\n/** Style interface for freezeline */\nexport interface FreezeLine {\n styles: {\n left: string;\n };\n}\n\n/** An interface used for group headers, consisting of grouping and hierarchical grouping properties */\nexport interface GroupHeader {\n /** Applied aggregation to be displayed in group header */\n aggregation: { [key: FieldDef['name']]: { [key: string]: number } };\n\n /** Count to be displayed in group header */\n count: number;\n\n /** Data */\n data: object;\n\n /** End index of the rows in a particular group */\n endIndex: number;\n\n /** group-key: Computed using getGroupKey utility */\n groupBy: string;\n\n /** String array denoting hierarchy */\n hierarchy: string[];\n\n /** Hierarchical grouping info object */\n info: object;\n\n /** Indicates expanded state */\n isExpanded: boolean;\n\n /** Indicates if its hierarchical grouping */\n isHierarchical: boolean;\n\n /** Indicates if it is a leaf node. */\n isLeafNode: boolean;\n\n /** Indicates visibility */\n isVisible: boolean;\n\n /** Label of the group header to be displayed on UI */\n label: string;\n\n /** Level denoting the nesting level of a group header */\n level: number;\n\n /** Name attribute on a group header */\n name: string;\n\n /** Boolean to toggle displaying the hierarchical footer */\n showHierarchicalFooter: boolean;\n\n /** End index of the rows in a particular group */\n startIndex: number;\n}\n\nexport interface RequiredDefinition {\n required: boolean;\n validatemessage: string;\n}\n\n/**\n * Warning detail structure from DX API responses.\n * Contains message information that can be localized and displayed to users.\n */\nexport interface WarningDetail {\n /** Localized Message */\n message?: string;\n}\n\n/** UI props to be set on the view for A11Y purpose */\nexport interface UIProps {\n /** This attribute conveys the number of columns in the repeating structures to screen readers. */\n 'aria-colcount': number;\n\n /** This attribute conveys the label of the repeating structures to screen readers. */\n 'aria-label': string;\n\n /** This attribute conveys the number of rows in the repeating structures to screen readers. */\n 'aria-rowcount': number;\n\n /** HTML role attribute for the view.\n * @default 'grid'\n */\n role: string;\n}\n\nexport type ViewState = OmitStrict<\n State,\n | 'groupFilters'\n | 'forceUpdateFeatures'\n | 'template'\n | 'presetId'\n | 'version'\n | 'renderFormatter'\n | 'hierarchicalGroup'\n> & { searchText?: string };\n\n/** Personalization information object */\ninterface PersonalizationInfo {\n /** Coordinates of current row index. */\n existingItemBoundingBox: DOMRect;\n\n /** Common visible item in view before and after paint (previous and next paint) */\n currentRowIndex: number;\n\n /** Possible index on view top */\n topRowIndex: number;\n\n /** Buffer coordinates while pagination. */\n bufferOldCords: DOMRect;\n\n /** Buffer coordinates while pagination is in progress and user scroll. */\n bufferNewCords: DOMRect;\n\n /** View object containing start index and end index */\n view: {\n startIndex: number;\n endIndex: number;\n };\n}\n\n/** Interface structure for virtualizer instance */\ninterface VirtualizeInstance {\n /** DOM element for body container */\n bContainer: HTMLElement;\n\n /** Multiplier to be used when calculating the buffer rows to be loaded, bufferRows = bufferMultiplier * totalrows */\n bufferMultiplier: number;\n\n /** Number denoting the row height */\n itemHeight: number;\n\n /** DOM element for parent container */\n pContainer: HTMLElement;\n\n /** Virtualizer specific information */\n pInfo: PersonalizationInfo;\n\n /** DOM element for row container */\n rContainer: HTMLElement;\n}\n\n/**\n * Attributes of the virtualizer being used\n */\nexport interface RootVirtualizer {\n /**\n * Returns the parent container pContainer set on the virtualizer\n * @returns div with id pContainer\n */\n getParentContainer: () => HTMLElement;\n\n /** Unique identifier of the virtualizer */\n id: string;\n\n /** Function to execute to scroll the virtualizer to top */\n scrollToTop: () => void;\n\n /** Additional information set on the virtualizer instance */\n vi: VirtualizeInstance;\n}\n\nexport interface VirtualizeElement {\n [key: string]: RootVirtualizer;\n}\n\nexport type FormatterFunction = Formatters[keyof Formatters];\n\nexport interface RefreshNotification {\n /** A unique identifier for a refresh notification published by consumer of RS. */\n id: number;\n /** The message that needs to be displayed as refresh notification */\n message: string;\n /** The label for the refresh action button. */\n refreshActionLabel: string;\n}\n"]}
|
|
@@ -26,6 +26,7 @@ export default function setupViewUtilityMock({ dispatchMock, rsPropsMock, viewSe
|
|
|
26
26
|
applyHiddenColumns(payload: string[], ootbColumns?: {
|
|
27
27
|
dragHandle?: boolean;
|
|
28
28
|
}): void;
|
|
29
|
+
applyVisibleColumns(payload: string[]): void;
|
|
29
30
|
applyAggregations(payload: NonNullable<import("../../../../types/State.types").State["aggregationInfo"]>): void;
|
|
30
31
|
applyOrder(payload: string[]): void;
|
|
31
32
|
updatePersonalization(personalizationKey: string, markAsDefault: boolean, markAsAppDefault: boolean): void;
|
|
@@ -40,6 +41,7 @@ export default function setupViewUtilityMock({ dispatchMock, rsPropsMock, viewSe
|
|
|
40
41
|
setAppDefaultPersonalization(personalizationKey: string, trimmedName: string): void;
|
|
41
42
|
applySearch(value: string): void;
|
|
42
43
|
applyRowHeight(payload: typeof import("../../../..").ROW_DENSITY[keyof typeof import("../../../..").ROW_DENSITY]): void;
|
|
44
|
+
applyGalleryLayout(layout: import("../../../../types/Meta.types").GalleryLayout): void;
|
|
43
45
|
doBootstrap(): void;
|
|
44
46
|
forceRefresh(flushState?: {
|
|
45
47
|
[k: string]: boolean;
|
|
@@ -60,6 +62,7 @@ export default function setupViewUtilityMock({ dispatchMock, rsPropsMock, viewSe
|
|
|
60
62
|
[key: import("../../../../types/Meta.types").FieldDef["id"]]: boolean;
|
|
61
63
|
}): void;
|
|
62
64
|
setConditionalStyleFormats(conditionalStyleFormats: NonNullable<import("../../../../types/State.types").State["conditionalStyleFormats"]>): void;
|
|
65
|
+
changeTemplate(template: NonNullable<import("../ViewGenerator").default["template"]>): void;
|
|
63
66
|
};
|
|
64
67
|
mockRsInternalProps: any;
|
|
65
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewUtilityMockSetup.d.ts","sourceRoot":"","sources":["../../../../../src/core/generators/__tests__/viewUtilityMockSetup.js"],"names":[],"mappings":"AAGA;;;;;
|
|
1
|
+
{"version":3,"file":"viewUtilityMockSetup.d.ts","sourceRoot":"","sources":["../../../../../src/core/generators/__tests__/viewUtilityMockSetup.js"],"names":[],"mappings":"AAGA;;;;;iBAcinJ,CAAC;0BAA4C,CAAC;gCAAoD,CAAC;qCAA+D,CAAC;oBAAkD,CAAC;;;;;;;;;;;;;;;;;sBAAm6R,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAD1ub"}
|
|
@@ -3,10 +3,10 @@ import type { ModalManagerContextValue } from '@pega/cosmos-react-core/lib/compo
|
|
|
3
3
|
import type RsInternal from '../RsInternal';
|
|
4
4
|
import ActionTypes from '../actions/actionConstants';
|
|
5
5
|
import type { Errors, State } from '../../../types/State.types';
|
|
6
|
-
import type { FieldDef, ROW_DENSITY } from '../../../types/Meta.types';
|
|
6
|
+
import type { FieldDef, GalleryLayout, ROW_DENSITY } from '../../../types/Meta.types';
|
|
7
7
|
import type { ActionMeta, ApplyAliasesActionPayload, ColumnFilteringActionPayload, ExpandCollapsePayload, PaginationPayload } from '../actions/actions.types';
|
|
8
8
|
import type View from './ViewGenerator';
|
|
9
|
-
import type { DebugInfo, RefreshNotification, RequiredDefinition } from './ViewGenerator.types';
|
|
9
|
+
import type { DebugInfo, RefreshNotification, RequiredDefinition, WarningDetail } from './ViewGenerator.types';
|
|
10
10
|
export type RefreshNotificationForConsumer = OmitStrict<RefreshNotification, 'id'>;
|
|
11
11
|
export type SupportedConsumerPayloads = {
|
|
12
12
|
[ActionTypes.USER_CONFIRMATION_ACTION]: OmitStrict<NonNullable<View['confirmationActionDetails']>, 'onSubmit' | 'onCancel'>;
|
|
@@ -16,6 +16,7 @@ export type SupportedConsumerPayloads = {
|
|
|
16
16
|
[ActionTypes.NOTIFY_DATA_REFRESH]: RefreshNotificationForConsumer;
|
|
17
17
|
[ActionTypes.SET_IN_EXTERNAL_STATE]: NonNullable<State['externalState']>;
|
|
18
18
|
[ActionTypes.UPDATE_SELECTED_ROWS]: undefined;
|
|
19
|
+
[ActionTypes.SET_WARNING_MESSAGES]: WarningDetail[];
|
|
19
20
|
};
|
|
20
21
|
export type SupportedConsumerActionType = keyof SupportedConsumerPayloads;
|
|
21
22
|
export default function viewUtilityMethods(rsInternal: RsInternal): {
|
|
@@ -41,7 +42,6 @@ export default function viewUtilityMethods(rsInternal: RsInternal): {
|
|
|
41
42
|
*
|
|
42
43
|
* @param sourceKey - The itemKey for the row being dragged.
|
|
43
44
|
* @param destinationKey - The itemKey for the row on which it is dropped.
|
|
44
|
-
* @returns
|
|
45
45
|
*/
|
|
46
46
|
handleRowReorder(sourceKey: string, destinationKey: string): void;
|
|
47
47
|
/**
|
|
@@ -157,6 +157,11 @@ export default function viewUtilityMethods(rsInternal: RsInternal): {
|
|
|
157
157
|
applyHiddenColumns(payload: string[], ootbColumns?: {
|
|
158
158
|
dragHandle?: boolean;
|
|
159
159
|
}): void;
|
|
160
|
+
/**
|
|
161
|
+
* Sets the {@link State.visibleColumns visibleColumns} in the state.
|
|
162
|
+
* @param columnId - A single column ID or an array of column IDs to make visible.
|
|
163
|
+
*/
|
|
164
|
+
applyVisibleColumns(payload: string[]): void;
|
|
160
165
|
/**
|
|
161
166
|
* Dispatches an action that replace {@link State.aggregationInfo aggregationInfo} slice in the state with the given {@link payload}.
|
|
162
167
|
* @param payload
|
|
@@ -245,6 +250,12 @@ export default function viewUtilityMethods(rsInternal: RsInternal): {
|
|
|
245
250
|
* @param payload the row density id.
|
|
246
251
|
*/
|
|
247
252
|
applyRowHeight(payload: (typeof ROW_DENSITY)[keyof typeof ROW_DENSITY]): void;
|
|
253
|
+
/**
|
|
254
|
+
* Applies gallery layout on the current view.
|
|
255
|
+
*
|
|
256
|
+
* @param layout - Gallery layout mode.
|
|
257
|
+
*/
|
|
258
|
+
applyGalleryLayout(layout: GalleryLayout): void;
|
|
248
259
|
/**
|
|
249
260
|
* Sets the {@link State.bootstrap bootstrap} status of repeating structures and update the {@link State.version version}in state.
|
|
250
261
|
*/
|
|
@@ -261,7 +272,6 @@ export default function viewUtilityMethods(rsInternal: RsInternal): {
|
|
|
261
272
|
/**
|
|
262
273
|
* Fetches actions for the {@link selectedItems} using {@link ApiContext.fetchActions fetchActions} api.
|
|
263
274
|
* @param selectedItems
|
|
264
|
-
* @returns
|
|
265
275
|
*/
|
|
266
276
|
fetchActions(selectedItems: string[]): Promise<(Pick<import("../../../types/Meta.types").RowAction, "text" | "id"> & {
|
|
267
277
|
onClick: (rowIds: string[], clearSelectionAndRefreshRowsCallback: () => void) => void;
|
|
@@ -282,15 +292,14 @@ export default function viewUtilityMethods(rsInternal: RsInternal): {
|
|
|
282
292
|
setErrors(payload: Errors): void;
|
|
283
293
|
/**
|
|
284
294
|
* Dispatches the dom container responsive breakpoints to state.
|
|
285
|
-
* @param
|
|
286
|
-
* @param
|
|
295
|
+
* @param breakpoint
|
|
296
|
+
* @param value
|
|
287
297
|
*/
|
|
288
298
|
setDomContainerResponsiveBreakpoints(breakpoint: string, value: boolean): void;
|
|
289
299
|
/**
|
|
290
300
|
* Refreshes the {@link View.data data} for {@link rows} by calling {@link ApiContext.fetchRowsData fetchRowsData} api.
|
|
291
301
|
* It also calls {@link utilMethods.forceUpdate forceUpdate } to trigger state change for re-rendering.
|
|
292
302
|
* @param rows
|
|
293
|
-
* @returns
|
|
294
303
|
*/
|
|
295
304
|
refreshRows(rows?: string[]): Promise<void>;
|
|
296
305
|
/**
|
|
@@ -302,17 +311,14 @@ export default function viewUtilityMethods(rsInternal: RsInternal): {
|
|
|
302
311
|
/**
|
|
303
312
|
* Triggers {@link ApiContext.importCSVData importCSVData} api.
|
|
304
313
|
* @param create
|
|
305
|
-
* @returns
|
|
306
314
|
*/
|
|
307
315
|
importCSVData(create: ModalManagerContextValue["create"]): Promise<void> | undefined;
|
|
308
316
|
/**
|
|
309
317
|
* Triggers {@link ApiContext.exportData exportData} api.
|
|
310
|
-
* @returns
|
|
311
318
|
*/
|
|
312
319
|
exportToExcel(): Promise<void> | undefined;
|
|
313
320
|
/**
|
|
314
321
|
* Triggers {@link ApiContext.exportDataToCSV exportDataToCSV} api.
|
|
315
|
-
* @returns
|
|
316
322
|
*/
|
|
317
323
|
exportToCSV(): Promise<void> | undefined;
|
|
318
324
|
/**
|
|
@@ -323,6 +329,13 @@ export default function viewUtilityMethods(rsInternal: RsInternal): {
|
|
|
323
329
|
[key: FieldDef["id"]]: boolean;
|
|
324
330
|
}): void;
|
|
325
331
|
setConditionalStyleFormats(conditionalStyleFormats: NonNullable<State["conditionalStyleFormats"]>): void;
|
|
332
|
+
/**
|
|
333
|
+
* Switches the active template for the view at runtime
|
|
334
|
+
* (e.g. when the user toggles between Table and Gallery from the toolbar).
|
|
335
|
+
*
|
|
336
|
+
* @param template The target template to switch to.
|
|
337
|
+
*/
|
|
338
|
+
changeTemplate(template: NonNullable<View["template"]>): void;
|
|
326
339
|
};
|
|
327
340
|
export type UtilityFunctions = ReturnType<typeof viewUtilityMethods>;
|
|
328
341
|
//# sourceMappingURL=viewUtilityMethods.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewUtilityMethods.d.ts","sourceRoot":"","sources":["../../../../src/core/generators/viewUtilityMethods.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0DAA0D,CAAC;AAEzG,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAMrD,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAMhE,OAAO,KAAK,EAAE,QAAQ,EAAQ,WAAW,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"viewUtilityMethods.d.ts","sourceRoot":"","sources":["../../../../src/core/generators/viewUtilityMethods.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0DAA0D,CAAC;AAEzG,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAMrD,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAMhE,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAQ,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,KAAK,EACV,UAAU,EACV,yBAAyB,EACzB,4BAA4B,EAC5B,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,KAAK,EACV,SAAS,EACT,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACd,MAAM,uBAAuB,CAAC;AAG/B,MAAM,MAAM,8BAA8B,GAAG,UAAU,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;AAEnF,MAAM,MAAM,yBAAyB,GAA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E;;;;;OAKG;uBAEgB,MAAM;IAIzB;;;;OAIG;4BACqB,CAAC,OAAO,WAAW,EAAE,MAAM,OAAO,WAAW,CAAC;IAItE;;;;OAIG;+BACwB,aAAa;IAIxC;;OAEG;;IAMH;;;;;OAKG;8BACsB;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,oBAAwB,MAAM,EAAE;IAajF;;;OAGG;gCACyB,MAAM,EAAE;;;IAIpC;;;OAGG;uCACsC,MAAM,EAAE;IAIjD;;OAEG;;IAKH;;;OAGG;uBACgB,MAAM;IAKzB;;;;OAIG;qDAC8C,MAAM,SAAS,OAAO;IAKvE;;;;OAIG;uBACqB,MAAM,EAAE;IA2BhC;;;;OAIG;8BAC6B,OAAO;IA8CvC;;;OAGG;0BACmB,wBAAwB,CAAC,QAAQ,CAAC;IAYxD;;OAEG;;IAiCH;;OAEG;;IAkBH;;;OAGG;qCAC8B;QAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,OAAO,CAAA;KAAE;wDAKxC,WAAW,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAKxE;;;;;OAKG;6BACsB,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;EAMzD;AACD,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ActionTypes from '../actions/actionConstants';
|
|
2
2
|
import * as actions from '../actions/actions';
|
|
3
3
|
import { rowSelectColumnMeta } from '../constants';
|
|
4
|
-
import { validateAction, passablePromise, deepCopy } from '../utils/util';
|
|
4
|
+
import { validateAction, passablePromise, deepCopy, deepEqual } from '../utils/util';
|
|
5
5
|
function syncData(key, sourceArray, modifiedArray) {
|
|
6
6
|
return sourceArray.map(item => {
|
|
7
7
|
const item2 = modifiedArray.find(i2 => i2[key] === item[key]);
|
|
@@ -35,7 +35,6 @@ export default function viewUtilityMethods(rsInternal) {
|
|
|
35
35
|
*
|
|
36
36
|
* @param sourceKey - The itemKey for the row being dragged.
|
|
37
37
|
* @param destinationKey - The itemKey for the row on which it is dropped.
|
|
38
|
-
* @returns
|
|
39
38
|
*/
|
|
40
39
|
handleRowReorder(sourceKey, destinationKey) {
|
|
41
40
|
if (getView()?.meta?.moveListRecords) {
|
|
@@ -110,7 +109,7 @@ export default function viewUtilityMethods(rsInternal) {
|
|
|
110
109
|
utilMethods.forceUpdate(false);
|
|
111
110
|
break;
|
|
112
111
|
case ActionTypes.TOGGLE_DISABLE_SELECTION: {
|
|
113
|
-
let rowSelectColumn = getView().columns?.find(column => column.field.
|
|
112
|
+
let rowSelectColumn = getView().columns?.find(column => column.field.id === rowSelectColumnMeta.field.id);
|
|
114
113
|
if (rowSelectColumn) {
|
|
115
114
|
rowSelectColumn = rowSelectColumn.setProp({
|
|
116
115
|
disableSelection: payload
|
|
@@ -138,6 +137,12 @@ export default function viewUtilityMethods(rsInternal) {
|
|
|
138
137
|
updateSelectedRows: new Date().getTime()
|
|
139
138
|
});
|
|
140
139
|
break;
|
|
140
|
+
case ActionTypes.SET_WARNING_MESSAGES:
|
|
141
|
+
if (!deepEqual(getView().getWarningMessages(), payload)) {
|
|
142
|
+
getView().setProp({ warningMessages: payload });
|
|
143
|
+
utilMethods.forceUpdate(false);
|
|
144
|
+
}
|
|
145
|
+
break;
|
|
141
146
|
default:
|
|
142
147
|
}
|
|
143
148
|
return actionReturnValue;
|
|
@@ -257,6 +262,13 @@ export default function viewUtilityMethods(rsInternal) {
|
|
|
257
262
|
applyHiddenColumns(payload, ootbColumns) {
|
|
258
263
|
getRsStateResolver().dispatch(actions.actionHiddenColumnUpdate(payload, ootbColumns));
|
|
259
264
|
},
|
|
265
|
+
/**
|
|
266
|
+
* Sets the {@link State.visibleColumns visibleColumns} in the state.
|
|
267
|
+
* @param columnId - A single column ID or an array of column IDs to make visible.
|
|
268
|
+
*/
|
|
269
|
+
applyVisibleColumns(payload) {
|
|
270
|
+
getRsStateResolver().dispatch(actions.actionVisibleColumnUpdate(payload));
|
|
271
|
+
},
|
|
260
272
|
/**
|
|
261
273
|
* Dispatches an action that replace {@link State.aggregationInfo aggregationInfo} slice in the state with the given {@link payload}.
|
|
262
274
|
* @param payload
|
|
@@ -368,6 +380,14 @@ export default function viewUtilityMethods(rsInternal) {
|
|
|
368
380
|
applyRowHeight(payload) {
|
|
369
381
|
getRsStateResolver().dispatch(actions.actionRowHeightChange(payload));
|
|
370
382
|
},
|
|
383
|
+
/**
|
|
384
|
+
* Applies gallery layout on the current view.
|
|
385
|
+
*
|
|
386
|
+
* @param layout - Gallery layout mode.
|
|
387
|
+
*/
|
|
388
|
+
applyGalleryLayout(layout) {
|
|
389
|
+
getRsStateResolver().dispatch(actions.actionGalleryLayoutChange(layout));
|
|
390
|
+
},
|
|
371
391
|
/**
|
|
372
392
|
* Sets the {@link State.bootstrap bootstrap} status of repeating structures and update the {@link State.version version}in state.
|
|
373
393
|
*/
|
|
@@ -385,14 +405,16 @@ export default function viewUtilityMethods(rsInternal) {
|
|
|
385
405
|
// If a refresh is in progress, don't trigger another refresh.
|
|
386
406
|
if (getRsStore().refreshInProgress)
|
|
387
407
|
return;
|
|
408
|
+
// Communicate forceRefresh to apiContext via ApiOptions.
|
|
388
409
|
getRsStore().refreshInProgress = true;
|
|
389
410
|
getRsStore().refreshToken = Date.now();
|
|
411
|
+
// Communicate forceRefresh to apiContext via callback.
|
|
412
|
+
getRsProps().apiContext.onBeforeRefresh?.();
|
|
390
413
|
getRsStateResolver().dispatch(actions.actionForceRefresh(flushState, featuresToAvoid));
|
|
391
414
|
},
|
|
392
415
|
/**
|
|
393
416
|
* Fetches actions for the {@link selectedItems} using {@link ApiContext.fetchActions fetchActions} api.
|
|
394
417
|
* @param selectedItems
|
|
395
|
-
* @returns
|
|
396
418
|
*/
|
|
397
419
|
fetchActions(selectedItems) {
|
|
398
420
|
return getRsProps().apiContext.fetchActions?.(selectedItems);
|
|
@@ -421,8 +443,8 @@ export default function viewUtilityMethods(rsInternal) {
|
|
|
421
443
|
},
|
|
422
444
|
/**
|
|
423
445
|
* Dispatches the dom container responsive breakpoints to state.
|
|
424
|
-
* @param
|
|
425
|
-
* @param
|
|
446
|
+
* @param breakpoint
|
|
447
|
+
* @param value
|
|
426
448
|
*/
|
|
427
449
|
setDomContainerResponsiveBreakpoints(breakpoint, value) {
|
|
428
450
|
const payload = { breakpoint, value };
|
|
@@ -432,7 +454,6 @@ export default function viewUtilityMethods(rsInternal) {
|
|
|
432
454
|
* Refreshes the {@link View.data data} for {@link rows} by calling {@link ApiContext.fetchRowsData fetchRowsData} api.
|
|
433
455
|
* It also calls {@link utilMethods.forceUpdate forceUpdate } to trigger state change for re-rendering.
|
|
434
456
|
* @param rows
|
|
435
|
-
* @returns
|
|
436
457
|
*/
|
|
437
458
|
async refreshRows(rows = []) {
|
|
438
459
|
const rsProps = getRsProps();
|
|
@@ -500,7 +521,6 @@ export default function viewUtilityMethods(rsInternal) {
|
|
|
500
521
|
/**
|
|
501
522
|
* Triggers {@link ApiContext.importCSVData importCSVData} api.
|
|
502
523
|
* @param create
|
|
503
|
-
* @returns
|
|
504
524
|
*/
|
|
505
525
|
importCSVData(create) {
|
|
506
526
|
return getRsProps()
|
|
@@ -513,16 +533,25 @@ export default function viewUtilityMethods(rsInternal) {
|
|
|
513
533
|
},
|
|
514
534
|
/**
|
|
515
535
|
* Triggers {@link ApiContext.exportData exportData} api.
|
|
516
|
-
* @returns
|
|
517
536
|
*/
|
|
518
537
|
exportToExcel() {
|
|
538
|
+
function getVisibleColumnFormatters() {
|
|
539
|
+
const visibleColumns = getView().getVisibleColumns();
|
|
540
|
+
const formatters = {};
|
|
541
|
+
visibleColumns?.forEach(column => {
|
|
542
|
+
if (column.formatterConfig) {
|
|
543
|
+
formatters[column.field.id] = column.formatterConfig;
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
return formatters;
|
|
547
|
+
}
|
|
519
548
|
return getRsProps()
|
|
520
549
|
.apiContext.exportData?.(deepCopy(getView().state), getView().meta, {
|
|
521
550
|
...(getRsStore().refreshInProgress && {
|
|
522
551
|
invalidateCache: true,
|
|
523
552
|
invalidateCacheToken: getRsStore().refreshToken
|
|
524
553
|
})
|
|
525
|
-
})
|
|
554
|
+
}, getVisibleColumnFormatters())
|
|
526
555
|
.catch(err => {
|
|
527
556
|
getRsStateResolver().dispatch(actions.actionNotificationAdd({
|
|
528
557
|
content: err
|
|
@@ -531,7 +560,6 @@ export default function viewUtilityMethods(rsInternal) {
|
|
|
531
560
|
},
|
|
532
561
|
/**
|
|
533
562
|
* Triggers {@link ApiContext.exportDataToCSV exportDataToCSV} api.
|
|
534
|
-
* @returns
|
|
535
563
|
*/
|
|
536
564
|
exportToCSV() {
|
|
537
565
|
return getRsProps()
|
|
@@ -556,6 +584,17 @@ export default function viewUtilityMethods(rsInternal) {
|
|
|
556
584
|
},
|
|
557
585
|
setConditionalStyleFormats(conditionalStyleFormats) {
|
|
558
586
|
getRsStateResolver().dispatch(actions.setConditionalStyleFormats(conditionalStyleFormats));
|
|
587
|
+
},
|
|
588
|
+
/**
|
|
589
|
+
* Switches the active template for the view at runtime
|
|
590
|
+
* (e.g. when the user toggles between Table and Gallery from the toolbar).
|
|
591
|
+
*
|
|
592
|
+
* @param template The target template to switch to.
|
|
593
|
+
*/
|
|
594
|
+
changeTemplate(template) {
|
|
595
|
+
if (getView().meta.allowSwitchTemplate === false)
|
|
596
|
+
return;
|
|
597
|
+
getRsStateResolver().dispatch(actions.actionChangeTemplate(template));
|
|
559
598
|
}
|
|
560
599
|
};
|
|
561
600
|
return utilMethods;
|