@pega/lists-core 10.0.0-build.1.9 → 10.0.0-build.10.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.
Files changed (161) hide show
  1. package/lib/index.d.ts +1 -1
  2. package/lib/index.d.ts.map +1 -1
  3. package/lib/index.js +1 -1
  4. package/lib/index.js.map +1 -1
  5. package/lib/src/core/RsStore.d.ts +10 -0
  6. package/lib/src/core/RsStore.d.ts.map +1 -1
  7. package/lib/src/core/RsStore.js +2 -0
  8. package/lib/src/core/RsStore.js.map +1 -1
  9. package/lib/src/core/StateResolver.d.ts.map +1 -1
  10. package/lib/src/core/StateResolver.js +2 -2
  11. package/lib/src/core/StateResolver.js.map +1 -1
  12. package/lib/src/core/actions/actionConstants.d.ts +2 -0
  13. package/lib/src/core/actions/actionConstants.d.ts.map +1 -1
  14. package/lib/src/core/actions/actionConstants.js +3 -1
  15. package/lib/src/core/actions/actionConstants.js.map +1 -1
  16. package/lib/src/core/actions/actions.d.ts +10 -3
  17. package/lib/src/core/actions/actions.d.ts.map +1 -1
  18. package/lib/src/core/actions/actions.js +26 -12
  19. package/lib/src/core/actions/actions.js.map +1 -1
  20. package/lib/src/core/actions/actions.types.d.ts +15 -6
  21. package/lib/src/core/actions/actions.types.d.ts.map +1 -1
  22. package/lib/src/core/actions/actions.types.js.map +1 -1
  23. package/lib/src/core/constants.d.ts +1 -0
  24. package/lib/src/core/constants.d.ts.map +1 -1
  25. package/lib/src/core/constants.js +3 -2
  26. package/lib/src/core/constants.js.map +1 -1
  27. package/lib/src/core/features/featureFactory.d.ts.map +1 -1
  28. package/lib/src/core/features/featureFactory.js +2 -0
  29. package/lib/src/core/features/featureFactory.js.map +1 -1
  30. package/lib/src/core/features/uIFeatures/afterRender/animation.d.ts +1 -1
  31. package/lib/src/core/features/uIFeatures/afterRender/animation.js +2 -2
  32. package/lib/src/core/features/uIFeatures/afterRender/animation.js.map +1 -1
  33. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.d.ts +2 -2
  34. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.d.ts.map +1 -1
  35. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js +27 -12
  36. package/lib/src/core/features/uIFeatures/afterRender/columnSizing/index.js.map +1 -1
  37. package/lib/src/core/features/uIFeatures/afterRender/customizeParentContainer/index.d.ts +1 -1
  38. package/lib/src/core/features/uIFeatures/afterRender/customizeParentContainer/index.js +1 -1
  39. package/lib/src/core/features/uIFeatures/afterRender/customizeParentContainer/index.js.map +1 -1
  40. package/lib/src/core/features/uIFeatures/beforeRender/adjustHeight.d.ts.map +1 -1
  41. package/lib/src/core/features/uIFeatures/beforeRender/adjustHeight.js +27 -5
  42. package/lib/src/core/features/uIFeatures/beforeRender/adjustHeight.js.map +1 -1
  43. package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.d.ts +2 -0
  44. package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.d.ts.map +1 -1
  45. package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.js +5 -1
  46. package/lib/src/core/features/uIFeatures/beforeRender/busyIndicator.js.map +1 -1
  47. package/lib/src/core/features/uIFeatures/beforeRender/changeTemplate.d.ts.map +1 -1
  48. package/lib/src/core/features/uIFeatures/beforeRender/changeTemplate.js +5 -2
  49. package/lib/src/core/features/uIFeatures/beforeRender/changeTemplate.js.map +1 -1
  50. package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.js +2 -2
  51. package/lib/src/core/features/uIFeatures/beforeRender/columnSizing/resize.js.map +1 -1
  52. package/lib/src/core/features/uIFeatures/beforeRender/customColumn.d.ts.map +1 -1
  53. package/lib/src/core/features/uIFeatures/beforeRender/customColumn.js +2 -1
  54. package/lib/src/core/features/uIFeatures/beforeRender/customColumn.js.map +1 -1
  55. package/lib/src/core/features/uIFeatures/beforeRender/filter.d.ts.map +1 -1
  56. package/lib/src/core/features/uIFeatures/beforeRender/filter.js +3 -3
  57. package/lib/src/core/features/uIFeatures/beforeRender/filter.js.map +1 -1
  58. package/lib/src/core/features/uIFeatures/beforeRender/grouping.d.ts +5 -0
  59. package/lib/src/core/features/uIFeatures/beforeRender/grouping.d.ts.map +1 -1
  60. package/lib/src/core/features/uIFeatures/beforeRender/grouping.js +206 -27
  61. package/lib/src/core/features/uIFeatures/beforeRender/grouping.js.map +1 -1
  62. package/lib/src/core/features/uIFeatures/beforeRender/masterDetail.d.ts +11 -0
  63. package/lib/src/core/features/uIFeatures/beforeRender/masterDetail.d.ts.map +1 -0
  64. package/lib/src/core/features/uIFeatures/beforeRender/masterDetail.js +97 -0
  65. package/lib/src/core/features/uIFeatures/beforeRender/masterDetail.js.map +1 -0
  66. package/lib/src/core/features/uIFeatures/beforeRender/moveListRecords.d.ts +1 -1
  67. package/lib/src/core/features/uIFeatures/beforeRender/moveListRecords.d.ts.map +1 -1
  68. package/lib/src/core/features/uIFeatures/beforeRender/moveListRecords.js +47 -29
  69. package/lib/src/core/features/uIFeatures/beforeRender/moveListRecords.js.map +1 -1
  70. package/lib/src/core/features/uIFeatures/beforeRender/prepareRows.d.ts.map +1 -1
  71. package/lib/src/core/features/uIFeatures/beforeRender/prepareRows.js +1 -0
  72. package/lib/src/core/features/uIFeatures/beforeRender/prepareRows.js.map +1 -1
  73. package/lib/src/core/features/uIFeatures/beforeRender/refresh.d.ts.map +1 -1
  74. package/lib/src/core/features/uIFeatures/beforeRender/refresh.js +2 -0
  75. package/lib/src/core/features/uIFeatures/beforeRender/refresh.js.map +1 -1
  76. package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.d.ts.map +1 -1
  77. package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.js +9 -2
  78. package/lib/src/core/features/uIFeatures/beforeRender/stateHydration.js.map +1 -1
  79. package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.d.ts.map +1 -1
  80. package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.js +21 -15
  81. package/lib/src/core/features/uIFeatures/beforeRender/stateSanitization.js.map +1 -1
  82. package/lib/src/core/features/uIFeatures/index.d.ts +3 -1
  83. package/lib/src/core/features/uIFeatures/index.d.ts.map +1 -1
  84. package/lib/src/core/features/uIFeatures/index.js +2 -0
  85. package/lib/src/core/features/uIFeatures/index.js.map +1 -1
  86. package/lib/src/core/generators/ColumnGenerator.d.ts +0 -4
  87. package/lib/src/core/generators/ColumnGenerator.d.ts.map +1 -1
  88. package/lib/src/core/generators/ColumnGenerator.js +0 -12
  89. package/lib/src/core/generators/ColumnGenerator.js.map +1 -1
  90. package/lib/src/core/generators/RowGenerator.d.ts +16 -1
  91. package/lib/src/core/generators/RowGenerator.d.ts.map +1 -1
  92. package/lib/src/core/generators/RowGenerator.js +83 -15
  93. package/lib/src/core/generators/RowGenerator.js.map +1 -1
  94. package/lib/src/core/generators/RowGenerator.types.d.ts +21 -1
  95. package/lib/src/core/generators/RowGenerator.types.d.ts.map +1 -1
  96. package/lib/src/core/generators/RowGenerator.types.js.map +1 -1
  97. package/lib/src/core/generators/ViewGenerator.d.ts +5 -1
  98. package/lib/src/core/generators/ViewGenerator.d.ts.map +1 -1
  99. package/lib/src/core/generators/ViewGenerator.js +27 -4
  100. package/lib/src/core/generators/ViewGenerator.js.map +1 -1
  101. package/lib/src/core/generators/ViewGenerator.types.d.ts +27 -1
  102. package/lib/src/core/generators/ViewGenerator.types.d.ts.map +1 -1
  103. package/lib/src/core/generators/ViewGenerator.types.js.map +1 -1
  104. package/lib/src/core/generators/__tests__/viewUtilityMockSetup.d.ts +5 -0
  105. package/lib/src/core/generators/__tests__/viewUtilityMockSetup.d.ts.map +1 -1
  106. package/lib/src/core/generators/viewUtilityMethods.d.ts +18 -0
  107. package/lib/src/core/generators/viewUtilityMethods.d.ts.map +1 -1
  108. package/lib/src/core/generators/viewUtilityMethods.js +91 -0
  109. package/lib/src/core/generators/viewUtilityMethods.js.map +1 -1
  110. package/lib/src/core/reducers/error.d.ts +2 -0
  111. package/lib/src/core/reducers/error.d.ts.map +1 -1
  112. package/lib/src/core/reducers/index.d.ts +2 -0
  113. package/lib/src/core/reducers/index.d.ts.map +1 -1
  114. package/lib/src/core/reducers/index.js +3 -1
  115. package/lib/src/core/reducers/index.js.map +1 -1
  116. package/lib/src/core/reducers/masterDetail.d.ts +4 -0
  117. package/lib/src/core/reducers/masterDetail.d.ts.map +1 -0
  118. package/lib/src/core/reducers/masterDetail.js +23 -0
  119. package/lib/src/core/reducers/masterDetail.js.map +1 -0
  120. package/lib/src/core/reducers/personalizationDirtyReducer.d.ts.map +1 -1
  121. package/lib/src/core/reducers/personalizationDirtyReducer.js +18 -3
  122. package/lib/src/core/reducers/personalizationDirtyReducer.js.map +1 -1
  123. package/lib/src/core/reducers/personalizationReducer.d.ts +1 -1
  124. package/lib/src/core/reducers/resize.d.ts.map +1 -1
  125. package/lib/src/core/reducers/resize.js +2 -1
  126. package/lib/src/core/reducers/resize.js.map +1 -1
  127. package/lib/src/core/reducers/visibility.d.ts.map +1 -1
  128. package/lib/src/core/reducers/visibility.js +11 -4
  129. package/lib/src/core/reducers/visibility.js.map +1 -1
  130. package/lib/src/core/test/junitMocks.d.ts +6 -0
  131. package/lib/src/core/test/junitMocks.d.ts.map +1 -1
  132. package/lib/src/core/test/junitMocks.js +9 -1
  133. package/lib/src/core/test/junitMocks.js.map +1 -1
  134. package/lib/src/core/test/utils/rowDragDropUtils.d.ts.map +1 -1
  135. package/lib/src/core/test/utils/rowDragDropUtils.js +7 -5
  136. package/lib/src/core/test/utils/rowDragDropUtils.js.map +1 -1
  137. package/lib/src/core/utils/masterDetail.d.ts +8 -0
  138. package/lib/src/core/utils/masterDetail.d.ts.map +1 -0
  139. package/lib/src/core/utils/masterDetail.js +25 -0
  140. package/lib/src/core/utils/masterDetail.js.map +1 -0
  141. package/lib/src/core/utils/util.d.ts +34 -17
  142. package/lib/src/core/utils/util.d.ts.map +1 -1
  143. package/lib/src/core/utils/util.js +118 -60
  144. package/lib/src/core/utils/util.js.map +1 -1
  145. package/lib/types/ApiContext.types.d.ts +8 -4
  146. package/lib/types/ApiContext.types.d.ts.map +1 -1
  147. package/lib/types/ApiContext.types.js +2 -1
  148. package/lib/types/ApiContext.types.js.map +1 -1
  149. package/lib/types/Meta.types.d.ts +171 -64
  150. package/lib/types/Meta.types.d.ts.map +1 -1
  151. package/lib/types/Meta.types.js +2 -1
  152. package/lib/types/Meta.types.js.map +1 -1
  153. package/lib/types/RsCoreBootArgs.types.d.ts +1 -1
  154. package/lib/types/RsCoreBootArgs.types.js.map +1 -1
  155. package/lib/types/State.types.d.ts +13 -1
  156. package/lib/types/State.types.d.ts.map +1 -1
  157. package/lib/types/State.types.js.map +1 -1
  158. package/lib/types.d.ts +10 -4
  159. package/lib/types.d.ts.map +1 -1
  160. package/lib/types.js.map +1 -1
  161. package/package.json +4 -4
