@k-int/stripes-kint-components 5.33.2 → 5.34.1

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 (296) 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 +36 -4
  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/es/lib/utils/parseErrorResponse.js +6 -1
  12. package/package.json +1 -1
  13. package/src/artifacts/coverage-jest/ActionList/ActionList.js.html +1 -1
  14. package/src/artifacts/coverage-jest/ActionList/ActionListFieldArray.js.html +1 -1
  15. package/src/artifacts/coverage-jest/ActionList/index.html +1 -1
  16. package/src/artifacts/coverage-jest/ActionList/index.js.html +1 -1
  17. package/src/artifacts/coverage-jest/ButtonTypedown/ButtonTypedown.js.html +1 -1
  18. package/src/artifacts/coverage-jest/ButtonTypedown/index.html +1 -1
  19. package/src/artifacts/coverage-jest/ButtonTypedown/index.js.html +1 -1
  20. package/src/artifacts/coverage-jest/ComboButton/ComboButton.js.html +1 -1
  21. package/src/artifacts/coverage-jest/ComboButton/index.html +1 -1
  22. package/src/artifacts/coverage-jest/ComboButton/index.js.html +1 -1
  23. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesLookup.js.html +26 -29
  24. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesSettings.js.html +142 -13
  25. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
  26. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyView.js.html +1 -1
  27. package/src/artifacts/coverage-jest/CustomProperties/Config/index.html +30 -30
  28. package/src/artifacts/coverage-jest/CustomProperties/Config/index.js.html +1 -1
  29. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
  30. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +23 -26
  31. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
  32. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyField.js.html +1 -1
  33. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
  34. package/src/artifacts/coverage-jest/CustomProperties/Edit/index.html +20 -20
  35. package/src/artifacts/coverage-jest/CustomProperties/Edit/index.js.html +1 -1
  36. package/src/artifacts/coverage-jest/CustomProperties/Edit/testResources.js.html +1 -1
  37. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilter.js.html +27 -30
  38. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
  39. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
  40. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
  41. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
  42. package/src/artifacts/coverage-jest/CustomProperties/Filter/index.html +15 -15
  43. package/src/artifacts/coverage-jest/CustomProperties/Filter/index.js.html +1 -1
  44. package/src/artifacts/coverage-jest/CustomProperties/Filter/testResources.js.html +1 -1
  45. package/src/artifacts/coverage-jest/CustomProperties/Filter/useOperators.js.html +12 -12
  46. package/src/artifacts/coverage-jest/CustomProperties/Filter/useParseActiveFilterStrings.js.html +14 -14
  47. package/src/artifacts/coverage-jest/CustomProperties/Filter/useValueProps.js.html +1 -1
  48. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesView.js.html +1 -1
  49. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesViewCtx.js.html +36 -39
  50. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertyCard.js.html +1 -1
  51. package/src/artifacts/coverage-jest/CustomProperties/View/index.html +21 -21
  52. package/src/artifacts/coverage-jest/CustomProperties/View/index.js.html +1 -1
  53. package/src/artifacts/coverage-jest/CustomProperties/View/testResources.js.html +1 -1
  54. package/src/artifacts/coverage-jest/CustomProperties/index.html +1 -1
  55. package/src/artifacts/coverage-jest/CustomProperties/index.js.html +1 -1
  56. package/src/artifacts/coverage-jest/CycleButton/CycleButton.js.html +1 -1
  57. package/src/artifacts/coverage-jest/CycleButton/index.html +1 -1
  58. package/src/artifacts/coverage-jest/CycleButton/index.js.html +1 -1
  59. package/src/artifacts/coverage-jest/FieldLabel/FieldLabel.js.html +1 -1
  60. package/src/artifacts/coverage-jest/FieldLabel/index.html +1 -1
  61. package/src/artifacts/coverage-jest/FieldLabel/index.js.html +1 -1
  62. package/src/artifacts/coverage-jest/FormModal/FormModal.js.html +1 -1
  63. package/src/artifacts/coverage-jest/FormModal/index.html +1 -1
  64. package/src/artifacts/coverage-jest/FormModal/index.js.html +1 -1
  65. package/src/artifacts/coverage-jest/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
  66. package/src/artifacts/coverage-jest/FormattedKintMessage/index.html +1 -1
  67. package/src/artifacts/coverage-jest/FormattedKintMessage/index.js.html +1 -1
  68. package/src/artifacts/coverage-jest/IconSelect/IconSelect.js.html +1 -1
  69. package/src/artifacts/coverage-jest/IconSelect/index.html +1 -1
  70. package/src/artifacts/coverage-jest/IconSelect/index.js.html +1 -1
  71. package/src/artifacts/coverage-jest/NoResultsMessage/NoResultsMessage.js.html +1 -1
  72. package/src/artifacts/coverage-jest/NoResultsMessage/index.html +1 -1
  73. package/src/artifacts/coverage-jest/NoResultsMessage/index.js.html +1 -1
  74. package/src/artifacts/coverage-jest/NumberField/NumberField.js.html +1 -1
  75. package/src/artifacts/coverage-jest/NumberField/index.html +1 -1
  76. package/src/artifacts/coverage-jest/NumberField/index.js.html +1 -1
  77. package/src/artifacts/coverage-jest/QueryTypedown/QueryTypedown.js.html +1 -1
  78. package/src/artifacts/coverage-jest/QueryTypedown/index.html +1 -1
  79. package/src/artifacts/coverage-jest/QueryTypedown/index.js.html +1 -1
  80. package/src/artifacts/coverage-jest/RefdataButtons/RefdataButtons.js.html +1 -1
  81. package/src/artifacts/coverage-jest/RefdataButtons/index.html +1 -1
  82. package/src/artifacts/coverage-jest/RefdataButtons/index.js.html +1 -1
  83. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +1 -1
  84. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.html +1 -1
  85. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.js.html +1 -1
  86. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +1 -1
  87. package/src/artifacts/coverage-jest/RichSelect/RichSelect.js.html +1 -1
  88. package/src/artifacts/coverage-jest/RichSelect/index.html +1 -1
  89. package/src/artifacts/coverage-jest/RichSelect/index.js.html +1 -1
  90. package/src/artifacts/coverage-jest/RichSelect/useSelectedOption.js.html +1 -1
  91. package/src/artifacts/coverage-jest/SASQLookupComponent/SASQLookupComponent.js.html +1 -1
  92. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
  93. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.html +1 -1
  94. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.js.html +1 -1
  95. package/src/artifacts/coverage-jest/SASQLookupComponent/index.html +1 -1
  96. package/src/artifacts/coverage-jest/SASQLookupComponent/index.js.html +1 -1
  97. package/src/artifacts/coverage-jest/SASQRoute/SASQRoute.js.html +1 -1
  98. package/src/artifacts/coverage-jest/SASQRoute/index.html +1 -1
  99. package/src/artifacts/coverage-jest/SASQRoute/index.js.html +1 -1
  100. package/src/artifacts/coverage-jest/SASQViewComponent/SASQViewComponent.js.html +1 -1
  101. package/src/artifacts/coverage-jest/SASQViewComponent/index.html +1 -1
  102. package/src/artifacts/coverage-jest/SASQViewComponent/index.js.html +1 -1
  103. package/src/artifacts/coverage-jest/SearchField/SearchField.js.html +1 -1
  104. package/src/artifacts/coverage-jest/SearchField/index.html +1 -1
  105. package/src/artifacts/coverage-jest/SearchField/index.js.html +1 -1
  106. package/src/artifacts/coverage-jest/SearchKeyControl/SearchKeyControl.js.html +1 -1
  107. package/src/artifacts/coverage-jest/SearchKeyControl/index.html +1 -1
  108. package/src/artifacts/coverage-jest/SearchKeyControl/index.js.html +1 -1
  109. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
  110. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.html +1 -1
  111. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.js.html +1 -1
  112. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/EditableRefdataList.js.html +1 -1
  113. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.html +1 -1
  114. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.js.html +1 -1
  115. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsList.js.html +1 -1
  116. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js.html +1 -1
  117. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.html +1 -1
  118. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.js.html +1 -1
  119. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/EditSettingValue.js.html +1 -1
  120. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.html +1 -1
  121. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.js.html +1 -1
  122. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/RenderSettingValue.js.html +1 -1
  123. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.html +1 -1
  124. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.js.html +1 -1
  125. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/SettingField.js.html +1 -1
  126. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.html +1 -1
  127. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.js.html +1 -1
  128. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.html +1 -1
  129. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.js.html +1 -1
  130. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/RefdataCategoriesSettings.js.html +1 -1
  131. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.html +1 -1
  132. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.js.html +1 -1
  133. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPage.js.html +1 -1
  134. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/SettingPagePane.js.html +1 -1
  135. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.html +1 -1
  136. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.js.html +1 -1
  137. package/src/artifacts/coverage-jest/Settings/SettingPage/index.html +1 -1
  138. package/src/artifacts/coverage-jest/Settings/SettingPage/index.js.html +1 -1
  139. package/src/artifacts/coverage-jest/Settings/Settings/Settings.js.html +1 -1
  140. package/src/artifacts/coverage-jest/Settings/Settings/index.html +1 -1
  141. package/src/artifacts/coverage-jest/Settings/Settings/index.js.html +1 -1
  142. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/SettingsFormContainer.js.html +1 -1
  143. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.html +1 -1
  144. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.js.html +1 -1
  145. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsField.js.html +1 -1
  146. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/StaticSettingsFieldComponent.js.html +1 -1
  147. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.html +1 -1
  148. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.js.html +1 -1
  149. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.html +1 -1
  150. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.js.html +1 -1
  151. package/src/artifacts/coverage-jest/Settings/constants/index.html +1 -1
  152. package/src/artifacts/coverage-jest/Settings/constants/index.js.html +1 -1
  153. package/src/artifacts/coverage-jest/Settings/constants/queryKeys.js.html +1 -1
  154. package/src/artifacts/coverage-jest/Settings/contexts/SettingsContext.js.html +1 -1
  155. package/src/artifacts/coverage-jest/Settings/contexts/index.html +1 -1
  156. package/src/artifacts/coverage-jest/Settings/contexts/index.js.html +1 -1
  157. package/src/artifacts/coverage-jest/Settings/hooks/index.html +1 -1
  158. package/src/artifacts/coverage-jest/Settings/hooks/index.js.html +1 -1
  159. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.html +1 -1
  160. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.js.html +1 -1
  161. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.html +1 -1
  162. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.js.html +1 -1
  163. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/useSettingCallout.js.html +1 -1
  164. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.html +1 -1
  165. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.js.html +1 -1
  166. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/useSettingsSectionInitalValues.js.html +1 -1
  167. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useStaticSettingsSection.js.html +1 -1
  168. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.html +1 -1
  169. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.js.html +1 -1
  170. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/useAppSettings.js.html +1 -1
  171. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.html +1 -1
  172. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.js.html +1 -1
  173. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/useSettingSection.js.html +1 -1
  174. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.html +1 -1
  175. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.js.html +1 -1
  176. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/useSettings.js.html +1 -1
  177. package/src/artifacts/coverage-jest/Settings/index.html +1 -1
  178. package/src/artifacts/coverage-jest/Settings/index.js.html +1 -1
  179. package/src/artifacts/coverage-jest/Tags/Tags.js.html +1 -1
  180. package/src/artifacts/coverage-jest/Tags/hooks/index.html +1 -1
  181. package/src/artifacts/coverage-jest/Tags/hooks/index.js.html +1 -1
  182. package/src/artifacts/coverage-jest/Tags/hooks/useTags.js.html +1 -1
  183. package/src/artifacts/coverage-jest/Tags/hooks/useTagsEnabled.js.html +1 -1
  184. package/src/artifacts/coverage-jest/Tags/index.html +1 -1
  185. package/src/artifacts/coverage-jest/Tags/index.js.html +1 -1
  186. package/src/artifacts/coverage-jest/Tags/tagsConfig.js.html +1 -1
  187. package/src/artifacts/coverage-jest/Typedown/Typedown.js.html +1 -1
  188. package/src/artifacts/coverage-jest/Typedown/index.html +1 -1
  189. package/src/artifacts/coverage-jest/Typedown/index.js.html +1 -1
  190. package/src/artifacts/coverage-jest/cobertura-coverage.xml +469 -281
  191. package/src/artifacts/coverage-jest/constants/comparators.js.html +1 -1
  192. package/src/artifacts/coverage-jest/constants/customProperties.js.html +1 -1
  193. package/src/artifacts/coverage-jest/constants/endpoints.js.html +1 -1
  194. package/src/artifacts/coverage-jest/constants/eventCodes.js.html +1 -1
  195. package/src/artifacts/coverage-jest/constants/index.html +1 -1
  196. package/src/artifacts/coverage-jest/constants/pagination.js.html +1 -1
  197. package/src/artifacts/coverage-jest/hooks/index.html +39 -9
  198. package/src/artifacts/coverage-jest/hooks/index.js.html +11 -2
  199. package/src/artifacts/coverage-jest/hooks/intlHooks/index.html +1 -1
  200. package/src/artifacts/coverage-jest/hooks/intlHooks/index.js.html +1 -1
  201. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.html +1 -1
  202. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.js.html +1 -1
  203. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/useIntlKey.js.html +6 -6
  204. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.html +1 -1
  205. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.js.html +1 -1
  206. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js.html +1 -1
  207. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.html +1 -1
  208. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.js.html +1 -1
  209. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/useKintIntl.js.html +11 -11
  210. package/src/artifacts/coverage-jest/hooks/typedownHooks/index.html +1 -1
  211. package/src/artifacts/coverage-jest/hooks/typedownHooks/index.js.html +1 -1
  212. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedown.js.html +1 -1
  213. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownData.js.html +1 -1
  214. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  215. package/src/artifacts/coverage-jest/hooks/useActionListRef.js.html +1 -1
  216. package/src/artifacts/coverage-jest/hooks/useActiveElement.js.html +1 -1
  217. package/src/artifacts/coverage-jest/hooks/useCustProps.js.html +376 -0
  218. package/src/artifacts/coverage-jest/hooks/useCustomProperties.js.html +1 -1
  219. package/src/artifacts/coverage-jest/hooks/useHelperApp.js.html +1 -1
  220. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.html +1 -1
  221. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.js.html +1 -1
  222. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/useInvalidateRefdata.js.html +1 -1
  223. package/src/artifacts/coverage-jest/hooks/useKiwtFieldArray.js.html +1 -1
  224. package/src/artifacts/coverage-jest/hooks/useKiwtSASQuery.js.html +1 -1
  225. package/src/artifacts/coverage-jest/hooks/useLocalPageStore.js.html +1 -1
  226. package/src/artifacts/coverage-jest/hooks/useLocalStorageState.js.html +1 -1
  227. package/src/artifacts/coverage-jest/hooks/useModConfigEntries.js.html +1 -1
  228. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.html +1 -1
  229. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.js.html +1 -1
  230. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/useMutateCustomProperties.js.html +1 -1
  231. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.html +1 -1
  232. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.js.html +1 -1
  233. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/useMutateGeneric.js.html +1 -1
  234. package/src/artifacts/coverage-jest/hooks/useMutateModConfigEntry.js.html +1 -1
  235. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.html +1 -1
  236. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.js.html +1 -1
  237. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/useMutateRefdataCategory.js.html +1 -1
  238. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.html +1 -1
  239. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.js.html +1 -1
  240. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/useMutateRefdataValue.js.html +1 -1
  241. package/src/artifacts/coverage-jest/hooks/useParallelBatchFetch.js.html +589 -0
  242. package/src/artifacts/coverage-jest/hooks/usePrevNextPagination.js.html +1 -1
  243. package/src/artifacts/coverage-jest/hooks/useQIndex.js.html +1 -1
  244. package/src/artifacts/coverage-jest/hooks/useRefdata.js.html +1 -1
  245. package/src/artifacts/coverage-jest/hooks/useSASQQueryMeta.js.html +1 -1
  246. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.html +1 -1
  247. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.js.html +1 -1
  248. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/useStandaloneSASQQueryParameter.js.html +1 -1
  249. package/src/artifacts/coverage-jest/hooks/useTemplates.js.html +1 -1
  250. package/src/artifacts/coverage-jest/index.html +77 -77
  251. package/src/artifacts/coverage-jest/utils/buildUrl.js.html +1 -1
  252. package/src/artifacts/coverage-jest/utils/filterParsers/deparseKiwtQueryFilters.js.html +1 -1
  253. package/src/artifacts/coverage-jest/utils/filterParsers/index.html +1 -1
  254. package/src/artifacts/coverage-jest/utils/filterParsers/index.js.html +1 -1
  255. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryFilters.js.html +1 -1
  256. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryGroups.js.html +1 -1
  257. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryString.js.html +1 -1
  258. package/src/artifacts/coverage-jest/utils/generateKiwtQuery.js.html +1 -1
  259. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/generateKiwtQueryParams.js.html +71 -71
  260. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.html +19 -19
  261. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.js.html +1 -1
  262. package/src/artifacts/coverage-jest/utils/groupCustomPropertiesByCtx.js.html +1 -1
  263. package/src/artifacts/coverage-jest/utils/index.html +13 -13
  264. package/src/artifacts/coverage-jest/utils/index.js.html +1 -1
  265. package/src/artifacts/coverage-jest/utils/matchString/index.html +1 -1
  266. package/src/artifacts/coverage-jest/utils/matchString/index.js.html +1 -1
  267. package/src/artifacts/coverage-jest/utils/matchString/matchString.js.html +1 -1
  268. package/src/artifacts/coverage-jest/utils/modConfigEntriesQueryKey.js.html +1 -1
  269. package/src/artifacts/coverage-jest/utils/parseErrorResponse.js.html +26 -8
  270. package/src/artifacts/coverage-jest/utils/parseModConfigEntry.js.html +1 -1
  271. package/src/artifacts/coverage-jest/utils/refdataOptions.js.html +1 -1
  272. package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.html +1 -1
  273. package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.js.html +1 -1
  274. package/src/artifacts/coverage-jest/utils/refdataQueryKey/refdataQueryKey.js.html +1 -1
  275. package/src/artifacts/coverage-jest/utils/selectorSafe.js.html +1 -1
  276. package/src/artifacts/coverage-jest/utils/sortByLabel.js.html +1 -1
  277. package/src/artifacts/coverage-jest/utils/stringStyling/boldString.js.html +1 -1
  278. package/src/artifacts/coverage-jest/utils/stringStyling/highlightString.js.html +1 -1
  279. package/src/artifacts/coverage-jest/utils/stringStyling/index.html +1 -1
  280. package/src/artifacts/coverage-jest/utils/stringStyling/index.js.html +1 -1
  281. package/src/artifacts/coverage-jest/utils/toCamelCase.js.html +1 -1
  282. package/src/artifacts/coverage-jest/utils/typedownQueryKey.js.html +1 -1
  283. package/src/artifacts/coverage-jest/validators/index.html +1 -1
  284. package/src/artifacts/coverage-jest/validators/index.js.html +1 -1
  285. package/src/artifacts/coverage-jest/validators/validators.js.html +1 -1
  286. package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +2 -3
  287. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +46 -3
  288. package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +2 -3
  289. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +3 -4
  290. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +13 -3
  291. package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.js +2 -3
  292. package/src/lib/hooks/README.md +101 -1
  293. package/src/lib/hooks/index.js +3 -0
  294. package/src/lib/hooks/useCustProps.js +97 -0
  295. package/src/lib/hooks/useParallelBatchFetch.js +168 -0
  296. package/src/lib/utils/parseErrorResponse.js +7 -1
