@pega/lists-core 9.0.0-build.29.21 → 9.0.0-build.29.23
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/src/core/StateResolver.d.ts.map +1 -1
- package/lib/src/core/StateResolver.js +16 -3
- package/lib/src/core/StateResolver.js.map +1 -1
- package/lib/src/core/actions/actions.d.ts +1 -0
- package/lib/src/core/actions/actions.d.ts.map +1 -1
- package/lib/src/core/actions/actions.types.d.ts +1 -0
- package/lib/src/core/actions/actions.types.d.ts.map +1 -1
- package/lib/src/core/generators/__tests__/viewUtilityMockSetup.d.ts.map +1 -1
- package/lib/src/core/generators/viewUtilityMethods.d.ts.map +1 -1
- package/lib/src/core/generators/viewUtilityMethods.js +9 -2
- package/lib/src/core/generators/viewUtilityMethods.js.map +1 -1
- package/lib/src/core/reducers/error.d.ts +1 -0
- package/lib/src/core/reducers/error.d.ts.map +1 -1
- package/lib/src/core/reducers/index.d.ts +1 -0
- package/lib/src/core/reducers/index.d.ts.map +1 -1
- package/lib/types/State.types.d.ts +5 -0
- package/lib/types/State.types.d.ts.map +1 -1
- package/lib/types/State.types.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StateResolver.d.ts","sourceRoot":"","sources":["../../../src/core/StateResolver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,KAAK,EAAc,UAAU,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAgB9F,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,sBAAsB,EAAuB,MAAM,2BAA2B,CAAC;AAC7F,OAAO,KAAK,EAAoB,UAAU,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGpF,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,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C,iBAAiB,CAAC,CAAC;AAChC,kCAAkC;AAClC,MAAM,CAAC,OAAO,OAAO,aAAa;;IAwChC,6CAA6C;IAC7C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;;OAKG;gBAED,QAAQ,EAAE,eAAe,EACzB,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,UAAU;IAiCxB;;;;;OAKG;IACH,QAAQ,GAAI,QAAQ,UAAU,KAAG,IAAI,CA+CnC;IAEF;;OAEG;IACH,QAAQ,cAEN;IAEF;;OAEG;IACH,gBAAgB,cAEd;IAEF;;;;OAIG;IACH,cAAc,GACZ,aAAa,CAAC,YAAY,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,UAI3E;CAqIH;AAED,0EAA0E;AAC1E,wBAAgB,0BAA0B,CAAC,cAAc,EAAE,UAAU,IAcrD,OAAO,KAAK,EAAE,kBAAkB,UAAU,gCAwBzD"}
|
|
@@ -134,6 +134,21 @@ export default class StateResolver {
|
|
|
134
134
|
return;
|
|
135
135
|
this.#middlewares = middlewares;
|
|
136
136
|
};
|
|
137
|
+
/**
|
|
138
|
+
* Returns true if the lone queued FORCE_UPDATE action should be skipped (no-op optimization).
|
|
139
|
+
*/
|
|
140
|
+
#skipForceUpdateAction = () => {
|
|
141
|
+
if (this.#queuedActions.length !== 1)
|
|
142
|
+
return false;
|
|
143
|
+
const action = this.#queuedActions[0];
|
|
144
|
+
if (action?.type !== ActionTypes.FORCE_UPDATE)
|
|
145
|
+
return false;
|
|
146
|
+
if (!('payload' in action))
|
|
147
|
+
return false;
|
|
148
|
+
if (action.payload.forceUpdateFeatures?.dependentViewPropertyChanged)
|
|
149
|
+
return false;
|
|
150
|
+
return !Object.keys(action.payload.forceUpdateFeatures ?? {}).length;
|
|
151
|
+
};
|
|
137
152
|
/** This will reduce the RsCore {@link State state} for a {@link StateResolver.dispatch dispatched} action .
|
|
138
153
|
* Additionally it will also run middlewares, fetches latest data using {@link FetchDataHandler} and executes post state update callback with latest reduced state.
|
|
139
154
|
*/
|
|
@@ -183,9 +198,7 @@ export default class StateResolver {
|
|
|
183
198
|
// forceUpdateFeatures slice is generally used by features when they are not able to perform their task if the rendering cycle is not complete.
|
|
184
199
|
// For eg.renderHeader and autosize feature set forceRenderOnNextRun and forceCalculateAutoWidth in this slice so that they will get executed after the existing rendering cycle is complete and the rows are rendered on DOM.
|
|
185
200
|
// If we skip these types of FORCE_UPDATE action then the corresponding features execution will also be skipped.
|
|
186
|
-
if (this.#
|
|
187
|
-
this.#queuedActions[0]?.type === ActionTypes.FORCE_UPDATE &&
|
|
188
|
-
!Object.keys(this.#queuedActions[0].payload.forceUpdateFeatures).length) {
|
|
201
|
+
if (this.#skipForceUpdateAction()) {
|
|
189
202
|
this.#queuedActions.shift();
|
|
190
203
|
}
|
|
191
204
|
if (this.#queuedActions.length) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StateResolver.js","sourceRoot":"","sources":["../../../src/core/StateResolver.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EACL,sCAAsC,EACtC,8BAA8B,EAC9B,OAAO,EACP,uBAAuB,EACvB,mBAAmB,IAAI,0BAA0B,EACjD,aAAa,EACb,cAAc,EACd,eAAe,EAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,WAAW,MAAM,2BAA2B,CAAC;AAapD,kCAAkC;AAClC,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,gDAAgD;IAChD,WAAW,CAAa;IAExB,0EAA0E;IAC1E,SAAS,CAAkB;IAE3B,8CAA8C;IAC9C,YAAY,CAAkE;IAE9E,yFAAyF;IACzF,iBAAiB,CAAmB;IAEpC,iEAAiE;IACjE,MAAM,CAAQ;IAEd,mFAAmF;IACnF,aAAa,CAAQ;IAErB,sDAAsD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;IAEH,OAAO,KAAK,EAAE,KAAY,EAAE,gBAA4B,EAAE,EAAE;QAC1D;;;;;WAKG;QACH,QAAQ,CAAC,IAAI,GAAG,cAAc,CAAC,OAAO,EAAE,CAAC,IAAK,CAAC;QAC/C,MAAM,YAAY,CAChB,CAAC,KAAK,EAAE,gBAAgB,CAAC,EACzB;YACE,KAAK,CAAC,gBAAgB;YACtB,KAAK,CAAC,MAAM;YACZ,KAAK,CAAC,iBAAiB;YACvB,KAAK,CAAC,YAAY;YAClB,KAAK,CAAC,OAAO;YACb,KAAK,CAAC,MAAM;YACZ,KAAK,CAAC,iBAAiB;YACvB,KAAK,CAAC,YAAY;YAClB,KAAK,CAAC,aAAa;SACpB,CACF,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable no-console */\nimport type { State } from '../../types/State.types';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext, ApiOptions, FetchDataResponse } from '../../types/ApiContext.types';\n\nimport { AFTER_FETCH, BEFORE_FETCH } from './pubSub/events';\nimport {\n clearProcessedActionsFromLatestActions,\n isSignificantPaginationOverlap,\n isEmpty,\n isFilterCriteriaChanged,\n isSameActionPresent as isSameActionPresentInQueue,\n isStaleAction,\n pickProperties,\n withMemoization\n} from './utils/util';\nimport { personalizationProps } from './reducers/personalizationReducer';\nimport ActionTypes from './actions/actionConstants';\nimport type { ActionType } from './actions/actionConstants';\nimport type RsInternal from './RsInternal';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { MiddleWareFeatureProps, UIFeatures, Feature } from './features/featureFactory';\nimport type { ActionAsFunction, BaseAction, Action } from './actions/actions.types';\nimport type RsProps from './RsProps';\n\nexport type ReducerFunction = (state: State, action: Action, rsInternal: RsInternal) => State;\nexport type FetchDataHandler = (\n state: State,\n fetchDataOptions: ApiOptions\n) => Promise<FetchDataResponse>;\n/** It manages state of RsCore. */\nexport default class StateResolver {\n /** A reference to {@link RsInternal} object. */\n #rsInternal: RsInternal;\n\n /** Reducer function to reduce RS Core actions to its respective state. */\n #reducers: ReducerFunction;\n\n /** A reference to beforeRender UI features */\n #middlewares?: (featureProps: MiddleWareFeatureProps) => Promise<void | null>;\n\n /** Handler to fetch and manage data using {@link ApiContext.fetchData fetchData} api. */\n #fetchDataHandler: FetchDataHandler;\n\n /** previously dispatched stable state excluding instant state */\n #state: State;\n\n /** Intermittent state generated based upon the processed actions from the queue */\n #currentState: State;\n\n /** State generated via actions with instantRender. */\n #instantState: State;\n\n /** Queue holding actions that are dispatched. */\n #queuedActions: Action[];\n\n /** Holds the action that is executed. */\n #previousExecutedActionQueue: Action[];\n\n /** It contains registered api's provided by consumer of RsCore */\n #externalStoreRef: NonNullable<RsProps['externalStore']>;\n\n /** Keep track of latest action of a type of that action is marked to ignore stale actions */\n #latestActions = new Map<ActionType, Action>();\n\n /** Indicates if an external dispatch to RS core consumer should ber skipped. */\n #skipExternalDispatch = false;\n\n /** Abort controller to abort the fetchData requests in transit */\n #abortController?: AbortController;\n\n /** Indicates if fetchData is in progress. */\n fetchDataInProgress?: boolean;\n\n /**\n * Create an instance of {@link StateResolver} class.\n * @param reducers Reducer function to reduce state for a given action\n * @param fetchDataHandler Fetch Data handler function to fetch the data of RSCore when required.\n * @param rsInternal Reference to {@link RsInternal} object.\n */\n constructor(\n reducers: ReducerFunction,\n fetchDataHandler: FetchDataHandler,\n rsInternal: RsInternal\n ) {\n this.#reducers = reducers;\n this.#fetchDataHandler = fetchDataHandler;\n this.#rsInternal = rsInternal;\n\n this.#externalStoreRef = rsInternal.getRsProps().externalStore!;\n\n this.#state = {};\n this.#currentState = {};\n this.#instantState = {};\n this.#queuedActions = [];\n this.#previousExecutedActionQueue = [];\n }\n\n /**\n * Executes {@link ApiContext.stateUpdateCallback stateUpdateCallback} and {@link ApiContext.setComponentState setComponentState} api with latest state.\n */\n #executePostStateUpdateCallbacks = () => {\n const { apiContext } = this.#rsInternal.getRsProps();\n if (apiContext?.stateUpdateCallback) {\n apiContext.stateUpdateCallback({\n ...pickProperties(this.getState(), personalizationProps)\n });\n }\n if (apiContext?.setComponentState && this.getState().personalization?.active) {\n apiContext.setComponentState({\n ...pickProperties(this.getState(), personalizationProps),\n activePersonalization: this.getState().personalization?.active\n });\n }\n };\n\n /**\n * Dispatches given {@link action} to update the RsCore {@link State state} based on the provided action type. Multiple actions are queued in the action queue.\n * It will further triggers various {@link UIFeatures features} and fetches data using {@link FetchDataHandler} according to the state changes.\n *\n * @param action - The action to be dispatched.\n */\n dispatch = (action: BaseAction): void => {\n if ('takeLatestAction' in action && action.takeLatestAction) {\n if (isSameActionPresentInQueue(action, this.#latestActions)) return;\n this.#latestActions.set(action.type, action);\n if (isSignificantPaginationOverlap(this.#latestActions, this.#previousExecutedActionQueue)) {\n this.#abortController?.abort();\n }\n }\n if (typeof action === 'function')\n return (action as ActionAsFunction)(\n this.dispatch,\n this.getState,\n this.#rsInternal.getView().meta\n );\n if (!this.#queuedActions.length && !this.fetchDataInProgress) {\n // Don't do deep copy as we don't do deep comparison for arrays and objects in memoization in feature files\n this.#currentState = { ...this.#state };\n }\n\n if ('instantRender' in action && action.instantRender) {\n if (this.#rsInternal.getRsProps().mode === 'debug') {\n console.warn(\n 'Doing instant render. This might introduce performance issues. Check if this is really needed.'\n );\n }\n this.#instantState = this.#reducers(this.#instantState, action, this.#rsInternal);\n this.#rsInternal.getView().setProp({\n state: { ...this.getState(), ...this.#instantState },\n isInstantRender: true\n });\n this.#externalStoreRef.dispatch({\n ...this.#instantState\n });\n this.#executePostStateUpdateCallbacks();\n\n return;\n }\n if ('skipActionQueue' in action && action.skipActionQueue) {\n this.#currentState = this.#reducers(this.#currentState, action, this.#rsInternal);\n return;\n }\n\n this.#queuedActions.push(action);\n // We run next batch only after completing first batch, Fetch call should get completed.\n if (this.#queuedActions.length === 1 && !this.#previousExecutedActionQueue.length) {\n this.#runQueuedActions();\n }\n };\n\n /**\n * Returns the current state that is built using the {@link dispatch dispatched} action.\n */\n getState = () => {\n return Object.keys(this.#currentState).length > 0 ? this.#currentState : this.#state;\n };\n\n /**\n * Returns a snapshot of the previous stable state before the action queue starts executing via {@link dispatch}.\n */\n getOriginalState = () => {\n return this.#state;\n };\n\n /**\n * Sets a function to execute a set of {@link Feature features} before triggering a render.\n * The provided function will be called with the {@link MiddleWareFeatureProps featureProps}\n * @param middlewares - A function that executes a set of {@link Feature features} before rendering.\n */\n setMiddlewares = (\n middlewares: (featureProps: MiddleWareFeatureProps) => Promise<void | null>\n ) => {\n if (this.#middlewares) return;\n this.#middlewares = middlewares;\n };\n\n /** This will reduce the RsCore {@link State state} for a {@link StateResolver.dispatch dispatched} action .\n * Additionally it will also run middlewares, fetches latest data using {@link FetchDataHandler} and executes post state update callback with latest reduced state.\n */\n #runQueuedActions = async () => {\n const queuedAction = this.#queuedActions[0];\n if (queuedAction) {\n const skipStaleActionExecution =\n 'takeLatestAction' in queuedAction &&\n queuedAction.takeLatestAction &&\n isStaleAction(queuedAction, this.#latestActions);\n\n if (skipStaleActionExecution) {\n this.#queuedActions.shift();\n await this.#runQueuedActions();\n return;\n }\n\n this.#previousExecutedActionQueue.push(queuedAction);\n this.#currentState = this.#reducers(this.#currentState, queuedAction, this.#rsInternal);\n await this.#middlewares!({\n rsInternal: this.#rsInternal,\n getState: this.getState,\n getOriginalState: this.getOriginalState,\n dispatch: this.dispatch,\n queuedActions: [queuedAction]\n });\n this.#queuedActions.shift();\n await this.#runQueuedActions();\n } else if (this.#rsInternal.getRsStore().isMounted) {\n this.fetchDataInProgress = true;\n\n await this.#fetchData({\n ...this.#currentState,\n ...this.#instantState\n });\n\n // if the processed action and latest action has same payload, delete the latestAction as all the actions have been processed.\n clearProcessedActionsFromLatestActions(\n this.#latestActions,\n this.#previousExecutedActionQueue\n );\n\n // if data has been ignored, don't dispatch to view layer as the there is no change in rows\n if (!this.#skipExternalDispatch) {\n await this.#externalStoreRef.dispatch({\n ...this.#currentState\n });\n }\n this.#skipExternalDispatch = false;\n this.fetchDataInProgress = false;\n this.#previousExecutedActionQueue = [];\n\n // this happens in cases of dispatches like query info. In that case, the props have been set on view directly and the dispatch has already happened\n // This will prevent unnecessary renders in case of server side table\n\n // Avoid skipping FORCE_UPDATE action in case feature has triggered it and is relying on forceUpdatedFeatures slice of state.\n // forceUpdateFeatures slice is generally used by features when they are not able to perform their task if the rendering cycle is not complete.\n // For eg.renderHeader and autosize feature set forceRenderOnNextRun and forceCalculateAutoWidth in this slice so that they will get executed after the existing rendering cycle is complete and the rows are rendered on DOM.\n // If we skip these types of FORCE_UPDATE action then the corresponding features execution will also be skipped.\n if (\n this.#queuedActions.length === 1 &&\n this.#queuedActions[0]?.type === ActionTypes.FORCE_UPDATE &&\n !Object.keys(this.#queuedActions[0].payload.forceUpdateFeatures).length\n ) {\n this.#queuedActions.shift();\n }\n if (this.#queuedActions.length) {\n this.#runQueuedActions();\n } else {\n this.#state = { ...this.#currentState };\n this.#currentState = {};\n this.#executePostStateUpdateCallbacks();\n }\n }\n };\n\n /**\n * Calls the {@link FetchDataHandler fetchDataHandler} and updates the latest data in the {@link View}\n * @param latestState - Current state.\n */\n #fetchData = async (latestState: State) => {\n this.#abortController = new AbortController();\n const signal = this.#abortController.signal;\n this.#rsInternal.getPubSubUtils().publish(BEFORE_FETCH);\n\n const derivedState = {\n ...latestState,\n groupFilters: this.#rsInternal.getRsStore().groupFilters\n };\n // TODO: No need to fetch data if all the groups are collapsed.\n const res = await this.#fetchDataHandler(derivedState, {\n signal,\n ...(this.#rsInternal.getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: this.#rsInternal.getRsStore().refreshToken\n })\n });\n if (res) {\n const { totalRecordCount, filteredRecordCount, data = [] } = res;\n\n if (!isEmpty(totalRecordCount) || !isEmpty(filteredRecordCount)) {\n this.#rsInternal.getView().setProp({\n resultsCount: totalRecordCount || filteredRecordCount,\n countGeneratedInternally: false,\n showCount: true\n });\n }\n\n if (isSignificantPaginationOverlap(this.#latestActions, this.#previousExecutedActionQueue)) {\n this.#skipExternalDispatch = true;\n } else {\n this.#rsInternal.getView().setProp({\n data,\n isCountUpdateRequired:\n isFilterCriteriaChanged(this.#rsInternal.getRsStore().meta, this.#state, latestState) ||\n latestState.refresh !== this.#state.refresh\n });\n }\n }\n\n this.#rsInternal.getPubSubUtils().publish(AFTER_FETCH);\n this.#rsInternal.getView().setProp({ state: latestState, isInstantRender: false });\n };\n}\n\n/** Initializes handler for {@link ApiContext.fetchData fetchData} api. */\nexport function initializeFetchDataHandler(rsCoreInternal: RsInternal) {\n let response = {} as FetchDataResponse;\n const fetchWrapper = withMemoization(async ([state, fetchDataOptions]: [State, ApiOptions]) => {\n try {\n response = await rsCoreInternal\n .getRsProps()\n .apiContext.fetchData(state, rsCoreInternal.getRsStore().meta, fetchDataOptions);\n } catch (err: any) {\n if (!['AbortError', 'CanceledError'].includes(err.name)) {\n console.error('API call failed', err);\n }\n }\n });\n\n return async (state: State, fetchDataOptions: ApiOptions) => {\n /**\n * Returning default data from getView() in case the actual apiContext.getData() doesn't get called.\n *\n * BUG-811621: in case of bulk actions and inline edit, the updated rows come from separate apiContext APIs\n * and the memo of below function won't break, so, it will give stale data. Using getView().data as the default fallback for such cases.\n */\n response.data = rsCoreInternal.getView().data!;\n await fetchWrapper(\n [state, fetchDataOptions],\n [\n state.filterExpression,\n state.search,\n state.paginationOptions,\n state.sortingOrder,\n state.refresh,\n state.groups,\n state.hierarchicalGroup,\n state.groupFilters,\n state.hiddenColumns\n ]\n );\n return response;\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"StateResolver.js","sourceRoot":"","sources":["../../../src/core/StateResolver.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EACL,sCAAsC,EACtC,8BAA8B,EAC9B,OAAO,EACP,uBAAuB,EACvB,mBAAmB,IAAI,0BAA0B,EACjD,aAAa,EACb,cAAc,EACd,eAAe,E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","sourcesContent":["/* eslint-disable no-console */\nimport type { State } from '../../types/State.types';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext, ApiOptions, FetchDataResponse } from '../../types/ApiContext.types';\n\nimport { AFTER_FETCH, BEFORE_FETCH } from './pubSub/events';\nimport {\n clearProcessedActionsFromLatestActions,\n isSignificantPaginationOverlap,\n isEmpty,\n isFilterCriteriaChanged,\n isSameActionPresent as isSameActionPresentInQueue,\n isStaleAction,\n pickProperties,\n withMemoization\n} from './utils/util';\nimport { personalizationProps } from './reducers/personalizationReducer';\nimport ActionTypes from './actions/actionConstants';\nimport type { ActionType } from './actions/actionConstants';\nimport type RsInternal from './RsInternal';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { MiddleWareFeatureProps, UIFeatures, Feature } from './features/featureFactory';\nimport type { ActionAsFunction, BaseAction, Action } from './actions/actions.types';\nimport type RsProps from './RsProps';\n\nexport type ReducerFunction = (state: State, action: Action, rsInternal: RsInternal) => State;\nexport type FetchDataHandler = (\n state: State,\n fetchDataOptions: ApiOptions\n) => Promise<FetchDataResponse>;\n/** It manages state of RsCore. */\nexport default class StateResolver {\n /** A reference to {@link RsInternal} object. */\n #rsInternal: RsInternal;\n\n /** Reducer function to reduce RS Core actions to its respective state. */\n #reducers: ReducerFunction;\n\n /** A reference to beforeRender UI features */\n #middlewares?: (featureProps: MiddleWareFeatureProps) => Promise<void | null>;\n\n /** Handler to fetch and manage data using {@link ApiContext.fetchData fetchData} api. */\n #fetchDataHandler: FetchDataHandler;\n\n /** previously dispatched stable state excluding instant state */\n #state: State;\n\n /** Intermittent state generated based upon the processed actions from the queue */\n #currentState: State;\n\n /** State generated via actions with instantRender. */\n #instantState: State;\n\n /** Queue holding actions that are dispatched. */\n #queuedActions: Action[];\n\n /** Holds the action that is executed. */\n #previousExecutedActionQueue: Action[];\n\n /** It contains registered api's provided by consumer of RsCore */\n #externalStoreRef: NonNullable<RsProps['externalStore']>;\n\n /** Keep track of latest action of a type of that action is marked to ignore stale actions */\n #latestActions = new Map<ActionType, Action>();\n\n /** Indicates if an external dispatch to RS core consumer should ber skipped. */\n #skipExternalDispatch = false;\n\n /** Abort controller to abort the fetchData requests in transit */\n #abortController?: AbortController;\n\n /** Indicates if fetchData is in progress. */\n fetchDataInProgress?: boolean;\n\n /**\n * Create an instance of {@link StateResolver} class.\n * @param reducers Reducer function to reduce state for a given action\n * @param fetchDataHandler Fetch Data handler function to fetch the data of RSCore when required.\n * @param rsInternal Reference to {@link RsInternal} object.\n */\n constructor(\n reducers: ReducerFunction,\n fetchDataHandler: FetchDataHandler,\n rsInternal: RsInternal\n ) {\n this.#reducers = reducers;\n this.#fetchDataHandler = fetchDataHandler;\n this.#rsInternal = rsInternal;\n\n this.#externalStoreRef = rsInternal.getRsProps().externalStore!;\n\n this.#state = {};\n this.#currentState = {};\n this.#instantState = {};\n this.#queuedActions = [];\n this.#previousExecutedActionQueue = [];\n }\n\n /**\n * Executes {@link ApiContext.stateUpdateCallback stateUpdateCallback} and {@link ApiContext.setComponentState setComponentState} api with latest state.\n */\n #executePostStateUpdateCallbacks = () => {\n const { apiContext } = this.#rsInternal.getRsProps();\n if (apiContext?.stateUpdateCallback) {\n apiContext.stateUpdateCallback({\n ...pickProperties(this.getState(), personalizationProps)\n });\n }\n if (apiContext?.setComponentState && this.getState().personalization?.active) {\n apiContext.setComponentState({\n ...pickProperties(this.getState(), personalizationProps),\n activePersonalization: this.getState().personalization?.active\n });\n }\n };\n\n /**\n * Dispatches given {@link action} to update the RsCore {@link State state} based on the provided action type. Multiple actions are queued in the action queue.\n * It will further triggers various {@link UIFeatures features} and fetches data using {@link FetchDataHandler} according to the state changes.\n *\n * @param action - The action to be dispatched.\n */\n dispatch = (action: BaseAction): void => {\n if ('takeLatestAction' in action && action.takeLatestAction) {\n if (isSameActionPresentInQueue(action, this.#latestActions)) return;\n this.#latestActions.set(action.type, action);\n if (isSignificantPaginationOverlap(this.#latestActions, this.#previousExecutedActionQueue)) {\n this.#abortController?.abort();\n }\n }\n if (typeof action === 'function')\n return (action as ActionAsFunction)(\n this.dispatch,\n this.getState,\n this.#rsInternal.getView().meta\n );\n if (!this.#queuedActions.length && !this.fetchDataInProgress) {\n // Don't do deep copy as we don't do deep comparison for arrays and objects in memoization in feature files\n this.#currentState = { ...this.#state };\n }\n\n if ('instantRender' in action && action.instantRender) {\n if (this.#rsInternal.getRsProps().mode === 'debug') {\n console.warn(\n 'Doing instant render. This might introduce performance issues. Check if this is really needed.'\n );\n }\n this.#instantState = this.#reducers(this.#instantState, action, this.#rsInternal);\n this.#rsInternal.getView().setProp({\n state: { ...this.getState(), ...this.#instantState },\n isInstantRender: true\n });\n this.#externalStoreRef.dispatch({\n ...this.#instantState\n });\n this.#executePostStateUpdateCallbacks();\n\n return;\n }\n if ('skipActionQueue' in action && action.skipActionQueue) {\n this.#currentState = this.#reducers(this.#currentState, action, this.#rsInternal);\n return;\n }\n\n this.#queuedActions.push(action);\n // We run next batch only after completing first batch, Fetch call should get completed.\n if (this.#queuedActions.length === 1 && !this.#previousExecutedActionQueue.length) {\n this.#runQueuedActions();\n }\n };\n\n /**\n * Returns the current state that is built using the {@link dispatch dispatched} action.\n */\n getState = () => {\n return Object.keys(this.#currentState).length > 0 ? this.#currentState : this.#state;\n };\n\n /**\n * Returns a snapshot of the previous stable state before the action queue starts executing via {@link dispatch}.\n */\n getOriginalState = () => {\n return this.#state;\n };\n\n /**\n * Sets a function to execute a set of {@link Feature features} before triggering a render.\n * The provided function will be called with the {@link MiddleWareFeatureProps featureProps}\n * @param middlewares - A function that executes a set of {@link Feature features} before rendering.\n */\n setMiddlewares = (\n middlewares: (featureProps: MiddleWareFeatureProps) => Promise<void | null>\n ) => {\n if (this.#middlewares) return;\n this.#middlewares = middlewares;\n };\n\n /**\n * Returns true if the lone queued FORCE_UPDATE action should be skipped (no-op optimization).\n */\n #skipForceUpdateAction = (): boolean => {\n if (this.#queuedActions.length !== 1) return false;\n const action = this.#queuedActions[0];\n if (action?.type !== ActionTypes.FORCE_UPDATE) return false;\n if (!('payload' in action)) return false;\n if (action.payload.forceUpdateFeatures?.dependentViewPropertyChanged) return false;\n return !Object.keys(action.payload.forceUpdateFeatures ?? {}).length;\n };\n\n /** This will reduce the RsCore {@link State state} for a {@link StateResolver.dispatch dispatched} action .\n * Additionally it will also run middlewares, fetches latest data using {@link FetchDataHandler} and executes post state update callback with latest reduced state.\n */\n #runQueuedActions = async () => {\n const queuedAction = this.#queuedActions[0];\n if (queuedAction) {\n const skipStaleActionExecution =\n 'takeLatestAction' in queuedAction &&\n queuedAction.takeLatestAction &&\n isStaleAction(queuedAction, this.#latestActions);\n\n if (skipStaleActionExecution) {\n this.#queuedActions.shift();\n await this.#runQueuedActions();\n return;\n }\n\n this.#previousExecutedActionQueue.push(queuedAction);\n this.#currentState = this.#reducers(this.#currentState, queuedAction, this.#rsInternal);\n await this.#middlewares!({\n rsInternal: this.#rsInternal,\n getState: this.getState,\n getOriginalState: this.getOriginalState,\n dispatch: this.dispatch,\n queuedActions: [queuedAction]\n });\n this.#queuedActions.shift();\n await this.#runQueuedActions();\n } else if (this.#rsInternal.getRsStore().isMounted) {\n this.fetchDataInProgress = true;\n\n await this.#fetchData({\n ...this.#currentState,\n ...this.#instantState\n });\n\n // if the processed action and latest action has same payload, delete the latestAction as all the actions have been processed.\n clearProcessedActionsFromLatestActions(\n this.#latestActions,\n this.#previousExecutedActionQueue\n );\n\n // if data has been ignored, don't dispatch to view layer as the there is no change in rows\n if (!this.#skipExternalDispatch) {\n await this.#externalStoreRef.dispatch({\n ...this.#currentState\n });\n }\n this.#skipExternalDispatch = false;\n this.fetchDataInProgress = false;\n this.#previousExecutedActionQueue = [];\n\n // this happens in cases of dispatches like query info. In that case, the props have been set on view directly and the dispatch has already happened\n // This will prevent unnecessary renders in case of server side table\n\n // Avoid skipping FORCE_UPDATE action in case feature has triggered it and is relying on forceUpdatedFeatures slice of state.\n // forceUpdateFeatures slice is generally used by features when they are not able to perform their task if the rendering cycle is not complete.\n // For eg.renderHeader and autosize feature set forceRenderOnNextRun and forceCalculateAutoWidth in this slice so that they will get executed after the existing rendering cycle is complete and the rows are rendered on DOM.\n // If we skip these types of FORCE_UPDATE action then the corresponding features execution will also be skipped.\n if (this.#skipForceUpdateAction()) {\n this.#queuedActions.shift();\n }\n if (this.#queuedActions.length) {\n this.#runQueuedActions();\n } else {\n this.#state = { ...this.#currentState };\n this.#currentState = {};\n this.#executePostStateUpdateCallbacks();\n }\n }\n };\n\n /**\n * Calls the {@link FetchDataHandler fetchDataHandler} and updates the latest data in the {@link View}\n * @param latestState - Current state.\n */\n #fetchData = async (latestState: State) => {\n this.#abortController = new AbortController();\n const signal = this.#abortController.signal;\n this.#rsInternal.getPubSubUtils().publish(BEFORE_FETCH);\n\n const derivedState = {\n ...latestState,\n groupFilters: this.#rsInternal.getRsStore().groupFilters\n };\n // TODO: No need to fetch data if all the groups are collapsed.\n const res = await this.#fetchDataHandler(derivedState, {\n signal,\n ...(this.#rsInternal.getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: this.#rsInternal.getRsStore().refreshToken\n })\n });\n if (res) {\n const { totalRecordCount, filteredRecordCount, data = [] } = res;\n\n if (!isEmpty(totalRecordCount) || !isEmpty(filteredRecordCount)) {\n this.#rsInternal.getView().setProp({\n resultsCount: totalRecordCount || filteredRecordCount,\n countGeneratedInternally: false,\n showCount: true\n });\n }\n\n if (isSignificantPaginationOverlap(this.#latestActions, this.#previousExecutedActionQueue)) {\n this.#skipExternalDispatch = true;\n } else {\n this.#rsInternal.getView().setProp({\n data,\n isCountUpdateRequired:\n isFilterCriteriaChanged(this.#rsInternal.getRsStore().meta, this.#state, latestState) ||\n latestState.refresh !== this.#state.refresh\n });\n }\n }\n\n this.#rsInternal.getPubSubUtils().publish(AFTER_FETCH);\n this.#rsInternal.getView().setProp({ state: latestState, isInstantRender: false });\n };\n}\n\n/** Initializes handler for {@link ApiContext.fetchData fetchData} api. */\nexport function initializeFetchDataHandler(rsCoreInternal: RsInternal) {\n let response = {} as FetchDataResponse;\n const fetchWrapper = withMemoization(async ([state, fetchDataOptions]: [State, ApiOptions]) => {\n try {\n response = await rsCoreInternal\n .getRsProps()\n .apiContext.fetchData(state, rsCoreInternal.getRsStore().meta, fetchDataOptions);\n } catch (err: any) {\n if (!['AbortError', 'CanceledError'].includes(err.name)) {\n console.error('API call failed', err);\n }\n }\n });\n\n return async (state: State, fetchDataOptions: ApiOptions) => {\n /**\n * Returning default data from getView() in case the actual apiContext.getData() doesn't get called.\n *\n * BUG-811621: in case of bulk actions and inline edit, the updated rows come from separate apiContext APIs\n * and the memo of below function won't break, so, it will give stale data. Using getView().data as the default fallback for such cases.\n */\n response.data = rsCoreInternal.getView().data!;\n await fetchWrapper(\n [state, fetchDataOptions],\n [\n state.filterExpression,\n state.search,\n state.paginationOptions,\n state.sortingOrder,\n state.refresh,\n state.groups,\n state.hierarchicalGroup,\n state.groupFilters,\n state.hiddenColumns\n ]\n );\n return response;\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/core/actions/actions.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,6BAA6B,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAMrF,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,IAAI,MAAM,6BAA6B,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGvE,OAAO,KAAK,EACV,UAAU,EACV,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,4BAA4B,EAC5B,mBAAmB,EACnB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CANhsD,CAAC;AACzD,MAAM,MAAM,MAAM,GAAG,kBAAkB,CAAC,OAAO,aAAa,CAAC,GAAG,kBAAkB,CAAC;AAInF,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,gBAAgB,CAAC"}
|
|
@@ -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;;;;;iBAcgpJ,CAAC;0BAA4C,CAAC;gCAAoD,CAAC;qCAA+D,CAAC;oBAAkD,CAAC;;;;;;;;;;;;;;;;;sBAAwjT,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAD95c"}
|
|
@@ -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;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;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,6 +1,6 @@
|
|
|
1
1
|
import ActionTypes from '../actions/actionConstants';
|
|
2
2
|
import * as actions from '../actions/actions';
|
|
3
|
-
import { rowSelectColumnMeta } from '../constants';
|
|
3
|
+
import { rowSelectColumnMeta, SUPPORTED_MODES_FOR_SELECTALL } from '../constants';
|
|
4
4
|
import { validateAction, passablePromise, deepCopy, deepEqual } from '../utils/util';
|
|
5
5
|
function syncData(key, sourceArray, modifiedArray) {
|
|
6
6
|
return sourceArray.map(item => {
|
|
@@ -74,7 +74,14 @@ export default function viewUtilityMethods(rsInternal) {
|
|
|
74
74
|
// If count is not finite then do instantRender as we want to hide the count immediately and don't want the StateResolver queue to be empty.
|
|
75
75
|
// Else the count will be displayed after the StateResolver queue becomes empty.
|
|
76
76
|
const instantRender = !Number.isFinite(count);
|
|
77
|
-
|
|
77
|
+
// When a finite count arrives on a selection table, set dependentViewPropertyChanged so the
|
|
78
|
+
// StateResolver optimization that drops a FORCE_UPDATE with empty forceUpdateFeatures does not suppress this dispatch.
|
|
79
|
+
// TODO: Revisit the approach to handle such cases where memoization of feature depends on view property instead of state
|
|
80
|
+
const { selectionMode } = getView().meta;
|
|
81
|
+
const isSelectionEnabled = !!selectionMode && SUPPORTED_MODES_FOR_SELECTALL.includes(selectionMode);
|
|
82
|
+
utilMethods.forceUpdate(instantRender, Number.isFinite(count) && isSelectionEnabled
|
|
83
|
+
? { dependentViewPropertyChanged: true }
|
|
84
|
+
: undefined);
|
|
78
85
|
},
|
|
79
86
|
/**
|
|
80
87
|
* Dispatches an action to interact with repeating structures, allowing consumers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewUtilityMethods.js","sourceRoot":"","sources":["../../../../src/core/generators/viewUtilityMethods.ts"],"names":[],"mappings":"AAIA,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AA4CrF,SAAS,QAAQ,CAAC,GAAW,EAAE,WAAsB,EAAE,aAAwB;IAC7E,OAAO,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QAC5B,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9D,OAAO,KAAK,IAAI,IAAI,CAAC;IACvB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM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AC,CAAC,CAAC;QACP,CAAC;QAED;;;WAGG;QACH,uBAAuB,CAAC,OAA2C;YACjE,kBAAkB,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC;QAC1E,CAAC;QAED,0BAA0B,CACxB,uBAAsE;YAEtE,kBAAkB,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,CAAC,CAAC;QAC7F,CAAC;QAED;;;;;WAKG;QACH,cAAc,CAAC,QAAuC;YACpD,IAAI,OAAO,EAAE,CAAC,IAAI,CAAC,mBAAmB,KAAK,KAAK;gBAAE,OAAO;YACzD,kBAAkB,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAAC;QACxE,CAAC;KACF,CAAC;IACF,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["import type { OmitStrict } from '@pega/cosmos-react-core';\nimport type { ModalManagerContextValue } from '@pega/cosmos-react-core/lib/components/Modal/Modal.types';\n\nimport type RsInternal from '../RsInternal';\nimport ActionTypes from '../actions/actionConstants';\nimport * as actions from '../actions/actions';\nimport { rowSelectColumnMeta } from '../constants';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { SUPPORTED_AVOIDABLE_FEATURES, SUPPORTED_FLUSH_KEYS } from '../constants';\nimport { validateAction, passablePromise, deepCopy, deepEqual } from '../utils/util';\nimport type { Errors, State } from '../../../types/State.types';\n// This is being used in JSdoc.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext, ApiOptions } from '../../../types/ApiContext.types';\n// This is being used in JSdoc.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { FieldDef, GalleryLayout, Meta, ROW_DENSITY } from '../../../types/Meta.types';\nimport type {\n ActionMeta,\n ApplyAliasesActionPayload,\n ColumnFilteringActionPayload,\n ExpandCollapsePayload,\n PaginationPayload\n} from '../actions/actions.types';\n\nimport type View from './ViewGenerator';\nimport type { RowData } from './RowGenerator.types';\nimport type {\n DebugInfo,\n RefreshNotification,\n RequiredDefinition,\n WarningDetail\n} from './ViewGenerator.types';\nimport type Column from './ColumnGenerator';\n\nexport type RefreshNotificationForConsumer = OmitStrict<RefreshNotification, 'id'>;\n\nexport type SupportedConsumerPayloads = {\n [ActionTypes.USER_CONFIRMATION_ACTION]: OmitStrict<\n NonNullable<View['confirmationActionDetails']>,\n 'onSubmit' | 'onCancel'\n >;\n [ActionTypes.UPDATE_DEBUG_INFO]: DebugInfo;\n [ActionTypes.TOGGLE_DISABLE_SELECTION]: boolean;\n [ActionTypes.TOGGLE_REQUIRED]: RequiredDefinition;\n [ActionTypes.NOTIFY_DATA_REFRESH]: RefreshNotificationForConsumer;\n [ActionTypes.SET_IN_EXTERNAL_STATE]: NonNullable<State['externalState']>;\n [ActionTypes.UPDATE_SELECTED_ROWS]: undefined;\n [ActionTypes.SET_WARNING_MESSAGES]: WarningDetail[];\n};\n\nexport type SupportedConsumerActionType = keyof SupportedConsumerPayloads;\n\nfunction syncData(key: string, sourceArray: RowData[], modifiedArray: RowData[]) {\n return sourceArray.map(item => {\n const item2 = modifiedArray.find(i2 => i2[key] === item[key]);\n return item2 || item;\n });\n}\n\nexport default function viewUtilityMethods(rsInternal: RsInternal) {\n const { getRsProps, getRsStateResolver, getView, getRsStore } = rsInternal;\n\n const utilMethods = {\n /**\n * Dispatches an action that creates a new state object without any internal modifications.\n *\n * If {@link instantRender} is false and {@link forceUpdateFeatures} are provided,\n * it updates the {@link State.forceUpdateFeatures forceUpdateFeatures} slice in the state.\n *\n * @param instantRender - Determines if the render should happen instantly.\n * @param forceUpdateFeatures - The features to force update in the state on next render cycle.\n */\n forceUpdate(instantRender?: boolean, forceUpdateFeatures?: State['forceUpdateFeatures']) {\n getRsStateResolver().dispatch(actions.actionForceUpdate(instantRender, forceUpdateFeatures));\n },\n\n /**\n * Handles the reordering of rows.\n *\n * If {@link Meta.moveListRecords moveListRecords} is set to true in Meta, it dispatches an action\n * that updates the keys of the {@link sourceKey source} row and the {@link destinationKey destination} row\n * in the {@link State.sourceKey sourceKey} and {@link State.destinationKey destinationKey} state slices, respectively.\n *\n * Otherwise, it calls {@link ApiContext.applyRowReorder applyRowReorder} from the apiContext and triggers\n * a {@link utilMethods.forceRefresh forceRefresh} on the state.\n *\n * @param sourceKey - The itemKey for the row being dragged.\n * @param destinationKey - The itemKey for the row on which it is dropped.\n */\n handleRowReorder(sourceKey: string, destinationKey: string) {\n if (getView()?.meta?.moveListRecords) {\n getRsStateResolver().dispatch(\n actions.actionMoveRecordKeysUpdate({\n sourceKey,\n destinationKey\n })\n );\n return;\n }\n getRsProps()\n .apiContext.applyRowReorder?.(sourceKey, destinationKey)\n .then(() => {\n utilMethods.forceRefresh();\n });\n },\n\n /**\n * Sets the count-related information onto the {@link View view} via {@link View.setProp setProp} and triggers {@link utilMethods.forceUpdate forceUpdate}.\n *\n * @param args - The count information object.\n * @param args.count - The total record count of the view, including group headers.\n * @param args.hasMoreResults - Indicates if the view has more records.\n * @param args.selectedRecordsCount - The total count of selected records.\n * @param args._countGeneratedInternally - Indicates if the count is generated internally. This is used for RS core internal purposes. Setting this from apiContext might lead to erroneous behavior.\n * @returns void\n */\n setRecordCount({\n count,\n hasMoreResults,\n selectedRecordsCount,\n _countGeneratedInternally,\n announce\n }: {\n count?: View['resultsCount'];\n hasMoreResults?: View['hasMoreResults'];\n selectedRecordsCount?: View['selectedRecordsCount'];\n _countGeneratedInternally?: View['countGeneratedInternally'];\n announce?: View['announceCount'];\n }) {\n // NOTE: setRecordCount can be called with partial props. So while doing setProp we need to make sure to check the existence of incoming prop value.\n // If incoming prop is undefined then it should have a fallback otherwise it will override existing value on view to undefined.\n getView().setProp({\n countGeneratedInternally: !!_countGeneratedInternally,\n hasMoreResults: hasMoreResults ?? false,\n resultsCount: count,\n selectedRecordsCount: selectedRecordsCount ?? getView().selectedRecordsCount,\n showCount: !Number.isFinite(count) ? false : !_countGeneratedInternally,\n announceCount: announce\n });\n // If count is not finite then do instantRender as we want to hide the count immediately and don't want the StateResolver queue to be empty.\n // Else the count will be displayed after the StateResolver queue becomes empty.\n const instantRender = !Number.isFinite(count);\n utilMethods.forceUpdate(instantRender);\n },\n\n /**\n * Dispatches an action to interact with repeating structures, allowing consumers\n * to perform operations using standard actions and payloads.\n *\n * @param action The action to be dispatched.\n * @param payload The payload associated with the action.\n * @returns The return value after the action has been processed by the repeating structure.\n */\n // TODO Refactor- this method to have only one parameter action object that contains type and payload. Maintenance of it will be easy.\n // TODO Make it generic specific.\n dispatchAction<T extends SupportedConsumerActionType>(\n action: T,\n payload?: SupportedConsumerPayloads[T]\n ): Promise<any> | undefined {\n const { dispatch } = getRsStateResolver();\n validateAction(action, payload, getView().externalStateKeys);\n\n let actionReturnValue;\n switch (action) {\n case ActionTypes.USER_CONFIRMATION_ACTION:\n // eslint-disable-next-line no-case-declarations\n const [promise, onSubmit, onCancel] = passablePromise<any>();\n getView().setProp({\n confirmationActionDetails: {\n onSubmit,\n onCancel,\n ...(payload as OmitStrict<\n NonNullable<View['confirmationActionDetails']>,\n 'onSubmit' | 'onCancel'\n >)\n }\n });\n dispatch(actions.showConfirmationAction());\n actionReturnValue = promise;\n break;\n case ActionTypes.UPDATE_DEBUG_INFO:\n getView().setProp({ debugInfo: [payload as DebugInfo] });\n utilMethods.forceUpdate(false);\n break;\n case ActionTypes.TOGGLE_DISABLE_SELECTION: {\n let rowSelectColumn = getView().columns?.find(\n column => column.field.id === rowSelectColumnMeta.field.id\n );\n if (rowSelectColumn) {\n rowSelectColumn = rowSelectColumn.setProp({\n disableSelection: payload as boolean\n });\n utilMethods.forceUpdate(false);\n }\n break;\n }\n case ActionTypes.TOGGLE_REQUIRED:\n getView().setProp({ requiredDef: payload as RequiredDefinition });\n utilMethods.forceUpdate(false);\n break;\n case ActionTypes.NOTIFY_DATA_REFRESH:\n getView().setProp('refreshNotification', {\n id: Date.now(),\n ...(payload as RefreshNotificationForConsumer)\n });\n utilMethods.forceUpdate(false);\n break;\n case ActionTypes.SET_IN_EXTERNAL_STATE:\n dispatch(actions.setExternalState(payload as NonNullable<State['externalState']>));\n break;\n case ActionTypes.UPDATE_SELECTED_ROWS:\n utilMethods.forceUpdate(false, {\n updateSelectedRows: new Date().getTime()\n });\n break;\n case ActionTypes.SET_WARNING_MESSAGES:\n if (!deepEqual(getView().getWarningMessages(), payload)) {\n getView().setProp({ warningMessages: payload as WarningDetail[] });\n utilMethods.forceUpdate(false);\n }\n break;\n default:\n }\n return actionReturnValue;\n },\n\n /** Returns the Html events required for reordering a column. */\n getFieldReorderProps() {\n return getRsStore().getFieldReorderProps?.();\n },\n\n // TODO: this should be moved to group generator instance.\n /**\n * Triggers the expand or collapse action for a group header.\n * Dispatches an action to update the {@link State.groupToggle groupToggle} slices in the state.\n *\n * @param payload The data related to the groups.\n */\n toggleGroupExpansion(payload: OmitStrict<ExpandCollapsePayload, 'groups'>) {\n getRsStateResolver().dispatch(actions.actionToggleExpandCollpase(payload));\n },\n\n /**\n * Clears hierarchical groups by dispatching an action to reset the {@link State.hierarchicalGroup hierarchicalGroup} slice in the state.\n */\n clearHierarchicalGroup() {\n getRsStore().groupingInfo = [];\n getRsStateResolver().dispatch(actions.actionUpdateDisplayMode({}));\n },\n\n /**\n * Dispatches a pagination action to update {@link State.paginationOptions paginationOptions} in the state slice.\n *\n * @param payload - The pagination options to update.\n * @param actionMeta - The action metadata.\n */\n onPaginate(payload: PaginationPayload, actionMeta?: ActionMeta) {\n getRsStateResolver().dispatch(actions.actionPaginate(payload, actionMeta));\n },\n\n /**\n * Removes a notification message.\n * Dispatches an action to update the {@link State.notifications notifications} slice in the state.\n *\n * @param payload The notification messages to be removed.\n */\n removeNotification(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionNotificationRemove(payload));\n },\n\n /**\n * Applies a filter to the repeating structures.\n * Dispatches an action that updates the {@link State.filterExpression filterExpression} in the state.\n *\n * @param params The filter expression to apply.\n */\n applyFilter(params: ColumnFilteringActionPayload) {\n getRsStateResolver().dispatch(actions.actionColumnFiltering(params));\n },\n\n /**\n * Dispatches an action to replace the {@link State.columnAlias columnAlias} slice in the state.\n *\n * @param params - Parameters for the action. Specify the necessary details.\n */\n applyAliases(params: ApplyAliasesActionPayload) {\n getRsStateResolver().dispatch(actions.actionReplaceLabels(params));\n },\n\n /**\n * Clears filters for the specified {@link columnId}.\n * Dispatches an action to update the {@link State.clearColFilter clearColFilter} slice in the state.\n * @param columnId - The column on which the filter should be cleared.\n */\n clearFilter(columnId: string) {\n getRsStateResolver().dispatch(actions.actionClearFiltering(columnId));\n },\n\n /**\n * Applies grouping to repeating structures.\n * Dispatches an action that adds {@link State.groups groups} in the state.\n * @param payload\n */\n applyGrouping(payload: NonNullable<State['groups']>) {\n getRsStateResolver().dispatch(actions.actionAddGroups(payload));\n },\n\n /**\n * Applies sorting the repeating structures.\n * Dispatches an action that adds {@link State.sortingOrder sortingOrder} in state.\n * @param payload\n */\n applySorting(payload: NonNullable<State['sortingOrder']>) {\n getRsStateResolver().dispatch(actions.actionUpdateSort(payload));\n },\n\n /**\n * Toggles the visibility of header icons.\n * Dispatches an action to update {@link State.showHeaderIcons} in the state.\n *\n * @param status The status indicating whether to show or hide header icons.\n */\n updateHeaderIconsVisibility(status: NonNullable<State['showHeaderIcons']>) {\n getRsStateResolver().dispatch(actions.actionShowHeaderIcons(status));\n },\n\n /**\n * Applies freezing to a set of columns.\n * Dispatches an action to update {@link State.freezeColumns freezeColumns} in the state.\n *\n * @param payload The payload containing information about the columns to freeze.\n */\n applyFreeze(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionColumnPin(payload));\n },\n\n /**\n * Toggles the visibility of columns.\n * Dispatches an action that updates {@link State.hiddenColumns hiddenColumns} in the state.\n * @param payload\n */\n applyToggleVisibility(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionColumnToggle(payload));\n },\n\n /**\n * Sets the {@link State.hiddenColumns hiddenColumns} in the state, including out-of-the-box columns like dragHandle.\n *\n * @param payload - The payload containing columns to hide.\n * @param ootbColumns - The out-of-the-box columns to include in {@link State.hiddenColumns hiddenColumns}.\n */\n applyHiddenColumns(payload: string[], ootbColumns?: { dragHandle?: boolean }) {\n getRsStateResolver().dispatch(actions.actionHiddenColumnUpdate(payload, ootbColumns));\n },\n\n /**\n * Sets the {@link State.visibleColumns visibleColumns} in the state.\n * @param columnId - A single column ID or an array of column IDs to make visible.\n */\n applyVisibleColumns(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionVisibleColumnUpdate(payload));\n },\n\n /**\n * Dispatches an action that replace {@link State.aggregationInfo aggregationInfo} slice in the state with the given {@link payload}.\n * @param payload\n */\n applyAggregations(payload: NonNullable<State['aggregationInfo']>) {\n getRsStateResolver().dispatch(actions.actionUpdateAggregations(payload));\n },\n\n /**\n * Applies order to columns of a repeatings structure with the given {@link payload}.\n * Dispatches an action that sets {@link State.colOrder columnOrder} in the state with the given {@link payload}.\n * @param payload\n */\n applyOrder(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionNewColumnOrder(payload));\n },\n\n /**\n * Saves the current personalization state.\n * Dispatches an action that invokes {@link ApiContext.updatePersonalization} to persist the changes.\n *\n * @param personalizationKey The key representing the current personalization.\n * @param markAsDefault Whether to mark the current personalization as default.\n * @param markAsAppDefault Whether to mark the current personalization as app default.\n */\n updatePersonalization(\n personalizationKey: string,\n markAsDefault: boolean,\n markAsAppDefault: boolean\n ) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationUpdate(personalizationKey, markAsDefault, markAsAppDefault)\n );\n },\n\n /**\n * Sets the selected personalization state as the current state of the repeating structures.\n * Dispatches an action to update the {@link State} of the repeating structures with the selected personalization state,\n * and updates the active personalization in the {@link State.personalization personalization} state slice.\n *\n * @param args Method arguments.\n * @param args.id ID of the personalization to be set active.\n * @param args.isPreset Indicates if the personalization is preset.\n */\n applyActivePersonalization({ id, isPreset = false }: { id: string; isPreset: boolean }) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationSetActive({\n id,\n isPreset\n })\n );\n getRsStateResolver().dispatch(actions.actionUpdateStateVersion());\n },\n\n /**\n * Creates a new personalization in the state.\n * Dispatches an action that calls {@link ApiContext.createPersonalization createPersonalization} API to create\n * a new personalization with the provided name and saves it in the {@link State.personalization personalization}.\n *\n * @param name The name of the personalization.\n * @param markAsDefault Indicates whether the new personalization should be marked as default.\n */\n createPersonalization(name: string, markAsDefault: boolean) {\n getRsStateResolver().dispatch(actions.actionPersonalizationCreate(name, markAsDefault));\n },\n\n /**\n * Updates the name, markAsDefault, and markAsAppDefault flags of the current personalization.\n *\n * @param active The current active personalization key.\n * @param name The updated name.\n * @param markAsDefault Indicates whether the current personalization should be marked as default.\n * @param markAsAppDefault Indicates whether the current personalization should be marked as app default.\n */\n editPersonalization(\n active: string,\n name: string,\n markAsDefault: boolean,\n markAsAppDefault: boolean\n ) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationEdit(active, name, markAsDefault, markAsAppDefault)\n );\n },\n\n /**\n * Deletes the current personalization identified by the given key.\n * Dispatches an action that calls {@link ApiContext.deletePersonalization deletePersonalization} API\n * and updates the {@link State.personalization personalization} state by removing the deleted personalization.\n *\n * @param personalizationKey - The key or ID of the personalization to be deleted.\n */\n deletePersonalization(personalizationKey: string) {\n getRsStateResolver().dispatch(actions.actionPersonalizationDelete(personalizationKey));\n },\n\n /**\n * Sets the current personalization key as the default personalization.\n * Dispatches an action to update `defaultPersonalization` in the `personalization` state slice\n * and calls {@link ApiContext.updatePersonalization updatePersonalization} API.\n *\n * @param personalizationKey - The key identifying the personalization to set as default.\n */\n setDefaultPersonalization(personalizationKey: string) {\n getRsStateResolver().dispatch(actions.actionPersonalizationSetDefault(personalizationKey));\n },\n\n /**\n * Sets the current {@link personalizationKey} as the app's default personalization.\n * Dispatches an action that invokes {@link ApiContext.updatePersonalization updatePersonalization} api with markAsAppDefault=true for the current personalization.\n *\n * @param personalizationKey The key of the personalization to set as default.\n * @param trimmedName The name of the personalization to update.\n */\n setAppDefaultPersonalization(personalizationKey: string, trimmedName: string) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationSetAppDefault(personalizationKey, trimmedName)\n );\n },\n\n /**\n * Applies the provided search value as a filter expression in the state,\n * using an OR condition with a contains clause.\n *\n * @param value The search value to apply.\n */\n\n applySearch(value: string) {\n getRsStateResolver().dispatch(actions.actionSearchGlobal(value));\n },\n\n /**\n * Applies the given row density in {@link State.selectedHeightOption selectedHeightOption} state slice.\n *\n * @param payload the row density id.\n */\n applyRowHeight(payload: (typeof ROW_DENSITY)[keyof typeof ROW_DENSITY]) {\n getRsStateResolver().dispatch(actions.actionRowHeightChange(payload));\n },\n\n /**\n * Applies gallery layout on the current view.\n *\n * @param layout - Gallery layout mode.\n */\n applyGalleryLayout(layout: GalleryLayout) {\n getRsStateResolver().dispatch(actions.actionGalleryLayoutChange(layout));\n },\n\n /**\n * Sets the {@link State.bootstrap bootstrap} status of repeating structures and update the {@link State.version version}in state.\n */\n doBootstrap() {\n getRsStateResolver().dispatch(actions.actionBootstrap());\n getRsStateResolver().dispatch(actions.actionUpdateStateVersion());\n },\n\n /**\n * Triggers a refresh of data in repeating structures.\n * Dispatches an action that injects {@link State.refresh refresh} flag in the state.\n * @param flushState The state slice that needs to be reset on refresh. See {@link SUPPORTED_AVOIDABLE_FEATURES}.\n * @param featuresToAvoid The features that should not run as part of refresh. See {@link SUPPORTED_FLUSH_KEYS}.\n */\n forceRefresh(flushState: { [k: string]: boolean } = {}, featuresToAvoid: string[] = []) {\n // If a refresh is in progress, don't trigger another refresh.\n if (getRsStore().refreshInProgress) return;\n\n // Communicate forceRefresh to apiContext via ApiOptions.\n getRsStore().refreshInProgress = true;\n getRsStore().refreshToken = Date.now();\n // Communicate forceRefresh to apiContext via callback.\n getRsProps().apiContext.onBeforeRefresh?.();\n\n getRsStateResolver().dispatch(actions.actionForceRefresh(flushState, featuresToAvoid));\n },\n\n /**\n * Fetches actions for the {@link selectedItems} using {@link ApiContext.fetchActions fetchActions} api.\n * @param selectedItems\n */\n fetchActions(selectedItems: string[]) {\n return getRsProps().apiContext.fetchActions?.(selectedItems);\n },\n\n /**\n * This resets the selection and refreshes the {@link rows} data.\n * @param rows\n */\n async clearSelectionAndRefreshRows(rows: string[]) {\n await Promise.allSettled([utilMethods.selectAllRows(false), utilMethods.refreshRows(rows)]);\n },\n\n /**\n * This removes {@link State.showConfirmationAction confirmationAction} from the state.\n */\n completeConfirmationAction() {\n getRsStateResolver().dispatch(actions.completeConfirmationAction());\n },\n\n /**\n * This sets the {@link State.errors errors} in the state.\n * @param payload\n */\n setErrors(payload: Errors) {\n if (payload.dataErrors) {\n getRsStateResolver().dispatch(actions.setDataErrors(payload.dataErrors));\n }\n },\n /**\n * Dispatches the dom container responsive breakpoints to state.\n * @param breakpoint\n * @param value\n */\n setDomContainerResponsiveBreakpoints(breakpoint: string, value: boolean) {\n const payload = { breakpoint, value };\n getRsStateResolver().dispatch(actions.setDomContainerResponsiveBreakpoints(payload));\n },\n\n /**\n * Refreshes the {@link View.data data} for {@link rows} by calling {@link ApiContext.fetchRowsData fetchRowsData} api.\n * It also calls {@link utilMethods.forceUpdate forceUpdate } to trigger state change for re-rendering.\n * @param rows\n */\n async refreshRows(rows: string[] = []) {\n const rsProps = getRsProps();\n if (rows.length === 0) {\n return;\n }\n const state = getRsStateResolver().getState();\n const { fetchRowsData } = rsProps.apiContext;\n const response = await fetchRowsData?.(\n deepCopy(state),\n getView().meta,\n rows,\n getView().meta.itemKey,\n {\n ...(getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: getRsStore().refreshToken\n })\n }\n );\n\n const data = syncData(getView().meta.itemKey, getView().data!, response!);\n getView().setProp({\n data: [...data]\n });\n utilMethods.forceUpdate(false, { forceRenderOnNextRun: true });\n },\n\n /**\n * Select/Deselect all rows(all pages in case of paginated data) by calling {@link ApiContext.setSelectedRows setSelectedRows}/ {@link ApiContext.clearSelectedRows clearSelectedRows} api.\n * It also updates the selected rows received from {@link ApiContext.getSelectedRows getSelectedRows} api in {@link State.selectedRows selectedRows} state slice.\n * @param isSelected\n */\n async selectAllRows(isSelected: boolean) {\n const rsProps = getRsProps();\n let selectedRows: (RowData & { $selected: boolean })[] = [];\n if (isSelected) {\n const response = await rsProps.apiContext.fetchData(\n {\n ...getRsStateResolver().getState(),\n paginationOptions: {\n rootVirtualiser: {\n startIndex: 0,\n endIndex: getView().resultsCount! - 1\n }\n },\n // passing groups and groupFilters as undefined to get all rows\n groups: undefined,\n groupFilters: undefined\n },\n getView().meta,\n {}\n );\n if (response) {\n const { data = [] } = response;\n selectedRows = data.map(item => ({ ...item, $selected: true })) || [];\n }\n try {\n await rsProps.apiContext.setSelectedRows?.(selectedRows);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('setSelectedRows api resulting into error.', e);\n }\n } else {\n // clear all selections when selectAll is unchecked\n await rsProps.apiContext.clearSelectedRows?.();\n }\n\n const rows = await rsProps.apiContext.getSelectedRows?.();\n\n if (rows)\n getRsStateResolver().dispatch(\n actions.actionRowSelectionItemsUpdate({\n selectedRows: rows,\n mode: getView().meta.selectionMode!\n })\n );\n },\n\n /**\n * Triggers {@link ApiContext.importCSVData importCSVData} api.\n * @param create\n */\n importCSVData(create: ModalManagerContextValue['create']) {\n return getRsProps()\n .apiContext.importCSVData?.(create)\n .catch(err => {\n getRsStateResolver().dispatch(\n actions.actionNotificationAdd({\n content: err\n })\n );\n });\n },\n\n /**\n * Triggers {@link ApiContext.exportData exportData} api.\n */\n exportToExcel() {\n function getVisibleColumnFormatters() {\n const visibleColumns = getView().getVisibleColumns();\n const formatters: Record<string, Column['formatterConfig']> = {};\n visibleColumns?.forEach(column => {\n if (column.formatterConfig) {\n formatters[column.field.id] = column.formatterConfig;\n }\n });\n return formatters;\n }\n return getRsProps()\n .apiContext.exportData?.(\n deepCopy(getView().state),\n getView().meta,\n {\n ...(getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: getRsStore().refreshToken\n })\n },\n getVisibleColumnFormatters()\n )\n .catch(err => {\n getRsStateResolver().dispatch(\n actions.actionNotificationAdd({\n content: err\n })\n );\n });\n },\n\n /**\n * Triggers {@link ApiContext.exportDataToCSV exportDataToCSV} api.\n */\n exportToCSV() {\n return getRsProps()\n .apiContext.exportDataToCSV?.(deepCopy(getView().state), getView().meta, {\n ...(getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: getRsStore().refreshToken\n })\n })\n .catch(err => {\n getRsStateResolver().dispatch(\n actions.actionNotificationAdd({\n content: err\n })\n );\n });\n },\n\n /**\n * Updates the visibility of columns by modifying {@link State.hiddenColumns}.\n * @param columns - An object mapping column IDs to their visibility status. `true` indicates the column is visible, and `false` means it is hidden.\n */\n updateColumnsVisibility(columns: { [key: FieldDef['id']]: boolean }) {\n getRsStateResolver().dispatch(actions.updateColumnsVisibility(columns));\n },\n\n setConditionalStyleFormats(\n conditionalStyleFormats: NonNullable<State['conditionalStyleFormats']>\n ) {\n getRsStateResolver().dispatch(actions.setConditionalStyleFormats(conditionalStyleFormats));\n },\n\n /**\n * Switches the active template for the view at runtime\n * (e.g. when the user toggles between Table and Gallery from the toolbar).\n *\n * @param template The target template to switch to.\n */\n changeTemplate(template: NonNullable<View['template']>) {\n if (getView().meta.allowSwitchTemplate === false) return;\n getRsStateResolver().dispatch(actions.actionChangeTemplate(template));\n }\n };\n return utilMethods;\n}\nexport type UtilityFunctions = ReturnType<typeof viewUtilityMethods>;\n"]}
|
|
1
|
+
{"version":3,"file":"viewUtilityMethods.js","sourceRoot":"","sources":["../../../../src/core/generators/viewUtilityMethods.ts"],"names":[],"mappings":"AAIA,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAGlF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,QAAQ,EAAE,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KACF,CAAC;IACF,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["import type { OmitStrict } from '@pega/cosmos-react-core';\nimport type { ModalManagerContextValue } from '@pega/cosmos-react-core/lib/components/Modal/Modal.types';\n\nimport type RsInternal from '../RsInternal';\nimport ActionTypes from '../actions/actionConstants';\nimport * as actions from '../actions/actions';\nimport { rowSelectColumnMeta, SUPPORTED_MODES_FOR_SELECTALL } from '../constants';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { SUPPORTED_AVOIDABLE_FEATURES, SUPPORTED_FLUSH_KEYS } from '../constants';\nimport { validateAction, passablePromise, deepCopy, deepEqual } from '../utils/util';\nimport type { Errors, State } from '../../../types/State.types';\n// This is being used in JSdoc.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext, ApiOptions } from '../../../types/ApiContext.types';\n// This is being used in JSdoc.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { FieldDef, GalleryLayout, Meta, ROW_DENSITY } from '../../../types/Meta.types';\nimport type {\n ActionMeta,\n ApplyAliasesActionPayload,\n ColumnFilteringActionPayload,\n ExpandCollapsePayload,\n PaginationPayload\n} from '../actions/actions.types';\n\nimport type View from './ViewGenerator';\nimport type { RowData } from './RowGenerator.types';\nimport type {\n DebugInfo,\n RefreshNotification,\n RequiredDefinition,\n WarningDetail\n} from './ViewGenerator.types';\nimport type Column from './ColumnGenerator';\n\nexport type RefreshNotificationForConsumer = OmitStrict<RefreshNotification, 'id'>;\n\nexport type SupportedConsumerPayloads = {\n [ActionTypes.USER_CONFIRMATION_ACTION]: OmitStrict<\n NonNullable<View['confirmationActionDetails']>,\n 'onSubmit' | 'onCancel'\n >;\n [ActionTypes.UPDATE_DEBUG_INFO]: DebugInfo;\n [ActionTypes.TOGGLE_DISABLE_SELECTION]: boolean;\n [ActionTypes.TOGGLE_REQUIRED]: RequiredDefinition;\n [ActionTypes.NOTIFY_DATA_REFRESH]: RefreshNotificationForConsumer;\n [ActionTypes.SET_IN_EXTERNAL_STATE]: NonNullable<State['externalState']>;\n [ActionTypes.UPDATE_SELECTED_ROWS]: undefined;\n [ActionTypes.SET_WARNING_MESSAGES]: WarningDetail[];\n};\n\nexport type SupportedConsumerActionType = keyof SupportedConsumerPayloads;\n\nfunction syncData(key: string, sourceArray: RowData[], modifiedArray: RowData[]) {\n return sourceArray.map(item => {\n const item2 = modifiedArray.find(i2 => i2[key] === item[key]);\n return item2 || item;\n });\n}\n\nexport default function viewUtilityMethods(rsInternal: RsInternal) {\n const { getRsProps, getRsStateResolver, getView, getRsStore } = rsInternal;\n\n const utilMethods = {\n /**\n * Dispatches an action that creates a new state object without any internal modifications.\n *\n * If {@link instantRender} is false and {@link forceUpdateFeatures} are provided,\n * it updates the {@link State.forceUpdateFeatures forceUpdateFeatures} slice in the state.\n *\n * @param instantRender - Determines if the render should happen instantly.\n * @param forceUpdateFeatures - The features to force update in the state on next render cycle.\n */\n forceUpdate(instantRender?: boolean, forceUpdateFeatures?: State['forceUpdateFeatures']) {\n getRsStateResolver().dispatch(actions.actionForceUpdate(instantRender, forceUpdateFeatures));\n },\n\n /**\n * Handles the reordering of rows.\n *\n * If {@link Meta.moveListRecords moveListRecords} is set to true in Meta, it dispatches an action\n * that updates the keys of the {@link sourceKey source} row and the {@link destinationKey destination} row\n * in the {@link State.sourceKey sourceKey} and {@link State.destinationKey destinationKey} state slices, respectively.\n *\n * Otherwise, it calls {@link ApiContext.applyRowReorder applyRowReorder} from the apiContext and triggers\n * a {@link utilMethods.forceRefresh forceRefresh} on the state.\n *\n * @param sourceKey - The itemKey for the row being dragged.\n * @param destinationKey - The itemKey for the row on which it is dropped.\n */\n handleRowReorder(sourceKey: string, destinationKey: string) {\n if (getView()?.meta?.moveListRecords) {\n getRsStateResolver().dispatch(\n actions.actionMoveRecordKeysUpdate({\n sourceKey,\n destinationKey\n })\n );\n return;\n }\n getRsProps()\n .apiContext.applyRowReorder?.(sourceKey, destinationKey)\n .then(() => {\n utilMethods.forceRefresh();\n });\n },\n\n /**\n * Sets the count-related information onto the {@link View view} via {@link View.setProp setProp} and triggers {@link utilMethods.forceUpdate forceUpdate}.\n *\n * @param args - The count information object.\n * @param args.count - The total record count of the view, including group headers.\n * @param args.hasMoreResults - Indicates if the view has more records.\n * @param args.selectedRecordsCount - The total count of selected records.\n * @param args._countGeneratedInternally - Indicates if the count is generated internally. This is used for RS core internal purposes. Setting this from apiContext might lead to erroneous behavior.\n * @returns void\n */\n setRecordCount({\n count,\n hasMoreResults,\n selectedRecordsCount,\n _countGeneratedInternally,\n announce\n }: {\n count?: View['resultsCount'];\n hasMoreResults?: View['hasMoreResults'];\n selectedRecordsCount?: View['selectedRecordsCount'];\n _countGeneratedInternally?: View['countGeneratedInternally'];\n announce?: View['announceCount'];\n }) {\n // NOTE: setRecordCount can be called with partial props. So while doing setProp we need to make sure to check the existence of incoming prop value.\n // If incoming prop is undefined then it should have a fallback otherwise it will override existing value on view to undefined.\n getView().setProp({\n countGeneratedInternally: !!_countGeneratedInternally,\n hasMoreResults: hasMoreResults ?? false,\n resultsCount: count,\n selectedRecordsCount: selectedRecordsCount ?? getView().selectedRecordsCount,\n showCount: !Number.isFinite(count) ? false : !_countGeneratedInternally,\n announceCount: announce\n });\n // If count is not finite then do instantRender as we want to hide the count immediately and don't want the StateResolver queue to be empty.\n // Else the count will be displayed after the StateResolver queue becomes empty.\n const instantRender = !Number.isFinite(count);\n\n // When a finite count arrives on a selection table, set dependentViewPropertyChanged so the\n // StateResolver optimization that drops a FORCE_UPDATE with empty forceUpdateFeatures does not suppress this dispatch.\n // TODO: Revisit the approach to handle such cases where memoization of feature depends on view property instead of state\n const { selectionMode } = getView().meta;\n const isSelectionEnabled =\n !!selectionMode && SUPPORTED_MODES_FOR_SELECTALL.includes(selectionMode);\n\n utilMethods.forceUpdate(\n instantRender,\n Number.isFinite(count) && isSelectionEnabled\n ? { dependentViewPropertyChanged: true }\n : undefined\n );\n },\n\n /**\n * Dispatches an action to interact with repeating structures, allowing consumers\n * to perform operations using standard actions and payloads.\n *\n * @param action The action to be dispatched.\n * @param payload The payload associated with the action.\n * @returns The return value after the action has been processed by the repeating structure.\n */\n // TODO Refactor- this method to have only one parameter action object that contains type and payload. Maintenance of it will be easy.\n // TODO Make it generic specific.\n dispatchAction<T extends SupportedConsumerActionType>(\n action: T,\n payload?: SupportedConsumerPayloads[T]\n ): Promise<any> | undefined {\n const { dispatch } = getRsStateResolver();\n validateAction(action, payload, getView().externalStateKeys);\n\n let actionReturnValue;\n switch (action) {\n case ActionTypes.USER_CONFIRMATION_ACTION:\n // eslint-disable-next-line no-case-declarations\n const [promise, onSubmit, onCancel] = passablePromise<any>();\n getView().setProp({\n confirmationActionDetails: {\n onSubmit,\n onCancel,\n ...(payload as OmitStrict<\n NonNullable<View['confirmationActionDetails']>,\n 'onSubmit' | 'onCancel'\n >)\n }\n });\n dispatch(actions.showConfirmationAction());\n actionReturnValue = promise;\n break;\n case ActionTypes.UPDATE_DEBUG_INFO:\n getView().setProp({ debugInfo: [payload as DebugInfo] });\n utilMethods.forceUpdate(false);\n break;\n case ActionTypes.TOGGLE_DISABLE_SELECTION: {\n let rowSelectColumn = getView().columns?.find(\n column => column.field.id === rowSelectColumnMeta.field.id\n );\n if (rowSelectColumn) {\n rowSelectColumn = rowSelectColumn.setProp({\n disableSelection: payload as boolean\n });\n utilMethods.forceUpdate(false);\n }\n break;\n }\n case ActionTypes.TOGGLE_REQUIRED:\n getView().setProp({ requiredDef: payload as RequiredDefinition });\n utilMethods.forceUpdate(false);\n break;\n case ActionTypes.NOTIFY_DATA_REFRESH:\n getView().setProp('refreshNotification', {\n id: Date.now(),\n ...(payload as RefreshNotificationForConsumer)\n });\n utilMethods.forceUpdate(false);\n break;\n case ActionTypes.SET_IN_EXTERNAL_STATE:\n dispatch(actions.setExternalState(payload as NonNullable<State['externalState']>));\n break;\n case ActionTypes.UPDATE_SELECTED_ROWS:\n utilMethods.forceUpdate(false, {\n updateSelectedRows: new Date().getTime()\n });\n break;\n case ActionTypes.SET_WARNING_MESSAGES:\n if (!deepEqual(getView().getWarningMessages(), payload)) {\n getView().setProp({ warningMessages: payload as WarningDetail[] });\n utilMethods.forceUpdate(false);\n }\n break;\n default:\n }\n return actionReturnValue;\n },\n\n /** Returns the Html events required for reordering a column. */\n getFieldReorderProps() {\n return getRsStore().getFieldReorderProps?.();\n },\n\n // TODO: this should be moved to group generator instance.\n /**\n * Triggers the expand or collapse action for a group header.\n * Dispatches an action to update the {@link State.groupToggle groupToggle} slices in the state.\n *\n * @param payload The data related to the groups.\n */\n toggleGroupExpansion(payload: OmitStrict<ExpandCollapsePayload, 'groups'>) {\n getRsStateResolver().dispatch(actions.actionToggleExpandCollpase(payload));\n },\n\n /**\n * Clears hierarchical groups by dispatching an action to reset the {@link State.hierarchicalGroup hierarchicalGroup} slice in the state.\n */\n clearHierarchicalGroup() {\n getRsStore().groupingInfo = [];\n getRsStateResolver().dispatch(actions.actionUpdateDisplayMode({}));\n },\n\n /**\n * Dispatches a pagination action to update {@link State.paginationOptions paginationOptions} in the state slice.\n *\n * @param payload - The pagination options to update.\n * @param actionMeta - The action metadata.\n */\n onPaginate(payload: PaginationPayload, actionMeta?: ActionMeta) {\n getRsStateResolver().dispatch(actions.actionPaginate(payload, actionMeta));\n },\n\n /**\n * Removes a notification message.\n * Dispatches an action to update the {@link State.notifications notifications} slice in the state.\n *\n * @param payload The notification messages to be removed.\n */\n removeNotification(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionNotificationRemove(payload));\n },\n\n /**\n * Applies a filter to the repeating structures.\n * Dispatches an action that updates the {@link State.filterExpression filterExpression} in the state.\n *\n * @param params The filter expression to apply.\n */\n applyFilter(params: ColumnFilteringActionPayload) {\n getRsStateResolver().dispatch(actions.actionColumnFiltering(params));\n },\n\n /**\n * Dispatches an action to replace the {@link State.columnAlias columnAlias} slice in the state.\n *\n * @param params - Parameters for the action. Specify the necessary details.\n */\n applyAliases(params: ApplyAliasesActionPayload) {\n getRsStateResolver().dispatch(actions.actionReplaceLabels(params));\n },\n\n /**\n * Clears filters for the specified {@link columnId}.\n * Dispatches an action to update the {@link State.clearColFilter clearColFilter} slice in the state.\n * @param columnId - The column on which the filter should be cleared.\n */\n clearFilter(columnId: string) {\n getRsStateResolver().dispatch(actions.actionClearFiltering(columnId));\n },\n\n /**\n * Applies grouping to repeating structures.\n * Dispatches an action that adds {@link State.groups groups} in the state.\n * @param payload\n */\n applyGrouping(payload: NonNullable<State['groups']>) {\n getRsStateResolver().dispatch(actions.actionAddGroups(payload));\n },\n\n /**\n * Applies sorting the repeating structures.\n * Dispatches an action that adds {@link State.sortingOrder sortingOrder} in state.\n * @param payload\n */\n applySorting(payload: NonNullable<State['sortingOrder']>) {\n getRsStateResolver().dispatch(actions.actionUpdateSort(payload));\n },\n\n /**\n * Toggles the visibility of header icons.\n * Dispatches an action to update {@link State.showHeaderIcons} in the state.\n *\n * @param status The status indicating whether to show or hide header icons.\n */\n updateHeaderIconsVisibility(status: NonNullable<State['showHeaderIcons']>) {\n getRsStateResolver().dispatch(actions.actionShowHeaderIcons(status));\n },\n\n /**\n * Applies freezing to a set of columns.\n * Dispatches an action to update {@link State.freezeColumns freezeColumns} in the state.\n *\n * @param payload The payload containing information about the columns to freeze.\n */\n applyFreeze(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionColumnPin(payload));\n },\n\n /**\n * Toggles the visibility of columns.\n * Dispatches an action that updates {@link State.hiddenColumns hiddenColumns} in the state.\n * @param payload\n */\n applyToggleVisibility(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionColumnToggle(payload));\n },\n\n /**\n * Sets the {@link State.hiddenColumns hiddenColumns} in the state, including out-of-the-box columns like dragHandle.\n *\n * @param payload - The payload containing columns to hide.\n * @param ootbColumns - The out-of-the-box columns to include in {@link State.hiddenColumns hiddenColumns}.\n */\n applyHiddenColumns(payload: string[], ootbColumns?: { dragHandle?: boolean }) {\n getRsStateResolver().dispatch(actions.actionHiddenColumnUpdate(payload, ootbColumns));\n },\n\n /**\n * Sets the {@link State.visibleColumns visibleColumns} in the state.\n * @param columnId - A single column ID or an array of column IDs to make visible.\n */\n applyVisibleColumns(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionVisibleColumnUpdate(payload));\n },\n\n /**\n * Dispatches an action that replace {@link State.aggregationInfo aggregationInfo} slice in the state with the given {@link payload}.\n * @param payload\n */\n applyAggregations(payload: NonNullable<State['aggregationInfo']>) {\n getRsStateResolver().dispatch(actions.actionUpdateAggregations(payload));\n },\n\n /**\n * Applies order to columns of a repeatings structure with the given {@link payload}.\n * Dispatches an action that sets {@link State.colOrder columnOrder} in the state with the given {@link payload}.\n * @param payload\n */\n applyOrder(payload: string[]) {\n getRsStateResolver().dispatch(actions.actionNewColumnOrder(payload));\n },\n\n /**\n * Saves the current personalization state.\n * Dispatches an action that invokes {@link ApiContext.updatePersonalization} to persist the changes.\n *\n * @param personalizationKey The key representing the current personalization.\n * @param markAsDefault Whether to mark the current personalization as default.\n * @param markAsAppDefault Whether to mark the current personalization as app default.\n */\n updatePersonalization(\n personalizationKey: string,\n markAsDefault: boolean,\n markAsAppDefault: boolean\n ) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationUpdate(personalizationKey, markAsDefault, markAsAppDefault)\n );\n },\n\n /**\n * Sets the selected personalization state as the current state of the repeating structures.\n * Dispatches an action to update the {@link State} of the repeating structures with the selected personalization state,\n * and updates the active personalization in the {@link State.personalization personalization} state slice.\n *\n * @param args Method arguments.\n * @param args.id ID of the personalization to be set active.\n * @param args.isPreset Indicates if the personalization is preset.\n */\n applyActivePersonalization({ id, isPreset = false }: { id: string; isPreset: boolean }) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationSetActive({\n id,\n isPreset\n })\n );\n getRsStateResolver().dispatch(actions.actionUpdateStateVersion());\n },\n\n /**\n * Creates a new personalization in the state.\n * Dispatches an action that calls {@link ApiContext.createPersonalization createPersonalization} API to create\n * a new personalization with the provided name and saves it in the {@link State.personalization personalization}.\n *\n * @param name The name of the personalization.\n * @param markAsDefault Indicates whether the new personalization should be marked as default.\n */\n createPersonalization(name: string, markAsDefault: boolean) {\n getRsStateResolver().dispatch(actions.actionPersonalizationCreate(name, markAsDefault));\n },\n\n /**\n * Updates the name, markAsDefault, and markAsAppDefault flags of the current personalization.\n *\n * @param active The current active personalization key.\n * @param name The updated name.\n * @param markAsDefault Indicates whether the current personalization should be marked as default.\n * @param markAsAppDefault Indicates whether the current personalization should be marked as app default.\n */\n editPersonalization(\n active: string,\n name: string,\n markAsDefault: boolean,\n markAsAppDefault: boolean\n ) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationEdit(active, name, markAsDefault, markAsAppDefault)\n );\n },\n\n /**\n * Deletes the current personalization identified by the given key.\n * Dispatches an action that calls {@link ApiContext.deletePersonalization deletePersonalization} API\n * and updates the {@link State.personalization personalization} state by removing the deleted personalization.\n *\n * @param personalizationKey - The key or ID of the personalization to be deleted.\n */\n deletePersonalization(personalizationKey: string) {\n getRsStateResolver().dispatch(actions.actionPersonalizationDelete(personalizationKey));\n },\n\n /**\n * Sets the current personalization key as the default personalization.\n * Dispatches an action to update `defaultPersonalization` in the `personalization` state slice\n * and calls {@link ApiContext.updatePersonalization updatePersonalization} API.\n *\n * @param personalizationKey - The key identifying the personalization to set as default.\n */\n setDefaultPersonalization(personalizationKey: string) {\n getRsStateResolver().dispatch(actions.actionPersonalizationSetDefault(personalizationKey));\n },\n\n /**\n * Sets the current {@link personalizationKey} as the app's default personalization.\n * Dispatches an action that invokes {@link ApiContext.updatePersonalization updatePersonalization} api with markAsAppDefault=true for the current personalization.\n *\n * @param personalizationKey The key of the personalization to set as default.\n * @param trimmedName The name of the personalization to update.\n */\n setAppDefaultPersonalization(personalizationKey: string, trimmedName: string) {\n getRsStateResolver().dispatch(\n actions.actionPersonalizationSetAppDefault(personalizationKey, trimmedName)\n );\n },\n\n /**\n * Applies the provided search value as a filter expression in the state,\n * using an OR condition with a contains clause.\n *\n * @param value The search value to apply.\n */\n\n applySearch(value: string) {\n getRsStateResolver().dispatch(actions.actionSearchGlobal(value));\n },\n\n /**\n * Applies the given row density in {@link State.selectedHeightOption selectedHeightOption} state slice.\n *\n * @param payload the row density id.\n */\n applyRowHeight(payload: (typeof ROW_DENSITY)[keyof typeof ROW_DENSITY]) {\n getRsStateResolver().dispatch(actions.actionRowHeightChange(payload));\n },\n\n /**\n * Applies gallery layout on the current view.\n *\n * @param layout - Gallery layout mode.\n */\n applyGalleryLayout(layout: GalleryLayout) {\n getRsStateResolver().dispatch(actions.actionGalleryLayoutChange(layout));\n },\n\n /**\n * Sets the {@link State.bootstrap bootstrap} status of repeating structures and update the {@link State.version version}in state.\n */\n doBootstrap() {\n getRsStateResolver().dispatch(actions.actionBootstrap());\n getRsStateResolver().dispatch(actions.actionUpdateStateVersion());\n },\n\n /**\n * Triggers a refresh of data in repeating structures.\n * Dispatches an action that injects {@link State.refresh refresh} flag in the state.\n * @param flushState The state slice that needs to be reset on refresh. See {@link SUPPORTED_AVOIDABLE_FEATURES}.\n * @param featuresToAvoid The features that should not run as part of refresh. See {@link SUPPORTED_FLUSH_KEYS}.\n */\n forceRefresh(flushState: { [k: string]: boolean } = {}, featuresToAvoid: string[] = []) {\n // If a refresh is in progress, don't trigger another refresh.\n if (getRsStore().refreshInProgress) return;\n\n // Communicate forceRefresh to apiContext via ApiOptions.\n getRsStore().refreshInProgress = true;\n getRsStore().refreshToken = Date.now();\n // Communicate forceRefresh to apiContext via callback.\n getRsProps().apiContext.onBeforeRefresh?.();\n\n getRsStateResolver().dispatch(actions.actionForceRefresh(flushState, featuresToAvoid));\n },\n\n /**\n * Fetches actions for the {@link selectedItems} using {@link ApiContext.fetchActions fetchActions} api.\n * @param selectedItems\n */\n fetchActions(selectedItems: string[]) {\n return getRsProps().apiContext.fetchActions?.(selectedItems);\n },\n\n /**\n * This resets the selection and refreshes the {@link rows} data.\n * @param rows\n */\n async clearSelectionAndRefreshRows(rows: string[]) {\n await Promise.allSettled([utilMethods.selectAllRows(false), utilMethods.refreshRows(rows)]);\n },\n\n /**\n * This removes {@link State.showConfirmationAction confirmationAction} from the state.\n */\n completeConfirmationAction() {\n getRsStateResolver().dispatch(actions.completeConfirmationAction());\n },\n\n /**\n * This sets the {@link State.errors errors} in the state.\n * @param payload\n */\n setErrors(payload: Errors) {\n if (payload.dataErrors) {\n getRsStateResolver().dispatch(actions.setDataErrors(payload.dataErrors));\n }\n },\n /**\n * Dispatches the dom container responsive breakpoints to state.\n * @param breakpoint\n * @param value\n */\n setDomContainerResponsiveBreakpoints(breakpoint: string, value: boolean) {\n const payload = { breakpoint, value };\n getRsStateResolver().dispatch(actions.setDomContainerResponsiveBreakpoints(payload));\n },\n\n /**\n * Refreshes the {@link View.data data} for {@link rows} by calling {@link ApiContext.fetchRowsData fetchRowsData} api.\n * It also calls {@link utilMethods.forceUpdate forceUpdate } to trigger state change for re-rendering.\n * @param rows\n */\n async refreshRows(rows: string[] = []) {\n const rsProps = getRsProps();\n if (rows.length === 0) {\n return;\n }\n const state = getRsStateResolver().getState();\n const { fetchRowsData } = rsProps.apiContext;\n const response = await fetchRowsData?.(\n deepCopy(state),\n getView().meta,\n rows,\n getView().meta.itemKey,\n {\n ...(getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: getRsStore().refreshToken\n })\n }\n );\n\n const data = syncData(getView().meta.itemKey, getView().data!, response!);\n getView().setProp({\n data: [...data]\n });\n utilMethods.forceUpdate(false, { forceRenderOnNextRun: true });\n },\n\n /**\n * Select/Deselect all rows(all pages in case of paginated data) by calling {@link ApiContext.setSelectedRows setSelectedRows}/ {@link ApiContext.clearSelectedRows clearSelectedRows} api.\n * It also updates the selected rows received from {@link ApiContext.getSelectedRows getSelectedRows} api in {@link State.selectedRows selectedRows} state slice.\n * @param isSelected\n */\n async selectAllRows(isSelected: boolean) {\n const rsProps = getRsProps();\n let selectedRows: (RowData & { $selected: boolean })[] = [];\n if (isSelected) {\n const response = await rsProps.apiContext.fetchData(\n {\n ...getRsStateResolver().getState(),\n paginationOptions: {\n rootVirtualiser: {\n startIndex: 0,\n endIndex: getView().resultsCount! - 1\n }\n },\n // passing groups and groupFilters as undefined to get all rows\n groups: undefined,\n groupFilters: undefined\n },\n getView().meta,\n {}\n );\n if (response) {\n const { data = [] } = response;\n selectedRows = data.map(item => ({ ...item, $selected: true })) || [];\n }\n try {\n await rsProps.apiContext.setSelectedRows?.(selectedRows);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('setSelectedRows api resulting into error.', e);\n }\n } else {\n // clear all selections when selectAll is unchecked\n await rsProps.apiContext.clearSelectedRows?.();\n }\n\n const rows = await rsProps.apiContext.getSelectedRows?.();\n\n if (rows)\n getRsStateResolver().dispatch(\n actions.actionRowSelectionItemsUpdate({\n selectedRows: rows,\n mode: getView().meta.selectionMode!\n })\n );\n },\n\n /**\n * Triggers {@link ApiContext.importCSVData importCSVData} api.\n * @param create\n */\n importCSVData(create: ModalManagerContextValue['create']) {\n return getRsProps()\n .apiContext.importCSVData?.(create)\n .catch(err => {\n getRsStateResolver().dispatch(\n actions.actionNotificationAdd({\n content: err\n })\n );\n });\n },\n\n /**\n * Triggers {@link ApiContext.exportData exportData} api.\n */\n exportToExcel() {\n function getVisibleColumnFormatters() {\n const visibleColumns = getView().getVisibleColumns();\n const formatters: Record<string, Column['formatterConfig']> = {};\n visibleColumns?.forEach(column => {\n if (column.formatterConfig) {\n formatters[column.field.id] = column.formatterConfig;\n }\n });\n return formatters;\n }\n return getRsProps()\n .apiContext.exportData?.(\n deepCopy(getView().state),\n getView().meta,\n {\n ...(getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: getRsStore().refreshToken\n })\n },\n getVisibleColumnFormatters()\n )\n .catch(err => {\n getRsStateResolver().dispatch(\n actions.actionNotificationAdd({\n content: err\n })\n );\n });\n },\n\n /**\n * Triggers {@link ApiContext.exportDataToCSV exportDataToCSV} api.\n */\n exportToCSV() {\n return getRsProps()\n .apiContext.exportDataToCSV?.(deepCopy(getView().state), getView().meta, {\n ...(getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: getRsStore().refreshToken\n })\n })\n .catch(err => {\n getRsStateResolver().dispatch(\n actions.actionNotificationAdd({\n content: err\n })\n );\n });\n },\n\n /**\n * Updates the visibility of columns by modifying {@link State.hiddenColumns}.\n * @param columns - An object mapping column IDs to their visibility status. `true` indicates the column is visible, and `false` means it is hidden.\n */\n updateColumnsVisibility(columns: { [key: FieldDef['id']]: boolean }) {\n getRsStateResolver().dispatch(actions.updateColumnsVisibility(columns));\n },\n\n setConditionalStyleFormats(\n conditionalStyleFormats: NonNullable<State['conditionalStyleFormats']>\n ) {\n getRsStateResolver().dispatch(actions.setConditionalStyleFormats(conditionalStyleFormats));\n },\n\n /**\n * Switches the active template for the view at runtime\n * (e.g. when the user toggles between Table and Gallery from the toolbar).\n *\n * @param template The target template to switch to.\n */\n changeTemplate(template: NonNullable<View['template']>) {\n if (getView().meta.allowSwitchTemplate === false) return;\n getRsStateResolver().dispatch(actions.actionChangeTemplate(template));\n }\n };\n return utilMethods;\n}\nexport type UtilityFunctions = ReturnType<typeof viewUtilityMethods>;\n"]}
|
|
@@ -30,6 +30,7 @@ declare const _default: (state: State, action: Action) => State | {
|
|
|
30
30
|
forceRenderOnNextRun?: boolean;
|
|
31
31
|
forceCalculateAutoWidth?: boolean;
|
|
32
32
|
updateSelectedRows?: number;
|
|
33
|
+
dependentViewPropertyChanged?: boolean;
|
|
33
34
|
};
|
|
34
35
|
selectedRows?: string[];
|
|
35
36
|
template?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../src/core/reducers/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;yBAEvC,OAAO,KAAK,EAAE,QAAQ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAmBgpU,CAAC;+BAAkI,CAAC;0BAAmJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../src/core/reducers/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;yBAEvC,OAAO,KAAK,EAAE,QAAQ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAmBgpU,CAAC;+BAAkI,CAAC;0BAAmJ,CAAC;oCAA0N,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAnB/qV,wBAkBE"}
|
|
@@ -31,6 +31,7 @@ export default function initializeReducers({ getRsProps }: RsInternal): (state:
|
|
|
31
31
|
forceRenderOnNextRun?: boolean;
|
|
32
32
|
forceCalculateAutoWidth?: boolean;
|
|
33
33
|
updateSelectedRows?: number;
|
|
34
|
+
dependentViewPropertyChanged?: boolean;
|
|
34
35
|
};
|
|
35
36
|
selectedRows?: string[];
|
|
36
37
|
template?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/reducers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAkExD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE,UAAU,IAC3D,OAAO,KAAK,EAAE,QAAQ,MAAM,EAAE,YAAY,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAemvQ,CAAC;+BAAkI,CAAC;0BAAmJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/reducers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAkExD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,UAAU,EAAE,EAAE,UAAU,IAC3D,OAAO,KAAK,EAAE,QAAQ,MAAM,EAAE,YAAY,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAemvQ,CAAC;+BAAkI,CAAC;0BAAmJ,CAAC;oCAA0N,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EADnyR"}
|
|
@@ -299,6 +299,11 @@ export interface State {
|
|
|
299
299
|
forceCalculateAutoWidth?: boolean;
|
|
300
300
|
/** Force re-fetch selectedRows by calling {@link ApiContext.getSelectedRows getSelectedRows} apiContext. */
|
|
301
301
|
updateSelectedRows?: number;
|
|
302
|
+
/**
|
|
303
|
+
* Set when a property on the {@link View} object is mutated directly (outside the action queue)
|
|
304
|
+
* and features need to re-run to react to the change.
|
|
305
|
+
*/
|
|
306
|
+
dependentViewPropertyChanged?: boolean;
|
|
302
307
|
};
|
|
303
308
|
/** An array of selected rows identified by value of {@link Meta.itemKey itemkey} for that rows */
|
|
304
309
|
selectedRows?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"State.types.d.ts","sourceRoot":"","sources":["../../types/State.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,KAAK,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AAE,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"State.types.js","sourceRoot":"","sources":["../../types/State.types.ts"],"names":[],"mappings":"AAyHA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,GAAG,aAAa;IAChB,8DAA8D;IAC9D,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["import type { ExcludeStrict, OmitStrict } from '@pega/cosmos-react-core';\nimport type { Condition, LeafCondition } from '@pega/cosmos-react-condition-builder';\nimport type { DateFunction } from '@pega/cosmos-react-condition-builder/lib/components/ConditionBuilder/core/types';\n\nimport type { personalizationProps } from '../src/core/reducers/personalizationReducer';\nimport type { RowData, ScalarRowData } from '../src/core/generators/RowGenerator.types';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type RsCoreBootArgs from './RsCoreBootArgs.types';\nimport type {\n ROW_DENSITY,\n GalleryLayout,\n HierarchicalInfo,\n /* eslint-disable @typescript-eslint/no-unused-vars */\n FieldDef,\n Meta,\n FieldType,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ConditionalStyleFormat\n} from './Meta.types';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext, RsApi } from './ApiContext.types';\n/** Custom functions ungrouped type */\ntype Ungrouped =\n | {\n /**\n * Ungrouped mode\n * 'aggregate' - Aggregate remaining groups as others group\n */\n mode: 'aggregate';\n /** Others group label */\n label: string;\n }\n | {\n /** 'exclude' - Exclude remaining values */\n mode: 'exclude';\n };\n\n/** Boundaries for range grouping */\nexport type RangeBoundaries =\n | 'include-lower-only'\n | 'include-upper-only'\n | 'include-both'\n | 'exclude-both';\n\n/** Rhs type for range grouping to support boundaries */\ninterface RangeGroupingRhs<T extends number | string> {\n rhs:\n | {\n value: T;\n }\n | {\n start: T;\n end: T;\n boundaries: RangeBoundaries;\n };\n}\n\n/** Modified leaf condition for Range grouping */\ntype RangeGroupingLeafCondition<T extends number | string> = OmitStrict<LeafCondition, 'rhs'> &\n RangeGroupingRhs<T>;\n\n/** Aggregation types */\nexport type AggregationType = 'Sum' | 'Min' | 'Max' | 'Avg';\n/** Aggregation state on the Table */\nexport type Aggregation = {\n /** Column ID */\n columnId: string;\n /** Aggregation type */\n type: AggregationType;\n};\n\n/** Custom grouping types */\nexport type CustomFunctions = 'TEXT_GROUPING' | 'RANGE_GROUPING';\n\n/** Custom text grouping details applied on column */\nexport type TextGrouping = {\n /** Custom function name */\n type: 'TEXT_GROUPING';\n /** Randomly generated unique id to distinguish separate custom functions on same field */\n id: string;\n /** Custom groups information */\n groups: {\n /** Group label */\n label: string;\n /** Group condition */\n condition: LeafCondition;\n }[];\n /** Ungrouped information */\n ungrouped: Ungrouped;\n};\n\n/** Custom range grouping details applied on column */\nexport type RangeGrouping = {\n /** Custom function name */\n type: 'RANGE_GROUPING';\n /** Randomly generated unique id to distinguish separate custom functions on same field */\n id: string;\n /** Custom groups information */\n groups: {\n /** Group label */\n label: string;\n /** Group condition */\n condition: RangeGroupingLeafCondition<number>;\n }[];\n /** Ungrouped information */\n ungrouped: Ungrouped;\n};\n\n/** Custom interval grouping details applied on column */\nexport type IntervalGrouping = {\n /** Custom function name */\n type: 'INTERVAL_GROUPING';\n /** Randomly generated unique id to distinguish separate custom functions on same field */\n id: string;\n /** interval */\n interval: number;\n /** boundaries */\n boundaries: 'include-lower-only' | 'include-upper-only';\n};\n\nexport const SortDirection = {\n ASC: 'asc',\n DESC: 'desc'\n} as const;\n\nexport const GroupSortDirection = {\n ...SortDirection,\n /** For custom grouping, the group order can be custom too. */\n CUSTOM: 'custom'\n} as const;\n\nexport type DateGroupAdditionalField = {\n /** Additional field id reference as mentioned in {@link FieldDef.id fieldDef id}. */\n id: FieldDef['id'];\n /** Optional date function for {@link FieldType.DATE 'date'}/ {@link FieldType.DATE_TIME 'dateTime'} field. */\n dateFunction?: ExcludeStrict<DateFunction, 'SECONDS'>;\n};\n\nexport type NumberGroupAdditionalField = {\n /** Additional field id reference as mentioned in {@link FieldDef.id fieldDef id}. */\n id: FieldDef['id'];\n /** Optional aggregation for {@link FieldType.NUMBER 'number'} type field. */\n aggregation?: ExcludeStrict<AggregationType, 'Avg'>;\n};\n\n/** Additional fields data for Group info. */\nexport type GroupAdditionalField =\n | {\n /** Additional field id reference as mentioned in {@link FieldDef.id fieldDef id}. */\n id: FieldDef['id'];\n }\n | DateGroupAdditionalField\n | NumberGroupAdditionalField;\n\n/** Group configuration on Table state */\nexport interface Group {\n /** Column ID */\n columnId: string;\n /** Date function if grouping by a date part */\n dateFunction?: DateFunction;\n /** Custom function if applied on Text/Number column */\n customFunction?: TextGrouping | RangeGrouping | IntervalGrouping;\n /** Sort order of the grouped column.\n * - asc - ascending\n * - desc - descending\n * - custom - user defined custom sorting. This is applicable in case of custom grouping.\n */\n order: (typeof GroupSortDirection)[keyof typeof GroupSortDirection];\n /** Current group level, starts with 0 for 1st level of grouping. */\n level: number;\n /** Additional field config for current group node */\n additionalFields?: GroupAdditionalField[];\n}\n\n/** Sort configuration on Table state */\nexport interface Sort {\n /** Column ID */\n columnId: string;\n /** Sort order */\n order: (typeof SortDirection)[keyof typeof SortDirection];\n /** Used to indicate the sequence in multi-sort */\n sequence: number;\n}\n\n/** Group filter from the Table state */\nexport interface GroupFilter {\n /** Start-index used for pagination */\n groupFrom: number;\n /** End-index used for pagination */\n groupTo: number;\n /**\n * List of filters in the current branch of groupFilters.\n * Each entry in the object corresponds to a single node in the given group's hierarchy\n * groupBy can be in one of two patterns - `${columnId}`, `${columnId}||${dateFunction}`.\n * Use getGroupFromKey from lists to safely split it.\n */\n filters: {\n [groupBy: string]: ScalarRowData;\n };\n}\n\nexport interface PersonalizationInfo {\n name: string;\n personalizationState: State;\n isDefaultPreset?: boolean;\n isPreset?: boolean;\n title?: string;\n template?: string;\n markAsDefault?: boolean;\n}\nexport interface Personalization {\n allPersonalizations: {\n [personalizationkey: string]: PersonalizationInfo;\n };\n defaultPersonalization: string;\n active: string;\n dirty?: boolean;\n previousDefaultPersonalization?: string;\n lastDeletedPersonalization?: PersonalizationInfo;\n}\nexport interface Child extends CustomField {\n fieldIds: string[];\n children: Child[];\n templateName: string;\n}\n/** This interface is the old implementation of custom fields which is required for state versioning reducer. */\ninterface OldCustomField {\n children?: Child[];\n templateName?: string;\n}\nexport type CustomField = {\n /**\n * An array which contains the 2 join column id details and merge template details(a tuple of length 1 and type string) for those 2 columns\n * Column Merge templates:\n * - comma\n * - space\n * - multiline\n * - forwardslash\n */\n expression: (string | [string])[];\n /** A unique id to identify the new column resulted from merging of 2 columns. */\n id: string;\n /** Label for the new column */\n label: string;\n /** Primary column id which is used to derive the {@link FieldDef FieldDefinition} of new column */\n primaryColumnId: string;\n} & OldCustomField;\n\nexport interface DataError {\n /** itemKey of the row that has error */\n [itemKeyValue: string | number]: {\n /** error message for the row */\n message: string;\n };\n}\nexport interface Errors {\n /** errors related to row data */\n dataErrors: DataError;\n}\n\nexport type ResponsiveBreakpoint = {\n [breakpoint in 'xs' | 'sm' | 'md' | 'lg' | 'xl']?: boolean;\n};\n\nexport interface Notification {\n content: string;\n id?: string;\n}\n\n/**\n * groupBy - field id of the column on which group is toggled.\n * value(2D array) - The path of the group which is toggled.\n * @example - Consider 3 columns Priority, Severity, Status and all are grouped.\n * Expanding the first and second nested group header fully starting from Priority -> Severity -> Status will result in:\n * {\n * 'Priority': [['85 P'], ['95P']],\n * 'Severity': [['85P', 'Low severity'], ['95P', 'Low severity']],\n * 'Status': [['85P', 'Low severity', 'Pending'],['95P', 'Low severity', 'Pending']]\n * }\n */\nexport interface GroupToggle {\n [groupBy: string]: (string | number | boolean | Date)[][];\n}\n\nexport interface RowSelectionChangeSet {\n [key: string]: { data: RowData; status: string; selected: boolean };\n}\n\nexport interface State {\n /** Current order of the columns in the form of array of {@link FieldDef.id fieldDef id} */\n colOrder?: string[];\n /** Current widths of the columns in the form of array of fieldDef id and its current width */\n columnWidths?: { [key: string]: number };\n /** Current frozen columns represented by array of fieldDef id */\n freezeColumns?: string[];\n /** Current hidden columns represented by array of fieldDef id */\n hiddenColumns?: string[];\n /** id value from displayDensity table meta configuration property */\n selectedHeightOption?: (typeof ROW_DENSITY)[keyof typeof ROW_DENSITY];\n /** Current gallery layout mode for gallery views */\n galleryLayout?: GalleryLayout;\n /** Filter configuration in the ConditionBuilder format */\n filterExpression?: Condition;\n /** Aggregation configuration */\n aggregationInfo?: Aggregation[];\n /** Grouping configuration */\n groups?: Group[];\n /**\n * Internal/transient snapshot of {@link groups} captured when switching to a template\n * that does not support grouping (e.g. Gallery), so the configuration can be restored\n * when the user switches back to a grouping-capable template.\n *\n * Prefixed with underscore to denote this is private to the `changeTemplate` feature\n * and must not be consumed by other features or external code.\n */\n _groupsSnapshot?: Group[];\n /** Sorting configuration */\n sortingOrder?: Sort[];\n /** Search configuration */\n search?: {\n /** Search text */\n query: string;\n /** Fields to search in\n * @deprecated - This is no longer used. The {@link FieldDef.searchable searchable} property in FieldDef is used to determine the fields included in global search.\n */\n fields: string[];\n };\n /** Group filters applied when fetching data-rows */\n groupFilters?: GroupFilter[];\n /** Pagination applied when fetching data-rows */\n paginationOptions?: {\n [virtualizerId: string]: {\n startIndex: number;\n endIndex: number;\n };\n };\n /** An object of features that needs to be forced triggered on next dispatch cycle of Repeating structures. */\n forceUpdateFeatures?: {\n /** Force re-render the Repeating structures on next dispatch */\n forceRenderOnNextRun?: boolean;\n /** Force re-calculate width of fields of the Repeating structures on next dispatch. */\n forceCalculateAutoWidth?: boolean;\n /** Force re-fetch selectedRows by calling {@link ApiContext.getSelectedRows getSelectedRows} apiContext. */\n updateSelectedRows?: number;\n };\n /** An array of selected rows identified by value of {@link Meta.itemKey itemkey} for that rows */\n selectedRows?: string[];\n /** Repeating Structure {@link Meta.template templates} */\n template?: string;\n /**\n * Runtime-only override of the active {@link Meta.template template} (e.g. when the user\n * toggles between Table and Gallery from the toolbar). Independent of {@link template},\n * which is bound to the current personalization preset.\n */\n currentTemplate?: Meta['template'];\n /**\n * Preset identifier through which the current preset/personalized view is derived.\n * For default preset or personalization dervied from default preset the value is equal to 'nonPersonalizationViewKey'\n */\n presetId?: string;\n /** Version of the state */\n version?: string;\n /** Personalization state of repeating structure */\n personalization?: Personalization;\n /** An array of custom fields generated using joining the columns */\n customFields?: CustomField[];\n /**\n * This key holds the state of the external component within RS state.\n * This state is never manipulated by Repeating structures. This key is personalizable. Currently it contains state related to {@link Meta.externalFilters}\n */\n externalState?: { [key: string]: object };\n /**\n * This holds formatter info for a given column id.\n * key - {@link FieldDef.id columnId}\n * value - Formatter name\n */\n renderFormatter?: {\n [key: string]: string | { type: string; config: unknown };\n };\n /** It contains the alias for the column. Key is {@link FieldDef.id id} of the column, value is the alias name given to that column. */\n columnAlias?: {\n [key: string]: string;\n };\n /** Hierarchical groups info */\n hierarchicalGroup?: HierarchicalInfo;\n /** Groups are expanded or closed. */\n allGroupsExpanded?: boolean;\n\n /** Stores the errors */\n errors?: Errors;\n /** {@link FieldDef.id Id} of the field for which filter is going to be deleted. */\n clearColFilter?: string | null;\n /** A 2D array that contains the expand/collapse info of groups\n * * @example - Consider 3 columns Priority, Severity, Status and all are grouped.\n * Expanding the first and second nested group header fully starting from Priority -> Severity -> Status will result in:\n * {\n * 'Priority': [['85 P'], ['95P']],\n * 'Severity': [['85P', 'Low severity'], ['95P', 'Low severity']],\n * 'Status': [['85P', 'Low severity', 'Pending'],['95P', 'Low severity', 'Pending']]\n * }\n */\n groupToggle?: GroupToggle;\n /** Indicates if the header icon needs to be shown for header cells. */\n showHeaderIcons?: boolean;\n /** The current set of notifications on repeating structures. */\n notifications?: Notification[];\n /** Temporary change set for the selection of rows till the time the selected rows are not communicated to ApiContext via {@link ApiContext.setSelectedRows setSelectedRows}. */\n rowSelectionChangeSet?: RowSelectionChangeSet;\n /** Indicates the repeating structures is bootstraped. */\n bootstrap?: boolean;\n /** Triggers refresh on repeating structures. */\n refresh?: number;\n /** Indicates to show select all checkbox in repeating structures. */\n showSelectAllCheckbox?: boolean;\n /** Indicates to show confirmation action in repeating structures. */\n showConfirmationAction?: boolean;\n /** Stores the itemkey of the row which is being moved in drag drop operations. */\n sourceKey?: string;\n /** Stores the itemkey of the row on which the dragged row is dropped in drag drop operations. */\n destinationKey?: string;\n /** Set of features which should be skipped when running the queued action. */\n featuresToAvoid?: string[];\n /** Stores the repeating structures body height. */\n tableHeight?: number | string;\n /** Stores the responsive breakpoints of DOM container */\n responsive?: ResponsiveBreakpoint;\n /**\n * Array of conditional style formats.\n *\n * When set, make sure the following conditions must be met:\n * - The available {@link RsCoreBootArgs.styleFormats styleFormats} must be passed to repeating structures as a prop.\n * - The `styleFormatId` referenced in conditional style formats within {@link State.conditionalStyleFormats state} must belong to one of the {@link RsCoreBootArgs.styleFormats styleFormats}.\n * - The {@link ApiContext.evaluateCondition evaluateCondition} API is optional. If the RS consumer wants to evaluate the condition itself, this API should be provided; otherwise, it is optional.\n *\n * **Note**: *For a given fieldName, if the data satisfies multiple conditional style formats, the first matching conditional format will be used.*\n */\n conditionalStyleFormats?: ConditionalStyleFormat[];\n\n /** Current visible columns represented by array of fieldDef id */\n visibleColumns?: string[];\n}\n\nexport interface PersonalizedState extends Pick<State, (typeof personalizationProps)[number]> {}\n"]}
|
|
1
|
+
{"version":3,"file":"State.types.js","sourceRoot":"","sources":["../../types/State.types.ts"],"names":[],"mappings":"AAyHA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACJ,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,GAAG,aAAa;IAChB,8DAA8D;IAC9D,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["import type { ExcludeStrict, OmitStrict } from '@pega/cosmos-react-core';\nimport type { Condition, LeafCondition } from '@pega/cosmos-react-condition-builder';\nimport type { DateFunction } from '@pega/cosmos-react-condition-builder/lib/components/ConditionBuilder/core/types';\n\nimport type { personalizationProps } from '../src/core/reducers/personalizationReducer';\nimport type { RowData, ScalarRowData } from '../src/core/generators/RowGenerator.types';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type RsCoreBootArgs from './RsCoreBootArgs.types';\nimport type {\n ROW_DENSITY,\n GalleryLayout,\n HierarchicalInfo,\n /* eslint-disable @typescript-eslint/no-unused-vars */\n FieldDef,\n Meta,\n FieldType,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ConditionalStyleFormat\n} from './Meta.types';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext, RsApi } from './ApiContext.types';\n/** Custom functions ungrouped type */\ntype Ungrouped =\n | {\n /**\n * Ungrouped mode\n * 'aggregate' - Aggregate remaining groups as others group\n */\n mode: 'aggregate';\n /** Others group label */\n label: string;\n }\n | {\n /** 'exclude' - Exclude remaining values */\n mode: 'exclude';\n };\n\n/** Boundaries for range grouping */\nexport type RangeBoundaries =\n | 'include-lower-only'\n | 'include-upper-only'\n | 'include-both'\n | 'exclude-both';\n\n/** Rhs type for range grouping to support boundaries */\ninterface RangeGroupingRhs<T extends number | string> {\n rhs:\n | {\n value: T;\n }\n | {\n start: T;\n end: T;\n boundaries: RangeBoundaries;\n };\n}\n\n/** Modified leaf condition for Range grouping */\ntype RangeGroupingLeafCondition<T extends number | string> = OmitStrict<LeafCondition, 'rhs'> &\n RangeGroupingRhs<T>;\n\n/** Aggregation types */\nexport type AggregationType = 'Sum' | 'Min' | 'Max' | 'Avg';\n/** Aggregation state on the Table */\nexport type Aggregation = {\n /** Column ID */\n columnId: string;\n /** Aggregation type */\n type: AggregationType;\n};\n\n/** Custom grouping types */\nexport type CustomFunctions = 'TEXT_GROUPING' | 'RANGE_GROUPING';\n\n/** Custom text grouping details applied on column */\nexport type TextGrouping = {\n /** Custom function name */\n type: 'TEXT_GROUPING';\n /** Randomly generated unique id to distinguish separate custom functions on same field */\n id: string;\n /** Custom groups information */\n groups: {\n /** Group label */\n label: string;\n /** Group condition */\n condition: LeafCondition;\n }[];\n /** Ungrouped information */\n ungrouped: Ungrouped;\n};\n\n/** Custom range grouping details applied on column */\nexport type RangeGrouping = {\n /** Custom function name */\n type: 'RANGE_GROUPING';\n /** Randomly generated unique id to distinguish separate custom functions on same field */\n id: string;\n /** Custom groups information */\n groups: {\n /** Group label */\n label: string;\n /** Group condition */\n condition: RangeGroupingLeafCondition<number>;\n }[];\n /** Ungrouped information */\n ungrouped: Ungrouped;\n};\n\n/** Custom interval grouping details applied on column */\nexport type IntervalGrouping = {\n /** Custom function name */\n type: 'INTERVAL_GROUPING';\n /** Randomly generated unique id to distinguish separate custom functions on same field */\n id: string;\n /** interval */\n interval: number;\n /** boundaries */\n boundaries: 'include-lower-only' | 'include-upper-only';\n};\n\nexport const SortDirection = {\n ASC: 'asc',\n DESC: 'desc'\n} as const;\n\nexport const GroupSortDirection = {\n ...SortDirection,\n /** For custom grouping, the group order can be custom too. */\n CUSTOM: 'custom'\n} as const;\n\nexport type DateGroupAdditionalField = {\n /** Additional field id reference as mentioned in {@link FieldDef.id fieldDef id}. */\n id: FieldDef['id'];\n /** Optional date function for {@link FieldType.DATE 'date'}/ {@link FieldType.DATE_TIME 'dateTime'} field. */\n dateFunction?: ExcludeStrict<DateFunction, 'SECONDS'>;\n};\n\nexport type NumberGroupAdditionalField = {\n /** Additional field id reference as mentioned in {@link FieldDef.id fieldDef id}. */\n id: FieldDef['id'];\n /** Optional aggregation for {@link FieldType.NUMBER 'number'} type field. */\n aggregation?: ExcludeStrict<AggregationType, 'Avg'>;\n};\n\n/** Additional fields data for Group info. */\nexport type GroupAdditionalField =\n | {\n /** Additional field id reference as mentioned in {@link FieldDef.id fieldDef id}. */\n id: FieldDef['id'];\n }\n | DateGroupAdditionalField\n | NumberGroupAdditionalField;\n\n/** Group configuration on Table state */\nexport interface Group {\n /** Column ID */\n columnId: string;\n /** Date function if grouping by a date part */\n dateFunction?: DateFunction;\n /** Custom function if applied on Text/Number column */\n customFunction?: TextGrouping | RangeGrouping | IntervalGrouping;\n /** Sort order of the grouped column.\n * - asc - ascending\n * - desc - descending\n * - custom - user defined custom sorting. This is applicable in case of custom grouping.\n */\n order: (typeof GroupSortDirection)[keyof typeof GroupSortDirection];\n /** Current group level, starts with 0 for 1st level of grouping. */\n level: number;\n /** Additional field config for current group node */\n additionalFields?: GroupAdditionalField[];\n}\n\n/** Sort configuration on Table state */\nexport interface Sort {\n /** Column ID */\n columnId: string;\n /** Sort order */\n order: (typeof SortDirection)[keyof typeof SortDirection];\n /** Used to indicate the sequence in multi-sort */\n sequence: number;\n}\n\n/** Group filter from the Table state */\nexport interface GroupFilter {\n /** Start-index used for pagination */\n groupFrom: number;\n /** End-index used for pagination */\n groupTo: number;\n /**\n * List of filters in the current branch of groupFilters.\n * Each entry in the object corresponds to a single node in the given group's hierarchy\n * groupBy can be in one of two patterns - `${columnId}`, `${columnId}||${dateFunction}`.\n * Use getGroupFromKey from lists to safely split it.\n */\n filters: {\n [groupBy: string]: ScalarRowData;\n };\n}\n\nexport interface PersonalizationInfo {\n name: string;\n personalizationState: State;\n isDefaultPreset?: boolean;\n isPreset?: boolean;\n title?: string;\n template?: string;\n markAsDefault?: boolean;\n}\nexport interface Personalization {\n allPersonalizations: {\n [personalizationkey: string]: PersonalizationInfo;\n };\n defaultPersonalization: string;\n active: string;\n dirty?: boolean;\n previousDefaultPersonalization?: string;\n lastDeletedPersonalization?: PersonalizationInfo;\n}\nexport interface Child extends CustomField {\n fieldIds: string[];\n children: Child[];\n templateName: string;\n}\n/** This interface is the old implementation of custom fields which is required for state versioning reducer. */\ninterface OldCustomField {\n children?: Child[];\n templateName?: string;\n}\nexport type CustomField = {\n /**\n * An array which contains the 2 join column id details and merge template details(a tuple of length 1 and type string) for those 2 columns\n * Column Merge templates:\n * - comma\n * - space\n * - multiline\n * - forwardslash\n */\n expression: (string | [string])[];\n /** A unique id to identify the new column resulted from merging of 2 columns. */\n id: string;\n /** Label for the new column */\n label: string;\n /** Primary column id which is used to derive the {@link FieldDef FieldDefinition} of new column */\n primaryColumnId: string;\n} & OldCustomField;\n\nexport interface DataError {\n /** itemKey of the row that has error */\n [itemKeyValue: string | number]: {\n /** error message for the row */\n message: string;\n };\n}\nexport interface Errors {\n /** errors related to row data */\n dataErrors: DataError;\n}\n\nexport type ResponsiveBreakpoint = {\n [breakpoint in 'xs' | 'sm' | 'md' | 'lg' | 'xl']?: boolean;\n};\n\nexport interface Notification {\n content: string;\n id?: string;\n}\n\n/**\n * groupBy - field id of the column on which group is toggled.\n * value(2D array) - The path of the group which is toggled.\n * @example - Consider 3 columns Priority, Severity, Status and all are grouped.\n * Expanding the first and second nested group header fully starting from Priority -> Severity -> Status will result in:\n * {\n * 'Priority': [['85 P'], ['95P']],\n * 'Severity': [['85P', 'Low severity'], ['95P', 'Low severity']],\n * 'Status': [['85P', 'Low severity', 'Pending'],['95P', 'Low severity', 'Pending']]\n * }\n */\nexport interface GroupToggle {\n [groupBy: string]: (string | number | boolean | Date)[][];\n}\n\nexport interface RowSelectionChangeSet {\n [key: string]: { data: RowData; status: string; selected: boolean };\n}\n\nexport interface State {\n /** Current order of the columns in the form of array of {@link FieldDef.id fieldDef id} */\n colOrder?: string[];\n /** Current widths of the columns in the form of array of fieldDef id and its current width */\n columnWidths?: { [key: string]: number };\n /** Current frozen columns represented by array of fieldDef id */\n freezeColumns?: string[];\n /** Current hidden columns represented by array of fieldDef id */\n hiddenColumns?: string[];\n /** id value from displayDensity table meta configuration property */\n selectedHeightOption?: (typeof ROW_DENSITY)[keyof typeof ROW_DENSITY];\n /** Current gallery layout mode for gallery views */\n galleryLayout?: GalleryLayout;\n /** Filter configuration in the ConditionBuilder format */\n filterExpression?: Condition;\n /** Aggregation configuration */\n aggregationInfo?: Aggregation[];\n /** Grouping configuration */\n groups?: Group[];\n /**\n * Internal/transient snapshot of {@link groups} captured when switching to a template\n * that does not support grouping (e.g. Gallery), so the configuration can be restored\n * when the user switches back to a grouping-capable template.\n *\n * Prefixed with underscore to denote this is private to the `changeTemplate` feature\n * and must not be consumed by other features or external code.\n */\n _groupsSnapshot?: Group[];\n /** Sorting configuration */\n sortingOrder?: Sort[];\n /** Search configuration */\n search?: {\n /** Search text */\n query: string;\n /** Fields to search in\n * @deprecated - This is no longer used. The {@link FieldDef.searchable searchable} property in FieldDef is used to determine the fields included in global search.\n */\n fields: string[];\n };\n /** Group filters applied when fetching data-rows */\n groupFilters?: GroupFilter[];\n /** Pagination applied when fetching data-rows */\n paginationOptions?: {\n [virtualizerId: string]: {\n startIndex: number;\n endIndex: number;\n };\n };\n /** An object of features that needs to be forced triggered on next dispatch cycle of Repeating structures. */\n forceUpdateFeatures?: {\n /** Force re-render the Repeating structures on next dispatch */\n forceRenderOnNextRun?: boolean;\n /** Force re-calculate width of fields of the Repeating structures on next dispatch. */\n forceCalculateAutoWidth?: boolean;\n /** Force re-fetch selectedRows by calling {@link ApiContext.getSelectedRows getSelectedRows} apiContext. */\n updateSelectedRows?: number;\n /**\n * Set when a property on the {@link View} object is mutated directly (outside the action queue)\n * and features need to re-run to react to the change.\n */\n dependentViewPropertyChanged?: boolean;\n };\n /** An array of selected rows identified by value of {@link Meta.itemKey itemkey} for that rows */\n selectedRows?: string[];\n /** Repeating Structure {@link Meta.template templates} */\n template?: string;\n /**\n * Runtime-only override of the active {@link Meta.template template} (e.g. when the user\n * toggles between Table and Gallery from the toolbar). Independent of {@link template},\n * which is bound to the current personalization preset.\n */\n currentTemplate?: Meta['template'];\n /**\n * Preset identifier through which the current preset/personalized view is derived.\n * For default preset or personalization dervied from default preset the value is equal to 'nonPersonalizationViewKey'\n */\n presetId?: string;\n /** Version of the state */\n version?: string;\n /** Personalization state of repeating structure */\n personalization?: Personalization;\n /** An array of custom fields generated using joining the columns */\n customFields?: CustomField[];\n /**\n * This key holds the state of the external component within RS state.\n * This state is never manipulated by Repeating structures. This key is personalizable. Currently it contains state related to {@link Meta.externalFilters}\n */\n externalState?: { [key: string]: object };\n /**\n * This holds formatter info for a given column id.\n * key - {@link FieldDef.id columnId}\n * value - Formatter name\n */\n renderFormatter?: {\n [key: string]: string | { type: string; config: unknown };\n };\n /** It contains the alias for the column. Key is {@link FieldDef.id id} of the column, value is the alias name given to that column. */\n columnAlias?: {\n [key: string]: string;\n };\n /** Hierarchical groups info */\n hierarchicalGroup?: HierarchicalInfo;\n /** Groups are expanded or closed. */\n allGroupsExpanded?: boolean;\n\n /** Stores the errors */\n errors?: Errors;\n /** {@link FieldDef.id Id} of the field for which filter is going to be deleted. */\n clearColFilter?: string | null;\n /** A 2D array that contains the expand/collapse info of groups\n * * @example - Consider 3 columns Priority, Severity, Status and all are grouped.\n * Expanding the first and second nested group header fully starting from Priority -> Severity -> Status will result in:\n * {\n * 'Priority': [['85 P'], ['95P']],\n * 'Severity': [['85P', 'Low severity'], ['95P', 'Low severity']],\n * 'Status': [['85P', 'Low severity', 'Pending'],['95P', 'Low severity', 'Pending']]\n * }\n */\n groupToggle?: GroupToggle;\n /** Indicates if the header icon needs to be shown for header cells. */\n showHeaderIcons?: boolean;\n /** The current set of notifications on repeating structures. */\n notifications?: Notification[];\n /** Temporary change set for the selection of rows till the time the selected rows are not communicated to ApiContext via {@link ApiContext.setSelectedRows setSelectedRows}. */\n rowSelectionChangeSet?: RowSelectionChangeSet;\n /** Indicates the repeating structures is bootstraped. */\n bootstrap?: boolean;\n /** Triggers refresh on repeating structures. */\n refresh?: number;\n /** Indicates to show select all checkbox in repeating structures. */\n showSelectAllCheckbox?: boolean;\n /** Indicates to show confirmation action in repeating structures. */\n showConfirmationAction?: boolean;\n /** Stores the itemkey of the row which is being moved in drag drop operations. */\n sourceKey?: string;\n /** Stores the itemkey of the row on which the dragged row is dropped in drag drop operations. */\n destinationKey?: string;\n /** Set of features which should be skipped when running the queued action. */\n featuresToAvoid?: string[];\n /** Stores the repeating structures body height. */\n tableHeight?: number | string;\n /** Stores the responsive breakpoints of DOM container */\n responsive?: ResponsiveBreakpoint;\n /**\n * Array of conditional style formats.\n *\n * When set, make sure the following conditions must be met:\n * - The available {@link RsCoreBootArgs.styleFormats styleFormats} must be passed to repeating structures as a prop.\n * - The `styleFormatId` referenced in conditional style formats within {@link State.conditionalStyleFormats state} must belong to one of the {@link RsCoreBootArgs.styleFormats styleFormats}.\n * - The {@link ApiContext.evaluateCondition evaluateCondition} API is optional. If the RS consumer wants to evaluate the condition itself, this API should be provided; otherwise, it is optional.\n *\n * **Note**: *For a given fieldName, if the data satisfies multiple conditional style formats, the first matching conditional format will be used.*\n */\n conditionalStyleFormats?: ConditionalStyleFormat[];\n\n /** Current visible columns represented by array of fieldDef id */\n visibleColumns?: string[];\n}\n\nexport interface PersonalizedState extends Pick<State, (typeof personalizationProps)[number]> {}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/lists-core",
|
|
3
|
-
"version": "9.0.0-build.29.
|
|
3
|
+
"version": "9.0.0-build.29.23",
|
|
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,8 +14,8 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-condition-builder": "9.0.0-build.29.
|
|
18
|
-
"@pega/cosmos-react-core": "9.0.0-build.29.
|
|
17
|
+
"@pega/cosmos-react-condition-builder": "9.0.0-build.29.23",
|
|
18
|
+
"@pega/cosmos-react-core": "9.0.0-build.29.23",
|
|
19
19
|
"@types/lodash-es": "^4.17.12",
|
|
20
20
|
"dayjs": "^1.11.13",
|
|
21
21
|
"fast-deep-equal": "^3.1.3",
|