package/lib/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { default as initializeRsCore } from './src/core/index';
2
2
  export { convertMetaIntoState } from './src/core/features/uIFeatures/beforeRender/stateHydration';
3
3
  export { filterParams, typeMap, comparatorMap } from './src/core/config/filterConfig';
4
- export { getVisibileFields, dateFunctionLabels, getScrollbarWidth, getScrollerElem, getRowContextData, getFilterInitializers, getFilterConditions, isFilterApplied, addFilter, getFilters, removeEmptyValues, isEmpty, normalizeMeta } from './src/core/utils/util';
4
+ export { getVisibleFields, 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, rowDeleteColumnMeta } from './src/core/constants';
6
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';
@@ -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,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,EACrB,mBAAmB,EACpB,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,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AO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
package/lib/index.js CHANGED
@@ -3,7 +3,7 @@ export { default as initializeRsCore } from './src/core/index';
3
3
  // FIXME: revisit below exports
4
4
  export { convertMetaIntoState } from './src/core/features/uIFeatures/beforeRender/stateHydration';
5
5
  export { filterParams, typeMap, comparatorMap } from './src/core/config/filterConfig';
6
- export { getVisibileFields, dateFunctionLabels, getScrollbarWidth, getScrollerElem, getRowContextData, getFilterInitializers, getFilterConditions, isFilterApplied, addFilter, getFilters, removeEmptyValues, isEmpty, normalizeMeta } from './src/core/utils/util';
6
+ export { getVisibleFields, 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, rowDeleteColumnMeta } from './src/core/constants';
8
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';
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,EACrB,mBAAmB,EACpB,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;AAEhH,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,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 rowDeleteColumnMeta\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\nexport { rowSelectColumnMeta } from './src/core/constants';\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,gBAAgB,EAChB,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,EACrB,mBAAmB,EACpB,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;AAEhH,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,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 getVisibleFields,\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 rowDeleteColumnMeta\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\nexport { rowSelectColumnMeta } from './src/core/constants';\n"]}
@@ -1,9 +1,17 @@
1
1
  import type { PersonalizedState, State } from '../../types/State.types';
2
2
  import type { FieldDef, Meta } from '../../types/Meta.types';
3
+ import type { GroupedInfo } from '../../types/ApiContext.types';
3
4
  import type RsCoreBootArgs from '../../types/RsCoreBootArgs.types';
4
5
  import type { ColumnReorderProps, ColumnResizerProps } from './generators/ColumnGenerator.types';
5
6
  import type { GroupingInfo, HierarchicalGroupingInfo } from './features/uIFeatures/beforeRender/grouping';
6
7
  import defaultTranslations from './defaultTranslations';