@@ -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-12T15:30:01.874Z
76
+ at 2026-03-23T17:05:11.570Z
77
77
  </div>
78
78
  <script src="../../prettify.js"></script>
79
79
  <script>
@@ -97,7 +97,7 @@ export default refdataQueryKey;
97
97
  <div class='footer quiet pad2 space-top1 center small'>
98
98
  Code coverage generated by
99
99
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
100
- at 2026-03-12T15:30:01.874Z
100
+ at 2026-03-23T17:05:11.570Z
101
101
  </div>
102
102
  <script src="../../prettify.js"></script>
103
103
  <script>
@@ -130,7 +130,7 @@ export default selectorSafe;
130
130
  <div class='footer quiet pad2 space-top1 center small'>
131
131
  Code coverage generated by
132
132
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
133
- at 2026-03-12T15:30:01.874Z
133
+ at 2026-03-23T17:05:11.570Z
134
134
  </div>
135
135
  <script src="../prettify.js"></script>
136
136
  <script>
@@ -115,7 +115,7 @@ export default sortByLabel;
115
115
  <div class='footer quiet pad2 space-top1 center small'>
116
116
  Code coverage generated by
117
117
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
118
- at 2026-03-12T15:30:01.874Z
118
+ at 2026-03-23T17:05:11.570Z
119
119
  </div>
