@pega/lists-core 9.0.0-build.21.8 → 9.0.0-build.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/src/core/RsCore.d.ts +1 -1
- package/lib/src/core/RsCore.js +1 -1
- package/lib/src/core/RsCore.js.map +1 -1
- package/lib/src/core/StateResolver.d.ts +0 -1
- package/lib/src/core/StateResolver.d.ts.map +1 -1
- package/lib/src/core/StateResolver.js +0 -1
- package/lib/src/core/StateResolver.js.map +1 -1
- package/lib/src/core/a11y/BaseA11y.d.ts +2 -3
- package/lib/src/core/a11y/BaseA11y.d.ts.map +1 -1
- package/lib/src/core/a11y/BaseA11y.js +3 -4
- package/lib/src/core/a11y/BaseA11y.js.map +1 -1
- package/lib/src/core/actions/actionConstants.d.ts +1 -0
- package/lib/src/core/actions/actionConstants.d.ts.map +1 -1
- package/lib/src/core/actions/actionConstants.js +1 -0
- package/lib/src/core/actions/actionConstants.js.map +1 -1
- package/lib/src/core/actions/actions.d.ts +7 -6
- package/lib/src/core/actions/actions.d.ts.map +1 -1
- package/lib/src/core/actions/actions.js +8 -6
- package/lib/src/core/actions/actions.js.map +1 -1
- package/lib/src/core/actions/actions.types.d.ts +4 -0
- package/lib/src/core/actions/actions.types.d.ts.map +1 -1
- package/lib/src/core/features/featureFactory.d.ts +0 -1
- package/lib/src/core/features/featureFactory.d.ts.map +1 -1
- package/lib/src/core/features/featureFactory.js +0 -3
- package/lib/src/core/features/featureFactory.js.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.d.ts +1 -2
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js +12 -12
- package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.d.ts.map +1 -1
- package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.js +2 -0
- package/lib/src/core/features/uIFeatures/beforeRender/prepareColumns.js.map +1 -1
- package/lib/src/core/features/uIFeatures/index.d.ts.map +1 -1
- package/lib/src/core/generators/ColumnGenerator.d.ts +2 -3
- package/lib/src/core/generators/ColumnGenerator.d.ts.map +1 -1
- package/lib/src/core/generators/ColumnGenerator.js +2 -4
- package/lib/src/core/generators/ColumnGenerator.js.map +1 -1
- package/lib/src/core/generators/RowGenerator.d.ts +1 -1
- package/lib/src/core/generators/RowGenerator.js +1 -1
- package/lib/src/core/generators/RowGenerator.js.map +1 -1
- package/lib/src/core/generators/ViewGenerator.d.ts +9 -13
- package/lib/src/core/generators/ViewGenerator.d.ts.map +1 -1
- package/lib/src/core/generators/ViewGenerator.js +15 -15
- package/lib/src/core/generators/ViewGenerator.js.map +1 -1
- package/lib/src/core/generators/ViewGenerator.types.d.ts +9 -1
- package/lib/src/core/generators/ViewGenerator.types.d.ts.map +1 -1
- package/lib/src/core/generators/ViewGenerator.types.js.map +1 -1
- package/lib/src/core/generators/__tests__/viewUtilityMockSetup.d.ts.map +1 -1
- package/lib/src/core/generators/viewUtilityMethods.d.ts +4 -9
- package/lib/src/core/generators/viewUtilityMethods.d.ts.map +1 -1
- package/lib/src/core/generators/viewUtilityMethods.js +9 -9
- package/lib/src/core/generators/viewUtilityMethods.js.map +1 -1
- package/lib/src/core/utils/util.d.ts +2 -2
- package/lib/src/core/utils/util.d.ts.map +1 -1
- package/lib/src/core/utils/util.js +4 -2
- package/lib/src/core/utils/util.js.map +1 -1
- package/lib/types.d.ts +2 -0
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { convertMetaIntoState } from './src/core/features/uIFeatures/beforeRende
|
|
|
3
3
|
export { filterParams, typeMap, comparatorMap } from './src/core/config/filterConfig';
|
|
4
4
|
export { getVisibileFields, dateFunctionLabels, getScrollbarWidth, getScrollerElem, getRowContextData, getFilterInitializers, getFilterConditions, isFilterApplied, addFilter, getFilters, removeEmptyValues, isEmpty, normalizeMeta } from './src/core/utils/util';
|
|
5
5
|
export { ACTION_FIELD_TYPE, expandCollapseAllMeta, rowErrorColumnMeta, rowDragDropColumnMeta } from './src/core/constants';
|
|
6
|
-
export declare const UPDATE_DEBUG_INFO: "updateDebugInfo", TOGGLE_DISABLE_SELECTION: "toggleDisableSelection", TOGGLE_REQUIRED: "toggleRequired", NOTIFY_DATA_REFRESH: "notifyDataRefresh", USER_CONFIRMATION_ACTION: "userConfirmationAction", SET_IN_EXTERNAL_STATE: "setInExternalState", UPDATE_SELECTED_ROWS: "updateSelectedRows";
|
|
6
|
+
export declare const UPDATE_DEBUG_INFO: "updateDebugInfo", TOGGLE_DISABLE_SELECTION: "toggleDisableSelection", TOGGLE_REQUIRED: "toggleRequired", NOTIFY_DATA_REFRESH: "notifyDataRefresh", USER_CONFIRMATION_ACTION: "userConfirmationAction", SET_IN_EXTERNAL_STATE: "setInExternalState", UPDATE_SELECTED_ROWS: "updateSelectedRows", SET_WARNING_MESSAGES: "setWarningMessages";
|
|
7
7
|
export { getMockColumn } from './src/core/test/junitMocks';
|
|
8
8
|
export { getGroupKey, getGroupFromKey } from './src/core/utils/util';
|
|
9
9
|
export { default as BaseA11y } from './src/core/a11y/BaseA11y';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAG/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAElG,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEtF,OAAO,EACL,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AU,EACV,iBAAiB,EACjB,OAAO,EACP,aAAa,EACd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,eAAO,MACL,iBAAiB,qBACjB,wBAAwB,4BACxB,eAAe,oBACf,mBAAmB,uBACnB,wBAAwB,4BACxB,qBAAqB,wBACrB,oBAAoB,wBACpB,oBAAoB,sBACP,CAAC;AAEhB,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAE/D,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,+DAA+D,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { convertMetaIntoState } from './src/core/features/uIFeatures/beforeRende
|
|
|
5
5
|
export { filterParams, typeMap, comparatorMap } from './src/core/config/filterConfig';
|
|
6
6
|
export { getVisibileFields, dateFunctionLabels, getScrollbarWidth, getScrollerElem, getRowContextData, getFilterInitializers, getFilterConditions, isFilterApplied, addFilter, getFilters, removeEmptyValues, isEmpty, normalizeMeta } from './src/core/utils/util';
|
|
7
7
|
export { ACTION_FIELD_TYPE, expandCollapseAllMeta, rowErrorColumnMeta, rowDragDropColumnMeta } from './src/core/constants';
|
|
8
|
-
export const { UPDATE_DEBUG_INFO, TOGGLE_DISABLE_SELECTION, TOGGLE_REQUIRED, NOTIFY_DATA_REFRESH, USER_CONFIRMATION_ACTION, SET_IN_EXTERNAL_STATE, UPDATE_SELECTED_ROWS } = ActionTypes;
|
|
8
|
+
export const { UPDATE_DEBUG_INFO, TOGGLE_DISABLE_SELECTION, TOGGLE_REQUIRED, NOTIFY_DATA_REFRESH, USER_CONFIRMATION_ACTION, SET_IN_EXTERNAL_STATE, UPDATE_SELECTED_ROWS, SET_WARNING_MESSAGES } = ActionTypes;
|
|
9
9
|
export { getMockColumn } from './src/core/test/junitMocks';
|
|
10
10
|
export { getGroupKey, getGroupFromKey } from './src/core/utils/util';
|
|
11
11
|
export { default as BaseA11y } from './src/core/a11y/BaseA11y';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAE7D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,+BAA+B;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAElG,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEtF,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,OAAO,EACP,aAAa,EACd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,MAAM,CAAC,MAAM,EACX,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACrB,GAAG,WAAW,CAAC;AAEhB,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAI/D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,+DAA+D,CAAC","sourcesContent":["import ActionTypes from './src/core/actions/actionConstants';\n\nexport { default as initializeRsCore } from './src/core/index';\n\n// FIXME: revisit below exports\nexport { convertMetaIntoState } from './src/core/features/uIFeatures/beforeRender/stateHydration';\n\nexport { filterParams, typeMap, comparatorMap } from './src/core/config/filterConfig';\n\nexport {\n getVisibileFields,\n dateFunctionLabels,\n getScrollbarWidth,\n getScrollerElem,\n getRowContextData,\n getFilterInitializers,\n getFilterConditions,\n isFilterApplied,\n addFilter,\n getFilters,\n removeEmptyValues,\n isEmpty,\n normalizeMeta\n} from './src/core/utils/util';\n\nexport {\n ACTION_FIELD_TYPE,\n expandCollapseAllMeta,\n rowErrorColumnMeta,\n rowDragDropColumnMeta\n} from './src/core/constants';\nexport const {\n UPDATE_DEBUG_INFO,\n TOGGLE_DISABLE_SELECTION,\n TOGGLE_REQUIRED,\n NOTIFY_DATA_REFRESH,\n USER_CONFIRMATION_ACTION,\n SET_IN_EXTERNAL_STATE,\n UPDATE_SELECTED_ROWS\n} = ActionTypes;\n\nexport { getMockColumn } from './src/core/test/junitMocks';\nexport { getGroupKey, getGroupFromKey } from './src/core/utils/util';\n\nexport { default as BaseA11y } from './src/core/a11y/BaseA11y';\n\nexport type { RsCoreTypes } from './types';\n\nexport { ROW_DENSITY, FieldType } from './types/Meta.types';\n\nexport { REPEATING_STRUCTURE_TEMPLATES, cellUpdateTrigger } from './types/Meta.types';\n\nexport { sanitizeConditionalStyleFormats } from './src/core/features/uIFeatures/beforeRender/stateSanitization';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAE7D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,+BAA+B;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAElG,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEtF,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,OAAO,EACP,aAAa,EACd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,MAAM,CAAC,MAAM,EACX,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACrB,GAAG,WAAW,CAAC;AAEhB,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAI/D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,+DAA+D,CAAC","sourcesContent":["import ActionTypes from './src/core/actions/actionConstants';\n\nexport { default as initializeRsCore } from './src/core/index';\n\n// FIXME: revisit below exports\nexport { convertMetaIntoState } from './src/core/features/uIFeatures/beforeRender/stateHydration';\n\nexport { filterParams, typeMap, comparatorMap } from './src/core/config/filterConfig';\n\nexport {\n getVisibileFields,\n dateFunctionLabels,\n getScrollbarWidth,\n getScrollerElem,\n getRowContextData,\n getFilterInitializers,\n getFilterConditions,\n isFilterApplied,\n addFilter,\n getFilters,\n removeEmptyValues,\n isEmpty,\n normalizeMeta\n} from './src/core/utils/util';\n\nexport {\n ACTION_FIELD_TYPE,\n expandCollapseAllMeta,\n rowErrorColumnMeta,\n rowDragDropColumnMeta\n} from './src/core/constants';\nexport const {\n UPDATE_DEBUG_INFO,\n TOGGLE_DISABLE_SELECTION,\n TOGGLE_REQUIRED,\n NOTIFY_DATA_REFRESH,\n USER_CONFIRMATION_ACTION,\n SET_IN_EXTERNAL_STATE,\n UPDATE_SELECTED_ROWS,\n SET_WARNING_MESSAGES\n} = ActionTypes;\n\nexport { getMockColumn } from './src/core/test/junitMocks';\nexport { getGroupKey, getGroupFromKey } from './src/core/utils/util';\n\nexport { default as BaseA11y } from './src/core/a11y/BaseA11y';\n\nexport type { RsCoreTypes } from './types';\n\nexport { ROW_DENSITY, FieldType } from './types/Meta.types';\n\nexport { REPEATING_STRUCTURE_TEMPLATES, cellUpdateTrigger } from './types/Meta.types';\n\nexport { sanitizeConditionalStyleFormats } from './src/core/features/uIFeatures/beforeRender/stateSanitization';\n"]}
|
package/lib/src/core/RsCore.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export default class RsCore {
|
|
|
14
14
|
*/
|
|
15
15
|
constructor(rsCoreInternal: RsInternal);
|
|
16
16
|
/**
|
|
17
|
-
* @param
|
|
17
|
+
* @param args - args whose reference is changing after initialization of rsCore
|
|
18
18
|
*/
|
|
19
19
|
updateInitArgs(args: {
|
|
20
20
|
apiContext: ApiContext;
|
package/lib/src/core/RsCore.js
CHANGED
|
@@ -16,7 +16,7 @@ export default class RsCore {
|
|
|
16
16
|
}
|
|
17
17
|
// TODO: enrich this to take other args like meta as well
|
|
18
18
|
/**
|
|
19
|
-
* @param
|
|
19
|
+
* @param args - args whose reference is changing after initialization of rsCore
|
|
20
20
|
*/
|
|
21
21
|
updateInitArgs(args) {
|
|
22
22
|
const { apiContext, styleFormats } = args;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RsCore.js","sourceRoot":"","sources":["../../../src/core/RsCore.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,WAAW,CAAa;IAExB;;;OAGG;IACH,YAAY,cAA0B;QACpC,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC;IACpC,CAAC;IAED,yDAAyD;IACzD;;OAEG;IACH,cAAc,CAAC,IAAuE;QACpF,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;QAC1C,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,UAAU,GAAG,UAAU,CAAC;QACtD,iEAAiE;QACjE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,EAAE,CAAC;YACzE,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,YAAY,GAAG,YAAY,CAAC;YAC1D,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IAED;;OAEG;IACH,OAAO,GAAG,GAAG,EAAE;QACb,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;IACpC,CAAC,CAAC;IAEF;;OAEG;IACH,eAAe,GAAG,GAAG,EAAE,CAAC,CAAC;QACvB,gEAAgE;QAChE,KAAK,EAAE,GAAG,EAAE;YACV,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnD,CAAC;QACD,+CAA+C;QAC/C,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACrD,CAAC;QACD,oIAAoI;QACpI,WAAW,EAAE,GAAG,EAAE;YAChB,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC1D,CAAC;KACF,CAAC,CAAC;CACJ","sourcesContent":["import type { ApiContext } from '../../types/ApiContext.types';\n\nimport type RsInternal from './RsInternal';\nimport type RsProps from './RsProps';\nimport { MOUNT, UNMOUNT, AFTER_RENDER } from './pubSub/events';\nimport { deepEqual } from './utils/util';\n\n/**\n * Represents the public interface of the core library.\n * On the initialization of core library, an instance of this class will be returned to the consumer\n * and they can use the available methods to interact with the library.\n */\nexport default class RsCore {\n #rsInternal: RsInternal;\n\n /**\n * Constructs an instance of RsCore.\n * @param rsCoreInternal RsInternal object.\n */\n constructor(rsCoreInternal: RsInternal) {\n this.#rsInternal = rsCoreInternal;\n }\n\n // TODO: enrich this to take other args like meta as well\n /**\n * @param
|
|
1
|
+
{"version":3,"file":"RsCore.js","sourceRoot":"","sources":["../../../src/core/RsCore.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,WAAW,CAAa;IAExB;;;OAGG;IACH,YAAY,cAA0B;QACpC,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC;IACpC,CAAC;IAED,yDAAyD;IACzD;;OAEG;IACH,cAAc,CAAC,IAAuE;QACpF,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;QAC1C,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,UAAU,GAAG,UAAU,CAAC;QACtD,iEAAiE;QACjE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,EAAE,CAAC;YACzE,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,YAAY,GAAG,YAAY,CAAC;YAC1D,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IAED;;OAEG;IACH,OAAO,GAAG,GAAG,EAAE;QACb,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;IACpC,CAAC,CAAC;IAEF;;OAEG;IACH,eAAe,GAAG,GAAG,EAAE,CAAC,CAAC;QACvB,gEAAgE;QAChE,KAAK,EAAE,GAAG,EAAE;YACV,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACnD,CAAC;QACD,+CAA+C;QAC/C,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACrD,CAAC;QACD,oIAAoI;QACpI,WAAW,EAAE,GAAG,EAAE;YAChB,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC1D,CAAC;KACF,CAAC,CAAC;CACJ","sourcesContent":["import type { ApiContext } from '../../types/ApiContext.types';\n\nimport type RsInternal from './RsInternal';\nimport type RsProps from './RsProps';\nimport { MOUNT, UNMOUNT, AFTER_RENDER } from './pubSub/events';\nimport { deepEqual } from './utils/util';\n\n/**\n * Represents the public interface of the core library.\n * On the initialization of core library, an instance of this class will be returned to the consumer\n * and they can use the available methods to interact with the library.\n */\nexport default class RsCore {\n #rsInternal: RsInternal;\n\n /**\n * Constructs an instance of RsCore.\n * @param rsCoreInternal RsInternal object.\n */\n constructor(rsCoreInternal: RsInternal) {\n this.#rsInternal = rsCoreInternal;\n }\n\n // TODO: enrich this to take other args like meta as well\n /**\n * @param args - args whose reference is changing after initialization of rsCore\n */\n updateInitArgs(args: { apiContext: ApiContext; styleFormats: RsProps['styleFormats'] }) {\n const { apiContext, styleFormats } = args;\n this.#rsInternal.getRsProps().apiContext = apiContext;\n // styleFormats props can be updated across re-renders, honor it.\n if (!deepEqual(this.#rsInternal.getRsProps().styleFormats, styleFormats)) {\n this.#rsInternal.getRsProps().styleFormats = styleFormats;\n this.#rsInternal.getView().type.forceUpdate(false);\n }\n }\n\n /**\n * Get the latest view object. This object can be used to construct the repeating structure view.\n */\n getView = () => {\n return this.#rsInternal.getView();\n };\n\n /**\n * Notify the core library about the view related events. The library will do run some features or do some cleanup based on the events.\n */\n notifyViewEvent = () => ({\n /** Notify when the component has mounted for the first time. */\n mount: () => {\n this.#rsInternal.getPubSubUtils().publish(MOUNT);\n },\n /** Notify when the component is unmounting. */\n unmount: () => {\n this.#rsInternal.getPubSubUtils().publish(UNMOUNT);\n },\n /** Notify every time the component has finished rendering. Core library might run some features that need the latest DOM to run. */\n afterRender: () => {\n this.#rsInternal.getPubSubUtils().publish(AFTER_RENDER);\n }\n });\n}\n"]}
|
|
@@ -36,7 +36,6 @@ export default class StateResolver {
|
|
|
36
36
|
* Sets a function to execute a set of {@link Feature features} before triggering a render.
|
|
37
37
|
* The provided function will be called with the {@link MiddleWareFeatureProps featureProps}
|
|
38
38
|
* @param middlewares - A function that executes a set of {@link Feature features} before rendering.
|
|
39
|
-
* @returns
|
|
40
39
|
*/
|
|
41
40
|
setMiddlewares: (middlewares: (featureProps: MiddleWareFeatureProps) => Promise<void | null>) => void;
|
|
42
41
|
}
|
|
@@ -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,EAAE,UAAU,EAAE,UAAU,KAAK,KAAK,CAAC;AAC9F,MAAM,MAAM,gBAAgB,GAAG,CAC7B,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,UAAU,KACzB,OAAO,CAAC,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;IAoCxB;;;;;OAKG;IACH,QAAQ,GAAI,QAAQ,UAAU,KAAG,IAAI,CA+CnC;IAEF;;OAEG;IACH,QAAQ,cAEN;IAEF;;OAEG;IACH,gBAAgB,cAEd;IAEF
|
|
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,EAAE,UAAU,EAAE,UAAU,KAAK,KAAK,CAAC;AAC9F,MAAM,MAAM,gBAAgB,GAAG,CAC7B,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,UAAU,KACzB,OAAO,CAAC,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;IAoCxB;;;;;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;CA6HH;AAED,0EAA0E;AAC1E,wBAAgB,0BAA0B,CAAC,cAAc,EAAE,UAAU,IAcrD,OAAO,KAAK,EAAE,kBAAkB,UAAU,gCAwBzD"}
|
|
@@ -131,7 +131,6 @@ export default class StateResolver {
|
|
|
131
131
|
* Sets a function to execute a set of {@link Feature features} before triggering a render.
|
|
132
132
|
* The provided function will be called with the {@link MiddleWareFeatureProps featureProps}
|
|
133
133
|
* @param middlewares - A function that executes a set of {@link Feature features} before rendering.
|
|
134
|
-
* @returns
|
|
135
134
|
*/
|
|
136
135
|
setMiddlewares = (middlewares) => {
|
|
137
136
|
if (this.#middlewares)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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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 visibleColumnsArr = this.#rsInternal.getView().getVisibleColumns();\n const visibleColumns = visibleColumnsArr.map(col => col.field.id);\n const { apiContext } = this.#rsInternal.getRsProps();\n if (apiContext?.stateUpdateCallback) {\n apiContext.stateUpdateCallback({\n ...pickProperties(this.getState(), personalizationProps),\n visibleColumns\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 * @returns\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,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,y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AAK,EAAE,cAAc,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QACrF,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxD,OAAO,CAAC,KAAK,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;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 visibleColumnsArr = this.#rsInternal.getView().getVisibleColumns();\n const visibleColumns = visibleColumnsArr.map(col => col.field.id);\n const { apiContext } = this.#rsInternal.getRsProps();\n if (apiContext?.stateUpdateCallback) {\n apiContext.stateUpdateCallback({\n ...pickProperties(this.getState(), personalizationProps),\n visibleColumns\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"]}
|
|
@@ -64,7 +64,7 @@ declare class BaseA11y {
|
|
|
64
64
|
* - If `Shift + Tab` is pressed, it focuses the `topFocusableElement`.
|
|
65
65
|
* - If only `Tab` is pressed, it focuses the `bottomFocusableElement`.
|
|
66
66
|
*
|
|
67
|
-
* @param
|
|
67
|
+
* @param event - The keyboard event object containing details of the pressed key.
|
|
68
68
|
*/
|
|
69
69
|
tabHandler(event: KeyboardEvent): void;
|
|
70
70
|
/**
|
|
@@ -85,7 +85,6 @@ declare class BaseA11y {
|
|
|
85
85
|
getFocusableElementsInCell(column: Element): HTMLElement[];
|
|
86
86
|
/**
|
|
87
87
|
* @param row
|
|
88
|
-
* @returns
|
|
89
88
|
*/
|
|
90
89
|
getSortedColumns(row: HTMLElement | null): (Element | HTMLElement)[];
|
|
91
90
|
/**
|
|
@@ -144,7 +143,7 @@ declare class BaseA11y {
|
|
|
144
143
|
*/
|
|
145
144
|
toggleStyleFormatAriaDescription(nextCol: Element, currentCol: Element): void;
|
|
146
145
|
/**
|
|
147
|
-
* @param
|
|
146
|
+
* @param event
|
|
148
147
|
*/
|
|
149
148
|
dynamicLoadersKeyDownHandler(event: KeyboardEvent): boolean;
|
|
150
149
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseA11y.d.ts","sourceRoot":"","sources":["../../../../src/core/a11y/BaseA11y.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,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AW,EAAE;IAgB1D;;OAEG;IACH,gBAAgB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,GAAG,CAAC,OAAO,GAAG,WAAW,CAAC,EAAE;IAIpE;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,aAAa;IAQrC;;;;;;;OAOG;IACH,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW;IAW7D;;;;;;;;;;;OAWG;IACH,mBAAmB,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO;IAwBhF;;OAEG;IACH,6BAA6B,IAAI,WAAW,GAAG,IAAI;IAkBnD;;;;;;;OAOG;IACH,sBAAsB;IAOtB;;;;OAIG;IACH,2BAA2B,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM;;;;;IASnF;;;;OAIG;IAEH,gCAAgC,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO;IAiLtE;;OAEG;IACH,4BAA4B,CAAC,KAAK,EAAE,aAAa;IA6BjD;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,aAAa;IAsBhC;;;;;;;;;;OAUG;IACH,cAAc,CAAC,QAAQ,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE;IAwChD,iBAAiB;IAWjB;;;;;;;;;;OAUG;IACH,4BAA4B,CAAC,KAAK,EAAE,UAAU;IAmB9C,cAAc;IAId,aAAa,CAAC,KAAK,EAAE,UAAU;CAWhC;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -108,7 +108,7 @@ class BaseA11y {
|
|
|
108
108
|
* - If `Shift + Tab` is pressed, it focuses the `topFocusableElement`.
|
|
109
109
|
* - If only `Tab` is pressed, it focuses the `bottomFocusableElement`.
|
|
110
110
|
*
|
|
111
|
-
* @param
|
|
111
|
+
* @param event - The keyboard event object containing details of the pressed key.
|
|
112
112
|
*/
|
|
113
113
|
tabHandler(event) {
|
|
114
114
|
const topFocusableElement = this.selectors.topFocusRef
|
|
@@ -175,7 +175,6 @@ class BaseA11y {
|
|
|
175
175
|
}
|
|
176
176
|
/**
|
|
177
177
|
* @param row
|
|
178
|
-
* @returns
|
|
179
178
|
*/
|
|
180
179
|
getSortedColumns(row) {
|
|
181
180
|
return [...(row?.querySelectorAll(this.selectors.focusElementSelector) ?? [])];
|
|
@@ -440,7 +439,7 @@ class BaseA11y {
|
|
|
440
439
|
return [...colItem.querySelectorAll(this.actionableSelectors.join(','))].includes(element);
|
|
441
440
|
}
|
|
442
441
|
/**
|
|
443
|
-
* @param
|
|
442
|
+
* @param event
|
|
444
443
|
*/
|
|
445
444
|
dynamicLoadersKeyDownHandler(event) {
|
|
446
445
|
const { keyCode } = event;
|
|
@@ -521,7 +520,7 @@ class BaseA11y {
|
|
|
521
520
|
}
|
|
522
521
|
}
|
|
523
522
|
/**
|
|
524
|
-
* @param
|
|
523
|
+
* @param firstCell
|
|
525
524
|
*/
|
|
526
525
|
#focusFirstElementInCell(firstCell) {
|
|
527
526
|
if (!firstCell)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseA11y.js","sourceRoot":"","sources":["../../../../src/core/a11y/BaseA11y.ts"],"names":[],"mappings":"AAUA,MAAM,IAAI,GAA2B;IACnC,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,EAAE;IACR,EAAE,EAAE,EAAE;IACN,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;CACA,CAAC;AAEX,MAAM,SAAS,GAAG,UAAU,CAAC;AAC7B,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAE5C;;;;;GAKG;AACH,SAAS,SAAS,CAAC,OAAgC;IACjD,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,OAAO,CAAC,YAAY,CAAC,SA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ACH,CAAC;IAED,cAAc;QACZ,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC;IAClC,CAAC;IAED,aAAa,CAAC,KAAiB;QAC7B,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;QAC1C,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;QAC1C,sIAAsI;QACtI,IACE,aAAa,KAAK,IAAI;YACtB,CAAC,CAAC,aAAa,IAAK,aAA6B,CAAC,QAAQ,CAAC,aAA4B,CAAC,CAAC,EACzF,CAAC;YACD,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,KAAK,CAAC;QACnC,CAAC;IACH,CAAC;CACF;AAED,eAAe,QAAQ,CAAC","sourcesContent":["export type Selectors = {\n topFocusRef?: string;\n bottomFocusRef?: string;\n focusElementSelector: string;\n parentElementSelector?: string;\n aboveLoader?: string;\n belowLoader?: string;\n addActionSelector?: string;\n};\n\nconst keys: Record<string, number> = {\n TAB: 9,\n ENTER: 13,\n SPACE: 32,\n ESCAPE: 27,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n HOME: 36\n} as const;\n\nconst TAB_INDEX = 'tabindex';\nconst DATA_COLUMNINDEX = 'data-columnIndex';\n\n/**\n * Sets focus on the provided HTML element.\n * It sets the `tabindex` attribute to \"0\" to ensure the element can receive keyboard focus.\n *\n * @param element - The HTML element to be focused. If `undefined`, the function does not performing any action.\n */\nfunction gainFocus(element: HTMLElement | undefined): void {\n if (!element) return;\n element.setAttribute(TAB_INDEX, '0');\n element.focus();\n}\n\n/**\n * Recursively finds the first parent element that has scrollable content.\n *\n * This function checks whether the given HTML element or any of its parent\n * elements has a scrollable content area.\n *\n * @param node - The starting HTML element to check for scrollable content.\n * If null, the function will return null.\n *\n * @returns - The first parent element with scrollable content, or null if no such element is found.\n */\nfunction getScrollParent(node: HTMLElement | null): HTMLElement | null {\n // eslint-disable-next-line eqeqeq\n if (node == null) {\n return null;\n }\n\n if (node.scrollHeight > node.clientHeight) {\n return node;\n }\n\n return getScrollParent(node.parentNode as HTMLElement);\n}\n\nclass BaseA11y {\n selectors: Selectors;\n keys: Record<string, number>;\n container: HTMLElement;\n focusableSelectors: string[];\n actionableSelectors?: string[];\n ariaLabel?: string;\n focusState: {\n focusSnapshot: {\n rowIndex: number | undefined;\n colIndex: number | undefined;\n rowKey: string | undefined;\n };\n hadFocus: boolean;\n };\n\n /**\n *\n * @param selectors\n * @param focusableSelectors Selectors which doesn't require arrow keys/typing interaction from user\n * @param customKeys\n * @param container\n * @param actionableSelectors Selectors which require arrow keys/typing interaction from user\n * @param ariaLabel\n *\n * selectors = {\n topFocusRef: '.top',\n bottomFocusRef: '.bottom',\n focusElementSelector: '.cell',\n parentElementSelector: '.row'\n };\n customKeys = {\n TAB: 9,\n ENTER: 13,\n SPACE: 32,\n ESCAPE: 27,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40\n };\n focusableSelectors = ['button', 'a[href]'];\n actionableSelectors = ['select', 'textarea']\n ariaLabel = 'Interactive content'\n */\n constructor(\n selectors: Selectors,\n focusableSelectors: string[],\n // eslint-disable-next-line @typescript-eslint/default-param-last\n customKeys: Record<string, number> = {},\n container: HTMLElement,\n actionableSelectors?: string[],\n ariaLabel?: string\n ) {\n this.selectors = { ...selectors };\n this.keys = { ...keys, ...customKeys };\n this.container = container;\n this.focusableSelectors = focusableSelectors;\n this.actionableSelectors = actionableSelectors;\n this.ariaLabel = ariaLabel;\n this.focusState = {\n focusSnapshot: { rowIndex: undefined, colIndex: undefined, rowKey: undefined },\n hadFocus: false\n };\n }\n\n /**\n * Sets the container element\n */\n setContainer(container: HTMLElement) {\n this.container = container;\n }\n\n /**\n * Handles tab key navigation within a focusable region. It focuses on the top or bottom\n * focusable element based on the `Shift` key press in combination with the `Tab` key.\n *\n * - If `Shift + Tab` is pressed, it focuses the `topFocusableElement`.\n * - If only `Tab` is pressed, it focuses the `bottomFocusableElement`.\n *\n * @param {KeyboardEvent} event - The keyboard event object containing details of the pressed key.\n */\n tabHandler(event: KeyboardEvent) {\n const topFocusableElement = this.selectors.topFocusRef\n ? this.container.parentElement?.querySelector(this.selectors.topFocusRef)\n : null;\n const bottomFocusableElement = this.selectors.bottomFocusRef\n ? this.container.parentElement?.querySelector(this.selectors.bottomFocusRef)\n : null;\n if (event.shiftKey && topFocusableElement) {\n const shiftTabKeyEvent = new KeyboardEvent('keypress', {\n bubbles: true,\n cancelable: true,\n key: 'Tab',\n shiftKey: true,\n keyCode: 9\n });\n\n (topFocusableElement as HTMLElement).focus();\n topFocusableElement.dispatchEvent(shiftTabKeyEvent);\n } else if (bottomFocusableElement) {\n const keyboardEvent = new KeyboardEvent('keypress', {\n bubbles: true,\n cancelable: true,\n key: 'Tab',\n shiftKey: false,\n keyCode: 9\n });\n\n (bottomFocusableElement as HTMLElement).focus();\n bottomFocusableElement.dispatchEvent(keyboardEvent);\n }\n }\n\n /**\n * Determines whether an element can receive focus.\n * Checks that the element is not disabled, not inside an inert container, and is visible.\n *\n * @param el - The element to check for focusability.\n * @returns `true` if the element can receive focus, `false` otherwise.\n */\n static isElementFocusable(el: HTMLElement): boolean {\n return (\n !el.hasAttribute('disabled') &&\n !el.closest('[inert]') &&\n (el.checkVisibility?.() ?? getComputedStyle(el).visibility !== 'hidden')\n );\n }\n\n /**\n * Retrieves all focusable elements within a given element based on the `focusableSelectors` array.\n * Filters out disabled elements, those inside inert containers, and visually hidden elements.\n *\n * @param column - The element from which to get focusable elements.\n * @returns An array of all focusable HTML elements found inside element.\n */\n getFocusableElementsInCell(column: Element): HTMLElement[] {\n const elements = column.querySelectorAll<HTMLElement>(this.focusableSelectors.join(','));\n return [...elements].filter(el => BaseA11y.isElementFocusable(el));\n }\n\n /**\n * Determines whether a given DOM element is a grid cell.\n * @param column - The DOM element to check.\n * @returns Returns `true` if the element contains the specified CSS class, indicating it's a grid cell, otherwise `false`.\n *\n * @private\n */\n #isGridCell(column: Element): boolean {\n return column.classList.contains(this.selectors.focusElementSelector.substring(1));\n }\n\n /**\n * @param row\n * @returns\n */\n getSortedColumns(row: HTMLElement | null): (Element | HTMLElement)[] {\n return [...(row?.querySelectorAll(this.selectors.focusElementSelector) ?? [])];\n }\n\n /**\n * @param event\n */\n stopEventHandler(event: KeyboardEvent) {\n return (\n (event.target as HTMLElement).getAttribute('aria-expanded') === 'true' ||\n (event.target as HTMLElement).closest('.popper') ||\n !Object.values(this.keys).includes(event.keyCode)\n );\n }\n\n /**\n * Sets focus on the loader element and stores the column index of the current focused element.\n *\n * @param loader - The loader element that will receive focus.\n * @param currentCol - The currently focused column element whose index will be stored.\n *\n * @returns void\n */\n setFocusOnLoader(loader: HTMLElement, currentCol: HTMLElement) {\n // Store the current focussed cell - useful when coming back\n const restoreFocusRef = {\n columnIndex: [\n ...this.container.querySelectorAll(this.selectors.focusElementSelector)\n ].indexOf(currentCol)\n };\n loader.setAttribute(DATA_COLUMNINDEX, restoreFocusRef.columnIndex.toString());\n loader.focus();\n }\n\n /**\n * Handles the `Tab` key navigation within a container element .\n * Ensures that when the user tabs out of the repeating structures, focus can be restored to the\n * previously active cell (from which the user tabbed out). If `shiftKey` is pressed (indicating reverse tabbing), the focus will move to the\n * top boundary element, otherwise, it moves to the bottom boundary element.\n *\n * @param event - The keyboard event triggered by the `Tab` key.\n * @param currentCol - The current column (cell) element from which the user is tabbing out.\n * @param shiftKey - A boolean indicating if the `Shift` key is pressed (for reverse tabbing).\n *\n * @returns void\n */\n containerTabHandler(event: KeyboardEvent, currentCol: Element, shiftKey: boolean) {\n // focus should be restored to the cell\n // from which user has tabbed out from the table\n let hiddenBoundaryElement = this.selectors.bottomFocusRef\n ? this.container.parentElement?.querySelector(this.selectors.bottomFocusRef)\n : null;\n if (shiftKey) {\n hiddenBoundaryElement = this.selectors.topFocusRef\n ? this.container.parentElement?.querySelector(this.selectors.topFocusRef)\n : null;\n }\n\n const restoreFocusRef = {\n columnIndex: [\n ...this.container.querySelectorAll(this.selectors.focusElementSelector)\n ].indexOf(currentCol)\n };\n if (hiddenBoundaryElement) {\n hiddenBoundaryElement.setAttribute(DATA_COLUMNINDEX, restoreFocusRef.columnIndex.toString());\n }\n\n this.tabHandler(event);\n }\n\n /**\n * Returns the first focusable element in the `container`.\n */\n getFocusableElementOnCtrlHome(): HTMLElement | null {\n return this.container.querySelector(this.selectors.focusElementSelector);\n }\n\n /**\n * Scrolls the nearest scrollable parent of a focusable element to the top.\n *\n * @private\n */\n #scrollToTop() {\n const scrollableParent = getScrollParent(\n this.container.querySelector(this.selectors.focusElementSelector)\n );\n if (scrollableParent) {\n scrollableParent.scrollTop = 0;\n }\n }\n\n /**\n * Handles the `Ctrl + Home` keypress event.\n *\n * It focuses the first focusable element in the container of the repeating structures,\n * and ensures that the view scrolls to the top after focusing.\n *\n * @returns void\n */\n handleCtrlHomeKeypress() {\n const cellToFocus = this.getFocusableElementOnCtrlHome();\n this.#focusFirstElementInCell(cellToFocus);\n\n this.#scrollToTop();\n }\n\n /**\n * @param nextItem\n * @param currentCol\n * @param keyCode\n */\n handleAnnouncementForErrors(nextItem: Element, currentCol: Element, keyCode: number) {\n return {\n ...this,\n nextItem,\n currentCol,\n keyCode\n };\n }\n\n /**\n * @param nextCol - The next item to focus on.\n * @param currentCol- The current element that has focus.\n * override this method for specific RS template\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this\n toggleStyleFormatAriaDescription(nextCol: Element, currentCol: Element) {}\n /**\n * Handles keyboard navigation. This method processes keyboard events like arrow keys, tab, home. It updates the `tabindex` of elements and supports accessibility\n * announcements for error handling.\n *\n * @param event - The keyboard event triggered by the user.\n * @param currentCol - The current element that has focus.\n *\n * @returns void\n *\n * @private\n */\n #containerEventHandlers(event: KeyboardEvent, currentCol: Element) {\n const { keyCode, shiftKey, ctrlKey } = event;\n if (this.stopEventHandler(event)) {\n return;\n }\n let nextItem: Element | undefined | null;\n\n if (this.selectors.parentElementSelector) {\n ({ nextItem } = this.#processWithParentSelector(\n currentCol as HTMLElement,\n keyCode,\n ctrlKey,\n nextItem\n ));\n } else {\n switch (keyCode) {\n case this.keys.UP:\n case this.keys.LEFT:\n nextItem = currentCol.previousElementSibling;\n break;\n case this.keys.RIGHT:\n case this.keys.DOWN:\n nextItem = currentCol.nextElementSibling;\n break;\n case this.keys.HOME:\n if (ctrlKey) {\n nextItem = this.container.querySelector(this.selectors.focusElementSelector);\n }\n break;\n default:\n }\n }\n\n if (keyCode === this.keys.TAB) {\n this.containerTabHandler(event, currentCol, shiftKey);\n }\n if (nextItem && currentCol) {\n event.preventDefault();\n const focusableElements = this.getFocusableElementsInCell(nextItem);\n // we will be supporting focus directly on the inner focusable elements so\n // tags like a, buttons should be skipped for focus on pressing tab\n if (!!this.actionableSelectors && !!this.ariaLabel) {\n const nextActionableElements = nextItem.querySelectorAll(\n this.actionableSelectors.join(',')\n );\n const nextFocusableElements = nextItem.querySelectorAll(this.focusableSelectors.join(','));\n const currentActionableElements = currentCol.querySelectorAll(\n this.actionableSelectors.join(',')\n );\n const currentFocusableElements = nextItem.querySelectorAll(\n this.focusableSelectors.join(',')\n );\n if (nextActionableElements.length || nextFocusableElements.length > 1) {\n nextItem.setAttribute('aria-label', this.ariaLabel);\n }\n if (currentActionableElements.length || currentFocusableElements.length > 1) {\n currentCol.removeAttribute('aria-label');\n }\n }\n currentCol.setAttribute('tabindex', '-1');\n if (focusableElements.length === 1 && this.#isGridCell(nextItem)) {\n this.handleAnnouncementForErrors(focusableElements[0], currentCol, keyCode);\n gainFocus(focusableElements[0]);\n } else {\n this.handleAnnouncementForErrors(nextItem, currentCol, keyCode);\n\n gainFocus(nextItem as HTMLElement);\n }\n\n this.toggleStyleFormatAriaDescription(nextItem, currentCol);\n }\n }\n\n /**\n * This method processes keyboard navigation events and moves focus between elements inside containers,\n * based on the arrow keys (up, down, left, right) and the Home key.\n *\n * @param currentCol - The current focused column element.\n * @param keyCode - The keycode of the pressed key (e.g., arrow keys, home key).\n * @param ctrlKey - Indicates if the `Ctrl` key was held down during the key press.\n * @param nextItem - The next item to focus on, updated by this function.\n *\n * @returns - Returns an object containing the index of the current element within its parent, the index of its parent element, and the next item to focus on.\n */\n #processWithParentSelector(\n currentCol: HTMLElement,\n keyCode: number,\n ctrlKey: boolean,\n nextItem: Element | undefined | null\n ) {\n const parentElements = this.container.querySelectorAll(this.selectors.parentElementSelector!);\n const indexOfCurrentEleInParent = [\n ...(currentCol\n .closest(this.selectors.parentElementSelector!)\n ?.querySelectorAll(this.selectors.focusElementSelector) ?? [])\n ].indexOf(currentCol);\n const currentEleParentIndex = [...parentElements].indexOf(\n currentCol.closest(this.selectors.parentElementSelector!)!\n );\n const sortedColumns = this.getSortedColumns(\n currentCol.closest(this.selectors.parentElementSelector!)\n );\n switch (keyCode) {\n case this.keys.HOME:\n if (ctrlKey) {\n this.handleCtrlHomeKeypress();\n }\n break;\n case this.keys.UP: {\n // Above Loader handler\n const aboveLoader = this.selectors.aboveLoader\n ? (this.container.querySelector(this.selectors.aboveLoader) as HTMLElement | null)\n : null;\n if (aboveLoader && currentEleParentIndex - 1 === 0) {\n this.setFocusOnLoader(aboveLoader, currentCol);\n } else if (currentEleParentIndex - 1 >= 0) {\n nextItem = parentElements[currentEleParentIndex - 1].querySelectorAll(\n this.selectors.focusElementSelector\n )[indexOfCurrentEleInParent];\n }\n break;\n }\n case this.keys.DOWN: {\n // Below Loader handler\n const belowLoader = this.selectors.belowLoader\n ? (this.container.querySelector(this.selectors.belowLoader) as HTMLElement | null)\n : null;\n if (belowLoader && parentElements.length === currentEleParentIndex + 1) {\n this.setFocusOnLoader(belowLoader, currentCol);\n } else if (parentElements.length > currentEleParentIndex + 1) {\n nextItem = parentElements[currentEleParentIndex + 1].querySelectorAll(\n this.selectors.focusElementSelector\n )[indexOfCurrentEleInParent];\n }\n break;\n }\n case this.keys.LEFT:\n nextItem = sortedColumns[sortedColumns.indexOf(currentCol) - 1];\n break;\n case this.keys.RIGHT:\n nextItem = sortedColumns[sortedColumns.indexOf(currentCol) + 1];\n break;\n default:\n }\n return { indexOfCurrentEleInParent, currentEleParentIndex, nextItem };\n }\n\n /**\n * Determines if the current element contains any `focusable` element.\n */\n #isFocusableElement(element: HTMLElement) {\n const colItem = element.closest(this.selectors.focusElementSelector);\n if (!colItem) return false;\n return [...colItem.querySelectorAll(this.focusableSelectors.join(','))].includes(element);\n }\n\n /**\n * Determines if the current element contains any `Actionable` elements like TextInput, TextArea\n */\n #isActionableElement(element: HTMLElement) {\n const colItem = element.closest(this.selectors.focusElementSelector);\n if (!colItem || !this.actionableSelectors) return false;\n return [...colItem.querySelectorAll(this.actionableSelectors.join(','))].includes(element);\n }\n\n /**\n * @param {KeyboardEvent} event\n */\n dynamicLoadersKeyDownHandler(event: KeyboardEvent) {\n const { keyCode } = event;\n event.stopPropagation();\n event.preventDefault();\n\n if (\n this.container &&\n (((event.target as HTMLElement).classList.contains(\n this.selectors.aboveLoader!.substring(1)\n ) &&\n keyCode === this.keys.DOWN) ||\n ((event.target as HTMLElement).classList.contains(\n this.selectors.belowLoader!.substring(1)\n ) &&\n keyCode === this.keys.UP))\n ) {\n let restoreFocusRef;\n\n if ((event.target as HTMLElement).hasAttribute(DATA_COLUMNINDEX)) {\n restoreFocusRef = {\n columnIndex: parseInt((event.target as HTMLElement).getAttribute(DATA_COLUMNINDEX)!, 10)\n };\n this.setFocusToCell(restoreFocusRef);\n return true;\n }\n }\n return false;\n }\n\n /**\n * Handles the keyboard navigation of a repeating structures.\n *\n * @public\n */\n a11yHandler(event: KeyboardEvent) {\n const rootNode = this.container.getRootNode();\n if (!(rootNode instanceof Document || rootNode instanceof ShadowRoot)) return;\n const currentCol = rootNode.activeElement?.closest(this.selectors.focusElementSelector);\n const belowLoader = this.selectors.belowLoader\n ? this.container.querySelector(this.selectors.belowLoader)\n : null;\n const aboveLoader = this.selectors.aboveLoader\n ? this.container.querySelector(this.selectors.aboveLoader)\n : null;\n\n if (\n currentCol === rootNode.activeElement ||\n this.#isFocusableElement(rootNode.activeElement as HTMLElement) ||\n this.#isActionableElement(rootNode.activeElement as HTMLElement)\n ) {\n this.#containerEventHandlers(event, currentCol as HTMLElement);\n } else if (belowLoader === event.target || aboveLoader === event.target) {\n this.dynamicLoadersKeyDownHandler(event);\n }\n }\n\n /**\n * Sets the focus to a specific cell in the grid based on the given position. If there is exactly one focusable element in a cell,\n * focus is set on it. Otherwise, the entire cell receives focus.\n *\n * If the specified cell cannot be found, focus is set on the first focusable element.\n *\n * @param position - The position of the cell to focus.\n * @param position.columnIndex - The index of the column for which the focus should be set.\n *\n * @returns void\n */\n setFocusToCell(position: { columnIndex: number }) {\n const { columnIndex } = position;\n const cellToFocus = this.container.querySelectorAll(this.selectors.focusElementSelector)[\n columnIndex\n ];\n if (cellToFocus) {\n const focusableElements = this.getFocusableElementsInCell(cellToFocus);\n // we will be supporting focus directly on the inner focusable elements so\n // tags like a, buttons should be skipped for focus on pressing tab\n if (\n focusableElements.length === 1 &&\n this.#isGridCell(cellToFocus)\n // Enable this in EPIC-80524\n // || isSelectAllCheckbox(focusableElements[0])\n ) {\n gainFocus(focusableElements[0]);\n } else {\n gainFocus(cellToFocus as HTMLElement);\n }\n } else {\n this.focusFirstElement();\n }\n }\n\n /**\n * @param {HTMLElement | null} firstCell\n */\n #focusFirstElementInCell(firstCell: Element | null) {\n if (!firstCell) return;\n const focusableElements = this.getFocusableElementsInCell(firstCell);\n // if there is only one focusable element in cell, e.g. a[href], radio etc, focus on that\n if (focusableElements.length === 1 && this.#isGridCell(firstCell)) {\n gainFocus(focusableElements[0]);\n } else {\n // if there are multiple focusable elements in cell or the cell is not a grid cell, focus on whole cell\n\n gainFocus(firstCell as HTMLElement);\n }\n }\n\n focusFirstElement() {\n const row = this.selectors.parentElementSelector\n ? this.container.querySelector(this.selectors.parentElementSelector)\n : null;\n if (row) {\n const firstCell = row.querySelector(this.selectors.focusElementSelector);\n\n this.#focusFirstElementInCell(firstCell);\n }\n }\n\n /**\n * Handles focus events on boundary elements within the container.\n * This method stops the propagation of the focus event and checks whether the focus has moved\n * outside of the specified container. If so, it determines whether to restore focus to a specific\n * cell or to the first focusable element within the container.\n *\n * @param event - The focus event object, which includes the element that lost focus\n * (via the `relatedTarget` property).\n *\n * @returns void\n */\n boundaryElementsFocusHandler(event: FocusEvent) {\n const { relatedTarget } = event;\n event.stopPropagation();\n if (this.container && !this.container.contains(relatedTarget as HTMLElement)) {\n let restoreFocusRef;\n\n if ((event.target as HTMLElement).hasAttribute(DATA_COLUMNINDEX)) {\n restoreFocusRef = {\n columnIndex: parseInt((event.target as HTMLElement).getAttribute(DATA_COLUMNINDEX)!, 10)\n };\n }\n if (restoreFocusRef) {\n this.setFocusToCell(restoreFocusRef);\n } else {\n this.focusFirstElement();\n }\n }\n }\n\n onFocusHandler() {\n this.focusState.hadFocus = true;\n }\n\n onBlurHandler(event: FocusEvent) {\n const currentTarget = event.currentTarget;\n const relatedTarget = event.relatedTarget;\n // If relatedTarget is within the currentTarget i.e. RS container, skip the blur event capture as focus is still within the container.\n if (\n relatedTarget === null ||\n !(currentTarget && (currentTarget as HTMLElement).contains(relatedTarget as HTMLElement))\n ) {\n this.focusState.hadFocus = false;\n }\n }\n}\n\nexport default BaseA11y;\n"]}
|
|
1
|
+
{"version":3,"file":"BaseA11y.js","sourceRoot":"","sources":["../../../../src/core/a11y/BaseA11y.ts"],"names":[],"mappings":"AAUA,MAAM,IAAI,GAA2B;IACnC,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,EAAE;IACR,EAAE,EAAE,EAAE;IACN,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE;CACA,CAAC;AAEX,MAAM,SAAS,GAAG,UAAU,CAAC;AAC7B,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAE5C;;;;;GAKG;AACH,SAAS,SAAS,CAAC,OAAgC;IACjD,IAAI,CAAC,OAAO;QAAE,O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AAE,CAAC;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;IAED,cAAc;QACZ,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC;IAClC,CAAC;IAED,aAAa,CAAC,KAAiB;QAC7B,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;QAC1C,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;QAC1C,sIAAsI;QACtI,IACE,aAAa,KAAK,IAAI;YACtB,CAAC,CAAC,aAAa,IAAK,aAA6B,CAAC,QAAQ,CAAC,aAA4B,CAAC,CAAC,EACzF,CAAC;YACD,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,KAAK,CAAC;QACnC,CAAC;IACH,CAAC;CACF;AAED,eAAe,QAAQ,CAAC","sourcesContent":["export type Selectors = {\n topFocusRef?: string;\n bottomFocusRef?: string;\n focusElementSelector: string;\n parentElementSelector?: string;\n aboveLoader?: string;\n belowLoader?: string;\n addActionSelector?: string;\n};\n\nconst keys: Record<string, number> = {\n TAB: 9,\n ENTER: 13,\n SPACE: 32,\n ESCAPE: 27,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n HOME: 36\n} as const;\n\nconst TAB_INDEX = 'tabindex';\nconst DATA_COLUMNINDEX = 'data-columnIndex';\n\n/**\n * Sets focus on the provided HTML element.\n * It sets the `tabindex` attribute to \"0\" to ensure the element can receive keyboard focus.\n *\n * @param element - The HTML element to be focused. If `undefined`, the function does not performing any action.\n */\nfunction gainFocus(element: HTMLElement | undefined): void {\n if (!element) return;\n element.setAttribute(TAB_INDEX, '0');\n element.focus();\n}\n\n/**\n * Recursively finds the first parent element that has scrollable content.\n *\n * This function checks whether the given HTML element or any of its parent\n * elements has a scrollable content area.\n *\n * @param node - The starting HTML element to check for scrollable content.\n * If null, the function will return null.\n *\n * @returns - The first parent element with scrollable content, or null if no such element is found.\n */\nfunction getScrollParent(node: HTMLElement | null): HTMLElement | null {\n // eslint-disable-next-line eqeqeq\n if (node == null) {\n return null;\n }\n\n if (node.scrollHeight > node.clientHeight) {\n return node;\n }\n\n return getScrollParent(node.parentNode as HTMLElement);\n}\n\nclass BaseA11y {\n selectors: Selectors;\n keys: Record<string, number>;\n container: HTMLElement;\n focusableSelectors: string[];\n actionableSelectors?: string[];\n ariaLabel?: string;\n focusState: {\n focusSnapshot: {\n rowIndex: number | undefined;\n colIndex: number | undefined;\n rowKey: string | undefined;\n };\n hadFocus: boolean;\n };\n\n /**\n *\n * @param selectors\n * @param focusableSelectors Selectors which doesn't require arrow keys/typing interaction from user\n * @param customKeys\n * @param container\n * @param actionableSelectors Selectors which require arrow keys/typing interaction from user\n * @param ariaLabel\n *\n * selectors = {\n topFocusRef: '.top',\n bottomFocusRef: '.bottom',\n focusElementSelector: '.cell',\n parentElementSelector: '.row'\n };\n customKeys = {\n TAB: 9,\n ENTER: 13,\n SPACE: 32,\n ESCAPE: 27,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40\n };\n focusableSelectors = ['button', 'a[href]'];\n actionableSelectors = ['select', 'textarea']\n ariaLabel = 'Interactive content'\n */\n constructor(\n selectors: Selectors,\n focusableSelectors: string[],\n // eslint-disable-next-line @typescript-eslint/default-param-last\n customKeys: Record<string, number> = {},\n container: HTMLElement,\n actionableSelectors?: string[],\n ariaLabel?: string\n ) {\n this.selectors = { ...selectors };\n this.keys = { ...keys, ...customKeys };\n this.container = container;\n this.focusableSelectors = focusableSelectors;\n this.actionableSelectors = actionableSelectors;\n this.ariaLabel = ariaLabel;\n this.focusState = {\n focusSnapshot: { rowIndex: undefined, colIndex: undefined, rowKey: undefined },\n hadFocus: false\n };\n }\n\n /**\n * Sets the container element\n */\n setContainer(container: HTMLElement) {\n this.container = container;\n }\n\n /**\n * Handles tab key navigation within a focusable region. It focuses on the top or bottom\n * focusable element based on the `Shift` key press in combination with the `Tab` key.\n *\n * - If `Shift + Tab` is pressed, it focuses the `topFocusableElement`.\n * - If only `Tab` is pressed, it focuses the `bottomFocusableElement`.\n *\n * @param event - The keyboard event object containing details of the pressed key.\n */\n tabHandler(event: KeyboardEvent) {\n const topFocusableElement = this.selectors.topFocusRef\n ? this.container.parentElement?.querySelector(this.selectors.topFocusRef)\n : null;\n const bottomFocusableElement = this.selectors.bottomFocusRef\n ? this.container.parentElement?.querySelector(this.selectors.bottomFocusRef)\n : null;\n if (event.shiftKey && topFocusableElement) {\n const shiftTabKeyEvent = new KeyboardEvent('keypress', {\n bubbles: true,\n cancelable: true,\n key: 'Tab',\n shiftKey: true,\n keyCode: 9\n });\n\n (topFocusableElement as HTMLElement).focus();\n topFocusableElement.dispatchEvent(shiftTabKeyEvent);\n } else if (bottomFocusableElement) {\n const keyboardEvent = new KeyboardEvent('keypress', {\n bubbles: true,\n cancelable: true,\n key: 'Tab',\n shiftKey: false,\n keyCode: 9\n });\n\n (bottomFocusableElement as HTMLElement).focus();\n bottomFocusableElement.dispatchEvent(keyboardEvent);\n }\n }\n\n /**\n * Determines whether an element can receive focus.\n * Checks that the element is not disabled, not inside an inert container, and is visible.\n *\n * @param el - The element to check for focusability.\n * @returns `true` if the element can receive focus, `false` otherwise.\n */\n static isElementFocusable(el: HTMLElement): boolean {\n return (\n !el.hasAttribute('disabled') &&\n !el.closest('[inert]') &&\n (el.checkVisibility?.() ?? getComputedStyle(el).visibility !== 'hidden')\n );\n }\n\n /**\n * Retrieves all focusable elements within a given element based on the `focusableSelectors` array.\n * Filters out disabled elements, those inside inert containers, and visually hidden elements.\n *\n * @param column - The element from which to get focusable elements.\n * @returns An array of all focusable HTML elements found inside element.\n */\n getFocusableElementsInCell(column: Element): HTMLElement[] {\n const elements = column.querySelectorAll<HTMLElement>(this.focusableSelectors.join(','));\n return [...elements].filter(el => BaseA11y.isElementFocusable(el));\n }\n\n /**\n * Determines whether a given DOM element is a grid cell.\n * @param column - The DOM element to check.\n * @returns Returns `true` if the element contains the specified CSS class, indicating it's a grid cell, otherwise `false`.\n *\n * @private\n */\n #isGridCell(column: Element): boolean {\n return column.classList.contains(this.selectors.focusElementSelector.substring(1));\n }\n\n /**\n * @param row\n */\n getSortedColumns(row: HTMLElement | null): (Element | HTMLElement)[] {\n return [...(row?.querySelectorAll(this.selectors.focusElementSelector) ?? [])];\n }\n\n /**\n * @param event\n */\n stopEventHandler(event: KeyboardEvent) {\n return (\n (event.target as HTMLElement).getAttribute('aria-expanded') === 'true' ||\n (event.target as HTMLElement).closest('.popper') ||\n !Object.values(this.keys).includes(event.keyCode)\n );\n }\n\n /**\n * Sets focus on the loader element and stores the column index of the current focused element.\n *\n * @param loader - The loader element that will receive focus.\n * @param currentCol - The currently focused column element whose index will be stored.\n *\n * @returns void\n */\n setFocusOnLoader(loader: HTMLElement, currentCol: HTMLElement) {\n // Store the current focussed cell - useful when coming back\n const restoreFocusRef = {\n columnIndex: [\n ...this.container.querySelectorAll(this.selectors.focusElementSelector)\n ].indexOf(currentCol)\n };\n loader.setAttribute(DATA_COLUMNINDEX, restoreFocusRef.columnIndex.toString());\n loader.focus();\n }\n\n /**\n * Handles the `Tab` key navigation within a container element .\n * Ensures that when the user tabs out of the repeating structures, focus can be restored to the\n * previously active cell (from which the user tabbed out). If `shiftKey` is pressed (indicating reverse tabbing), the focus will move to the\n * top boundary element, otherwise, it moves to the bottom boundary element.\n *\n * @param event - The keyboard event triggered by the `Tab` key.\n * @param currentCol - The current column (cell) element from which the user is tabbing out.\n * @param shiftKey - A boolean indicating if the `Shift` key is pressed (for reverse tabbing).\n *\n * @returns void\n */\n containerTabHandler(event: KeyboardEvent, currentCol: Element, shiftKey: boolean) {\n // focus should be restored to the cell\n // from which user has tabbed out from the table\n let hiddenBoundaryElement = this.selectors.bottomFocusRef\n ? this.container.parentElement?.querySelector(this.selectors.bottomFocusRef)\n : null;\n if (shiftKey) {\n hiddenBoundaryElement = this.selectors.topFocusRef\n ? this.container.parentElement?.querySelector(this.selectors.topFocusRef)\n : null;\n }\n\n const restoreFocusRef = {\n columnIndex: [\n ...this.container.querySelectorAll(this.selectors.focusElementSelector)\n ].indexOf(currentCol)\n };\n if (hiddenBoundaryElement) {\n hiddenBoundaryElement.setAttribute(DATA_COLUMNINDEX, restoreFocusRef.columnIndex.toString());\n }\n\n this.tabHandler(event);\n }\n\n /**\n * Returns the first focusable element in the `container`.\n */\n getFocusableElementOnCtrlHome(): HTMLElement | null {\n return this.container.querySelector(this.selectors.focusElementSelector);\n }\n\n /**\n * Scrolls the nearest scrollable parent of a focusable element to the top.\n *\n * @private\n */\n #scrollToTop() {\n const scrollableParent = getScrollParent(\n this.container.querySelector(this.selectors.focusElementSelector)\n );\n if (scrollableParent) {\n scrollableParent.scrollTop = 0;\n }\n }\n\n /**\n * Handles the `Ctrl + Home` keypress event.\n *\n * It focuses the first focusable element in the container of the repeating structures,\n * and ensures that the view scrolls to the top after focusing.\n *\n * @returns void\n */\n handleCtrlHomeKeypress() {\n const cellToFocus = this.getFocusableElementOnCtrlHome();\n this.#focusFirstElementInCell(cellToFocus);\n\n this.#scrollToTop();\n }\n\n /**\n * @param nextItem\n * @param currentCol\n * @param keyCode\n */\n handleAnnouncementForErrors(nextItem: Element, currentCol: Element, keyCode: number) {\n return {\n ...this,\n nextItem,\n currentCol,\n keyCode\n };\n }\n\n /**\n * @param nextCol - The next item to focus on.\n * @param currentCol- The current element that has focus.\n * override this method for specific RS template\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, class-methods-use-this\n toggleStyleFormatAriaDescription(nextCol: Element, currentCol: Element) {}\n /**\n * Handles keyboard navigation. This method processes keyboard events like arrow keys, tab, home. It updates the `tabindex` of elements and supports accessibility\n * announcements for error handling.\n *\n * @param event - The keyboard event triggered by the user.\n * @param currentCol - The current element that has focus.\n *\n * @returns void\n *\n * @private\n */\n #containerEventHandlers(event: KeyboardEvent, currentCol: Element) {\n const { keyCode, shiftKey, ctrlKey } = event;\n if (this.stopEventHandler(event)) {\n return;\n }\n let nextItem: Element | undefined | null;\n\n if (this.selectors.parentElementSelector) {\n ({ nextItem } = this.#processWithParentSelector(\n currentCol as HTMLElement,\n keyCode,\n ctrlKey,\n nextItem\n ));\n } else {\n switch (keyCode) {\n case this.keys.UP:\n case this.keys.LEFT:\n nextItem = currentCol.previousElementSibling;\n break;\n case this.keys.RIGHT:\n case this.keys.DOWN:\n nextItem = currentCol.nextElementSibling;\n break;\n case this.keys.HOME:\n if (ctrlKey) {\n nextItem = this.container.querySelector(this.selectors.focusElementSelector);\n }\n break;\n default:\n }\n }\n\n if (keyCode === this.keys.TAB) {\n this.containerTabHandler(event, currentCol, shiftKey);\n }\n if (nextItem && currentCol) {\n event.preventDefault();\n const focusableElements = this.getFocusableElementsInCell(nextItem);\n // we will be supporting focus directly on the inner focusable elements so\n // tags like a, buttons should be skipped for focus on pressing tab\n if (!!this.actionableSelectors && !!this.ariaLabel) {\n const nextActionableElements = nextItem.querySelectorAll(\n this.actionableSelectors.join(',')\n );\n const nextFocusableElements = nextItem.querySelectorAll(this.focusableSelectors.join(','));\n const currentActionableElements = currentCol.querySelectorAll(\n this.actionableSelectors.join(',')\n );\n const currentFocusableElements = nextItem.querySelectorAll(\n this.focusableSelectors.join(',')\n );\n if (nextActionableElements.length || nextFocusableElements.length > 1) {\n nextItem.setAttribute('aria-label', this.ariaLabel);\n }\n if (currentActionableElements.length || currentFocusableElements.length > 1) {\n currentCol.removeAttribute('aria-label');\n }\n }\n currentCol.setAttribute('tabindex', '-1');\n if (focusableElements.length === 1 && this.#isGridCell(nextItem)) {\n this.handleAnnouncementForErrors(focusableElements[0], currentCol, keyCode);\n gainFocus(focusableElements[0]);\n } else {\n this.handleAnnouncementForErrors(nextItem, currentCol, keyCode);\n\n gainFocus(nextItem as HTMLElement);\n }\n\n this.toggleStyleFormatAriaDescription(nextItem, currentCol);\n }\n }\n\n /**\n * This method processes keyboard navigation events and moves focus between elements inside containers,\n * based on the arrow keys (up, down, left, right) and the Home key.\n *\n * @param currentCol - The current focused column element.\n * @param keyCode - The keycode of the pressed key (e.g., arrow keys, home key).\n * @param ctrlKey - Indicates if the `Ctrl` key was held down during the key press.\n * @param nextItem - The next item to focus on, updated by this function.\n *\n * @returns - Returns an object containing the index of the current element within its parent, the index of its parent element, and the next item to focus on.\n */\n #processWithParentSelector(\n currentCol: HTMLElement,\n keyCode: number,\n ctrlKey: boolean,\n nextItem: Element | undefined | null\n ) {\n const parentElements = this.container.querySelectorAll(this.selectors.parentElementSelector!);\n const indexOfCurrentEleInParent = [\n ...(currentCol\n .closest(this.selectors.parentElementSelector!)\n ?.querySelectorAll(this.selectors.focusElementSelector) ?? [])\n ].indexOf(currentCol);\n const currentEleParentIndex = [...parentElements].indexOf(\n currentCol.closest(this.selectors.parentElementSelector!)!\n );\n const sortedColumns = this.getSortedColumns(\n currentCol.closest(this.selectors.parentElementSelector!)\n );\n switch (keyCode) {\n case this.keys.HOME:\n if (ctrlKey) {\n this.handleCtrlHomeKeypress();\n }\n break;\n case this.keys.UP: {\n // Above Loader handler\n const aboveLoader = this.selectors.aboveLoader\n ? (this.container.querySelector(this.selectors.aboveLoader) as HTMLElement | null)\n : null;\n if (aboveLoader && currentEleParentIndex - 1 === 0) {\n this.setFocusOnLoader(aboveLoader, currentCol);\n } else if (currentEleParentIndex - 1 >= 0) {\n nextItem = parentElements[currentEleParentIndex - 1].querySelectorAll(\n this.selectors.focusElementSelector\n )[indexOfCurrentEleInParent];\n }\n break;\n }\n case this.keys.DOWN: {\n // Below Loader handler\n const belowLoader = this.selectors.belowLoader\n ? (this.container.querySelector(this.selectors.belowLoader) as HTMLElement | null)\n : null;\n if (belowLoader && parentElements.length === currentEleParentIndex + 1) {\n this.setFocusOnLoader(belowLoader, currentCol);\n } else if (parentElements.length > currentEleParentIndex + 1) {\n nextItem = parentElements[currentEleParentIndex + 1].querySelectorAll(\n this.selectors.focusElementSelector\n )[indexOfCurrentEleInParent];\n }\n break;\n }\n case this.keys.LEFT:\n nextItem = sortedColumns[sortedColumns.indexOf(currentCol) - 1];\n break;\n case this.keys.RIGHT:\n nextItem = sortedColumns[sortedColumns.indexOf(currentCol) + 1];\n break;\n default:\n }\n return { indexOfCurrentEleInParent, currentEleParentIndex, nextItem };\n }\n\n /**\n * Determines if the current element contains any `focusable` element.\n */\n #isFocusableElement(element: HTMLElement) {\n const colItem = element.closest(this.selectors.focusElementSelector);\n if (!colItem) return false;\n return [...colItem.querySelectorAll(this.focusableSelectors.join(','))].includes(element);\n }\n\n /**\n * Determines if the current element contains any `Actionable` elements like TextInput, TextArea\n */\n #isActionableElement(element: HTMLElement) {\n const colItem = element.closest(this.selectors.focusElementSelector);\n if (!colItem || !this.actionableSelectors) return false;\n return [...colItem.querySelectorAll(this.actionableSelectors.join(','))].includes(element);\n }\n\n /**\n * @param event\n */\n dynamicLoadersKeyDownHandler(event: KeyboardEvent) {\n const { keyCode } = event;\n event.stopPropagation();\n event.preventDefault();\n\n if (\n this.container &&\n (((event.target as HTMLElement).classList.contains(\n this.selectors.aboveLoader!.substring(1)\n ) &&\n keyCode === this.keys.DOWN) ||\n ((event.target as HTMLElement).classList.contains(\n this.selectors.belowLoader!.substring(1)\n ) &&\n keyCode === this.keys.UP))\n ) {\n let restoreFocusRef;\n\n if ((event.target as HTMLElement).hasAttribute(DATA_COLUMNINDEX)) {\n restoreFocusRef = {\n columnIndex: parseInt((event.target as HTMLElement).getAttribute(DATA_COLUMNINDEX)!, 10)\n };\n this.setFocusToCell(restoreFocusRef);\n return true;\n }\n }\n return false;\n }\n\n /**\n * Handles the keyboard navigation of a repeating structures.\n *\n * @public\n */\n a11yHandler(event: KeyboardEvent) {\n const rootNode = this.container.getRootNode();\n if (!(rootNode instanceof Document || rootNode instanceof ShadowRoot)) return;\n const currentCol = rootNode.activeElement?.closest(this.selectors.focusElementSelector);\n const belowLoader = this.selectors.belowLoader\n ? this.container.querySelector(this.selectors.belowLoader)\n : null;\n const aboveLoader = this.selectors.aboveLoader\n ? this.container.querySelector(this.selectors.aboveLoader)\n : null;\n\n if (\n currentCol === rootNode.activeElement ||\n this.#isFocusableElement(rootNode.activeElement as HTMLElement) ||\n this.#isActionableElement(rootNode.activeElement as HTMLElement)\n ) {\n this.#containerEventHandlers(event, currentCol as HTMLElement);\n } else if (belowLoader === event.target || aboveLoader === event.target) {\n this.dynamicLoadersKeyDownHandler(event);\n }\n }\n\n /**\n * Sets the focus to a specific cell in the grid based on the given position. If there is exactly one focusable element in a cell,\n * focus is set on it. Otherwise, the entire cell receives focus.\n *\n * If the specified cell cannot be found, focus is set on the first focusable element.\n *\n * @param position - The position of the cell to focus.\n * @param position.columnIndex - The index of the column for which the focus should be set.\n *\n * @returns void\n */\n setFocusToCell(position: { columnIndex: number }) {\n const { columnIndex } = position;\n const cellToFocus = this.container.querySelectorAll(this.selectors.focusElementSelector)[\n columnIndex\n ];\n if (cellToFocus) {\n const focusableElements = this.getFocusableElementsInCell(cellToFocus);\n // we will be supporting focus directly on the inner focusable elements so\n // tags like a, buttons should be skipped for focus on pressing tab\n if (\n focusableElements.length === 1 &&\n this.#isGridCell(cellToFocus)\n // Enable this in EPIC-80524\n // || isSelectAllCheckbox(focusableElements[0])\n ) {\n gainFocus(focusableElements[0]);\n } else {\n gainFocus(cellToFocus as HTMLElement);\n }\n } else {\n this.focusFirstElement();\n }\n }\n\n /**\n * @param firstCell\n */\n #focusFirstElementInCell(firstCell: Element | null) {\n if (!firstCell) return;\n const focusableElements = this.getFocusableElementsInCell(firstCell);\n // if there is only one focusable element in cell, e.g. a[href], radio etc, focus on that\n if (focusableElements.length === 1 && this.#isGridCell(firstCell)) {\n gainFocus(focusableElements[0]);\n } else {\n // if there are multiple focusable elements in cell or the cell is not a grid cell, focus on whole cell\n\n gainFocus(firstCell as HTMLElement);\n }\n }\n\n focusFirstElement() {\n const row = this.selectors.parentElementSelector\n ? this.container.querySelector(this.selectors.parentElementSelector)\n : null;\n if (row) {\n const firstCell = row.querySelector(this.selectors.focusElementSelector);\n\n this.#focusFirstElementInCell(firstCell);\n }\n }\n\n /**\n * Handles focus events on boundary elements within the container.\n * This method stops the propagation of the focus event and checks whether the focus has moved\n * outside of the specified container. If so, it determines whether to restore focus to a specific\n * cell or to the first focusable element within the container.\n *\n * @param event - The focus event object, which includes the element that lost focus\n * (via the `relatedTarget` property).\n *\n * @returns void\n */\n boundaryElementsFocusHandler(event: FocusEvent) {\n const { relatedTarget } = event;\n event.stopPropagation();\n if (this.container && !this.container.contains(relatedTarget as HTMLElement)) {\n let restoreFocusRef;\n\n if ((event.target as HTMLElement).hasAttribute(DATA_COLUMNINDEX)) {\n restoreFocusRef = {\n columnIndex: parseInt((event.target as HTMLElement).getAttribute(DATA_COLUMNINDEX)!, 10)\n };\n }\n if (restoreFocusRef) {\n this.setFocusToCell(restoreFocusRef);\n } else {\n this.focusFirstElement();\n }\n }\n }\n\n onFocusHandler() {\n this.focusState.hadFocus = true;\n }\n\n onBlurHandler(event: FocusEvent) {\n const currentTarget = event.currentTarget;\n const relatedTarget = event.relatedTarget;\n // If relatedTarget is within the currentTarget i.e. RS container, skip the blur event capture as focus is still within the container.\n if (\n relatedTarget === null ||\n !(currentTarget && (currentTarget as HTMLElement).contains(relatedTarget as HTMLElement))\n ) {\n this.focusState.hadFocus = false;\n }\n }\n}\n\nexport default BaseA11y;\n"]}
|
|
@@ -16,6 +16,7 @@ declare const ActionTypes: {
|
|
|
16
16
|
readonly TOGGLE_PIN: "togglePin";
|
|
17
17
|
readonly TOGGLE_PIN_AT_INDEX: "togglePinAtIndex";
|
|
18
18
|
readonly COLUMN_SORT: "columnSort";
|
|
19
|
+
readonly SET_WARNING_MESSAGES: "setWarningMessages";
|
|
19
20
|
readonly UPDATE_SORT: "updateSort";
|
|
20
21
|
readonly BOOTSTRAP: "bootstrap";
|
|
21
22
|
readonly PAGINATE: "paginate";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionConstants.d.ts","sourceRoot":"","sources":["../../../../src/core/actions/actionConstants.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"actionConstants.d.ts","sourceRoot":"","sources":["../../../../src/core/actions/actionConstants.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+EP,CAAC;AAEX,eAAe,WAAW,CAAC;AAC3B,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionConstants.js","sourceRoot":"","sources":["../../../../src/core/actions/actionConstants.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IAClB,gBAAgB,EAAE,kBAAkB;IACpC,mBAAmB,EAAE,qBAAqB;IAC1C,mCAAmC;IAEnC,qCAAqC;IACrC,mBAAmB,EAAE,qBAAqB;IAC1C,oBAAoB,EAAE,sBAAsB;IAC5C,sBAAsB,EAAE,wBAAwB;IAChD,yBAAyB,EAAE,2BAA2B;IACtD,gCAAgC,EAAE,kCAAkC;IACpE,sBAAsB,EAAE,wBAAwB;IAChD,0BAA0B,EAAE,4BAA4B;IACxD,2BAA2B,EAAE,6BAA6B;IAC1D,+BAA+B,EAAE,iCAAiC;IAClE,sBAAsB,EAAE,wBAAwB;IAChD,mCAAmC;IAEnC,gBAAgB,EAAE,iBAAiB;IACnC,sBAAsB,EAAE,sBAAsB;IAC9C,UAAU,EAAE,WAAW;IACvB,mBAAmB,EAAE,kBAAkB;IACvC,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,YAAY;IACzB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,iBAAiB;IACpC,aAAa,EAAE,cAAc;IAC7B,aAAa,EAAE,cAAc;IAC7B,oBAAoB,EAAE,oBAAoB;IAC1C,gBAAgB,EAAE,kBAAkB;IACpC,qBAAqB,EAAE,wBAAwB;IAC/C,eAAe,EAAE,gBAAgB;IACjC,oBA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;AAEX,eAAe,WAAW,CAAC","sourcesContent":["const ActionTypes = {\n NOTIFICATION_ADD: 'NOTIFICATION_ADD',\n NOTIFICATION_REMOVE: 'NOTIFICATION_REMOVE',\n /* Personalization Actions - End */\n\n /* Personalization Actions - Start */\n PERSONALIZATION_GET: 'PERSONALIZATION_GET',\n PERSONALIZATION_EDIT: 'PERSONALIZATION_EDIT',\n PERSONALIZATION_UPDATE: 'PERSONALIZATION_UPDATE',\n PERSONALIZATION_UPDATE_ID: 'PERSONALIZATION_UPDATE_ID',\n PERSONALIZATION_UPDATE_PRESET_ID: 'PERSONALIZATION_UPDATE_PRESET_ID',\n PERSONALIZATION_DELETE: 'PERSONALIZATION_DELETE',\n PERSONALIZATION_SET_ACTIVE: 'PERSONALIZATION_SET_ACTIVE',\n PERSONALIZATION_SET_DEFAULT: 'PERSONALIZATION_SET_DEFAULT',\n PERSONALIZATION_SET_APP_DEFAULT: 'PERSONALIZATION_SET_APP_DEFAULT',\n PERSONALIZATION_CREATE: 'PERSONALIZATION_CREATE',\n /* Personalization Actions - End */\n\n COLUMN_FILTERING: 'columnFiltering',\n COLUMN_CLEAR_FILTERING: 'columnClearFiltering',\n TOGGLE_PIN: 'togglePin',\n TOGGLE_PIN_AT_INDEX: 'togglePinAtIndex',\n COLUMN_SORT: 'columnSort',\n UPDATE_SORT: 'updateSort',\n BOOTSTRAP: 'bootstrap',\n PAGINATE: 'paginate',\n ROW_HEIGHT_CHANGE: 'rowHeightChange',\n COLUMN_RESIZE: 'columnResize',\n COLUMN_TOGGLE: 'columnToggle',\n HIDDEN_COLUMN_UPDATE: 'hiddenColumnUpdate',\n COLUMN_DRAG_DROP: 'COLUMN_DRAG_DROP',\n COLUMN_DISPLAY_CHANGE: 'COLUMN_DISPLAY_CHANGE’',\n TOGGLE_GROUPING: 'toggleGrouping',\n UPDATE_GROUPING_SORT: 'updateGroupingSort',\n TOGGLE_EXPAND_COLLAPSE: 'toggleExpandCollapse',\n ADD_GROUPS: 'addGroups',\n SEARCH: 'search',\n COLUMN_MERGE: 'columnMerge',\n CUSTOM_COLUMN_DELETE: 'customColumnDelete',\n HYDRATE_STATE: 'HYDRATE_STATE',\n SANITIZE_STATE: 'sanitizeState',\n MOVE_RECORD_KEYS: 'moverecordkeys',\n UPDATE_COLUMN_ORDER: 'updateColumnOrder',\n NEW_COLUMN_ORDER: 'newColumnOrder',\n UPDATE_ROW_SELECTION: 'updateRowSelection',\n UPDATE_ROW_SELECTION_STATUS: 'UPDATE_ROW_SELECTION_STATUS',\n UPDATE_ROW_SELECTION_ITEMS: 'UPDATE_ROW_SELECTION_ITEMS',\n CLEAR_ROW_SELECTION: 'CLEAR_ROW_SELECTION',\n UPDATE_AGGREGATION: 'updateAggregation',\n UPDATE_AGGREGATIONS: 'updateAggregations',\n UPDATE_TABLE_HEIGHT: 'updateTableHeight',\n CHANGE_RENDERER_FORMATTER: 'changeRenderFormatter',\n REMOVE_RENDERER_FORMATTER: 'removeRenderFormatter',\n CHANGE_LABEL: 'changeLabel',\n REPLACE_LABELS: 'replaceLabels',\n SHOW_HEADER_ICONS: 'showHeaderIcons',\n CHANGE_CELL_MODE: 'changeCellMode',\n FORCE_UPDATE: 'forceUpdate',\n FORCE_REFRESH: 'forceRefresh',\n TOGGLE_EXPAND_COLLAPSE_ALL: 'toggleExpandCollapseAll',\n UPDATE_STATE_VERSION: 'updateStateVersion',\n TOGGLE_SELECTALL_CHECKBOX: 'toggleSelectAllCheckbox',\n\n // Dispatch Action constants that is used by consumer in order to send particular actions to Repeating structures\n TOGGLE_DISABLE_SELECTION: 'toggleDisableSelection',\n UPDATE_DEBUG_INFO: 'updateDebugInfo',\n TOGGLE_REQUIRED: 'toggleRequired',\n NOTIFY_DATA_REFRESH: 'notifyDataRefresh',\n USER_CONFIRMATION_ACTION: 'userConfirmationAction',\n COMPLETE_USER_CONFIRMATION_ACTION: 'completeUserConfirmationAction',\n SET_IN_EXTERNAL_STATE: 'setInExternalState',\n UPDATE_SELECTED_ROWS: 'updateSelectedRows',\n SET_DATA_ERROR: 'setDataError',\n SET_DOM_CONTAINER_BREAKPOINTS: 'setDomContainerResponsiveBreakpoints',\n UPDATE_COLUMNS_VISIBILITY: 'updateColumnsVisibility',\n SET_CONDITIONAL_STYLE_FORMATS: 'setConditionalStyleFormats',\n ADD_COLUMN_VISIBILITY: 'addColumnVisibility',\n VISIBLE_COLUMN_UPDATE: 'visibleColumnUpdate'\n} as const;\n\nexport default ActionTypes;\nexport type ActionType = (typeof ActionTypes)[keyof typeof ActionTypes];\n"]}
|
|
1
|
+
{"version":3,"file":"actionConstants.js","sourceRoot":"","sources":["../../../../src/core/actions/actionConstants.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IAClB,gBAAgB,EAAE,kBAAkB;IACpC,mBAAmB,EAAE,qBAAqB;IAC1C,mCAAmC;IAEnC,qCAAqC;IACrC,mBAAmB,EAAE,qBAAqB;IAC1C,oBAAoB,EAAE,sBAAsB;IAC5C,sBAAsB,EAAE,wBAAwB;IAChD,yBAAyB,EAAE,2BAA2B;IACtD,gCAAgC,EAAE,kCAAkC;IACpE,sBAAsB,EAAE,wBAAwB;IAChD,0BAA0B,EAAE,4BAA4B;IACxD,2BAA2B,EAAE,6BAA6B;IAC1D,+BAA+B,EAAE,iCAAiC;IAClE,sBAAsB,EAAE,wBAAwB;IAChD,mCAAmC;IAEnC,gBAAgB,EAAE,iBAAiB;IACnC,sBAAsB,EAAE,sBAAsB;IAC9C,UAAU,EAAE,WAAW;IACvB,mBAAmB,EAAE,kBAAkB;IACvC,WAAW,EAAE,YAAY;IACzB,oBAAoB,EAAE,oBAAoB;IAC1C,WAAW,EAAE,YAAY;IACzB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,iBAAiB;IACpC,aAAa,EAAE,cAAc;IAC7B,aAAa,EAAE,cAAc;IAC7B,oBAAoB,EAAE,oBAAoB;IAC1C,gBAAgB,EAAE,kBAAkB;IACpC,qBAAqB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AE,qBAAqB;IAC5C,qBAAqB,EAAE,qBAAqB;CACpC,CAAC;AAEX,eAAe,WAAW,CAAC","sourcesContent":["const ActionTypes = {\n NOTIFICATION_ADD: 'NOTIFICATION_ADD',\n NOTIFICATION_REMOVE: 'NOTIFICATION_REMOVE',\n /* Personalization Actions - End */\n\n /* Personalization Actions - Start */\n PERSONALIZATION_GET: 'PERSONALIZATION_GET',\n PERSONALIZATION_EDIT: 'PERSONALIZATION_EDIT',\n PERSONALIZATION_UPDATE: 'PERSONALIZATION_UPDATE',\n PERSONALIZATION_UPDATE_ID: 'PERSONALIZATION_UPDATE_ID',\n PERSONALIZATION_UPDATE_PRESET_ID: 'PERSONALIZATION_UPDATE_PRESET_ID',\n PERSONALIZATION_DELETE: 'PERSONALIZATION_DELETE',\n PERSONALIZATION_SET_ACTIVE: 'PERSONALIZATION_SET_ACTIVE',\n PERSONALIZATION_SET_DEFAULT: 'PERSONALIZATION_SET_DEFAULT',\n PERSONALIZATION_SET_APP_DEFAULT: 'PERSONALIZATION_SET_APP_DEFAULT',\n PERSONALIZATION_CREATE: 'PERSONALIZATION_CREATE',\n /* Personalization Actions - End */\n\n COLUMN_FILTERING: 'columnFiltering',\n COLUMN_CLEAR_FILTERING: 'columnClearFiltering',\n TOGGLE_PIN: 'togglePin',\n TOGGLE_PIN_AT_INDEX: 'togglePinAtIndex',\n COLUMN_SORT: 'columnSort',\n SET_WARNING_MESSAGES: 'setWarningMessages',\n UPDATE_SORT: 'updateSort',\n BOOTSTRAP: 'bootstrap',\n PAGINATE: 'paginate',\n ROW_HEIGHT_CHANGE: 'rowHeightChange',\n COLUMN_RESIZE: 'columnResize',\n COLUMN_TOGGLE: 'columnToggle',\n HIDDEN_COLUMN_UPDATE: 'hiddenColumnUpdate',\n COLUMN_DRAG_DROP: 'COLUMN_DRAG_DROP',\n COLUMN_DISPLAY_CHANGE: 'COLUMN_DISPLAY_CHANGE’',\n TOGGLE_GROUPING: 'toggleGrouping',\n UPDATE_GROUPING_SORT: 'updateGroupingSort',\n TOGGLE_EXPAND_COLLAPSE: 'toggleExpandCollapse',\n ADD_GROUPS: 'addGroups',\n SEARCH: 'search',\n COLUMN_MERGE: 'columnMerge',\n CUSTOM_COLUMN_DELETE: 'customColumnDelete',\n HYDRATE_STATE: 'HYDRATE_STATE',\n SANITIZE_STATE: 'sanitizeState',\n MOVE_RECORD_KEYS: 'moverecordkeys',\n UPDATE_COLUMN_ORDER: 'updateColumnOrder',\n NEW_COLUMN_ORDER: 'newColumnOrder',\n UPDATE_ROW_SELECTION: 'updateRowSelection',\n UPDATE_ROW_SELECTION_STATUS: 'UPDATE_ROW_SELECTION_STATUS',\n UPDATE_ROW_SELECTION_ITEMS: 'UPDATE_ROW_SELECTION_ITEMS',\n CLEAR_ROW_SELECTION: 'CLEAR_ROW_SELECTION',\n UPDATE_AGGREGATION: 'updateAggregation',\n UPDATE_AGGREGATIONS: 'updateAggregations',\n UPDATE_TABLE_HEIGHT: 'updateTableHeight',\n CHANGE_RENDERER_FORMATTER: 'changeRenderFormatter',\n REMOVE_RENDERER_FORMATTER: 'removeRenderFormatter',\n CHANGE_LABEL: 'changeLabel',\n REPLACE_LABELS: 'replaceLabels',\n SHOW_HEADER_ICONS: 'showHeaderIcons',\n CHANGE_CELL_MODE: 'changeCellMode',\n FORCE_UPDATE: 'forceUpdate',\n FORCE_REFRESH: 'forceRefresh',\n TOGGLE_EXPAND_COLLAPSE_ALL: 'toggleExpandCollapseAll',\n UPDATE_STATE_VERSION: 'updateStateVersion',\n TOGGLE_SELECTALL_CHECKBOX: 'toggleSelectAllCheckbox',\n\n // Dispatch Action constants that is used by consumer in order to send particular actions to Repeating structures\n TOGGLE_DISABLE_SELECTION: 'toggleDisableSelection',\n UPDATE_DEBUG_INFO: 'updateDebugInfo',\n TOGGLE_REQUIRED: 'toggleRequired',\n NOTIFY_DATA_REFRESH: 'notifyDataRefresh',\n USER_CONFIRMATION_ACTION: 'userConfirmationAction',\n COMPLETE_USER_CONFIRMATION_ACTION: 'completeUserConfirmationAction',\n SET_IN_EXTERNAL_STATE: 'setInExternalState',\n UPDATE_SELECTED_ROWS: 'updateSelectedRows',\n SET_DATA_ERROR: 'setDataError',\n SET_DOM_CONTAINER_BREAKPOINTS: 'setDomContainerResponsiveBreakpoints',\n UPDATE_COLUMNS_VISIBILITY: 'updateColumnsVisibility',\n SET_CONDITIONAL_STYLE_FORMATS: 'setConditionalStyleFormats',\n ADD_COLUMN_VISIBILITY: 'addColumnVisibility',\n VISIBLE_COLUMN_UPDATE: 'visibleColumnUpdate'\n} as const;\n\nexport default ActionTypes;\nexport type ActionType = (typeof ActionTypes)[keyof typeof ActionTypes];\n"]}
|