8
+ /** A normalized Kanban lane retained for merging with current grouped results. */
9
+ export interface KanbanLaneInfo {
10
+ /** Identifies the Meta lane configuration that produced this lane list. */
11
+ sourceKey: string;
12
+ /** Ordered Kanban lane values (the level-0 group's distinct values), independent of active card filters. */
13
+ lanes: GroupedInfo['name'][];
14
+ }
7
15
  export default class RsStore {
8
16
  /** Indicates if it is initial render (or mount) of Repeating structures. It is usually set to true upon initialization of RsCore. */
9
17
  isInitialRender: boolean;
@@ -15,6 +23,8 @@ export default class RsStore {
15
23
  presets: Meta[];
16
24
  /** Current grouping information. */
17
25
  groupingInfo?: GroupingInfo[] | HierarchicalGroupingInfo[];
26
+ /** Runtime-only Kanban lanes used to retain empty lanes across grouped refreshes. */
27
+ kanbanLaneInfo?: KanbanLaneInfo;
18
28
  /** Stores the Html events required for reordering a column. */
19
29
  private fieldReorderProps;
20
30
  /** Stores the Html events required for resizing a column. */
@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,EAAE,SAAS,KAAK,IAAI,CAAC;KAC7C,CAAC;IAEF,sKAAsK;IACtK,iBAAiB,UAAS;IAC1B,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,qDAAqD;IACrD,cAAc,CAAC,EAAE,CAAC,iBAAiB,GAAG;QAAE,qBAAqB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;IAEjF,oFAAoF;IACpF,YAAY,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IAE9C;;;;;;OAMG;IACH,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,OAAO,mBAAmB,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;IAGhF,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;gBAGlC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,IAAI,EAAE,EACf,eAAe,UAAO,EACtB,SAAS,UAAQ,EACjB,YAAY,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC;IAW/C,2DAA2D;IAC3D,oBAAoB,CAAC,iBAAiB,EAAE,OAAO,CAAC,mBAAmB,CAAC;IAIpE,gEAAgE;IAChE,oBAAoB;IAKpB,OAAO,CAAC,OAAO,EAAE,IAAI,GAAG,IAAI;IAQ5B,2DAA2D;IAC3D,qBAAqB,CAAC,kBAAkB,EAAE,OAAO,CAAC,oBAAoB,CAAC;IAIvE,8DAA8D;IAC9D,qBAAqB;IAIrB,8FAA8F;IAC9F,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;CAGvD"}
@@ -11,6 +11,8 @@ export default class RsStore {
11
11
  presets;
12
12
  /** Current grouping information. */
13
13
  groupingInfo;
14
+ /** Runtime-only Kanban lanes used to retain empty lanes across grouped refreshes. */
15
+ kanbanLaneInfo;
14
16
  /** Stores the Html events required for reordering a column. */
15
17
  fieldReorderProps;
16
18
  /** Stores the Html events required for resizing a column.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} from '../../types/State.types';\nimport type { FieldDef, Meta } from '../../types/Meta.types';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiOptions } from '../../types/ApiContext.types';\nimport type RsCoreBootArgs from '../../types/RsCoreBootArgs.types';\n\nimport type { ColumnReorderProps, ColumnResizerProps } from './generators/ColumnGenerator.types';\nimport type {\n GroupingInfo,\n HierarchicalGroupingInfo\n} from './features/uIFeatures/beforeRender/grouping';\nimport defaultTranslations from './defaultTranslations';\n\nexport default class RsStore {\n /** Indicates if it is initial render (or mount) of Repeating structures. It is usually set to true upon initialization of RsCore. */\n isInitialRender: boolean;\n /** Indicates if repeating structures component is mounted */\n isMounted: boolean;\n /** Repeating structures meta */\n meta: Meta;\n /** Other variants of Repeating structures meta. E.g. Table/Gallery/Timeline Preset */\n presets: Meta[];\n /** Current grouping information. */\n groupingInfo?: GroupingInfo[] | HierarchicalGroupingInfo[];\n\n /** Stores the Html events required for reordering a column. */\n private fieldReorderProps!: ColumnReorderProps | null;\n /** Stores the Html events required for resizing a column. */\n private columnResizerProps!: ColumnResizerProps;\n /** Holds the bounding rect of rows before animation is triggered. */\n oldBoundingBox?: Map<string, DOMRect> | null;\n /** Holds the bounding rect of columns before animation is triggered. */\n oldColumnBoundingBox?: Map<string, DOMRect> | null;\n /** Indicates to skip the column animation feature on next run. */\n skipColumnAnimationOnNextRun?: boolean;\n /** Timer for loading indicator for time consuming operations such as execution of {@link ApiContext} api's */\n busyIndicatorTimer?: ReturnType<typeof setTimeout> | null;\n /** Current group filters in the state. */\n groupFilters?: State['groupFilters'];\n /** Indicates if the column sizing is triggered after rows being available on DOM. */\n columnSizingTriggerdOnRowsAvailable?: boolean;\n /** Indicates whether the automatic resizing of columns has already been triggered. */\n autosizeTriggered?: boolean;\n /** Indicates if the personalizations for a given RS view is already fetched. */\n personalizationDone?: boolean;\n /** A reference to row drag drop information used during row drag drop operation. */\n rowDragDropRef!: {\n dropTarget: HTMLElement[];\n dragTarget?: HTMLElement;\n dropZones: [];\n dragLeaveSkipped?: boolean;\n dropTargetCoord?: DOMRect | null;\n forcedDragLeave?: boolean;\n isDragTargetTypeRow?: boolean;\n contextDropCb?: (ev: DragEvent) => void;\n contextDragOverCb?: (ev: DragEvent) => void;\n };\n\n /** Set this as true to notify apiContext api's for invalidating api cache. This is communicated via {@link ApiOptions.invalidateCache invalidateCache api option}. */\n refreshInProgress = false;\n /** The refresh token used to identify a unique refresh triggered. */\n refreshToken?: number;\n\n /** The personalized state of Repeating structure. */\n componentState?: (PersonalizedState & { activePersonalization?: string }) | null;\n\n /** Used to provide localized strings, typically overriding default translations. */\n translations?: RsCoreBootArgs['translations'];\n\n /**\n * Translates the given input string using the injected or default translations pack.\n *\n * @param str - The key of the string to be translated, which must be a key of the defaultTranslations.\n * @param tokens - Optional array of strings to be used for token replacement in the translated string.\n * @returns The translated string, with tokens replaced if provided.\n */\n translate: (str: keyof typeof defaultTranslations, tokens?: string[]) => string;\n\n // maintain a fieldDefsMap for quick access.\n fieldDefsMap: Map<string, FieldDef>;\n\n constructor(\n meta: Meta,\n presets: Meta[],\n isInitialRender = true,\n isMounted = false,\n translations?: RsCoreBootArgs['translations']\n ) {\n this.meta = meta;\n this.fieldDefsMap = new Map(meta.fieldDefs.map(fieldDef => [fieldDef.id, fieldDef]));\n this.presets = presets;\n this.isInitialRender = isInitialRender;\n this.isMounted = isMounted;\n this.translations = { ...defaultTranslations, ...translations };\n this.translate = translatorFor(this.translations, this.meta.locale!);\n }\n\n /** Sets the Html events required for resizing a column. */\n setFieldReorderProps(fieldReorderProps: RsStore['fieldReorderProps']) {\n this.fieldReorderProps = fieldReorderProps;\n }\n\n /** Returns the Html events required for reordering a column. */\n getFieldReorderProps() {\n return this.fieldReorderProps;\n }\n\n // Updates store meta and synchronizes derived fieldDefsMap with the new metadata\n setMeta(newMeta: Meta): void {\n this.meta = newMeta;\n\n this.fieldDefsMap = new Map(\n this.meta.fieldDefs?.map(fieldDef => [fieldDef.id, fieldDef]) ?? []\n );\n }\n\n /** Sets the Html events required for resizing a column. */\n setColumnResizerProps(columnResizerProps: RsStore['columnResizerProps']) {\n this.columnResizerProps = columnResizerProps;\n }\n\n /** Returns the Html events required for resizing a column. */\n getColumnResizerProps() {\n return this.columnResizerProps;\n }\n\n /** Retrieves the FieldDef object corresponding to the given fieldId from the fieldDefsMap. */\n getFieldDefById(fieldId: string): FieldDef | undefined {\n return this.fieldDefsMap.get(fieldId);\n }\n}\n"]}
1
+ {"version":3,"file":"RsStore.js","sourceRoot":"","sources":["../../../src/core/RsStore.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,4CAA4C,CAAC;AAavE,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AAUxD,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,qIAAqI;IACrI,eAAe,CAAU;IACzB,6DAA6D;IAC7D,SAAS,CAAU;IACnB,gCAAgC;IAChC,IAAI,CAAO;IACX,sFAAsF;IACtF,OAAO,CAAS;IAChB,oCAAoC;IACpC,YAAY,CAA+C;IAC3D,qFAAqF;IACrF,cAAc,CAAkB;IAEhC,+DAA+D;IACvD,iBAAiB,CAA6B;IACtD,6DAA6D;IACrD,kBAAkB,CAAsB;IAChD,qEAAqE;IACrE,cAAc,CAA+B;IAC7C,wEAAwE;IACxE,oBAAoB,CAA+B;IACnD,kEAAkE;IAClE,4BAA4B,CAAW;IACvC,8GAA8G;IAC9G,kBAAkB,CAAwC;IAC1D,0CAA0C;IAC1C,YAAY,CAAyB;IACrC,qFAAqF;IACrF,mCAAmC,CAAW;IAC9C,sFAAsF;IACtF,iBAAiB,CAAW;IAC5B,gFAAgF;IAChF,mBAAmB,CAAW;IAC9B,oFAAoF;IACpF,cAAc,CAUZ;IAEF,sKAAsK;IACtK,iBAAiB,GAAG,KAAK,CAAC;IAC1B,qEAAqE;IACrE,YAAY,CAAU;IAEtB,qDAAqD;IACrD,cAAc,CAAmE;IAEjF,oFAAoF;IACpF,YAAY,CAAkC;IAE9C;;;;;;O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GAAG,kBAAkB,CAAC;IAC/C,CAAC;IAED,8DAA8D;IAC9D,qBAAqB;QACnB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAED,8FAA8F;IAC9F,eAAe,CAAC,OAAe;QAC7B,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;CACF","sourcesContent":["import translatorFor from '@pega/cosmos-react-core/lib/i18n/translate';\n\nimport type { PersonalizedState, State } from '../../types/State.types';\nimport type { FieldDef, Meta } from '../../types/Meta.types';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { GroupedInfo, ApiOptions } from '../../types/ApiContext.types';\nimport type RsCoreBootArgs from '../../types/RsCoreBootArgs.types';\n\nimport type { ColumnReorderProps, ColumnResizerProps } from './generators/ColumnGenerator.types';\nimport type {\n GroupingInfo,\n HierarchicalGroupingInfo\n} from './features/uIFeatures/beforeRender/grouping';\nimport defaultTranslations from './defaultTranslations';\n\n/** A normalized Kanban lane retained for merging with current grouped results. */\nexport interface KanbanLaneInfo {\n /** Identifies the Meta lane configuration that produced this lane list. */\n sourceKey: string;\n /** Ordered Kanban lane values (the level-0 group's distinct values), independent of active card filters. */\n lanes: GroupedInfo['name'][];\n}\n\nexport default class RsStore {\n /** Indicates if it is initial render (or mount) of Repeating structures. It is usually set to true upon initialization of RsCore. */\n isInitialRender: boolean;\n /** Indicates if repeating structures component is mounted */\n isMounted: boolean;\n /** Repeating structures meta */\n meta: Meta;\n /** Other variants of Repeating structures meta. E.g. Table/Gallery/Timeline Preset */\n presets: Meta[];\n /** Current grouping information. */\n groupingInfo?: GroupingInfo[] | HierarchicalGroupingInfo[];\n /** Runtime-only Kanban lanes used to retain empty lanes across grouped refreshes. */\n kanbanLaneInfo?: KanbanLaneInfo;\n\n /** Stores the Html events required for reordering a column. */\n private fieldReorderProps!: ColumnReorderProps | null;\n /** Stores the Html events required for resizing a column. */\n private columnResizerProps!: ColumnResizerProps;\n /** Holds the bounding rect of rows before animation is triggered. */\n oldBoundingBox?: Map<string, DOMRect> | null;\n /** Holds the bounding rect of columns before animation is triggered. */\n oldColumnBoundingBox?: Map<string, DOMRect> | null;\n /** Indicates to skip the column animation feature on next run. */\n skipColumnAnimationOnNextRun?: boolean;\n /** Timer for loading indicator for time consuming operations such as execution of {@link ApiContext} api's */\n busyIndicatorTimer?: ReturnType<typeof setTimeout> | null;\n /** Current group filters in the state. */\n groupFilters?: State['groupFilters'];\n /** Indicates if the column sizing is triggered after rows being available on DOM. */\n columnSizingTriggerdOnRowsAvailable?: boolean;\n /** Indicates whether the automatic resizing of columns has already been triggered. */\n autosizeTriggered?: boolean;\n /** Indicates if the personalizations for a given RS view is already fetched. */\n personalizationDone?: boolean;\n /** A reference to row drag drop information used during row drag drop operation. */\n rowDragDropRef!: {\n dropTarget: HTMLElement[];\n dragTarget?: HTMLElement;\n dropZones: [];\n dragLeaveSkipped?: boolean;\n dropTargetCoord?: DOMRect | null;\n forcedDragLeave?: boolean;\n isDragTargetTypeRow?: boolean;\n contextDropCb?: (ev: DragEvent) => void;\n contextDragOverCb?: (ev: DragEvent) => void;\n };\n\n /** Set this as true to notify apiContext api's for invalidating api cache. This is communicated via {@link ApiOptions.invalidateCache invalidateCache api option}. */\n refreshInProgress = false;\n /** The refresh token used to identify a unique refresh triggered. */\n refreshToken?: number;\n\n /** The personalized state of Repeating structure. */\n componentState?: (PersonalizedState & { activePersonalization?: string }) | null;\n\n /** Used to provide localized strings, typically overriding default translations. */\n translations?: RsCoreBootArgs['translations'];\n\n /**\n * Translates the given input string using the injected or default translations pack.\n *\n * @param str - The key of the string to be translated, which must be a key of the defaultTranslations.\n * @param tokens - Optional array of strings to be used for token replacement in the translated string.\n * @returns The translated string, with tokens replaced if provided.\n */\n translate: (str: keyof typeof defaultTranslations, tokens?: string[]) => string;\n\n // maintain a fieldDefsMap for quick access.\n fieldDefsMap: Map<string, FieldDef>;\n\n constructor(\n meta: Meta,\n presets: Meta[],\n isInitialRender = true,\n isMounted = false,\n translations?: RsCoreBootArgs['translations']\n ) {\n this.meta = meta;\n this.fieldDefsMap = new Map(meta.fieldDefs.map(fieldDef => [fieldDef.id, fieldDef]));\n this.presets = presets;\n this.isInitialRender = isInitialRender;\n this.isMounted = isMounted;\n this.translations = { ...defaultTranslations, ...translations };\n this.translate = translatorFor(this.translations, this.meta.locale!);\n }\n\n /** Sets the Html events required for resizing a column. */\n setFieldReorderProps(fieldReorderProps: RsStore['fieldReorderProps']) {\n this.fieldReorderProps = fieldReorderProps;\n }\n\n /** Returns the Html events required for reordering a column. */\n getFieldReorderProps() {\n return this.fieldReorderProps;\n }\n\n // Updates store meta and synchronizes derived fieldDefsMap with the new metadata\n setMeta(newMeta: Meta): void {\n this.meta = newMeta;\n\n this.fieldDefsMap = new Map(\n this.meta.fieldDefs?.map(fieldDef => [fieldDef.id, fieldDef]) ?? []\n );\n }\n\n /** Sets the Html events required for resizing a column. */\n setColumnResizerProps(columnResizerProps: RsStore['columnResizerProps']) {\n this.columnResizerProps = columnResizerProps;\n }\n\n /** Returns the Html events required for resizing a column. */\n getColumnResizerProps() {\n return this.columnResizerProps;\n }\n\n /** Retrieves the FieldDef object corresponding to the given fieldId from the fieldDefsMap. */\n getFieldDefById(fieldId: string): FieldDef | undefined {\n return this.fieldDefsMap.get(fieldId);\n }\n}\n"]}
@@ -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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,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;IAiCxB;;;;;OAKG;IACH,QAAQ,GAAI,QAAQ,UAAU,KAAG,IAAI,CAgDnC;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;CAoIH;AAED,0EAA0E;AAC1E,wBAAgB,0BAA0B,CAAC,cAAc,EAAE,UAAU,IAcrD,OAAO,KAAK,EAAE,kBAAkB,UAAU,gCAwBzD"}
@@ -82,7 +82,7 @@ export default class StateResolver {
82
82
  }
83
83
  }
84
84
  if (typeof action === 'function')
85
- return action(this.dispatch, this.getState, this.#rsInternal.getView().meta);
85
+ return action(this.dispatch, this.getState, this.#rsInternal.getView().meta, this.#rsInternal.getRsStore);
86
86
  if (!this.#queuedActions.length && !this.fetchDataInProgress) {
87
87
  // Don't do deep copy as we don't do deep comparison for arrays and objects in memoization in feature files
88
88
  this.#currentState = { ...this.#state };
@@ -285,7 +285,7 @@ export function initializeFetchDataHandler(rsCoreInternal) {
285
285
  state.groups,
286
286
  state.hierarchicalGroup,
287
287
  state.groupFilters,
288
- state.hiddenColumns
288
+ state.visibleColumns
289
289
  ]);
290
290
  return response;
291
291
  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AAC,YAAY;YAClB,KAAK,CAAC,OAAO;YACb,KAAK,CAAC,MAAM;YACZ,KAAK,CAAC,iBAAiB;YACvB,KAAK,CAAC,YAAY;YAClB,KAAK,CAAC,aAAa;SACpB,CACF,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable no-console */\nimport type { State } from '../../types/State.types';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext, ApiOptions, FetchDataResponse } from '../../types/ApiContext.types';\n\nimport { AFTER_FETCH, BEFORE_FETCH } from './pubSub/events';\nimport {\n clearProcessedActionsFromLatestActions,\n isSignificantPaginationOverlap,\n isEmpty,\n isFilterCriteriaChanged,\n isSameActionPresent as isSameActionPresentInQueue,\n isStaleAction,\n pickProperties,\n withMemoization\n} from './utils/util';\nimport { personalizationProps } from './reducers/personalizationReducer';\nimport ActionTypes from './actions/actionConstants';\nimport type { ActionType } from './actions/actionConstants';\nimport type RsInternal from './RsInternal';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { MiddleWareFeatureProps, UIFeatures, Feature } from './features/featureFactory';\nimport type { ActionAsFunction, BaseAction, Action } from './actions/actions.types';\nimport type RsProps from './RsProps';\n\nexport type ReducerFunction = (state: State, action: Action, rsInternal: RsInternal) => State;\nexport type FetchDataHandler = (\n state: State,\n fetchDataOptions: ApiOptions\n) => Promise<FetchDataResponse>;\n/** It manages state of RsCore. */\nexport default class StateResolver {\n /** A reference to {@link RsInternal} object. */\n #rsInternal: RsInternal;\n\n /** Reducer function to reduce RS Core actions to its respective state. */\n #reducers: ReducerFunction;\n\n /** A reference to beforeRender UI features */\n #middlewares?: (featureProps: MiddleWareFeatureProps) => Promise<void | null>;\n\n /** Handler to fetch and manage data using {@link ApiContext.fetchData fetchData} api. */\n #fetchDataHandler: FetchDataHandler;\n\n /** previously dispatched stable state excluding instant state */\n #state: State;\n\n /** Intermittent state generated based upon the processed actions from the queue */\n #currentState: State;\n\n /** State generated via actions with instantRender. */\n #instantState: State;\n\n /** Queue holding actions that are dispatched. */\n #queuedActions: Action[];\n\n /** Holds the action that is executed. */\n #previousExecutedActionQueue: Action[];\n\n /** It contains registered api's provided by consumer of RsCore */\n #externalStoreRef: NonNullable<RsProps['externalStore']>;\n\n /** Keep track of latest action of a type of that action is marked to ignore stale actions */\n #latestActions = new Map<ActionType, Action>();\n\n /** Indicates if an external dispatch to RS core consumer should ber skipped. */\n #skipExternalDispatch = false;\n\n /** Abort controller to abort the fetchData requests in transit */\n #abortController?: AbortController;\n\n /** Indicates if fetchData is in progress. */\n fetchDataInProgress?: boolean;\n\n /**\n * Create an instance of {@link StateResolver} class.\n * @param reducers Reducer function to reduce state for a given action\n * @param fetchDataHandler Fetch Data handler function to fetch the data of RSCore when required.\n * @param rsInternal Reference to {@link RsInternal} object.\n */\n constructor(\n reducers: ReducerFunction,\n fetchDataHandler: FetchDataHandler,\n rsInternal: RsInternal\n ) {\n this.#reducers = reducers;\n this.#fetchDataHandler = fetchDataHandler;\n this.#rsInternal = rsInternal;\n\n this.#externalStoreRef = rsInternal.getRsProps().externalStore!;\n\n this.#state = {};\n this.#currentState = {};\n this.#instantState = {};\n this.#queuedActions = [];\n this.#previousExecutedActionQueue = [];\n }\n\n /**\n * Executes {@link ApiContext.stateUpdateCallback stateUpdateCallback} and {@link ApiContext.setComponentState setComponentState} api with latest state.\n */\n #executePostStateUpdateCallbacks = () => {\n const { apiContext } = this.#rsInternal.getRsProps();\n if (apiContext?.stateUpdateCallback) {\n apiContext.stateUpdateCallback({\n ...pickProperties(this.getState(), personalizationProps)\n });\n }\n if (apiContext?.setComponentState && this.getState().personalization?.active) {\n apiContext.setComponentState({\n ...pickProperties(this.getState(), personalizationProps),\n activePersonalization: this.getState().personalization?.active\n });\n }\n };\n\n /**\n * Dispatches given {@link action} to update the RsCore {@link State state} based on the provided action type. Multiple actions are queued in the action queue.\n * It will further triggers various {@link UIFeatures features} and fetches data using {@link FetchDataHandler} according to the state changes.\n *\n * @param action - The action to be dispatched.\n */\n dispatch = (action: BaseAction): void => {\n if ('takeLatestAction' in action && action.takeLatestAction) {\n if (isSameActionPresentInQueue(action, this.#latestActions)) return;\n this.#latestActions.set(action.type, action);\n if (isSignificantPaginationOverlap(this.#latestActions, this.#previousExecutedActionQueue)) {\n this.#abortController?.abort();\n }\n }\n if (typeof action === 'function')\n return (action as ActionAsFunction)(\n this.dispatch,\n this.getState,\n this.#rsInternal.getView().meta\n );\n if (!this.#queuedActions.length && !this.fetchDataInProgress) {\n // Don't do deep copy as we don't do deep comparison for arrays and objects in memoization in feature files\n this.#currentState = { ...this.#state };\n }\n\n if ('instantRender' in action && action.instantRender) {\n if (this.#rsInternal.getRsProps().mode === 'debug') {\n console.warn(\n 'Doing instant render. This might introduce performance issues. Check if this is really needed.'\n );\n }\n this.#instantState = this.#reducers(this.#instantState, action, this.#rsInternal);\n this.#rsInternal.getView().setProp({\n state: { ...this.getState(), ...this.#instantState },\n isInstantRender: true\n });\n this.#externalStoreRef.dispatch({\n ...this.#instantState\n });\n this.#executePostStateUpdateCallbacks();\n\n return;\n }\n if ('skipActionQueue' in action && action.skipActionQueue) {\n this.#currentState = this.#reducers(this.#currentState, action, this.#rsInternal);\n return;\n }\n\n this.#queuedActions.push(action);\n // We run next batch only after completing first batch, Fetch call should get completed.\n if (this.#queuedActions.length === 1 && !this.#previousExecutedActionQueue.length) {\n this.#runQueuedActions();\n }\n };\n\n /**\n * Returns the current state that is built using the {@link dispatch dispatched} action.\n */\n getState = () => {\n return Object.keys(this.#currentState).length > 0 ? this.#currentState : this.#state;\n };\n\n /**\n * Returns a snapshot of the previous stable state before the action queue starts executing via {@link dispatch}.\n */\n getOriginalState = () => {\n return this.#state;\n };\n\n /**\n * Sets a function to execute a set of {@link Feature features} before triggering a render.\n * The provided function will be called with the {@link MiddleWareFeatureProps featureProps}\n * @param middlewares - A function that executes a set of {@link Feature features} before rendering.\n */\n setMiddlewares = (\n middlewares: (featureProps: MiddleWareFeatureProps) => Promise<void | null>\n ) => {\n if (this.#middlewares) return;\n this.#middlewares = middlewares;\n };\n\n /**\n * Returns true if the lone queued FORCE_UPDATE action should be skipped (no-op optimization).\n */\n #skipForceUpdateAction = (): boolean => {\n if (this.#queuedActions.length !== 1) return false;\n const action = this.#queuedActions[0];\n if (action?.type !== ActionTypes.FORCE_UPDATE) return false;\n if (!('payload' in action)) return false;\n return !Object.keys(action.payload.forceUpdateFeatures ?? {}).length;\n };\n\n /** This will reduce the RsCore {@link State state} for a {@link StateResolver.dispatch dispatched} action .\n * Additionally it will also run middlewares, fetches latest data using {@link FetchDataHandler} and executes post state update callback with latest reduced state.\n */\n #runQueuedActions = async () => {\n const queuedAction = this.#queuedActions[0];\n if (queuedAction) {\n const skipStaleActionExecution =\n 'takeLatestAction' in queuedAction &&\n queuedAction.takeLatestAction &&\n isStaleAction(queuedAction, this.#latestActions);\n\n if (skipStaleActionExecution) {\n this.#queuedActions.shift();\n await this.#runQueuedActions();\n return;\n }\n\n this.#previousExecutedActionQueue.push(queuedAction);\n this.#currentState = this.#reducers(this.#currentState, queuedAction, this.#rsInternal);\n await this.#middlewares!({\n rsInternal: this.#rsInternal,\n getState: this.getState,\n getOriginalState: this.getOriginalState,\n dispatch: this.dispatch,\n queuedActions: [queuedAction]\n });\n this.#queuedActions.shift();\n await this.#runQueuedActions();\n } else if (this.#rsInternal.getRsStore().isMounted) {\n this.fetchDataInProgress = true;\n\n await this.#fetchData({\n ...this.#currentState,\n ...this.#instantState\n });\n\n // if the processed action and latest action has same payload, delete the latestAction as all the actions have been processed.\n clearProcessedActionsFromLatestActions(\n this.#latestActions,\n this.#previousExecutedActionQueue\n );\n\n // if data has been ignored, don't dispatch to view layer as the there is no change in rows\n if (!this.#skipExternalDispatch) {\n await this.#externalStoreRef.dispatch({\n ...this.#currentState\n });\n }\n this.#skipExternalDispatch = false;\n this.fetchDataInProgress = false;\n this.#previousExecutedActionQueue = [];\n\n // this happens in cases of dispatches like query info. In that case, the props have been set on view directly and the dispatch has already happened\n // This will prevent unnecessary renders in case of server side table\n\n // Avoid skipping FORCE_UPDATE action in case feature has triggered it and is relying on forceUpdatedFeatures slice of state.\n // forceUpdateFeatures slice is generally used by features when they are not able to perform their task if the rendering cycle is not complete.\n // For eg.renderHeader and autosize feature set forceRenderOnNextRun and forceCalculateAutoWidth in this slice so that they will get executed after the existing rendering cycle is complete and the rows are rendered on DOM.\n // If we skip these types of FORCE_UPDATE action then the corresponding features execution will also be skipped.\n if (this.#skipForceUpdateAction()) {\n this.#queuedActions.shift();\n }\n if (this.#queuedActions.length) {\n this.#runQueuedActions();\n } else {\n this.#state = { ...this.#currentState };\n this.#currentState = {};\n this.#executePostStateUpdateCallbacks();\n }\n }\n };\n\n /**\n * Calls the {@link FetchDataHandler fetchDataHandler} and updates the latest data in the {@link View}\n * @param latestState - Current state.\n */\n #fetchData = async (latestState: State) => {\n this.#abortController = new AbortController();\n const signal = this.#abortController.signal;\n this.#rsInternal.getPubSubUtils().publish(BEFORE_FETCH);\n\n const derivedState = {\n ...latestState,\n groupFilters: this.#rsInternal.getRsStore().groupFilters\n };\n // TODO: No need to fetch data if all the groups are collapsed.\n const res = await this.#fetchDataHandler(derivedState, {\n signal,\n ...(this.#rsInternal.getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: this.#rsInternal.getRsStore().refreshToken\n })\n });\n if (res) {\n const { totalRecordCount, filteredRecordCount, data = [] } = res;\n\n if (!isEmpty(totalRecordCount) || !isEmpty(filteredRecordCount)) {\n this.#rsInternal.getView().setProp({\n resultsCount: totalRecordCount || filteredRecordCount,\n countGeneratedInternally: false,\n showCount: true\n });\n }\n\n if (isSignificantPaginationOverlap(this.#latestActions, this.#previousExecutedActionQueue)) {\n this.#skipExternalDispatch = true;\n } else {\n this.#rsInternal.getView().setProp({\n data,\n isCountUpdateRequired:\n isFilterCriteriaChanged(this.#rsInternal.getRsStore().meta, this.#state, latestState) ||\n latestState.refresh !== this.#state.refresh\n });\n }\n }\n\n this.#rsInternal.getPubSubUtils().publish(AFTER_FETCH);\n this.#rsInternal.getView().setProp({ state: latestState, isInstantRender: false });\n };\n}\n\n/** Initializes handler for {@link ApiContext.fetchData fetchData} api. */\nexport function initializeFetchDataHandler(rsCoreInternal: RsInternal) {\n let response = {} as FetchDataResponse;\n const fetchWrapper = withMemoization(async ([state, fetchDataOptions]: [State, ApiOptions]) => {\n try {\n response = await rsCoreInternal\n .getRsProps()\n .apiContext.fetchData(state, rsCoreInternal.getRsStore().meta, fetchDataOptions);\n } catch (err: any) {\n if (!['AbortError', 'CanceledError'].includes(err.name)) {\n console.error('API call failed', err);\n }\n }\n });\n\n return async (state: State, fetchDataOptions: ApiOptions) => {\n /**\n * Returning default data from getView() in case the actual apiContext.getData() doesn't get called.\n *\n * BUG-811621: in case of bulk actions and inline edit, the updated rows come from separate apiContext APIs\n * and the memo of below function won't break, so, it will give stale data. Using getView().data as the default fallback for such cases.\n */\n response.data = rsCoreInternal.getView().data!;\n await fetchWrapper(\n [state, fetchDataOptions],\n [\n state.filterExpression,\n state.search,\n state.paginationOptions,\n state.sortingOrder,\n state.refresh,\n state.groups,\n state.hierarchicalGroup,\n state.groupFilters,\n state.hiddenColumns\n ]\n );\n return response;\n };\n}\n"]}
1
+ {"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,gDAA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Y,GAAG,eAAe,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAsB,EAAE,EAAE;QAC5F,IAAI,CAAC;YACH,QAAQ,GAAG,MAAM,cAAc;iBAC5B,UAAU,EAAE;iBACZ,UAAU,CAAC,SAAS,CAAC,KAAK,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,cAAc;SACrB,CACF,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable no-console */\nimport type { State } from '../../types/State.types';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { ApiContext, ApiOptions, FetchDataResponse } from '../../types/ApiContext.types';\n\nimport { AFTER_FETCH, BEFORE_FETCH } from './pubSub/events';\nimport {\n clearProcessedActionsFromLatestActions,\n isSignificantPaginationOverlap,\n isEmpty,\n isFilterCriteriaChanged,\n isSameActionPresent as isSameActionPresentInQueue,\n isStaleAction,\n pickProperties,\n withMemoization\n} from './utils/util';\nimport { personalizationProps } from './reducers/personalizationReducer';\nimport ActionTypes from './actions/actionConstants';\nimport type { ActionType } from './actions/actionConstants';\nimport type RsInternal from './RsInternal';\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { MiddleWareFeatureProps, UIFeatures, Feature } from './features/featureFactory';\nimport type { ActionAsFunction, BaseAction, Action } from './actions/actions.types';\nimport type RsProps from './RsProps';\n\nexport type ReducerFunction = (state: State, action: Action, rsInternal: RsInternal) => State;\nexport type FetchDataHandler = (\n state: State,\n fetchDataOptions: ApiOptions\n) => Promise<FetchDataResponse>;\n/** It manages state of RsCore. */\nexport default class StateResolver {\n /** A reference to {@link RsInternal} object. */\n #rsInternal: RsInternal;\n\n /** Reducer function to reduce RS Core actions to its respective state. */\n #reducers: ReducerFunction;\n\n /** A reference to beforeRender UI features */\n #middlewares?: (featureProps: MiddleWareFeatureProps) => Promise<void | null>;\n\n /** Handler to fetch and manage data using {@link ApiContext.fetchData fetchData} api. */\n #fetchDataHandler: FetchDataHandler;\n\n /** previously dispatched stable state excluding instant state */\n #state: State;\n\n /** Intermittent state generated based upon the processed actions from the queue */\n #currentState: State;\n\n /** State generated via actions with instantRender. */\n #instantState: State;\n\n /** Queue holding actions that are dispatched. */\n #queuedActions: Action[];\n\n /** Holds the action that is executed. */\n #previousExecutedActionQueue: Action[];\n\n /** It contains registered api's provided by consumer of RsCore */\n #externalStoreRef: NonNullable<RsProps['externalStore']>;\n\n /** Keep track of latest action of a type of that action is marked to ignore stale actions */\n #latestActions = new Map<ActionType, Action>();\n\n /** Indicates if an external dispatch to RS core consumer should ber skipped. */\n #skipExternalDispatch = false;\n\n /** Abort controller to abort the fetchData requests in transit */\n #abortController?: AbortController;\n\n /** Indicates if fetchData is in progress. */\n fetchDataInProgress?: boolean;\n\n /**\n * Create an instance of {@link StateResolver} class.\n * @param reducers Reducer function to reduce state for a given action\n * @param fetchDataHandler Fetch Data handler function to fetch the data of RSCore when required.\n * @param rsInternal Reference to {@link RsInternal} object.\n */\n constructor(\n reducers: ReducerFunction,\n fetchDataHandler: FetchDataHandler,\n rsInternal: RsInternal\n ) {\n this.#reducers = reducers;\n this.#fetchDataHandler = fetchDataHandler;\n this.#rsInternal = rsInternal;\n\n this.#externalStoreRef = rsInternal.getRsProps().externalStore!;\n\n this.#state = {};\n this.#currentState = {};\n this.#instantState = {};\n this.#queuedActions = [];\n this.#previousExecutedActionQueue = [];\n }\n\n /**\n * Executes {@link ApiContext.stateUpdateCallback stateUpdateCallback} and {@link ApiContext.setComponentState setComponentState} api with latest state.\n */\n #executePostStateUpdateCallbacks = () => {\n const { apiContext } = this.#rsInternal.getRsProps();\n if (apiContext?.stateUpdateCallback) {\n apiContext.stateUpdateCallback({\n ...pickProperties(this.getState(), personalizationProps)\n });\n }\n if (apiContext?.setComponentState && this.getState().personalization?.active) {\n apiContext.setComponentState({\n ...pickProperties(this.getState(), personalizationProps),\n activePersonalization: this.getState().personalization?.active\n });\n }\n };\n\n /**\n * Dispatches given {@link action} to update the RsCore {@link State state} based on the provided action type. Multiple actions are queued in the action queue.\n * It will further triggers various {@link UIFeatures features} and fetches data using {@link FetchDataHandler} according to the state changes.\n *\n * @param action - The action to be dispatched.\n */\n dispatch = (action: BaseAction): void => {\n if ('takeLatestAction' in action && action.takeLatestAction) {\n if (isSameActionPresentInQueue(action, this.#latestActions)) return;\n this.#latestActions.set(action.type, action);\n if (isSignificantPaginationOverlap(this.#latestActions, this.#previousExecutedActionQueue)) {\n this.#abortController?.abort();\n }\n }\n if (typeof action === 'function')\n return (action as ActionAsFunction)(\n this.dispatch,\n this.getState,\n this.#rsInternal.getView().meta,\n this.#rsInternal.getRsStore\n );\n if (!this.#queuedActions.length && !this.fetchDataInProgress) {\n // Don't do deep copy as we don't do deep comparison for arrays and objects in memoization in feature files\n this.#currentState = { ...this.#state };\n }\n\n if ('instantRender' in action && action.instantRender) {\n if (this.#rsInternal.getRsProps().mode === 'debug') {\n console.warn(\n 'Doing instant render. This might introduce performance issues. Check if this is really needed.'\n );\n }\n this.#instantState = this.#reducers(this.#instantState, action, this.#rsInternal);\n this.#rsInternal.getView().setProp({\n state: { ...this.getState(), ...this.#instantState },\n isInstantRender: true\n });\n this.#externalStoreRef.dispatch({\n ...this.#instantState\n });\n this.#executePostStateUpdateCallbacks();\n\n return;\n }\n if ('skipActionQueue' in action && action.skipActionQueue) {\n this.#currentState = this.#reducers(this.#currentState, action, this.#rsInternal);\n return;\n }\n\n this.#queuedActions.push(action);\n // We run next batch only after completing first batch, Fetch call should get completed.\n if (this.#queuedActions.length === 1 && !this.#previousExecutedActionQueue.length) {\n this.#runQueuedActions();\n }\n };\n\n /**\n * Returns the current state that is built using the {@link dispatch dispatched} action.\n */\n getState = () => {\n return Object.keys(this.#currentState).length > 0 ? this.#currentState : this.#state;\n };\n\n /**\n * Returns a snapshot of the previous stable state before the action queue starts executing via {@link dispatch}.\n */\n getOriginalState = () => {\n return this.#state;\n };\n\n /**\n * Sets a function to execute a set of {@link Feature features} before triggering a render.\n * The provided function will be called with the {@link MiddleWareFeatureProps featureProps}\n * @param middlewares - A function that executes a set of {@link Feature features} before rendering.\n */\n setMiddlewares = (\n middlewares: (featureProps: MiddleWareFeatureProps) => Promise<void | null>\n ) => {\n if (this.#middlewares) return;\n this.#middlewares = middlewares;\n };\n\n /**\n * Returns true if the lone queued FORCE_UPDATE action should be skipped (no-op optimization).\n */\n #skipForceUpdateAction = (): boolean => {\n if (this.#queuedActions.length !== 1) return false;\n const action = this.#queuedActions[0];\n if (action?.type !== ActionTypes.FORCE_UPDATE) return false;\n if (!('payload' in action)) return false;\n return !Object.keys(action.payload.forceUpdateFeatures ?? {}).length;\n };\n\n /** This will reduce the RsCore {@link State state} for a {@link StateResolver.dispatch dispatched} action .\n * Additionally it will also run middlewares, fetches latest data using {@link FetchDataHandler} and executes post state update callback with latest reduced state.\n */\n #runQueuedActions = async () => {\n const queuedAction = this.#queuedActions[0];\n if (queuedAction) {\n const skipStaleActionExecution =\n 'takeLatestAction' in queuedAction &&\n queuedAction.takeLatestAction &&\n isStaleAction(queuedAction, this.#latestActions);\n\n if (skipStaleActionExecution) {\n this.#queuedActions.shift();\n await this.#runQueuedActions();\n return;\n }\n\n this.#previousExecutedActionQueue.push(queuedAction);\n this.#currentState = this.#reducers(this.#currentState, queuedAction, this.#rsInternal);\n await this.#middlewares!({\n rsInternal: this.#rsInternal,\n getState: this.getState,\n getOriginalState: this.getOriginalState,\n dispatch: this.dispatch,\n queuedActions: [queuedAction]\n });\n this.#queuedActions.shift();\n await this.#runQueuedActions();\n } else if (this.#rsInternal.getRsStore().isMounted) {\n this.fetchDataInProgress = true;\n\n await this.#fetchData({\n ...this.#currentState,\n ...this.#instantState\n });\n\n // if the processed action and latest action has same payload, delete the latestAction as all the actions have been processed.\n clearProcessedActionsFromLatestActions(\n this.#latestActions,\n this.#previousExecutedActionQueue\n );\n\n // if data has been ignored, don't dispatch to view layer as the there is no change in rows\n if (!this.#skipExternalDispatch) {\n await this.#externalStoreRef.dispatch({\n ...this.#currentState\n });\n }\n this.#skipExternalDispatch = false;\n this.fetchDataInProgress = false;\n this.#previousExecutedActionQueue = [];\n\n // this happens in cases of dispatches like query info. In that case, the props have been set on view directly and the dispatch has already happened\n // This will prevent unnecessary renders in case of server side table\n\n // Avoid skipping FORCE_UPDATE action in case feature has triggered it and is relying on forceUpdatedFeatures slice of state.\n // forceUpdateFeatures slice is generally used by features when they are not able to perform their task if the rendering cycle is not complete.\n // For eg.renderHeader and autosize feature set forceRenderOnNextRun and forceCalculateAutoWidth in this slice so that they will get executed after the existing rendering cycle is complete and the rows are rendered on DOM.\n // If we skip these types of FORCE_UPDATE action then the corresponding features execution will also be skipped.\n if (this.#skipForceUpdateAction()) {\n this.#queuedActions.shift();\n }\n if (this.#queuedActions.length) {\n this.#runQueuedActions();\n } else {\n this.#state = { ...this.#currentState };\n this.#currentState = {};\n this.#executePostStateUpdateCallbacks();\n }\n }\n };\n\n /**\n * Calls the {@link FetchDataHandler fetchDataHandler} and updates the latest data in the {@link View}\n * @param latestState - Current state.\n */\n #fetchData = async (latestState: State) => {\n this.#abortController = new AbortController();\n const signal = this.#abortController.signal;\n this.#rsInternal.getPubSubUtils().publish(BEFORE_FETCH);\n\n const derivedState = {\n ...latestState,\n groupFilters: this.#rsInternal.getRsStore().groupFilters\n };\n // TODO: No need to fetch data if all the groups are collapsed.\n const res = await this.#fetchDataHandler(derivedState, {\n signal,\n ...(this.#rsInternal.getRsStore().refreshInProgress && {\n invalidateCache: true,\n invalidateCacheToken: this.#rsInternal.getRsStore().refreshToken\n })\n });\n if (res) {\n const { totalRecordCount, filteredRecordCount, data = [] } = res;\n\n if (!isEmpty(totalRecordCount) || !isEmpty(filteredRecordCount)) {\n this.#rsInternal.getView().setProp({\n resultsCount: totalRecordCount || filteredRecordCount,\n countGeneratedInternally: false,\n showCount: true\n });\n }\n\n if (isSignificantPaginationOverlap(this.#latestActions, this.#previousExecutedActionQueue)) {\n this.#skipExternalDispatch = true;\n } else {\n this.#rsInternal.getView().setProp({\n data,\n isCountUpdateRequired:\n isFilterCriteriaChanged(this.#rsInternal.getRsStore().meta, this.#state, latestState) ||\n latestState.refresh !== this.#state.refresh\n });\n }\n }\n\n this.#rsInternal.getPubSubUtils().publish(AFTER_FETCH);\n this.#rsInternal.getView().setProp({ state: latestState, isInstantRender: false });\n };\n}\n\n/** Initializes handler for {@link ApiContext.fetchData fetchData} api. */\nexport function initializeFetchDataHandler(rsCoreInternal: RsInternal) {\n let response = {} as FetchDataResponse;\n const fetchWrapper = withMemoization(async ([state, fetchDataOptions]: [State, ApiOptions]) => {\n try {\n response = await rsCoreInternal\n .getRsProps()\n .apiContext.fetchData(state, rsCoreInternal.getRsStore().meta, fetchDataOptions);\n } catch (err: any) {\n if (!['AbortError', 'CanceledError'].includes(err.name)) {\n console.error('API call failed', err);\n }\n }\n });\n\n return async (state: State, fetchDataOptions: ApiOptions) => {\n /**\n * Returning default data from getView() in case the actual apiContext.getData() doesn't get called.\n *\n * BUG-811621: in case of bulk actions and inline edit, the updated rows come from separate apiContext APIs\n * and the memo of below function won't break, so, it will give stale data. Using getView().data as the default fallback for such cases.\n */\n response.data = rsCoreInternal.getView().data!;\n await fetchWrapper(\n [state, fetchDataOptions],\n [\n state.filterExpression,\n state.search,\n state.paginationOptions,\n state.sortingOrder,\n state.refresh,\n state.groups,\n state.hierarchicalGroup,\n state.groupFilters,\n state.visibleColumns\n ]\n );\n return response;\n };\n}\n"]}
@@ -72,6 +72,8 @@ declare const ActionTypes: {
72
72
  readonly ADD_COLUMN_VISIBILITY: "addColumnVisibility";
73
73
  readonly VISIBLE_COLUMN_UPDATE: "visibleColumnUpdate";
74
74
  readonly CHANGE_TEMPLATE: "changeTemplate";
75
+ readonly OPEN_MASTER_DETAIL: "openMasterDetail";
76
+ readonly CLOSE_MASTER_DETAIL: "closeMasterDetail";
75
77
  };
76
78
  export default ActionTypes;
77
79
  export type ActionType = (typeof ActionTypes)[keyof typeof ActionTypes];
@@ -1 +1 @@
1
- {"version":3,"file":"actionConstants.d.ts","sourceRoot":"","sources":["../../../../src/core/actions/actionConstants.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFP,CAAC;AAEX,eAAe,WAAW,CAAC;AAC3B,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"actionConstants.d.ts","sourceRoot":"","sources":["../../../../src/core/actions/actionConstants.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFP,CAAC;AAEX,eAAe,WAAW,CAAC;AAC3B,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC"}
@@ -75,7 +75,9 @@ const ActionTypes = {
75
75
  SET_CONDITIONAL_STYLE_FORMATS: 'setConditionalStyleFormats',
76
76
  ADD_COLUMN_VISIBILITY: 'addColumnVisibility',
77
77
  VISIBLE_COLUMN_UPDATE: 'visibleColumnUpdate',
78
- CHANGE_TEMPLATE: 'changeTemplate'
78
+ CHANGE_TEMPLATE: 'changeTemplate',
79
+ OPEN_MASTER_DETAIL: 'openMasterDetail',
80
+ CLOSE_MASTER_DETAIL: 'closeMasterDetail'
79
81
  };
80
82
  export default ActionTypes;
81
83
  //# sourceMappingURL=actionConstants.js.map
@@ -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,oBAAoB,EAAE,oBAAoB;IAC1C,WAAW,EAAE,YAAY;IACzB,SAAS,EAA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,iCAAiC,EAAE,gCAAgC;IACnE,qBAAqB,EAAE,oBAAoB;IAC3C,oBAAoB,EAAE,oBAAoB;IAC1C,cAAc,EAAE,cAAc;IAC9B,6BAA6B,EAAE,sCAAsC;IACrE,yBAAyB,EAAE,yBAAyB;IACpD,6BAA6B,EAAE,4BAA4B;IAC3D,qBAAqB,EAAE,qBAAqB;IAC5C,qBAAqB,EAAE,qBAAqB;IAC5C,eAAe,EAAE,gBAAgB;CACzB,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 GALLERY_LAYOUT_CHANGE: 'galleryLayoutChange',\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 SET_GROUP_SNAPSHOT: 'setGroupSnapshot',\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\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 CHANGE_TEMPLATE: 'changeTemplate'\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,gBAAg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B;IACrD,oBAAoB,EAAE,oBAAoB;IAE1C,iHAAiH;IACjH,wBAAwB,EAAE,wBAAwB;IAClD,iBAAiB,EAAE,iBAAiB;IACpC,eAAe,EAAE,gBAAgB;IACjC,mBAAmB,EAAE,mBAAmB;IACxC,wBAAwB,EAAE,wBAAwB;IAClD,iCAAiC,EAAE,gCAAgC;IACnE,qBAAqB,EAAE,oBAAoB;IAC3C,oBAAoB,EAAE,oBAAoB;IAC1C,cAAc,EAAE,cAAc;IAC9B,6BAA6B,EAAE,sCAAsC;IACrE,yBAAyB,EAAE,yBAAyB;IACpD,6BAA6B,EAAE,4BAA4B;IAC3D,qBAAqB,EAAE,qBAAqB;IAC5C,qBAAqB,EAAE,qBAAqB;IAC5C,eAAe,EAAE,gBAAgB;IACjC,kBAAkB,EAAE,kBAAkB;IACtC,mBAAmB,EAAE,mBAAmB;CAChC,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 GALLERY_LAYOUT_CHANGE: 'galleryLayoutChange',\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 SET_GROUP_SNAPSHOT: 'setGroupSnapshot',\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\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 CHANGE_TEMPLATE: 'changeTemplate',\n OPEN_MASTER_DETAIL: 'openMasterDetail',\n CLOSE_MASTER_DETAIL: 'closeMasterDetail'\n} as const;\n\nexport default ActionTypes;\nexport type ActionType = (typeof ActionTypes)[keyof typeof ActionTypes];\n"]}
@@ -3,7 +3,7 @@ import type { Errors, Group, Notification, State } from '../../../types/State.ty
3
3
  import type Column from '../generators/ColumnGenerator';
4
4
  import type View from '../generators/ViewGenerator';
5
5
  import type { WarningDetail } from '../generators/ViewGenerator.types';
6
- import type { ActionMeta, ApplyAliasesActionPayload, ChangeLabelActionPayload, ColumnDragDropAction, ColumnFilteringActionPayload, ColumnResizePayload, ColumnSortPayload, DeleteCustomColumnPayload, ExpandCollapsePayload, MergeColumnsPayload, MoveRecordKeysUpdatePayload, PaginateAction, PaginationPayload, RemoveRenderFormatterPayload, RowSelectionItemsUpdatePayload, RowSelectionUpdatePayload, SanitizableProperties, SearchGlobalActionAsFunction, UpdateAggregationPayload, UpdateRenderFormatterPayload, UpdateRowSelectionStatusPayload } from './actions.types';
6
+ import type { ActionMeta, ApplyAliasesActionPayload, ChangeLabelActionPayload, ColumnDragDropAction, ColumnFilteringActionPayload, ColumnResizePayload, ColumnSortPayload, DeleteCustomColumnPayload, ExpandCollapsePayload, MergeColumnsPayload, MoveRecordKeysUpdatePayload, OpenMasterDetailPayload, PaginateAction, PaginationPayload, RemoveRenderFormatterPayload, RowSelectionItemsUpdatePayload, RowSelectionUpdatePayload, SanitizableProperties, SearchGlobalActionAsFunction, UpdateAggregationPayload, UpdateRenderFormatterPayload, UpdateRowSelectionStatusPayload } from './actions.types';
7
7
  export declare function actionNotificationAdd(notifications: Notification | Notification[]): {
8
8
  type: "NOTIFICATION_ADD";
9
9
  payload: {
@@ -45,7 +45,14 @@ export declare function actionUpdateSort(payload: NonNullable<State['sortingOrde
45
45
  export declare function actionPaginate(payload: PaginationPayload, actionMeta?: ActionMeta): PaginateAction;
46
46
  export declare function actionChangeTemplate(payload: (typeof REPEATING_STRUCTURE_TEMPLATES)[keyof typeof REPEATING_STRUCTURE_TEMPLATES]): {
47
47
  type: "changeTemplate";
48
- payload: "Table" | "Gallery" | "Timeline" | "Map";
48
+ payload: "Table" | "Gallery" | "Timeline" | "Map" | "Kanban";
49
+ };
50
+ export declare function actionOpenMasterDetail(payload: OpenMasterDetailPayload): {
51
+ type: "openMasterDetail";
52
+ payload: OpenMasterDetailPayload;
53
+ };
54
+ export declare function actionCloseMasterDetail(): {
55
+ type: "closeMasterDetail";
49
56
  };
50
57
  export declare function actionRowHeightChange(payload: (typeof ROW_DENSITY)[keyof typeof ROW_DENSITY]): {
51
58
  type: "rowHeightChange";
@@ -156,7 +163,7 @@ export declare function actionVisibleColumnUpdate(payload: string[]): {
156
163
  payload: string[];
157
164
  };
158
165
  /**
159
- * Returns a dispatch function that dispatches {@link query} value with all the text type fields.
166
+ * Returns a dispatch function that dispatches {@link query} value with all the text and URL type fields.
160
167
  * @param query search string
161
168
  */
162
169
  export declare function actionSearchGlobal(query: string): SearchGlobalActionAsFunction;
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/core/actions/actions.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,6BAA6B,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAMrF,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,KAAK,IAAI,MAAM,6BAA6B,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGvE,OAAO,KAAK,EACV,UAAU,EACV,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,4BAA4B,EAC5B,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,2BAA2B,EAC3B,cAAc,EACd,iBAAiB,EACjB,4BAA4B,EAC5B,8BAA8B,EAC9B,yBAAyB,EACzB,qBAAqB,EACrB,4BAA4B,EAC5B,wBAAwB,EACxB,4BAA4B,EAC5B,+BAA+B,EAChC,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,YAAY,GAAG,YAAY,EAAE;;;;;EAajF;AAED,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,M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AC,OAAO,EAAE,wBAAwB;;;EAKlE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,yBAAyB;;;EAKrE;AAED,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,OAAO;;;EAK7D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,UAAO,EACpB,mBAAmB,GAAE,KAAK,CAAC,qBAAqB,CAAM;;;;;;;;;;EASvD;AAED,wBAAgB,kBAAkB,CAChC,UAAU,GAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAO,EAC3C,eAAe,GAAE,MAAM,EAAO;;;;;;EA4B/B;AAED,wBAAgB,sBAAsB;;;EAKrC;AAED,wBAAgB,0BAA0B;;;EAKzC;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,YAAY,CAAC;;;EAK1D;AAED,wBAAgB,oCAAoC,CAAC,OAAO,EAAE;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB;;;oBAFa,MAAM;eACX,OAAO;;EAMf;AAGD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;;;;;EAK5E;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE;IAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,OAAO,CAAA;CAAE;;;;;EAKlF;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,sBAAsB,EAAE;;;EAK3E"}
@@ -2,7 +2,7 @@
2
2
  import { REPEATING_STRUCTURE_TEMPLATES } from '../../../types/Meta.types';
3
3
  import { SUPPORTED_AVOIDABLE_FEATURES, SUPPORTED_FLUSH_KEYS } from '../constants';
4
4
  import { autoSizeOfColumn, autoSizeOfColumns } from '../features/uIFeatures/afterRender/columnSizing/autoSize';
5
- import { getVisibileFields } from '../utils/util';
5
+ import { getVisibleFields } from '../utils/util';
6
6
  import ActionTypes from './actionConstants';
7
7
  export function actionNotificationAdd(notifications) {
8
8
  const msgs = Array.isArray(notifications) ? notifications : [notifications];
@@ -75,6 +75,17 @@ export function actionChangeTemplate(payload) {
75
75
  payload
76
76
  };
77
77
  }
78
+ export function actionOpenMasterDetail(payload) {
79
+ return {
80
+ type: ActionTypes.OPEN_MASTER_DETAIL,
81
+ payload
82
+ };
83
+ }
84
+ export function actionCloseMasterDetail() {
85
+ return {
86
+ type: ActionTypes.CLOSE_MASTER_DETAIL
87
+ };
88
+ }
78
89
  export function actionRowHeightChange(payload) {
79
90
  return {
80
91
  type: ActionTypes.ROW_HEIGHT_CHANGE,
@@ -215,21 +226,24 @@ export function actionVisibleColumnUpdate(payload) {
215
226
  };
216
227
  }
217
228
  /**
218
- * Returns a dispatch function that dispatches {@link query} value with all the text type fields.
229
+ * Returns a dispatch function that dispatches {@link query} value with all the text and URL type fields.
219
230
  * @param query search string
220
231
  */
221
232
  export function actionSearchGlobal(query) {
222
- return (dispatch, getState, meta) => {
233
+ return (dispatch, getState, meta, getRsStore) => {
223
234
  const state = getState();
224
- const { customFields } = state;
225
- let { hiddenColumns } = state;
226
- if (meta.template === REPEATING_STRUCTURE_TEMPLATES.TIMELINE && meta.timelineFields) {
227
- const { title, date, status } = meta.timelineFields;
228
- const timelineCustomColumns = [title?.label, date?.label, status?.label];
229
- hiddenColumns = hiddenColumns?.filter(el => !timelineCustomColumns.includes(el));
230
- }
231
- const visibleFields = getVisibileFields(meta.fieldDefs, hiddenColumns, customFields);
232
- const fields = visibleFields.filter(({ searchable }) => searchable).map(({ name }) => name); // Searchable fields
235
+ const { customFields, visibleColumns } = state;
236
+ const visibleFields = getVisibleFields(meta, visibleColumns, customFields);
237
+ const fields = visibleFields.flatMap(field => {
238
+ if (!field.searchable) {
239
+ return [];
240
+ }
241
+ const referencedField = field.searchProperty
242
+ ? getRsStore().getFieldDefById(field.searchProperty.field)
243
+ : undefined;
244
+ const searchField = referencedField ?? field;
245
+ return searchField.searchable ? [searchField.name] : [];
246
+ });
233
247
  dispatch({
234
248
  type: ActionTypes.SEARCH,
235
249
  payload: { query, fields }