120
120
  <script src="../prettify.js"></script>
121
121
  <script>
@@ -175,7 +175,7 @@ export default boldString;
175
175
  <div class='footer quiet pad2 space-top1 center small'>
176
176
  Code coverage generated by
177
177
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
178
- at 2026-03-12T15:30:01.874Z
178
+ at 2026-03-23T17:05:11.570Z
179
179
  </div>
180
180
  <script src="../../prettify.js"></script>
181
181
  <script>
@@ -175,7 +175,7 @@ export default highlightString;
175
175
  <div class='footer quiet pad2 space-top1 center small'>
176
176
  Code coverage generated by
177
177
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
178
- at 2026-03-12T15:30:01.874Z
178
+ at 2026-03-23T17:05:11.570Z
179
179
  </div>
180
180
  <script src="../../prettify.js"></script>
181
181
  <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-12T15:30:01.874Z
134
+ at 2026-03-23T17:05:11.570Z
135
135
  </div>
136
136
  <script src="../../prettify.js"></script>
137
137
  <script>
@@ -76,7 +76,7 @@ export { default as boldString } from './boldString';
76
76
  <div class='footer quiet pad2 space-top1 center small'>
77
77
  Code coverage generated by
78
78
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
79
- at 2026-03-12T15:30:01.874Z
79
+ at 2026-03-23T17:05:11.570Z
80
80
  </div>
