@k-int/stripes-kint-components 5.33.1 → 5.34.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 (295) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +2 -3
  3. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +4 -3
  4. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +2 -3
  5. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +2 -3
  6. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +15 -5
  7. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +2 -3
  8. package/es/lib/hooks/index.js +17 -1
  9. package/es/lib/hooks/useCustProps.js +88 -0
  10. package/es/lib/hooks/useParallelBatchFetch.js +140 -0
  11. package/package.json +1 -1
  12. package/src/artifacts/coverage-jest/ActionList/ActionList.js.html +1 -1
  13. package/src/artifacts/coverage-jest/ActionList/ActionListFieldArray.js.html +1 -1
  14. package/src/artifacts/coverage-jest/ActionList/index.html +1 -1
  15. package/src/artifacts/coverage-jest/ActionList/index.js.html +1 -1
  16. package/src/artifacts/coverage-jest/ButtonTypedown/ButtonTypedown.js.html +1 -1
  17. package/src/artifacts/coverage-jest/ButtonTypedown/index.html +1 -1
  18. package/src/artifacts/coverage-jest/ButtonTypedown/index.js.html +1 -1
  19. package/src/artifacts/coverage-jest/ComboButton/ComboButton.js.html +1 -1
  20. package/src/artifacts/coverage-jest/ComboButton/index.html +1 -1
  21. package/src/artifacts/coverage-jest/ComboButton/index.js.html +1 -1
  22. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesLookup.js.html +26 -29
  23. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesSettings.js.html +8 -5
  24. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
  25. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyView.js.html +1 -1
  26. package/src/artifacts/coverage-jest/CustomProperties/Config/index.html +20 -20
  27. package/src/artifacts/coverage-jest/CustomProperties/Config/index.js.html +1 -1
  28. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
  29. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +23 -26
  30. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
  31. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyField.js.html +1 -1
  32. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
  33. package/src/artifacts/coverage-jest/CustomProperties/Edit/index.html +20 -20
  34. package/src/artifacts/coverage-jest/CustomProperties/Edit/index.js.html +1 -1
  35. package/src/artifacts/coverage-jest/CustomProperties/Edit/testResources.js.html +1 -1
  36. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilter.js.html +27 -30
  37. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
  38. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
  39. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
  40. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
  41. package/src/artifacts/coverage-jest/CustomProperties/Filter/index.html +15 -15
  42. package/src/artifacts/coverage-jest/CustomProperties/Filter/index.js.html +1 -1
  43. package/src/artifacts/coverage-jest/CustomProperties/Filter/testResources.js.html +1 -1
  44. package/src/artifacts/coverage-jest/CustomProperties/Filter/useOperators.js.html +12 -12
  45. package/src/artifacts/coverage-jest/CustomProperties/Filter/useParseActiveFilterStrings.js.html +14 -14
  46. package/src/artifacts/coverage-jest/CustomProperties/Filter/useValueProps.js.html +1 -1
  47. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesView.js.html +1 -1
  48. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesViewCtx.js.html +36 -39
  49. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertyCard.js.html +1 -1
  50. package/src/artifacts/coverage-jest/CustomProperties/View/index.html +21 -21
  51. package/src/artifacts/coverage-jest/CustomProperties/View/index.js.html +1 -1
  52. package/src/artifacts/coverage-jest/CustomProperties/View/testResources.js.html +1 -1
  53. package/src/artifacts/coverage-jest/CustomProperties/index.html +1 -1
  54. package/src/artifacts/coverage-jest/CustomProperties/index.js.html +1 -1
  55. package/src/artifacts/coverage-jest/CycleButton/CycleButton.js.html +1 -1
  56. package/src/artifacts/coverage-jest/CycleButton/index.html +1 -1
  57. package/src/artifacts/coverage-jest/CycleButton/index.js.html +1 -1
  58. package/src/artifacts/coverage-jest/FieldLabel/FieldLabel.js.html +1 -1
  59. package/src/artifacts/coverage-jest/FieldLabel/index.html +1 -1
  60. package/src/artifacts/coverage-jest/FieldLabel/index.js.html +1 -1
  61. package/src/artifacts/coverage-jest/FormModal/FormModal.js.html +1 -1
  62. package/src/artifacts/coverage-jest/FormModal/index.html +1 -1
  63. package/src/artifacts/coverage-jest/FormModal/index.js.html +1 -1
  64. package/src/artifacts/coverage-jest/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
  65. package/src/artifacts/coverage-jest/FormattedKintMessage/index.html +1 -1
  66. package/src/artifacts/coverage-jest/FormattedKintMessage/index.js.html +1 -1
  67. package/src/artifacts/coverage-jest/IconSelect/IconSelect.js.html +1 -1
  68. package/src/artifacts/coverage-jest/IconSelect/index.html +1 -1
  69. package/src/artifacts/coverage-jest/IconSelect/index.js.html +1 -1
  70. package/src/artifacts/coverage-jest/NoResultsMessage/NoResultsMessage.js.html +1 -1
  71. package/src/artifacts/coverage-jest/NoResultsMessage/index.html +1 -1
  72. package/src/artifacts/coverage-jest/NoResultsMessage/index.js.html +1 -1
  73. package/src/artifacts/coverage-jest/NumberField/NumberField.js.html +15 -15
  74. package/src/artifacts/coverage-jest/NumberField/index.html +1 -1
  75. package/src/artifacts/coverage-jest/NumberField/index.js.html +1 -1
  76. package/src/artifacts/coverage-jest/QueryTypedown/QueryTypedown.js.html +1 -1
  77. package/src/artifacts/coverage-jest/QueryTypedown/index.html +1 -1
  78. package/src/artifacts/coverage-jest/QueryTypedown/index.js.html +1 -1
  79. package/src/artifacts/coverage-jest/RefdataButtons/RefdataButtons.js.html +1 -1
  80. package/src/artifacts/coverage-jest/RefdataButtons/index.html +1 -1
  81. package/src/artifacts/coverage-jest/RefdataButtons/index.js.html +1 -1
  82. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +1 -1
  83. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.html +1 -1
  84. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.js.html +1 -1
  85. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +1 -1
  86. package/src/artifacts/coverage-jest/RichSelect/RichSelect.js.html +1 -1
  87. package/src/artifacts/coverage-jest/RichSelect/index.html +1 -1
  88. package/src/artifacts/coverage-jest/RichSelect/index.js.html +1 -1
  89. package/src/artifacts/coverage-jest/RichSelect/useSelectedOption.js.html +1 -1
  90. package/src/artifacts/coverage-jest/SASQLookupComponent/SASQLookupComponent.js.html +31 -31
  91. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
  92. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.html +1 -1
  93. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.js.html +1 -1
  94. package/src/artifacts/coverage-jest/SASQLookupComponent/index.html +1 -1
  95. package/src/artifacts/coverage-jest/SASQLookupComponent/index.js.html +1 -1
  96. package/src/artifacts/coverage-jest/SASQRoute/SASQRoute.js.html +1 -1
  97. package/src/artifacts/coverage-jest/SASQRoute/index.html +1 -1
  98. package/src/artifacts/coverage-jest/SASQRoute/index.js.html +1 -1
  99. package/src/artifacts/coverage-jest/SASQViewComponent/SASQViewComponent.js.html +1 -1
  100. package/src/artifacts/coverage-jest/SASQViewComponent/index.html +1 -1
  101. package/src/artifacts/coverage-jest/SASQViewComponent/index.js.html +1 -1
  102. package/src/artifacts/coverage-jest/SearchField/SearchField.js.html +1 -1
  103. package/src/artifacts/coverage-jest/SearchField/index.html +1 -1
  104. package/src/artifacts/coverage-jest/SearchField/index.js.html +1 -1
  105. package/src/artifacts/coverage-jest/SearchKeyControl/SearchKeyControl.js.html +1 -1
  106. package/src/artifacts/coverage-jest/SearchKeyControl/index.html +1 -1
  107. package/src/artifacts/coverage-jest/SearchKeyControl/index.js.html +1 -1
  108. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
  109. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.html +1 -1
  110. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.js.html +1 -1
  111. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/EditableRefdataList.js.html +1 -1
  112. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.html +1 -1
  113. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.js.html +1 -1
  114. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsList.js.html +1 -1
  115. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js.html +1 -1
  116. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.html +1 -1
  117. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.js.html +1 -1
  118. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/EditSettingValue.js.html +1 -1
  119. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.html +1 -1
  120. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.js.html +1 -1
  121. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/RenderSettingValue.js.html +1 -1
  122. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.html +1 -1
  123. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.js.html +1 -1
  124. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/SettingField.js.html +1 -1
  125. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.html +1 -1
  126. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.js.html +1 -1
  127. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.html +1 -1
  128. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.js.html +1 -1
  129. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/RefdataCategoriesSettings.js.html +1 -1
  130. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.html +1 -1
  131. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.js.html +1 -1
  132. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPage.js.html +1 -1
  133. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/SettingPagePane.js.html +1 -1
  134. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.html +1 -1
  135. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.js.html +1 -1
  136. package/src/artifacts/coverage-jest/Settings/SettingPage/index.html +1 -1
  137. package/src/artifacts/coverage-jest/Settings/SettingPage/index.js.html +1 -1
  138. package/src/artifacts/coverage-jest/Settings/Settings/Settings.js.html +1 -1
  139. package/src/artifacts/coverage-jest/Settings/Settings/index.html +1 -1
  140. package/src/artifacts/coverage-jest/Settings/Settings/index.js.html +1 -1
  141. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/SettingsFormContainer.js.html +1 -1
  142. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.html +1 -1
  143. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.js.html +1 -1
  144. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsField.js.html +1 -1
  145. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/StaticSettingsFieldComponent.js.html +1 -1
  146. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.html +1 -1
  147. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.js.html +1 -1
  148. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.html +1 -1
  149. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.js.html +1 -1
  150. package/src/artifacts/coverage-jest/Settings/constants/index.html +1 -1
  151. package/src/artifacts/coverage-jest/Settings/constants/index.js.html +1 -1
  152. package/src/artifacts/coverage-jest/Settings/constants/queryKeys.js.html +1 -1
  153. package/src/artifacts/coverage-jest/Settings/contexts/SettingsContext.js.html +1 -1
  154. package/src/artifacts/coverage-jest/Settings/contexts/index.html +1 -1
  155. package/src/artifacts/coverage-jest/Settings/contexts/index.js.html +1 -1
  156. package/src/artifacts/coverage-jest/Settings/hooks/index.html +1 -1
  157. package/src/artifacts/coverage-jest/Settings/hooks/index.js.html +1 -1
  158. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.html +1 -1
  159. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.js.html +1 -1
  160. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.html +1 -1
  161. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.js.html +1 -1
  162. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/useSettingCallout.js.html +1 -1
  163. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.html +1 -1
  164. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.js.html +1 -1
  165. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/useSettingsSectionInitalValues.js.html +1 -1
  166. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useStaticSettingsSection.js.html +1 -1
  167. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.html +1 -1
  168. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.js.html +1 -1
  169. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/useAppSettings.js.html +1 -1
  170. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.html +1 -1
  171. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.js.html +1 -1
  172. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/useSettingSection.js.html +1 -1
  173. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.html +1 -1
  174. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.js.html +1 -1
  175. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/useSettings.js.html +1 -1
  176. package/src/artifacts/coverage-jest/Settings/index.html +1 -1
  177. package/src/artifacts/coverage-jest/Settings/index.js.html +1 -1
  178. package/src/artifacts/coverage-jest/Tags/Tags.js.html +1 -1
  179. package/src/artifacts/coverage-jest/Tags/hooks/index.html +1 -1
  180. package/src/artifacts/coverage-jest/Tags/hooks/index.js.html +1 -1
  181. package/src/artifacts/coverage-jest/Tags/hooks/useTags.js.html +1 -1
  182. package/src/artifacts/coverage-jest/Tags/hooks/useTagsEnabled.js.html +1 -1
  183. package/src/artifacts/coverage-jest/Tags/index.html +1 -1
  184. package/src/artifacts/coverage-jest/Tags/index.js.html +1 -1
  185. package/src/artifacts/coverage-jest/Tags/tagsConfig.js.html +1 -1
  186. package/src/artifacts/coverage-jest/Typedown/Typedown.js.html +1 -1
  187. package/src/artifacts/coverage-jest/Typedown/index.html +1 -1
  188. package/src/artifacts/coverage-jest/Typedown/index.js.html +1 -1
  189. package/src/artifacts/coverage-jest/cobertura-coverage.xml +564 -394
  190. package/src/artifacts/coverage-jest/constants/comparators.js.html +1 -1
  191. package/src/artifacts/coverage-jest/constants/customProperties.js.html +1 -1
  192. package/src/artifacts/coverage-jest/constants/endpoints.js.html +1 -1
  193. package/src/artifacts/coverage-jest/constants/eventCodes.js.html +1 -1
  194. package/src/artifacts/coverage-jest/constants/index.html +1 -1
  195. package/src/artifacts/coverage-jest/constants/pagination.js.html +1 -1
  196. package/src/artifacts/coverage-jest/hooks/index.html +39 -9
  197. package/src/artifacts/coverage-jest/hooks/index.js.html +11 -2
  198. package/src/artifacts/coverage-jest/hooks/intlHooks/index.html +1 -1
  199. package/src/artifacts/coverage-jest/hooks/intlHooks/index.js.html +1 -1
  200. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.html +1 -1
  201. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.js.html +1 -1
  202. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/useIntlKey.js.html +7 -7
  203. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.html +1 -1
  204. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.js.html +1 -1
  205. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js.html +6 -6
  206. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.html +1 -1
  207. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.js.html +1 -1
  208. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/useKintIntl.js.html +11 -11
  209. package/src/artifacts/coverage-jest/hooks/typedownHooks/index.html +1 -1
  210. package/src/artifacts/coverage-jest/hooks/typedownHooks/index.js.html +1 -1
  211. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedown.js.html +1 -1
  212. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownData.js.html +1 -1
  213. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  214. package/src/artifacts/coverage-jest/hooks/useActionListRef.js.html +1 -1
  215. package/src/artifacts/coverage-jest/hooks/useActiveElement.js.html +1 -1
  216. package/src/artifacts/coverage-jest/hooks/useCustProps.js.html +376 -0
  217. package/src/artifacts/coverage-jest/hooks/useCustomProperties.js.html +1 -1
  218. package/src/artifacts/coverage-jest/hooks/useHelperApp.js.html +1 -1
  219. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.html +1 -1
  220. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.js.html +1 -1
  221. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/useInvalidateRefdata.js.html +1 -1
  222. package/src/artifacts/coverage-jest/hooks/useKiwtFieldArray.js.html +1 -1
  223. package/src/artifacts/coverage-jest/hooks/useKiwtSASQuery.js.html +9 -9
  224. package/src/artifacts/coverage-jest/hooks/useLocalPageStore.js.html +1 -1
  225. package/src/artifacts/coverage-jest/hooks/useLocalStorageState.js.html +5 -5
  226. package/src/artifacts/coverage-jest/hooks/useModConfigEntries.js.html +1 -1
  227. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.html +1 -1
  228. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.js.html +1 -1
  229. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/useMutateCustomProperties.js.html +1 -1
  230. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.html +1 -1
  231. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.js.html +1 -1
  232. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/useMutateGeneric.js.html +1 -1
  233. package/src/artifacts/coverage-jest/hooks/useMutateModConfigEntry.js.html +1 -1
  234. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.html +1 -1
  235. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.js.html +1 -1
  236. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/useMutateRefdataCategory.js.html +1 -1
  237. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.html +1 -1
  238. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.js.html +1 -1
  239. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/useMutateRefdataValue.js.html +1 -1
  240. package/src/artifacts/coverage-jest/hooks/useParallelBatchFetch.js.html +589 -0
  241. package/src/artifacts/coverage-jest/hooks/usePrevNextPagination.js.html +20 -20
  242. package/src/artifacts/coverage-jest/hooks/useQIndex.js.html +8 -8
  243. package/src/artifacts/coverage-jest/hooks/useRefdata.js.html +1 -1
  244. package/src/artifacts/coverage-jest/hooks/useSASQQueryMeta.js.html +1 -1
  245. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.html +1 -1
  246. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.js.html +1 -1
  247. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/useStandaloneSASQQueryParameter.js.html +1 -1
  248. package/src/artifacts/coverage-jest/hooks/useTemplates.js.html +1 -1
  249. package/src/artifacts/coverage-jest/index.html +70 -70
  250. package/src/artifacts/coverage-jest/utils/buildUrl.js.html +1 -1
  251. package/src/artifacts/coverage-jest/utils/filterParsers/deparseKiwtQueryFilters.js.html +1 -1
  252. package/src/artifacts/coverage-jest/utils/filterParsers/index.html +1 -1
  253. package/src/artifacts/coverage-jest/utils/filterParsers/index.js.html +1 -1
  254. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryFilters.js.html +1 -1
  255. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryGroups.js.html +1 -1
  256. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryString.js.html +1 -1
  257. package/src/artifacts/coverage-jest/utils/generateKiwtQuery.js.html +1 -1
  258. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/generateKiwtQueryParams.js.html +71 -71
  259. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.html +19 -19
  260. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.js.html +1 -1
  261. package/src/artifacts/coverage-jest/utils/groupCustomPropertiesByCtx.js.html +1 -1
  262. package/src/artifacts/coverage-jest/utils/index.html +1 -1
  263. package/src/artifacts/coverage-jest/utils/index.js.html +1 -1
  264. package/src/artifacts/coverage-jest/utils/matchString/index.html +1 -1
  265. package/src/artifacts/coverage-jest/utils/matchString/index.js.html +1 -1
  266. package/src/artifacts/coverage-jest/utils/matchString/matchString.js.html +1 -1
  267. package/src/artifacts/coverage-jest/utils/modConfigEntriesQueryKey.js.html +1 -1
  268. package/src/artifacts/coverage-jest/utils/parseErrorResponse.js.html +1 -1
  269. package/src/artifacts/coverage-jest/utils/parseModConfigEntry.js.html +1 -1
  270. package/src/artifacts/coverage-jest/utils/refdataOptions.js.html +1 -1
  271. package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.html +1 -1
  272. package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.js.html +1 -1
  273. package/src/artifacts/coverage-jest/utils/refdataQueryKey/refdataQueryKey.js.html +1 -1
  274. package/src/artifacts/coverage-jest/utils/selectorSafe.js.html +1 -1
  275. package/src/artifacts/coverage-jest/utils/sortByLabel.js.html +1 -1
  276. package/src/artifacts/coverage-jest/utils/stringStyling/boldString.js.html +1 -1
  277. package/src/artifacts/coverage-jest/utils/stringStyling/highlightString.js.html +1 -1
  278. package/src/artifacts/coverage-jest/utils/stringStyling/index.html +1 -1
  279. package/src/artifacts/coverage-jest/utils/stringStyling/index.js.html +1 -1
  280. package/src/artifacts/coverage-jest/utils/toCamelCase.js.html +1 -1
  281. package/src/artifacts/coverage-jest/utils/typedownQueryKey.js.html +1 -1
  282. package/src/artifacts/coverage-jest/validators/index.html +1 -1
  283. package/src/artifacts/coverage-jest/validators/index.js.html +1 -1
  284. package/src/artifacts/coverage-jest/validators/validators.js.html +1 -1
  285. package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +2 -3
  286. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +4 -3
  287. package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +2 -3
  288. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +3 -4
  289. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +13 -3
  290. package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.js +2 -3
  291. package/src/lib/hooks/README.md +101 -1
  292. package/src/lib/hooks/index.js +3 -0
  293. package/src/lib/hooks/useCustProps.js +97 -0
  294. package/src/lib/hooks/useParallelBatchFetch.js +168 -0
  295. package/styles/TypeDown.css +2 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [5.34.0](https://gitlab.com/knowledge-integration/folio/stripes-kint-components/compare/v5.33.2...v5.34.0) (2026-03-18)
2
+
3
+
4
+ ### Features
5
+
6
+ * **useCustProps:** Implement a 'parallel batched fetch' approach for retrieving custom properties in Agreements and Licenses -- ERM-3953 ([e68465a](https://gitlab.com/knowledge-integration/folio/stripes-kint-components/commit/e68465a22dd85becc971857200ce645ca388e03c))
7
+
8
+ ## [5.33.2](https://gitlab.com/knowledge-integration/folio/stripes-kint-components/compare/v5.33.1...v5.33.2) (2026-03-12)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **Typedown:** Fix minor issue where Typedown shrinks with 1 or 0 results ([bcbbd7b](https://gitlab.com/knowledge-integration/folio/stripes-kint-components/commit/bcbbd7bf9447e7742423918cc98b2906f2e395a7))
14
+
1
15
  ## [5.33.1](https://gitlab.com/knowledge-integration/folio/stripes-kint-components/compare/v5.33.0...v5.33.1) (2026-03-09)
2
16
 
3
17
 
@@ -30,13 +30,12 @@ const CustomPropertiesLookup = _ref => {
30
30
  });
31
31
  const [selectedContext, setSelectedContext] = (0, _react.useState)();
32
32
  const {
33
- data: custprops,
33
+ custprops,
34
34
  isLoading
35
- } = (0, _hooks.useCustomProperties)({
35
+ } = (0, _hooks.useCustProps)({
36
36
  endpoint,
37
37
  nsValues,
38
38
  queryParams,
39
- returnQueryObject: true,
40
39
  ctx: selectedContext,
41
40
  options: {
42
41
  sort: [{
@@ -15,6 +15,7 @@ var _CustomPropertiesLookup = _interopRequireDefault(require("./CustomProperties
15
15
  var _CustomPropertyView = _interopRequireDefault(require("./CustomPropertyView"));
16
16
  var _CustomPropertyForm = _interopRequireDefault(require("./CustomPropertyForm"));
17
17
  var _hooks = require("../../hooks");
18
+ var _useCustProps = require("../../hooks/useCustProps");
18
19
  var _utils = require("../../utils");
19
20
  var _jsxRuntime = require("react/jsx-runtime");
20
21
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -83,7 +84,7 @@ const CustomPropertiesSettings = _ref => {
83
84
  afterQueryCalls: {
84
85
  put: res => {
85
86
  setMode(VIEWING);
86
- queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
87
+ queryClient.invalidateQueries(_useCustProps.CUSTPROPS_QUERY_KEY_BASE);
87
88
  setCustomProperty(res);
88
89
  if (afterQueryCalls?.put) {
89
90
  afterQueryCalls.put(res);
@@ -91,7 +92,7 @@ const CustomPropertiesSettings = _ref => {
91
92
  },
92
93
  post: res => {
93
94
  setMode(VIEWING);
94
- queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
95
+ queryClient.invalidateQueries(_useCustProps.CUSTPROPS_QUERY_KEY_BASE);
95
96
  setCustomProperty(res);
96
97
  if (afterQueryCalls?.post) {
97
98
  afterQueryCalls.post(res);
@@ -99,7 +100,7 @@ const CustomPropertiesSettings = _ref => {
99
100
  },
100
101
  delete: res => {
101
102
  setMode(VIEWING);
102
- queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
103
+ queryClient.invalidateQueries(_useCustProps.CUSTPROPS_QUERY_KEY_BASE);
103
104
  setCustomProperty();
104
105
  if (afterQueryCalls?.delete) {
105
106
  afterQueryCalls.delete(res);
@@ -48,12 +48,11 @@ const CustomPropertiesEditCtx = _ref => {
48
48
  });
49
49
  };
50
50
  const {
51
- data: custprops,
51
+ custprops,
52
52
  isLoading
53
- } = (0, _hooks.useCustomProperties)({
53
+ } = (0, _hooks.useCustProps)({
54
54
  ctx,
55
55
  endpoint: customPropertiesEndpoint,
56
- returnQueryObject: true,
57
56
  options: {
58
57
  filters: [{
59
58
  path: 'retired',
@@ -30,11 +30,10 @@ const CustomPropertiesFilter = _ref => {
30
30
  const closeEditModal = () => setEditingFilters(false);
31
31
  const kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
32
32
  const {
33
- data: custprops,
33
+ custprops,
34
34
  isLoading
35
- } = (0, _hooks.useCustomProperties)({
35
+ } = (0, _hooks.useCustProps)({
36
36
  endpoint: customPropertiesEndpoint,
37
- returnQueryObject: true,
38
37
  options: {
39
38
  sort: [{
40
39
  path: 'ctx'
@@ -2,6 +2,7 @@
2
2
 
3
3
  var _react = _interopRequireDefault(require("react"));
4
4
  var _reactRouterDom = require("react-router-dom");
5
+ var _react2 = require("@folio/jest-config-stripes/testing-library/react");
5
6
  var _stripesErmTesting = require("@folio/stripes-erm-testing");
6
7
  var _testResources = require("./testResources");
7
8
  var _CustomPropertiesFilter = _interopRequireDefault(require("./CustomPropertiesFilter"));
@@ -37,10 +38,19 @@ describe('CustomPropertiesFilter', () => {
37
38
  id: 'accordion-toggle-button-clickable-custprop-filter'
38
39
  }).exists();
39
40
  });
40
- it('renders CustomPropertiesFilterForm component ', () => {
41
- const {
42
- getByText
43
- } = renderComponent;
44
- expect(getByText('CustomPropertiesFilterForm')).toBeInTheDocument();
41
+ describe.each('Opening the Custom properties accordion', () => {
42
+ beforeEach(async () => {
43
+ await (0, _react2.waitFor)(async () => {
44
+ await (0, _stripesErmTesting.Accordion)({
45
+ id: 'clickable-custprop-filter'
46
+ }).click();
47
+ });
48
+ });
49
+ it('renders CustomPropertiesFilterForm component ', () => {
50
+ const {
51
+ getByText
52
+ } = renderComponent;
53
+ expect(getByText('CustomPropertiesFilterForm')).toBeInTheDocument();
54
+ });
45
55
  });
46
56
  });
@@ -48,12 +48,11 @@ const CustomPropertiesViewCtx = _ref => {
48
48
  });
49
49
  };
50
50
  const {
51
- data: custprops,
51
+ custprops,
52
52
  isLoading
53
- } = (0, _hooks.useCustomProperties)({
53
+ } = (0, _hooks.useCustProps)({
54
54
  ctx,
55
55
  endpoint: customPropertiesEndpoint,
56
- returnQueryObject: true,
57
56
  options: {
58
57
  sort: [{
59
58
  path: 'retired'
@@ -13,6 +13,7 @@ var _exportNames = {
13
13
  useQIndex: true,
14
14
  useKiwtFieldArray: true,
15
15
  useCustomProperties: true,
16
+ useCustProps: true,
16
17
  useInvalidateRefdata: true,
17
18
  useSASQQueryMeta: true,
18
19
  useModConfigEntries: true,
@@ -23,7 +24,8 @@ var _exportNames = {
23
24
  useMutateCustomProperties: true,
24
25
  useMutateModConfigEntry: true,
25
26
  usePrevNextPagination: true,
26
- useStandaloneSASQQueryParameter: true
27
+ useStandaloneSASQQueryParameter: true,
28
+ useParallelBatchFetch: true
27
29
  };
28
30
  Object.defineProperty(exports, "useActionListRef", {
29
31
  enumerable: true,
@@ -37,6 +39,12 @@ Object.defineProperty(exports, "useActiveElement", {
37
39
  return _useActiveElement.default;
38
40
  }
39
41
  });
42
+ Object.defineProperty(exports, "useCustProps", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _useCustProps.default;
46
+ }
47
+ });
40
48
  Object.defineProperty(exports, "useCustomProperties", {
41
49
  enumerable: true,
42
50
  get: function () {
@@ -109,6 +117,12 @@ Object.defineProperty(exports, "useMutateRefdataValue", {
109
117
  return _useMutateRefdataValue.default;
110
118
  }
111
119
  });
120
+ Object.defineProperty(exports, "useParallelBatchFetch", {
121
+ enumerable: true,
122
+ get: function () {
123
+ return _useParallelBatchFetch.default;
124
+ }
125
+ });
112
126
  Object.defineProperty(exports, "usePrevNextPagination", {
113
127
  enumerable: true,
114
128
  get: function () {
@@ -154,6 +168,7 @@ var _useLocalStorageState = _interopRequireDefault(require("./useLocalStorageSta
154
168
  var _useQIndex = _interopRequireDefault(require("./useQIndex"));
155
169
  var _useKiwtFieldArray = _interopRequireDefault(require("./useKiwtFieldArray"));
156
170
  var _useCustomProperties = _interopRequireDefault(require("./useCustomProperties"));
171
+ var _useCustProps = _interopRequireDefault(require("./useCustProps"));
157
172
  var _useInvalidateRefdata = _interopRequireDefault(require("./useInvalidateRefdata"));
158
173
  var _useSASQQueryMeta = _interopRequireDefault(require("./useSASQQueryMeta"));
159
174
  var _useModConfigEntries = _interopRequireDefault(require("./useModConfigEntries"));
@@ -165,6 +180,7 @@ var _useMutateCustomProperties = _interopRequireDefault(require("./useMutateCust
165
180
  var _useMutateModConfigEntry = _interopRequireDefault(require("./useMutateModConfigEntry"));
166
181
  var _usePrevNextPagination = _interopRequireDefault(require("./usePrevNextPagination"));
167
182
  var _useStandaloneSASQQueryParameter = _interopRequireDefault(require("./useStandaloneSASQQueryParameter"));
183
+ var _useParallelBatchFetch = _interopRequireDefault(require("./useParallelBatchFetch"));
168
184
  var _intlHooks = require("./intlHooks");
169
185
  Object.keys(_intlHooks).forEach(function (key) {
170
186
  if (key === "default" || key === "__esModule") return;
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.CUSTPROPS_QUERY_KEY_BASE = void 0;
7
+ var _propTypes = _interopRequireDefault(require("prop-types"));
8
+ var _useParallelBatchFetch = _interopRequireDefault(require("./useParallelBatchFetch"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const CUSTPROPS_QUERY_KEY_BASE = exports.CUSTPROPS_QUERY_KEY_BASE = ['stripes-kint-components', 'useCustProps', 'custprops'];
11
+ const useCustProps = _ref => {
12
+ let {
13
+ endpoint,
14
+ ctx,
15
+ nsValues = {
16
+ sort: 'id'
17
+ },
18
+ options = {},
19
+ queryParams = {},
20
+ batchLimit = Infinity,
21
+ batchSize = 100,
22
+ concurrentRequests = 5
23
+ } = _ref;
24
+ const custPropOptions = {
25
+ searchKey: 'label,name,description',
26
+ filterKeys: {
27
+ ContextKey: 'ctx'
28
+ },
29
+ sort: [{
30
+ path: 'weight'
31
+ }, {
32
+ path: 'label'
33
+ }],
34
+ filters: [],
35
+ ...options
36
+ };
37
+ if (Array.isArray(ctx)) {
38
+ custPropOptions.filters.push({
39
+ values: ctx.map(c => c === 'isNull' ? 'ctx isNull' : `ctx==${c}`)
40
+ });
41
+ } else if (ctx === 'isNull') {
42
+ custPropOptions.filters.push({
43
+ value: 'ctx isNull'
44
+ });
45
+ } else if (ctx) {
46
+ custPropOptions.filters.push({
47
+ path: 'ctx',
48
+ value: ctx
49
+ });
50
+ }
51
+ const {
52
+ items: custprops = [],
53
+ isLoading = true,
54
+ total = 0
55
+ } = (0, _useParallelBatchFetch.default)({
56
+ endpoint,
57
+ BATCH_LIMIT: batchLimit,
58
+ BATCH_SIZE: batchSize,
59
+ CONCURRENT_REQUESTS: concurrentRequests,
60
+ batchParams: custPropOptions,
61
+ nsValues,
62
+ generateQueryKey: _ref2 => {
63
+ let {
64
+ endpoint: queryEndpoint,
65
+ offset,
66
+ paramsArray
67
+ } = _ref2;
68
+ return [...CUSTPROPS_QUERY_KEY_BASE, ctx, queryEndpoint, offset, paramsArray];
69
+ },
70
+ queryOptions: queryParams
71
+ });
72
+ return {
73
+ custprops,
74
+ isLoading,
75
+ total
76
+ };
77
+ };
78
+ useCustProps.propTypes = {
79
+ endpoint: _propTypes.default.string,
80
+ ctx: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
81
+ nsValues: _propTypes.default.object,
82
+ options: _propTypes.default.object,
83
+ queryParams: _propTypes.default.object,
84
+ batchLimit: _propTypes.default.number,
85
+ batchSize: _propTypes.default.number,
86
+ concurrentRequests: _propTypes.default.number
87
+ };
88
+ var _default = exports.default = useCustProps;
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = require("react");
8
+ var _reactQuery = require("react-query");
9
+ var _lodash = require("lodash");
10
+ var _core = require("@folio/stripes/core");
11
+ var _utils = require("../utils");
12
+ // A hook to do the same thing as batch fetching > 100 resources, but parallelising it.
13
+
14
+ // Only defining defaults to ward of "magic number" sonarlint rule -.-
15
+ const CONCURRENT_REQUESTS_DEFAULT = 5;
16
+ const MAX_BATCH_SIZE = 100;
17
+ const DEFAULT_BATCH_LIMIT = Infinity;
18
+
19
+ // CONCURRENT_REQUESTS and BATCH_SIZE can be tweaked here, but implementor beware
20
+ // They are formatted as if constants to discourage this
21
+ const useParallelBatchFetch = _ref => {
22
+ let {
23
+ BATCH_LIMIT = DEFAULT_BATCH_LIMIT,
24
+ // Number of resources to stop at, Infinity by default but can be set to a limit
25
+ batchParams = {},
26
+ // Params object of the shape accepted by generateKiwtQueryParams
27
+ nsValues = {},
28
+ BATCH_SIZE = MAX_BATCH_SIZE,
29
+ // Number of resources to fetch per batch
30
+ CONCURRENT_REQUESTS = CONCURRENT_REQUESTS_DEFAULT,
31
+ // Number of requests to make concurrently
32
+ endpoint,
33
+ // endpoint to hit to fetch items
34
+ generateQueryKey,
35
+ // Passed function to allow customised query keys
36
+ queryNamespace = 'stripes-kint-components',
37
+ queryOptions: passedQueryOptions = {} // Options to pass to each query
38
+ } = _ref;
39
+ const ky = (0, _core.useOkapiKy)();
40
+ const SAFE_BATCH_SIZE = Math.min(BATCH_SIZE, MAX_BATCH_SIZE);
41
+ const [isLoading, setIsLoading] = (0, _react.useState)(true);
42
+
43
+ // Destructure passed query options to grab enabled
44
+ const {
45
+ enabled: queryEnabled = true,
46
+ ...queryOptions
47
+ } = passedQueryOptions;
48
+ const paramsArray = (0, _react.useMemo)(() => (0, _utils.generateKiwtQueryParams)({
49
+ ...batchParams,
50
+ perPage: SAFE_BATCH_SIZE,
51
+ stats: true
52
+ }, nsValues), [batchParams, nsValues, SAFE_BATCH_SIZE]);
53
+ const getDefaultNSArray = (0, _react.useCallback)(offset => [queryNamespace, endpoint, offset, paramsArray, 'useChunkedBatchedFetch'], [queryNamespace, endpoint, paramsArray]);
54
+ const namespaceArray = generateQueryKey ? generateQueryKey({
55
+ CONCURRENT_REQUESTS,
56
+ BATCH_LIMIT,
57
+ SAFE_BATCH_SIZE,
58
+ batchParams,
59
+ endpoint,
60
+ offset: 0,
61
+ paramsArray,
62
+ passedQueryOptions
63
+ }) : getDefaultNSArray(0);
64
+
65
+ // Firstly fetch page 1 to get information about totals
66
+ const firstFetchResult = (0, _reactQuery.useQuery)(namespaceArray, () => ky.get(`${endpoint}?${[...paramsArray, 'offset=0']?.join('&')}`).json(), passedQueryOptions);
67
+ const totalRecords = (0, _react.useMemo)(() => firstFetchResult?.data?.total ?? 0, [firstFetchResult]);
68
+
69
+ // WAIT for initial fetch to conclude before setting up queryArray
70
+ // Set up query array, and only enable the first CONCURRENT_REQUESTS requests
71
+ const getQueryArray = (0, _react.useCallback)(() => {
72
+ if (!firstFetchResult?.isFetched) {
73
+ return [];
74
+ }
75
+ const recordsToFetch = Math.min(totalRecords, BATCH_LIMIT);
76
+ // Have already fetched page 1
77
+
78
+ const queryArray = [];
79
+ // Offset will be i * SAFE_BATCH_SIZE
80
+ for (let offset = SAFE_BATCH_SIZE; offset < recordsToFetch; offset += SAFE_BATCH_SIZE) {
81
+ const queryKey = generateQueryKey ? generateQueryKey({
82
+ CONCURRENT_REQUESTS,
83
+ BATCH_LIMIT,
84
+ SAFE_BATCH_SIZE,
85
+ batchParams,
86
+ endpoint,
87
+ offset,
88
+ paramsArray,
89
+ passedQueryOptions
90
+ }) : getDefaultNSArray(offset);
91
+ const paramString = [...paramsArray, `offset=${offset}`]?.join('&');
92
+ queryArray.push({
93
+ queryKey,
94
+ queryFn: () => ky.get(`${endpoint}?${paramString}`).json(),
95
+ // Only enable once the previous slice has all been fetched
96
+ enabled: queryEnabled && offset / SAFE_BATCH_SIZE < CONCURRENT_REQUESTS,
97
+ ...queryOptions
98
+ });
99
+ }
100
+ return queryArray;
101
+ }, [BATCH_LIMIT, batchParams, CONCURRENT_REQUESTS, endpoint, firstFetchResult, generateQueryKey, getDefaultNSArray, ky, paramsArray, passedQueryOptions, queryEnabled, queryOptions, SAFE_BATCH_SIZE, totalRecords]);
102
+
103
+ // Differentiate between chunked logic and the first return (Which includes the initial fetch)
104
+ const itemQueries = (0, _reactQuery.useQueries)(getQueryArray());
105
+ const returnItemQueries = (0, _react.useMemo)(() => [firstFetchResult, ...itemQueries], [firstFetchResult, itemQueries]);
106
+
107
+ // Once chunk has finished fetching, fetch next chunk
108
+ (0, _react.useEffect)(() => {
109
+ const chunkedQuery = (0, _lodash.chunk)(returnItemQueries, CONCURRENT_REQUESTS);
110
+ chunkedQuery.forEach((q, i) => {
111
+ // Check that all previous chunk are fetched,
112
+ // and that all of our current chunk are not fetched and not loading
113
+ if (i !== 0 && chunkedQuery[i - 1]?.every(pq => pq.isFetched === true) && q.every(req => req.isFetched === false) && q.every(req => req.isLoading === false)) {
114
+ // Trigger fetch for each request in the chunk
115
+ q.forEach(req => {
116
+ req.refetch();
117
+ });
118
+ }
119
+ });
120
+ }, [CONCURRENT_REQUESTS, returnItemQueries]);
121
+
122
+ // Keep easy track of whether this hook is all loaded or not
123
+ // (This slightly flattens the "isLoading/isFetched" distinction, but it's an ease of use prop)
124
+ (0, _react.useEffect)(() => {
125
+ const newLoading = (returnItemQueries?.length ?? 0) < 1 || returnItemQueries?.some(uq => !uq.isFetched);
126
+ if (isLoading !== newLoading) {
127
+ setIsLoading(newLoading);
128
+ }
129
+ }, [isLoading, returnItemQueries]);
130
+ return {
131
+ itemQueries: returnItemQueries,
132
+ isLoading,
133
+ // Offer all fetched orderLines in flattened array once ready
134
+ items: isLoading ? [] : returnItemQueries?.reduce((acc, curr) => {
135
+ return [...acc, ...(curr?.data?.results ?? [])];
136
+ }, []),
137
+ total: totalRecords
138
+ };
139
+ };
140
+ var _default = exports.default = useParallelBatchFetch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k-int/stripes-kint-components",
3
- "version": "5.33.1",
3
+ "version": "5.34.0",
4
4
  "description": "Stripes Component library for K-Int specific applications",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -358,7 +358,7 @@ export default ActionList;
358
358
  <div class='footer quiet pad2 space-top1 center small'>
359
359
  Code coverage generated by
360
360
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
361
- at 2026-03-09T14:50:53.363Z
361
+ at 2026-03-18T13:14:53.894Z
362
362
  </div>
363
363
  <script src="../prettify.js"></script>
364
364
  <script>
@@ -1495,7 +1495,7 @@ export default ActionListFieldArray;
1495
1495
  <div class='footer quiet pad2 space-top1 center small'>
1496
1496
  Code coverage generated by
1497
1497
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1498
- at 2026-03-09T14:50:53.363Z
1498
+ at 2026-03-18T13:14:53.894Z
1499
1499
  </div>
1500
1500
  <script src="../prettify.js"></script>
1501
1501
  <script>
@@ -131,7 +131,7 @@
131
131
  <div class='footer quiet pad2 space-top1 center small'>
132
132
  Code coverage generated by
133
133
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
134
- at 2026-03-09T14:50:53.363Z
134
+ at 2026-03-18T13:14:53.894Z
135
135
  </div>
136
136
  <script src="../prettify.js"></script>
137
137
  <script>
@@ -73,7 +73,7 @@
73
73
  <div class='footer quiet pad2 space-top1 center small'>
74
74
  Code coverage generated by
75
75
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
76
- at 2026-03-09T14:50:53.363Z
76
+ at 2026-03-18T13:14:53.894Z
77
77
  </div>
78
78
  <script src="../prettify.js"></script>
79
79
  <script>
@@ -421,7 +421,7 @@ ButtonTypedown.propTypes = {
421
421
  <div class='footer quiet pad2 space-top1 center small'>
422
422
  Code coverage generated by
423
423
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
424
- at 2026-03-09T14:50:53.363Z
424
+ at 2026-03-18T13:14:53.894Z
425
425
  </div>
426
426
  <script src="../prettify.js"></script>
427
427
  <script>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at 2026-03-09T14:50:53.363Z
119
+ at 2026-03-18T13:14:53.894Z
120
120
  </div>
121
121
  <script src="../prettify.js"></script>
122
122
  <script>
@@ -73,7 +73,7 @@
73
73
  <div class='footer quiet pad2 space-top1 center small'>
74
74
  Code coverage generated by
75
75
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
76
- at 2026-03-09T14:50:53.363Z
76
+ at 2026-03-18T13:14:53.894Z
77
77
  </div>
78
78
  <script src="../prettify.js"></script>
79
79
  <script>
@@ -553,7 +553,7 @@ export default ComboButton;
553
553
  <div class='footer quiet pad2 space-top1 center small'>
554
554
  Code coverage generated by
555
555
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
556
- at 2026-03-09T14:50:53.363Z
556
+ at 2026-03-18T13:14:53.894Z
557
557
  </div>
558
558
  <script src="../prettify.js"></script>
559
559
  <script>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at 2026-03-09T14:50:53.363Z
119
+ at 2026-03-18T13:14:53.894Z
120
120
  </div>
121
121
  <script src="../prettify.js"></script>
122
122
  <script>
@@ -73,7 +73,7 @@
73
73
  <div class='footer quiet pad2 space-top1 center small'>
74
74
  Code coverage generated by
75
75
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
76
- at 2026-03-09T14:50:53.363Z
76
+ at 2026-03-18T13:14:53.894Z
77
77
  </div>
78
78
  <script src="../prettify.js"></script>
79
79
  <script>