81
81
  <script src="../../prettify.js"></script>
82
82
  <script>
@@ -112,7 +112,7 @@ export default toCamelCase;
112
112
  <div class='footer quiet pad2 space-top1 center small'>
113
113
  Code coverage generated by
114
114
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
115
- at 2026-03-12T15:30:01.874Z
115
+ at 2026-03-23T17:05:11.570Z
116
116
  </div>
117
117
  <script src="../prettify.js"></script>
118
118
  <script>
@@ -97,7 +97,7 @@ export default typedownQueryKey;
97
97
  <div class='footer quiet pad2 space-top1 center small'>
98
98
  Code coverage generated by
99
99
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
100
- at 2026-03-12T15:30:01.874Z
100
+ at 2026-03-23T17:05:11.570Z
101
101
  </div>
102
102
  <script src="../prettify.js"></script>
103
103
  <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-12T15:30:01.874Z
119
+ at 2026-03-23T17:05:11.570Z
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-12T15:30:01.874Z
76
+ at 2026-03-23T17:05:11.570Z
77
77
  </div>
78
78
  <script src="../prettify.js"></script>
79
79
  <script>
@@ -355,7 +355,7 @@ export {
355
355
  <div class='footer quiet pad2 space-top1 center small'>
356
356
  Code coverage generated by
357
357
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
358
- at 2026-03-12T15:30:01.874Z
358
+ at 2026-03-23T17:05:11.570Z
359
359
  </div>
360
360
  <script src="../prettify.js"></script>
361
361
  <script>
@@ -5,7 +5,7 @@ import { Col, MultiColumnList, Row, Spinner, Select, Button } from '@folio/strip
5
5
 
6
6
  import { Form } from 'react-final-form';
7
7
  import SearchField from '../../SearchField';
8
- import { useCustomProperties, useKintIntl } from '../../hooks';
8
+ import { useCustProps, useKintIntl } from '../../hooks';
9
9
 
10
10
  import css from '../../../../styles/CustomProperties.css';
11
11
 
@@ -24,11 +24,10 @@ const CustomPropertiesLookup = ({
24
24
  });
25
25
  const [selectedContext, setSelectedContext] = useState();
26
26
 
27
- const { data: custprops, isLoading } = useCustomProperties({
27
+ const { custprops, isLoading } = useCustProps({
28
28
  endpoint,
29
29
  nsValues,
30
30
  queryParams,
31
- returnQueryObject: true,
32
31
  ctx: selectedContext,
33
32
  options: {
34
33
  sort: [
@@ -13,6 +13,7 @@ import CustomPropertiesLookup from './CustomPropertiesLookup';
13
13
  import CustomPropertyView from './CustomPropertyView';
14
14
  import CustomPropertiesForm from './CustomPropertyForm';
15
15
  import { useKintIntl, useMutateCustomProperties, useRefdata } from '../../hooks';
16
+ import { CUSTPROPS_QUERY_KEY_BASE } from '../../hooks/useCustProps';
16
17
  import { parseErrorResponse } from '../../utils';
17
18
 
18
19
  const EDITING = 'edit';
@@ -87,7 +88,7 @@ const CustomPropertiesSettings = ({
87
88
  afterQueryCalls: {
88
89
  put: res => {
89
90
  setMode(VIEWING);
90
- queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
91
+ queryClient.invalidateQueries(CUSTPROPS_QUERY_KEY_BASE);
91
92
  setCustomProperty(res);
92
93
  if (afterQueryCalls?.put) {
93
94
  afterQueryCalls.put(res);
@@ -95,7 +96,7 @@ const CustomPropertiesSettings = ({
95
96
  },
96
97
  post: res => {
97
98
  setMode(VIEWING);
98
- queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
99
+ queryClient.invalidateQueries(CUSTPROPS_QUERY_KEY_BASE);
99
100
  setCustomProperty(res);
100
101
  if (afterQueryCalls?.post) {
101
102
  afterQueryCalls.post(res);
@@ -103,7 +104,7 @@ const CustomPropertiesSettings = ({
103
104
  },
104
105
  delete: res => {
105
106
  setMode(VIEWING);
106
- queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
107
+ queryClient.invalidateQueries(CUSTPROPS_QUERY_KEY_BASE);
107
108
  setCustomProperty();
108
109
  if (afterQueryCalls?.delete) {
109
110
  afterQueryCalls.delete(res);
@@ -113,6 +114,45 @@ const CustomPropertiesSettings = ({
113
114
  catchQueryCalls: {
114
115
  // Default delete behaviour is to fire a callout, either with kint-components default message
115
116
  // or one provided in labelOverrides, which is passed the error message and customProperty in question
117
+ post: async (err) => {
118
+ const errorResp = await parseErrorResponse(err.response);
119
+
120
+ callout.sendCallout({
121
+ message: kintIntl.formatKintMessage(
122
+ {
123
+ id: 'customProperties.config.create.errorMessage',
124
+ overrideValue: labelOverrides?.createError
125
+ },
126
+ {
127
+ error: errorResp?.message,
128
+ }
129
+ ),
130
+ type: 'error',
131
+ timeout: 0
132
+ });
133
+
134
+ throw err;
135
+ },
136
+ put: async (err) => {
137
+ const errorResp = await parseErrorResponse(err.response);
138
+
139
+ callout.sendCallout({
140
+ message: kintIntl.formatKintMessage(
141
+ {
142
+ id: 'customProperties.config.edit.errorMessage',
143
+ overrideValue: labelOverrides?.editError
144
+ },
145
+ {
146
+ error: errorResp?.message,
147
+ label: customProperty?.label ?? customProperty?.name,
148
+ }
149
+ ),
150
+ type: 'error',
151
+ timeout: 0
152
+ });
153
+
154
+ throw err;
155
+ },
116
156
  delete: async (err) => {
117
157
  const errorResp = await parseErrorResponse(err.response);
118
158
 
@@ -128,7 +168,10 @@ const CustomPropertiesSettings = ({
128
168
  }
129
169
  ),
130
170
  type: 'error',
171
+ timeout: 0
131
172
  });
173
+
174
+ throw err;
132
175
  },
133
176
  ...catchQueryCalls // Override defaults here
134
177
  },
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
2
2
  import { Accordion } from '@folio/stripes/components';
3
3
 
4
4
  import CustomPropertiesListField from './CustomPropertiesListField';
5
- import { useCustomProperties, useKintIntl } from '../../hooks';
5
+ import { useCustProps, useKintIntl } from '../../hooks';
6
6
 
7
7
  const CustomPropertiesEditCtx = ({
8
8
  ctx,
@@ -41,10 +41,9 @@ const CustomPropertiesEditCtx = ({
41
41
  );
42
42
  };
43
43
 
44
- const { data: custprops, isLoading } = useCustomProperties({
44
+ const { custprops, isLoading } = useCustProps({
45
45
  ctx,
46
46
  endpoint: customPropertiesEndpoint,
47
- returnQueryObject: true,
48
47
  options: {
49
48
  filters: [{
50
49
  path: 'retired',
@@ -7,7 +7,7 @@ import {
7
7
  Layout,
8
8
  Spinner
9
9
  } from '@folio/stripes/components';
10
- import { useCustomProperties, useKintIntl } from '../../hooks';
10
+ import { useCustProps, useKintIntl } from '../../hooks';
11
11
  import useParseActiveFilterStrings from './useParseActiveFilterStrings';
12
12
  import CustomPropertiesFilterForm from './CustomPropertiesFilterForm';
13
13
  import { MULTI_REFDATA_CLASS_NAME, REFDATA_CLASS_NAME } from '../../constants/customProperties';
@@ -22,16 +22,15 @@ const CustomPropertiesFilter = ({
22
22
  intlKey: passedIntlKey,
23
23
  intlNS: passedIntlNS,
24
24
  labelOverrides = {}
25
- }) => {
25
+ }) => {
26
26
  const [editingFilters, setEditingFilters] = useState(false);
27
27
  const openEditModal = () => setEditingFilters(true);
28
28
  const closeEditModal = () => setEditingFilters(false);
29
29
 
30
30
  const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
31
31
 
32
- const { data: custprops, isLoading } = useCustomProperties({
32
+ const { custprops, isLoading } = useCustProps({
33
33
  endpoint: customPropertiesEndpoint,
34
- returnQueryObject: true,
35
34
  options: {
36
35
  sort: [
37
36
  { path: 'ctx' }, // Group by ctx
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
 
3
3
  import { MemoryRouter } from 'react-router-dom';
4
+
5
+ import { waitFor } from '@folio/jest-config-stripes/testing-library/react';
4
6
  import { Accordion, Button } from '@folio/stripes-erm-testing';
5
7
 
6
8
  import { activeFilters, filterHandlers } from './testResources';
@@ -40,8 +42,16 @@ describe('CustomPropertiesFilter', () => {
40
42
  await Button({ id: 'accordion-toggle-button-clickable-custprop-filter' }).exists();
41
43
  });
42
44
 
43
- it('renders CustomPropertiesFilterForm component ', () => {
44
- const { getByText } = renderComponent;
45
- expect(getByText('CustomPropertiesFilterForm')).toBeInTheDocument();
45
+ describe.each('Opening the Custom properties accordion', () => {
46
+ beforeEach(async () => {
47
+ await waitFor(async () => {
48
+ await Accordion({ id: 'clickable-custprop-filter' }).click();
49
+ });
50
+ });
51
+
52
+ it('renders CustomPropertiesFilterForm component ', () => {
53
+ const { getByText } = renderComponent;
54
+ expect(getByText('CustomPropertiesFilterForm')).toBeInTheDocument();
55
+ });
46
56
  });
47
57
  });
@@ -1,7 +1,7 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import { Accordion, Badge, Spinner } from '@folio/stripes/components';
3
3
 
4
- import { useCustomProperties, useKintIntl } from '../../hooks';
4
+ import { useCustProps, useKintIntl } from '../../hooks';
5
5
 
6
6
  import CustomPropertyCard from './CustomPropertyCard';
7
7
 
@@ -42,10 +42,9 @@ const CustomPropertiesViewCtx = ({
42
42
  );
43
43
  };
44
44
 
45
- const { data: custprops, isLoading } = useCustomProperties({
45
+ const { custprops, isLoading } = useCustProps({
46
46
  ctx,
47
47
  endpoint: customPropertiesEndpoint,
48
- returnQueryObject: true,
49
48
  options: {
50
49
  sort: [
51
50
  { path: 'retired' }, // Place retired custprops at the end
@@ -7,7 +7,7 @@ A hook for fetching refdata values
7
7
  ```javascript
8
8
  import { useRefdata } from '@k-int/stripes-kint-components'
9
9
  ...
10
- const data = useRefdata({
10
+ const data = useRefdata({
11
11
  desc: 'PublicationRequest.PublicationType',
12
12
  endpoint: 'oa/refdata'
13
13
  });
@@ -253,3 +253,103 @@ updateObject({ id: 456, name: 'Updated Object' }) // Updates the object with id
253
253
  | queryKeyMutators | object | An object of the form `{ delete: func1, post: func2, put: func3 }` where `func1()`, `func2()`, and `func3()` are functions that return the query key for each mutation. | `{ delete: () => [...queryKey, 'delete'], post: () => [...queryKey, 'create'], put: () => [...queryKey, 'edit'] }` | ✕ |
254
254
  | queryParams | object | An object of the form `{ delete: obj1, post: obj2, put: obj3 }` where `obj1`, `obj2`, and `obj3` are the query parameters for each operation. | `{}` | ✕ |
255
255
  | returnQueryObject | object | An object of the form `{ delete: bool1, post: bool2, put: bool3 }` containing switches to return the entire query object from `useMutation` for each operation. If `false` (the default), the `mutateAsync` function will be returned; if `true`, the full object (including `mutate`, `isLoading`, `error`, etc.) will be returned. | `{ delete: false, post: false, put: false }` | ✕ |
256
+ ## useCustProps
257
+ A hook for fetching custom property definitions using batched parallel requests.
258
+
259
+ This hook replaces `useCustomProperties` as the preferred way of retrieving custom property definitions. It uses `useParallelBatchFetch` internally to ensure that all available custom properties are fetched even when the backend paginates responses.
260
+
261
+ ### Why this hook exists
262
+ The previous `useCustomProperties` hook relied on a single request with `max: 100`, which meant that only the first 100 custom properties could be retrieved. In environments with more definitions this led to incomplete data.
263
+
264
+ `useCustProps` resolves this by:
265
+ - using batched requests with controlled concurrency
266
+ - retrieving all available custom property definitions
267
+ - maintaining compatibility with existing query key patterns used across `stripes-kint-components`
268
+
269
+ ### Basic usage
270
+ ```javascript
271
+ const { custprops, isLoading } = useCustProps({
272
+ ctx,
273
+ endpoint: customPropertiesEndpoint,
274
+ });
275
+ ```
276
+ ### Props
277
+ | Name | Type | Description | Default | Required |
278
+ |--------------------|------------------|-----------------------------------------------------------------------------|-------------------|----------|
279
+ | endpoint | string | Backend endpoint used to retrieve custom property definitions | | ✓ |
280
+ | ctx | string \| string[]| Context or contexts used to filter custom properties | | ✕ |
281
+ | nsValues | object | Additional namespace query parameters passed to generateKiwtQueryParams | { sort: 'id' } | ✕ |
282
+ | options | object | Additional query configuration merged into the custom property query | {} | ✕ |
283
+ | queryParams | object | Options forwarded to the underlying react-query calls | {} | ✕ |
284
+ | batchLimit | number | Maximum number of records to fetch | Infinity | ✕ |
285
+ | batchSize | number | Number of records fetched per batch | 100 | ✕ |
286
+ | concurrentRequests | number | Number of concurrent requests made when fetching batches | 5 | ✕ |
287
+
288
+ ## useCustomProperties
289
+ Legacy hook for fetching custom property definitions.
290
+
291
+ This hook performs a single request using a `max` parameter (typically `100`) and therefore only retrieves the first page of results. In environments where more than 100 custom properties exist, this can lead to incomplete data.
292
+
293
+ ### Recommendation
294
+ Where possible it is recommended to migrate to:
295
+
296
+ - `useCustProps` for retrieving custom property definitions
297
+ - or one of the shared components such as:
298
+ - `CustomPropertiesLookup`
299
+ - `CustomPropertiesView`
300
+ - `CustomPropertiesSettings`
301
+
302
+ These components already use `useCustProps` internally and ensure consistent behaviour.
303
+
304
+ `useCustomProperties` remains available for backwards compatibility but may be deprecated in the future.
305
+
306
+ ### Basic usage
307
+ ```javascript
308
+ import { useCustomProperties } from '@k-int/stripes-kint-components';
309
+
310
+ const { data, isLoading } = useCustomProperties({
311
+ endpoint: '/erm/custom-properties',
312
+ returnQueryObject: true
313
+ });
314
+ ```
315
+ ### Props
316
+ | Name | Type | Description | Default | Required |
317
+ |-------------------|------------------|---------------------------------------------------------------------------|---------------|----------|
318
+ | endpoint | string | Backend endpoint used to retrieve custom property definitions | | ✓ |
319
+ | ctx | string \| string[]| Context or contexts used to filter custom properties | | ✕ |
320
+ | nsValues | object | Additional namespace query parameters passed to generateKiwtQuery | { sort: 'id'} | ✕ |
321
+ | options | object | Additional query configuration merged into the custom property query | {} | ✕ |
322
+ | queryParams | object | Options forwarded to the underlying react-query call | {} | ✕ |
323
+ | returnQueryObject | boolean | If true, the full react-query result object is returned instead of data | false | ✕ |
324
+ ## useParallelBatchFetch
325
+ A generic hook for performing batched parallel API requests.
326
+
327
+ This hook is designed to fetch paginated resources in multiple requests while limiting the number of concurrent requests. It was originally introduced in `stripes-erm-components` and has been incorporated into `stripes-kint-components` to maintain consistency across libraries.
328
+
329
+ The hook performs the following steps:
330
+
331
+ 1. Fetches the first page of results to determine the total record count.
332
+ 2. Generates additional requests using offsets.
333
+ 3. Executes batches of requests in parallel with a configurable concurrency limit.
334
+ 4. Returns a flattened array of results.
335
+
336
+ ### Basic usage
337
+ ```javascript
338
+ import useParallelBatchFetch from '@k-int/stripes-kint-components/hooks/useParallelBatchFetch';
339
+
340
+ const { items, isLoading, total } = useParallelBatchFetch({
341
+ endpoint: '/erm/custom-properties'
342
+ });
343
+ ```
344
+ ### Props
345
+ | Name | Type | Description | Default | Required |
346
+ |---------------------|----------|---------------------------------------------------------------------|-----------------------------|----------|
347
+ | endpoint | string | Endpoint used for fetching resources | | ✓ |
348
+ | batchParams | object | Query configuration passed to generateKiwtQueryParams | {} | ✕ |
349
+ | nsValues | object | Additional namespace query parameters | {} | ✕ |
350
+ | BATCH_SIZE | number | Number of records fetched per request | 100 | ✕ |
351
+ | CONCURRENT_REQUESTS | number | Maximum number of parallel requests | 5 | ✕ |
352
+ | BATCH_LIMIT | number | Maximum number of records to fetch | Infinity | ✕ |
353
+ | generateQueryKey | function | Optional function used to generate custom react-query keys | | ✕ |
354
+ | queryOptions | object | Options passed to the underlying react-query calls | {} | ✕ |
355
+ | queryNamespace | string | Namespace used for the default query key | 'stripes-kint-components' | ✕ |
@@ -7,6 +7,7 @@ export { default as useLocalStorageState } from './useLocalStorageState';
7
7
  export { default as useQIndex } from './useQIndex';
8
8
  export { default as useKiwtFieldArray } from './useKiwtFieldArray';
9
9
  export { default as useCustomProperties } from './useCustomProperties';
10
+ export { default as useCustProps } from './useCustProps';
10
11
  export { default as useInvalidateRefdata } from './useInvalidateRefdata';
11
12
  export { default as useSASQQueryMeta } from './useSASQQueryMeta';
12
13
  export { default as useModConfigEntries } from './useModConfigEntries';
@@ -21,4 +22,6 @@ export { default as useMutateModConfigEntry } from './useMutateModConfigEntry';
21
22
  export { default as usePrevNextPagination } from './usePrevNextPagination';
22
23
  export { default as useStandaloneSASQQueryParameter } from './useStandaloneSASQQueryParameter';
23
24
 
25
+ export { default as useParallelBatchFetch } from './useParallelBatchFetch';
26
+
24
27
  export * from './intlHooks';
@@ -0,0 +1,97 @@
1
+ import PropTypes from 'prop-types';
2
+
3
+ import useParallelBatchFetch from './useParallelBatchFetch';
4
+
5
+ export const CUSTPROPS_QUERY_KEY_BASE = [
6
+ 'stripes-kint-components',
7
+ 'useCustProps',
8
+ 'custprops'
9
+ ];
10
+
11
+ const useCustProps = ({
12
+ endpoint,
13
+ ctx,
14
+ nsValues = {
15
+ sort: 'id'
16
+ },
17
+ options = {},
18
+ queryParams = {},
19
+ batchLimit = Infinity,
20
+ batchSize = 100,
21
+ concurrentRequests = 5,
22
+ }) => {
23
+ const custPropOptions = {
24
+ searchKey: 'label,name,description',
25
+ filterKeys: {
26
+ ContextKey: 'ctx'
27
+ },
28
+ sort: [
29
+ { path: 'weight' },
30
+ { path: 'label' }
31
+ ],
32
+ filters: [],
33
+ ...options
34
+ };
35
+
36
+ if (Array.isArray(ctx)) {
37
+ custPropOptions.filters.push({
38
+ values: ctx.map(c => (c === 'isNull' ? 'ctx isNull' : `ctx==${c}`))
39
+ });
40
+ } else if (ctx === 'isNull') {
41
+ custPropOptions.filters.push({
42
+ value: 'ctx isNull'
43
+ });
44
+ } else if (ctx) {
45
+ custPropOptions.filters.push({
46
+ path: 'ctx',
47
+ value: ctx
48
+ });
49
+ }
50
+
51
+ const {
52
+ items: custprops = [],
53
+ isLoading = true,
54
+ total = 0
55
+ } = useParallelBatchFetch({
56
+ endpoint,
57
+ BATCH_LIMIT: batchLimit,
58
+ BATCH_SIZE: batchSize,
59
+ CONCURRENT_REQUESTS: concurrentRequests,
60
+ batchParams: custPropOptions,
61
+ nsValues,
62
+ generateQueryKey: ({
63
+ endpoint: queryEndpoint,
64
+ offset,
65
+ paramsArray
66
+ }) => [
67
+ ...CUSTPROPS_QUERY_KEY_BASE,
68
+ ctx,
69
+ queryEndpoint,
70
+ offset,
71
+ paramsArray
72
+ ],
73
+ queryOptions: queryParams
74
+ });
75
+
76
+ return {
77
+ custprops,
78
+ isLoading,
79
+ total
80
+ };
81
+ };
82
+
83
+ useCustProps.propTypes = {
84
+ endpoint: PropTypes.string,
85
+ ctx: PropTypes.oneOfType([
86
+ PropTypes.string,
87
+ PropTypes.arrayOf(PropTypes.string)
88
+ ]),
89
+ nsValues: PropTypes.object,
90
+ options: PropTypes.object,
91
+ queryParams: PropTypes.object,
92
+ batchLimit: PropTypes.number,
93
+ batchSize: PropTypes.number,
94
+ concurrentRequests: PropTypes.number,
95
+ };
96
+
97
+ export default useCustProps;