@k-int/stripes-kint-components 5.31.4 → 5.33.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 (397) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/es/__mocks__/@folio/stripes/components.js +7 -3
  3. package/es/__mocks__/@folio/stripes/core.js +6 -4
  4. package/es/__mocks__/@folio/stripes/smart-components.js +6 -4
  5. package/es/__mocks__/react-query.js +6 -4
  6. package/es/__mocks__/react-router-dom.js +6 -6
  7. package/es/lib/ActionList/ActionList.js +33 -26
  8. package/es/lib/ActionList/ActionListFieldArray.js +119 -103
  9. package/es/lib/ButtonTypedown/ButtonTypedown.js +72 -17
  10. package/es/lib/ComboButton/ComboButton.js +47 -42
  11. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +17 -11
  12. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +46 -42
  13. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +58 -58
  14. package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +8 -4
  15. package/es/lib/CustomProperties/Config/CustomPropertyView.js +33 -32
  16. package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -1
  17. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -1
  18. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +3 -3
  19. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +35 -29
  20. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +59 -61
  21. package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +20 -20
  22. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -2
  23. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +1 -1
  24. package/es/lib/CustomProperties/Edit/testResources.js +12 -11
  25. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +33 -22
  26. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +37 -24
  27. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -1
  28. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +6 -6
  29. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +6 -3
  30. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +8 -4
  31. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +19 -15
  32. package/es/lib/CustomProperties/Filter/testResources.js +2 -1
  33. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +2 -1
  34. package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -1
  35. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +25 -17
  36. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +6 -3
  37. package/es/lib/CustomProperties/View/CustomPropertyCard.js +11 -7
  38. package/es/lib/CycleButton/CycleButton.js +17 -9
  39. package/es/lib/FormModal/FormModal.js +32 -24
  40. package/es/lib/FormattedKintMessage/FormattedKintMessage.js +30 -23
  41. package/es/lib/IconSelect/IconSelect.js +32 -22
  42. package/es/lib/NoResultsMessage/NoResultsMessage.js +5 -4
  43. package/es/lib/NumberField/NumberField.js +25 -17
  44. package/es/lib/NumberField/NumberField.test.js +7 -6
  45. package/es/lib/QueryTypedown/QueryTypedown.js +15 -8
  46. package/es/lib/RefdataButtons/RefdataButtons.js +9 -6
  47. package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +60 -48
  48. package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +6 -5
  49. package/es/lib/RichSelect/RichSelect.js +36 -31
  50. package/es/lib/RichSelect/useSelectedOption.js +2 -1
  51. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +94 -91
  52. package/es/lib/SASQLookupComponent/SASQLookupComponent.test.js +36 -44
  53. package/es/lib/SASQLookupComponent/TableBody/TableBody.js +53 -42
  54. package/es/lib/SASQLookupComponent/TableBody/TableBody.test.js +23 -19
  55. package/es/lib/SASQRoute/SASQRoute.js +29 -25
  56. package/es/lib/SASQRoute/SASQRoute.test.js +13 -11
  57. package/es/lib/SASQViewComponent/SASQViewComponent.js +76 -68
  58. package/es/lib/SASQViewComponent/SASQViewComponent.test.js +8 -4
  59. package/es/lib/SearchField/SearchField.js +13 -7
  60. package/es/lib/SearchKeyControl/SearchKeyControl.js +13 -8
  61. package/es/lib/SearchKeyControl/SearchKeyControl.test.js +6 -2
  62. package/es/lib/Settings/EditableRefdataCategoryList/EditableRefdataCategoryList.js +46 -30
  63. package/es/lib/Settings/EditableRefdataList/EditableRefdataList.js +43 -33
  64. package/es/lib/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js +11 -7
  65. package/es/lib/Settings/EditableSettingsList/SettingField/EditSettingValue/EditSettingValue.js +20 -13
  66. package/es/lib/Settings/EditableSettingsList/SettingField/RenderSettingValue/RenderSettingValue.js +12 -10
  67. package/es/lib/Settings/EditableSettingsList/SettingField/SettingField.js +15 -10
  68. package/es/lib/Settings/EditableSettingsList/SettingField/SettingField.test.js +3 -3
  69. package/es/lib/Settings/RefdataCategoriesSettings/RefdataCategoriesSettings.js +26 -19
  70. package/es/lib/Settings/SettingPage/SettingPagePane/SettingPagePane.js +2 -2
  71. package/es/lib/Settings/Settings/Settings.js +178 -0
  72. package/es/lib/Settings/Settings/index.js +13 -0
  73. package/es/lib/Settings/SettingsFormContainer/SettingsFormContainer.js +35 -30
  74. package/es/lib/Settings/StaticSettingsField/StaticSettingsField.js +8 -5
  75. package/es/lib/Settings/StaticSettingsField/StaticSettingsFieldComponent/StaticSettingsFieldComponent.js +22 -18
  76. package/es/lib/Settings/hooks/staticSettingsPages/useSettingCallout/useSettingCallout.js +2 -2
  77. package/es/lib/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/useSettingsSectionInitalValues.js +1 -1
  78. package/es/lib/Settings/hooks/staticSettingsPages/useStaticSettingsSection.js +7 -3
  79. package/es/lib/Settings/hooks/useAppSettings/useAppSettings.js +11 -7
  80. package/es/lib/Settings/hooks/useSettingSection/useSettingSection.js +22 -16
  81. package/es/lib/Settings/hooks/useSettings/useSettings.js +105 -85
  82. package/es/lib/Settings/index.js +8 -0
  83. package/es/lib/Tags/Tags.js +8 -5
  84. package/es/lib/Tags/hooks/useTags.js +1 -1
  85. package/es/lib/Tags/hooks/useTagsEnabled.js +3 -2
  86. package/es/lib/Tags/tagsConfig.js +1 -1
  87. package/es/lib/Typedown/Typedown.js +31 -21
  88. package/es/lib/hooks/__mocks__/index.js +7 -3
  89. package/es/lib/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js +26 -20
  90. package/es/lib/hooks/intlHooks/useKintIntl/useKintIntl.js +34 -24
  91. package/es/lib/hooks/typedownHooks/useTypedown.js +12 -11
  92. package/es/lib/hooks/typedownHooks/useTypedownToggle.js +2 -2
  93. package/es/lib/hooks/useActionListRef.js +1 -1
  94. package/es/lib/hooks/useActiveElement.js +1 -1
  95. package/es/lib/hooks/useCustomProperties.js +10 -6
  96. package/es/lib/hooks/useHelperApp.js +16 -13
  97. package/es/lib/hooks/useKiwtFieldArray.js +8 -7
  98. package/es/lib/hooks/useKiwtSASQuery.js +19 -15
  99. package/es/lib/hooks/useLocalPageStore.js +10 -7
  100. package/es/lib/hooks/useModConfigEntries.js +2 -2
  101. package/es/lib/hooks/useMutateCustomProperties/useMutateCustomProperties.js +17 -10
  102. package/es/lib/hooks/useMutateGeneric/useMutateGeneric.js +2 -2
  103. package/es/lib/hooks/useMutateModConfigEntry.js +2 -2
  104. package/es/lib/hooks/useMutateRefdataCategory/useMutateRefdataCategory.js +21 -15
  105. package/es/lib/hooks/useMutateRefdataValue/useMutateRefdataValue.js +23 -16
  106. package/es/lib/hooks/usePrevNextPagination.js +19 -17
  107. package/es/lib/hooks/useQIndex.js +14 -11
  108. package/es/lib/hooks/useRefdata.js +3 -3
  109. package/es/lib/hooks/useStandaloneSASQQueryParameter/useStandaloneSASQQueryParameter.js +13 -9
  110. package/es/lib/hooks/useTemplates.js +4 -4
  111. package/es/lib/utils/buildUrl.js +3 -2
  112. package/es/lib/utils/filterParsers/deparseKiwtQueryFilters.js +5 -5
  113. package/es/lib/utils/filterParsers/parseKiwtQueryFilters.js +2 -2
  114. package/es/lib/utils/filterParsers/parseKiwtQueryGroups.js +5 -4
  115. package/es/lib/utils/filterParsers/parseKiwtQueryString.js +1 -1
  116. package/es/lib/utils/generateKiwtQueryParams/generateKiwtQueryParams.js +107 -94
  117. package/es/lib/utils/groupCustomPropertiesByCtx.js +9 -5
  118. package/es/lib/utils/matchString.js +7 -5
  119. package/es/lib/utils/parseErrorResponse.js +7 -3
  120. package/es/lib/utils/selectorSafe.js +3 -2
  121. package/es/lib/utils/sortByLabel.js +3 -2
  122. package/es/lib/validators/validators.js +9 -6
  123. package/package.json +1 -1
  124. package/src/artifacts/coverage-jest/ActionList/ActionList.js.html +1 -1
  125. package/src/artifacts/coverage-jest/ActionList/ActionListFieldArray.js.html +1 -1
  126. package/src/artifacts/coverage-jest/ActionList/index.html +1 -1
  127. package/src/artifacts/coverage-jest/ActionList/index.js.html +1 -1
  128. package/src/artifacts/coverage-jest/ButtonTypedown/ButtonTypedown.js.html +215 -23
  129. package/src/artifacts/coverage-jest/ButtonTypedown/index.html +17 -17
  130. package/src/artifacts/coverage-jest/ButtonTypedown/index.js.html +1 -1
  131. package/src/artifacts/coverage-jest/ComboButton/ComboButton.js.html +1 -1
  132. package/src/artifacts/coverage-jest/ComboButton/index.html +1 -1
  133. package/src/artifacts/coverage-jest/ComboButton/index.js.html +1 -1
  134. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
  135. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesSettings.js.html +1 -1
  136. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
  137. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyView.js.html +1 -1
  138. package/src/artifacts/coverage-jest/CustomProperties/Config/index.html +1 -1
  139. package/src/artifacts/coverage-jest/CustomProperties/Config/index.js.html +1 -1
  140. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
  141. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
  142. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
  143. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyField.js.html +1 -1
  144. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
  145. package/src/artifacts/coverage-jest/CustomProperties/Edit/index.html +1 -1
  146. package/src/artifacts/coverage-jest/CustomProperties/Edit/index.js.html +1 -1
  147. package/src/artifacts/coverage-jest/CustomProperties/Edit/testResources.js.html +1 -1
  148. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilter.js.html +1 -1
  149. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
  150. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
  151. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
  152. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
  153. package/src/artifacts/coverage-jest/CustomProperties/Filter/index.html +1 -1
  154. package/src/artifacts/coverage-jest/CustomProperties/Filter/index.js.html +1 -1
  155. package/src/artifacts/coverage-jest/CustomProperties/Filter/testResources.js.html +1 -1
  156. package/src/artifacts/coverage-jest/CustomProperties/Filter/useOperators.js.html +1 -1
  157. package/src/artifacts/coverage-jest/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
  158. package/src/artifacts/coverage-jest/CustomProperties/Filter/useValueProps.js.html +1 -1
  159. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesView.js.html +1 -1
  160. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesViewCtx.js.html +1 -1
  161. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertyCard.js.html +1 -1
  162. package/src/artifacts/coverage-jest/CustomProperties/View/index.html +1 -1
  163. package/src/artifacts/coverage-jest/CustomProperties/View/index.js.html +1 -1
  164. package/src/artifacts/coverage-jest/CustomProperties/View/testResources.js.html +1 -1
  165. package/src/artifacts/coverage-jest/CustomProperties/index.html +1 -1
  166. package/src/artifacts/coverage-jest/CustomProperties/index.js.html +1 -1
  167. package/src/artifacts/coverage-jest/CycleButton/CycleButton.js.html +1 -1
  168. package/src/artifacts/coverage-jest/CycleButton/index.html +1 -1
  169. package/src/artifacts/coverage-jest/CycleButton/index.js.html +1 -1
  170. package/src/artifacts/coverage-jest/FieldLabel/FieldLabel.js.html +1 -1
  171. package/src/artifacts/coverage-jest/FieldLabel/index.html +1 -1
  172. package/src/artifacts/coverage-jest/FieldLabel/index.js.html +1 -1
  173. package/src/artifacts/coverage-jest/FormModal/FormModal.js.html +1 -1
  174. package/src/artifacts/coverage-jest/FormModal/index.html +1 -1
  175. package/src/artifacts/coverage-jest/FormModal/index.js.html +1 -1
  176. package/src/artifacts/coverage-jest/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
  177. package/src/artifacts/coverage-jest/FormattedKintMessage/index.html +1 -1
  178. package/src/artifacts/coverage-jest/FormattedKintMessage/index.js.html +1 -1
  179. package/src/artifacts/coverage-jest/IconSelect/IconSelect.js.html +1 -1
  180. package/src/artifacts/coverage-jest/IconSelect/index.html +1 -1
  181. package/src/artifacts/coverage-jest/IconSelect/index.js.html +1 -1
  182. package/src/artifacts/coverage-jest/NoResultsMessage/NoResultsMessage.js.html +1 -1
  183. package/src/artifacts/coverage-jest/NoResultsMessage/index.html +1 -1
  184. package/src/artifacts/coverage-jest/NoResultsMessage/index.js.html +1 -1
  185. package/src/artifacts/coverage-jest/NumberField/NumberField.js.html +15 -15
  186. package/src/artifacts/coverage-jest/NumberField/index.html +1 -1
  187. package/src/artifacts/coverage-jest/NumberField/index.js.html +1 -1
  188. package/src/artifacts/coverage-jest/QueryTypedown/QueryTypedown.js.html +1 -1
  189. package/src/artifacts/coverage-jest/QueryTypedown/index.html +1 -1
  190. package/src/artifacts/coverage-jest/QueryTypedown/index.js.html +1 -1
  191. package/src/artifacts/coverage-jest/RefdataButtons/RefdataButtons.js.html +1 -1
  192. package/src/artifacts/coverage-jest/RefdataButtons/index.html +1 -1
  193. package/src/artifacts/coverage-jest/RefdataButtons/index.js.html +1 -1
  194. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +1 -1
  195. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.html +1 -1
  196. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.js.html +1 -1
  197. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +1 -1
  198. package/src/artifacts/coverage-jest/RichSelect/RichSelect.js.html +1 -1
  199. package/src/artifacts/coverage-jest/RichSelect/index.html +1 -1
  200. package/src/artifacts/coverage-jest/RichSelect/index.js.html +1 -1
  201. package/src/artifacts/coverage-jest/RichSelect/useSelectedOption.js.html +1 -1
  202. package/src/artifacts/coverage-jest/SASQLookupComponent/SASQLookupComponent.js.html +31 -31
  203. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
  204. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.html +1 -1
  205. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.js.html +1 -1
  206. package/src/artifacts/coverage-jest/SASQLookupComponent/index.html +1 -1
  207. package/src/artifacts/coverage-jest/SASQLookupComponent/index.js.html +1 -1
  208. package/src/artifacts/coverage-jest/SASQRoute/SASQRoute.js.html +1 -1
  209. package/src/artifacts/coverage-jest/SASQRoute/index.html +1 -1
  210. package/src/artifacts/coverage-jest/SASQRoute/index.js.html +1 -1
  211. package/src/artifacts/coverage-jest/SASQViewComponent/SASQViewComponent.js.html +1 -1
  212. package/src/artifacts/coverage-jest/SASQViewComponent/index.html +1 -1
  213. package/src/artifacts/coverage-jest/SASQViewComponent/index.js.html +1 -1
  214. package/src/artifacts/coverage-jest/SearchField/SearchField.js.html +1 -1
  215. package/src/artifacts/coverage-jest/SearchField/index.html +1 -1
  216. package/src/artifacts/coverage-jest/SearchField/index.js.html +1 -1
  217. package/src/artifacts/coverage-jest/SearchKeyControl/SearchKeyControl.js.html +1 -1
  218. package/src/artifacts/coverage-jest/SearchKeyControl/index.html +1 -1
  219. package/src/artifacts/coverage-jest/SearchKeyControl/index.js.html +1 -1
  220. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
  221. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.html +1 -1
  222. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.js.html +1 -1
  223. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/EditableRefdataList.js.html +1 -1
  224. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.html +1 -1
  225. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.js.html +1 -1
  226. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsList.js.html +1 -1
  227. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js.html +1 -1
  228. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.html +1 -1
  229. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.js.html +1 -1
  230. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/EditSettingValue.js.html +1 -1
  231. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.html +1 -1
  232. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.js.html +1 -1
  233. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/RenderSettingValue.js.html +1 -1
  234. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.html +1 -1
  235. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.js.html +1 -1
  236. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/SettingField.js.html +1 -1
  237. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.html +1 -1
  238. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.js.html +1 -1
  239. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.html +1 -1
  240. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.js.html +1 -1
  241. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/RefdataCategoriesSettings.js.html +1 -1
  242. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.html +1 -1
  243. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.js.html +1 -1
  244. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPage.js.html +1 -1
  245. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/SettingPagePane.js.html +1 -1
  246. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.html +1 -1
  247. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.js.html +1 -1
  248. package/src/artifacts/coverage-jest/Settings/SettingPage/index.html +1 -1
  249. package/src/artifacts/coverage-jest/Settings/SettingPage/index.js.html +1 -1
  250. package/src/artifacts/coverage-jest/Settings/Settings/Settings.js.html +730 -0
  251. package/src/artifacts/coverage-jest/Settings/Settings/index.html +131 -0
  252. package/src/artifacts/coverage-jest/Settings/Settings/index.js.html +88 -0
  253. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/SettingsFormContainer.js.html +1 -1
  254. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.html +1 -1
  255. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.js.html +1 -1
  256. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsField.js.html +1 -1
  257. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/StaticSettingsFieldComponent.js.html +1 -1
  258. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.html +1 -1
  259. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.js.html +1 -1
  260. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.html +1 -1
  261. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.js.html +1 -1
  262. package/src/artifacts/coverage-jest/Settings/constants/index.html +1 -1
  263. package/src/artifacts/coverage-jest/Settings/constants/index.js.html +1 -1
  264. package/src/artifacts/coverage-jest/Settings/constants/queryKeys.js.html +1 -1
  265. package/src/artifacts/coverage-jest/Settings/contexts/SettingsContext.js.html +1 -1
  266. package/src/artifacts/coverage-jest/Settings/contexts/index.html +1 -1
  267. package/src/artifacts/coverage-jest/Settings/contexts/index.js.html +1 -1
  268. package/src/artifacts/coverage-jest/Settings/hooks/index.html +1 -1
  269. package/src/artifacts/coverage-jest/Settings/hooks/index.js.html +1 -1
  270. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.html +1 -1
  271. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.js.html +1 -1
  272. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.html +1 -1
  273. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.js.html +1 -1
  274. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/useSettingCallout.js.html +1 -1
  275. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.html +1 -1
  276. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.js.html +1 -1
  277. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/useSettingsSectionInitalValues.js.html +1 -1
  278. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useStaticSettingsSection.js.html +1 -1
  279. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.html +1 -1
  280. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.js.html +1 -1
  281. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/useAppSettings.js.html +1 -1
  282. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.html +1 -1
  283. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.js.html +1 -1
  284. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/useSettingSection.js.html +1 -1
  285. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.html +11 -11
  286. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.js.html +1 -1
  287. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/useSettings.js.html +118 -64
  288. package/src/artifacts/coverage-jest/Settings/index.html +1 -1
  289. package/src/artifacts/coverage-jest/Settings/index.js.html +11 -2
  290. package/src/artifacts/coverage-jest/Tags/Tags.js.html +1 -1
  291. package/src/artifacts/coverage-jest/Tags/hooks/index.html +1 -1
  292. package/src/artifacts/coverage-jest/Tags/hooks/index.js.html +1 -1
  293. package/src/artifacts/coverage-jest/Tags/hooks/useTags.js.html +1 -1
  294. package/src/artifacts/coverage-jest/Tags/hooks/useTagsEnabled.js.html +1 -1
  295. package/src/artifacts/coverage-jest/Tags/index.html +1 -1
  296. package/src/artifacts/coverage-jest/Tags/index.js.html +1 -1
  297. package/src/artifacts/coverage-jest/Tags/tagsConfig.js.html +1 -1
  298. package/src/artifacts/coverage-jest/Typedown/Typedown.js.html +13 -4
  299. package/src/artifacts/coverage-jest/Typedown/index.html +3 -3
  300. package/src/artifacts/coverage-jest/Typedown/index.js.html +1 -1
  301. package/src/artifacts/coverage-jest/cobertura-coverage.xml +457 -284
  302. package/src/artifacts/coverage-jest/constants/comparators.js.html +1 -1
  303. package/src/artifacts/coverage-jest/constants/customProperties.js.html +1 -1
  304. package/src/artifacts/coverage-jest/constants/endpoints.js.html +1 -1
  305. package/src/artifacts/coverage-jest/constants/eventCodes.js.html +1 -1
  306. package/src/artifacts/coverage-jest/constants/index.html +1 -1
  307. package/src/artifacts/coverage-jest/constants/pagination.js.html +1 -1
  308. package/src/artifacts/coverage-jest/hooks/index.html +1 -1
  309. package/src/artifacts/coverage-jest/hooks/index.js.html +1 -1
  310. package/src/artifacts/coverage-jest/hooks/intlHooks/index.html +1 -1
  311. package/src/artifacts/coverage-jest/hooks/intlHooks/index.js.html +1 -1
  312. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.html +1 -1
  313. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.js.html +1 -1
  314. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/useIntlKey.js.html +7 -7
  315. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.html +1 -1
  316. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.js.html +1 -1
  317. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js.html +6 -6
  318. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.html +1 -1
  319. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.js.html +1 -1
  320. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/useKintIntl.js.html +6 -6
  321. package/src/artifacts/coverage-jest/hooks/typedownHooks/index.html +1 -1
  322. package/src/artifacts/coverage-jest/hooks/typedownHooks/index.js.html +1 -1
  323. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedown.js.html +1 -1
  324. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownData.js.html +1 -1
  325. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  326. package/src/artifacts/coverage-jest/hooks/useActionListRef.js.html +1 -1
  327. package/src/artifacts/coverage-jest/hooks/useActiveElement.js.html +1 -1
  328. package/src/artifacts/coverage-jest/hooks/useCustomProperties.js.html +1 -1
  329. package/src/artifacts/coverage-jest/hooks/useHelperApp.js.html +1 -1
  330. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.html +1 -1
  331. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.js.html +1 -1
  332. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/useInvalidateRefdata.js.html +1 -1
  333. package/src/artifacts/coverage-jest/hooks/useKiwtFieldArray.js.html +1 -1
  334. package/src/artifacts/coverage-jest/hooks/useKiwtSASQuery.js.html +9 -9
  335. package/src/artifacts/coverage-jest/hooks/useLocalPageStore.js.html +1 -1
  336. package/src/artifacts/coverage-jest/hooks/useLocalStorageState.js.html +5 -5
  337. package/src/artifacts/coverage-jest/hooks/useModConfigEntries.js.html +1 -1
  338. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.html +1 -1
  339. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.js.html +1 -1
  340. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/useMutateCustomProperties.js.html +1 -1
  341. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.html +1 -1
  342. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.js.html +1 -1
  343. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/useMutateGeneric.js.html +1 -1
  344. package/src/artifacts/coverage-jest/hooks/useMutateModConfigEntry.js.html +1 -1
  345. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.html +1 -1
  346. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.js.html +1 -1
  347. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/useMutateRefdataCategory.js.html +1 -1
  348. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.html +1 -1
  349. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.js.html +1 -1
  350. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/useMutateRefdataValue.js.html +1 -1
  351. package/src/artifacts/coverage-jest/hooks/usePrevNextPagination.js.html +20 -20
  352. package/src/artifacts/coverage-jest/hooks/useQIndex.js.html +8 -8
  353. package/src/artifacts/coverage-jest/hooks/useRefdata.js.html +1 -1
  354. package/src/artifacts/coverage-jest/hooks/useSASQQueryMeta.js.html +1 -1
  355. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.html +1 -1
  356. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.js.html +1 -1
  357. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/useStandaloneSASQQueryParameter.js.html +1 -1
  358. package/src/artifacts/coverage-jest/hooks/useTemplates.js.html +1 -1
  359. package/src/artifacts/coverage-jest/index.html +40 -25
  360. package/src/artifacts/coverage-jest/utils/buildUrl.js.html +1 -1
  361. package/src/artifacts/coverage-jest/utils/filterParsers/deparseKiwtQueryFilters.js.html +1 -1
  362. package/src/artifacts/coverage-jest/utils/filterParsers/index.html +1 -1
  363. package/src/artifacts/coverage-jest/utils/filterParsers/index.js.html +1 -1
  364. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryFilters.js.html +1 -1
  365. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryGroups.js.html +1 -1
  366. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryString.js.html +1 -1
  367. package/src/artifacts/coverage-jest/utils/generateKiwtQuery.js.html +1 -1
  368. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/generateKiwtQueryParams.js.html +1 -1
  369. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.html +1 -1
  370. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.js.html +1 -1
  371. package/src/artifacts/coverage-jest/utils/groupCustomPropertiesByCtx.js.html +1 -1
  372. package/src/artifacts/coverage-jest/utils/highlightString.js.html +1 -1
  373. package/src/artifacts/coverage-jest/utils/index.html +1 -1
  374. package/src/artifacts/coverage-jest/utils/index.js.html +1 -1
  375. package/src/artifacts/coverage-jest/utils/matchString.js.html +1 -1
  376. package/src/artifacts/coverage-jest/utils/modConfigEntriesQueryKey.js.html +1 -1
  377. package/src/artifacts/coverage-jest/utils/parseErrorResponse.js.html +1 -1
  378. package/src/artifacts/coverage-jest/utils/parseModConfigEntry.js.html +1 -1
  379. package/src/artifacts/coverage-jest/utils/refdataOptions.js.html +1 -1
  380. package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.html +1 -1
  381. package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.js.html +1 -1
  382. package/src/artifacts/coverage-jest/utils/refdataQueryKey/refdataQueryKey.js.html +1 -1
  383. package/src/artifacts/coverage-jest/utils/selectorSafe.js.html +1 -1
  384. package/src/artifacts/coverage-jest/utils/sortByLabel.js.html +1 -1
  385. package/src/artifacts/coverage-jest/utils/toCamelCase.js.html +1 -1
  386. package/src/artifacts/coverage-jest/utils/typedownQueryKey.js.html +1 -1
  387. package/src/artifacts/coverage-jest/validators/index.html +1 -1
  388. package/src/artifacts/coverage-jest/validators/index.js.html +1 -1
  389. package/src/artifacts/coverage-jest/validators/validators.js.html +1 -1
  390. package/src/lib/ButtonTypedown/ButtonTypedown.js +77 -13
  391. package/src/lib/Settings/Settings/Settings.js +215 -0
  392. package/src/lib/Settings/Settings/index.js +1 -0
  393. package/src/lib/Settings/hooks/useSettings/README.md +49 -19
  394. package/src/lib/Settings/hooks/useSettings/useSettings.js +64 -46
  395. package/src/lib/Settings/index.js +3 -0
  396. package/src/lib/Typedown/Typedown.js +4 -1
  397. package/styles/TypeDown.css +2 -2
@@ -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-02-04T17:18:32.500Z
76
+ at 2026-03-06T00:03:21.988Z
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-02-04T17:18:32.500Z
100
+ at 2026-03-06T00:03:21.988Z
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-02-04T17:18:32.500Z
133
+ at 2026-03-06T00:03:21.988Z
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-02-04T17:18:32.500Z
118
+ at 2026-03-06T00:03:21.988Z
119
119
  </div>
120
120
  <script src="../prettify.js"></script>
121
121
  <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-02-04T17:18:32.500Z
115
+ at 2026-03-06T00:03:21.988Z
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-02-04T17:18:32.500Z
100
+ at 2026-03-06T00:03:21.988Z
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-02-04T17:18:32.500Z
119
+ at 2026-03-06T00:03:21.988Z
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-02-04T17:18:32.500Z
76
+ at 2026-03-06T00:03:21.988Z
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-02-04T17:18:32.500Z
358
+ at 2026-03-06T00:03:21.988Z
359
359
  </div>
360
360
  <script src="../prettify.js"></script>
361
361
  <script>
@@ -1,15 +1,38 @@
1
+ import { useCallback } from 'react';
1
2
  import PropTypes from 'prop-types';
2
3
 
3
- import { DropdownButton } from '@folio/stripes/components';
4
+ import { DropdownButton, Tooltip } from '@folio/stripes/components';
4
5
 
5
6
  import SearchField from '../SearchField';
6
7
  import Typedown from '../Typedown';
7
8
 
8
9
  const ButtonTypedown = ({
9
10
  id,
11
+ renderButtonItem,
10
12
  renderListItem,
13
+ tooltipProps: {
14
+ getTooltipText, // A special prop that selectedValue can be passed into
15
+ ...tooltipProps
16
+ } = {},
11
17
  ...typedownProps
12
18
  }) => {
19
+ const renderButtonFunc = useCallback((selectedValue) => {
20
+ if (renderButtonItem) {
21
+ return renderButtonItem(selectedValue);
22
+ }
23
+
24
+ return renderListItem(selectedValue);
25
+ }, [renderButtonItem, renderListItem]);
26
+
27
+ const usesTypedown = (
28
+ getTooltipText &&
29
+ typeof getTooltipText === 'function'
30
+ ) ||
31
+ (
32
+ tooltipProps?.text &&
33
+ tooltipProps.text !== ''
34
+ );
35
+
13
36
  return (
14
37
  <Typedown
15
38
  getDisplayValue={() => false}
@@ -27,18 +50,59 @@ const ButtonTypedown = ({
27
50
  triggerComponentRef,
28
51
  triggerId,
29
52
  typedownTriggerKeyDownHandler
30
- }) => (
31
- <DropdownButton
32
- ref={triggerComponentRef}
33
- buttonStyle="dropdownItem"
34
- fullWidth
35
- id={triggerId}
36
- marginBottom0
37
- onKeyDown={typedownTriggerKeyDownHandler}
38
- >
39
- {renderListItem(selectedValue)}
40
- </DropdownButton>
41
- )}
53
+ }) => {
54
+ const renderButton = ({
55
+ buttonRef,
56
+ ...buttonProps
57
+ }) => {
58
+ return (
59
+ <DropdownButton
60
+ ref={buttonRef}
61
+ buttonStyle="dropdownItem"
62
+ id={triggerId}
63
+ marginBottom0
64
+ onKeyDown={typedownTriggerKeyDownHandler}
65
+ {...buttonProps}
66
+ >
67
+ {renderButtonFunc(selectedValue)}
68
+ </DropdownButton>
69
+ );
70
+ };
71
+
72
+ if (!usesTypedown) {
73
+ return renderButton({
74
+ buttonRef: triggerComponentRef,
75
+ });
76
+ }
77
+
78
+ const typedownText = (
79
+ getTooltipText &&
80
+ typeof getTooltipText === 'function'
81
+ ) ?
82
+ getTooltipText(selectedValue) :
83
+ (tooltipProps?.text || '');
84
+
85
+ return (
86
+ <Tooltip
87
+ id={`button-typedown-trigger-${id}`}
88
+ placement="bottom"
89
+ text={typedownText}
90
+ >
91
+ {({ ref: tooltipRef, ariaIds }) => (
92
+ renderButton({
93
+ buttonRef: (node) => {
94
+ // Contrive composed node from tooltip AND triggerComponent
95
+ triggerComponentRef(node);
96
+ if (tooltipRef.current !== node && !!node) {
97
+ tooltipRef.current = node;
98
+ }
99
+ },
100
+ 'aria-labelledby': ariaIds.text
101
+ })
102
+ )}
103
+ </Tooltip>
104
+ );
105
+ }}
42
106
  {...typedownProps}
43
107
  />
44
108
  );
@@ -0,0 +1,215 @@
1
+ import { useCallback, useMemo, useRef } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import {
4
+ Switch,
5
+ Route,
6
+ } from 'react-router-dom';
7
+
8
+ import { useStripes } from '@folio/stripes/core';
9
+
10
+ import {
11
+ NavList,
12
+ NavListItem,
13
+ NavListSection,
14
+ Pane,
15
+ } from '@folio/stripes/components';
16
+
17
+ // This is a functional version of the component in stripes-smart-components, onto which we can add some extra functionality
18
+ const Settings = ({
19
+ additionalRoutes,
20
+ // activeLink,
21
+ location,
22
+ match,
23
+ navPaneWidth = '30%',
24
+ paneProps = {},
25
+ paneTitle,
26
+ paneTitleRef: passedPaneTitleRef,
27
+ pages,
28
+ sections: passedSections,
29
+ }) => {
30
+ const stripes = useStripes();
31
+ const internalPaneTitleRef = useRef();
32
+ const paneTitleRef = passedPaneTitleRef || internalPaneTitleRef;
33
+
34
+ const sections = useMemo(() => {
35
+ if (passedSections) {
36
+ return passedSections;
37
+ }
38
+
39
+ return ([{ label: '', pages: (pages || []) }]);
40
+ }, [pages, passedSections]);
41
+
42
+ const internalRoutes = useMemo(() => {
43
+ return sections.flatMap(section => {
44
+ return section.pages
45
+ .filter(p => !p.perm || stripes.hasPerm(p.perm))
46
+ .flatMap(p => ({
47
+ page: p,
48
+ component: p.component, // This was previously stripes connected... is this going to cause issues?
49
+ }));
50
+ });
51
+ }, [sections, stripes]);
52
+
53
+ const handlePaneFocus = useCallback(({ paneTitleRef: ptr }) => {
54
+ if (ptr) ptr.current.focus();
55
+ }, []);
56
+
57
+ // links in a given section
58
+ const navlinks = useCallback((section) => {
59
+ let activeLink = ''; // Store which link is active... there is DEFINITELY a better way to get this...
60
+
61
+ const navItems = section.pages.map((p) => {
62
+ const search = location.search || '';
63
+ const link = `${match.path}/${p.route}`;
64
+ let href = link;
65
+ let isActive = false;
66
+
67
+ // NavListItem allows for isActive to be set independently, rather than
68
+ // strict internal comparison of the href and the `activeLink`
69
+ // Since the location can be augmented after navigation through subsequent navigation
70
+ // or through appending a query string, it's best to
71
+ // solely rely on the pathname for appying the style vs equality.
72
+ if (location.pathname.startsWith(link)) {
73
+ // apply the query string for the active link only.
74
+ href = link + search;
75
+ activeLink = link;
76
+ isActive = true;
77
+ }
78
+ if (p.perm && !stripes.hasPerm(p.perm)) return null;
79
+
80
+ return (
81
+ <NavListItem
82
+ key={p.route}
83
+ isActive={isActive}
84
+ to={href}
85
+ >
86
+ {p.label}
87
+ </NavListItem>
88
+ );
89
+ }).filter(x => x !== null);
90
+
91
+ return (
92
+ <NavListSection
93
+ activeLink={activeLink}
94
+ label={section.label}
95
+ >
96
+ {navItems}
97
+ </NavListSection>
98
+ );
99
+ }, [location.pathname, location.search, match.path, stripes]);
100
+
101
+ const routes = useMemo(() => internalRoutes.map((internalRoute) => {
102
+ const { page } = internalRoute;
103
+ const { component: Component, contextValue, Provider } = page;
104
+
105
+ if (Provider) {
106
+ return (
107
+ <Route
108
+ key={internalRoute.page.route}
109
+ path={`${match.path}/${internalRoute.page.route}`}
110
+ render={props2 => (
111
+ <Provider
112
+ contextValue={contextValue}
113
+ >
114
+ <Component
115
+ {...props2}
116
+ label={internalRoute.page.label}
117
+ stripes={stripes}
118
+ />
119
+ </Provider>
120
+ )}
121
+ />
122
+ );
123
+ }
124
+
125
+ const Current = internalRoute.component;
126
+ return (<Route
127
+ key={internalRoute.page.route}
128
+ path={`${match.path}/${internalRoute.page.route}`}
129
+ render={props2 => (
130
+ <Current
131
+ {...props2}
132
+ label={internalRoute.page.label}
133
+ stripes={stripes}
134
+ />
135
+ )}
136
+ />);
137
+ }), [internalRoutes, match.path, stripes]);
138
+
139
+ return (
140
+ <>
141
+ <Pane
142
+ defaultWidth={navPaneWidth}
143
+ id="app-settings-nav-pane"
144
+ onMount={handlePaneFocus}
145
+ paneTitle={paneTitle || 'Module Settings'}
146
+ paneTitleRef={paneTitleRef}
147
+ {...paneProps}
148
+ >
149
+ {sections.map((section, index) => {
150
+ const {
151
+ label: {
152
+ props: sectionProps,
153
+ },
154
+ } = section;
155
+ const id = sectionProps && sectionProps.id ? sectionProps.id : 'Module Settings';
156
+
157
+ return (
158
+ <NavList
159
+ key={index}
160
+ aria-label={id}
161
+ >
162
+ {navlinks(section)}
163
+ </NavList>
164
+ );
165
+ })
166
+ }
167
+ </Pane>
168
+ <Switch>
169
+ {additionalRoutes}
170
+ {routes}
171
+ </Switch>
172
+ </>
173
+ );
174
+ };
175
+
176
+ Settings.propTypes = {
177
+ activeLink: PropTypes.string,
178
+ additionalRoutes: PropTypes.arrayOf(
179
+ PropTypes.object.isRequired,
180
+ ),
181
+ location: PropTypes.shape({
182
+ pathname: PropTypes.string,
183
+ search: PropTypes.string,
184
+ }),
185
+ match: PropTypes.shape({
186
+ path: PropTypes.string.isRequired,
187
+ }).isRequired,
188
+ navPaneWidth: PropTypes.string,
189
+ pages: PropTypes.arrayOf(
190
+ PropTypes.shape({
191
+ component: PropTypes.func.isRequired,
192
+ label: PropTypes.node.isRequired,
193
+ perm: PropTypes.string,
194
+ route: PropTypes.string.isRequired,
195
+ }),
196
+ ),
197
+ paneBackLink: PropTypes.string,
198
+ paneTitle: PropTypes.node,
199
+ paneTitleRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
200
+ sections: PropTypes.arrayOf(
201
+ PropTypes.shape({
202
+ label: PropTypes.node.isRequired,
203
+ pages: PropTypes.arrayOf(
204
+ PropTypes.shape({
205
+ component: PropTypes.func.isRequired,
206
+ label: PropTypes.node.isRequired,
207
+ perm: PropTypes.string,
208
+ route: PropTypes.string.isRequired,
209
+ }),
210
+ ).isRequired,
211
+ }),
212
+ ),
213
+ };
214
+
215
+ export default Settings;
@@ -0,0 +1 @@
1
+ export { default } from './Settings';
@@ -1,5 +1,9 @@
1
1
  # useSettings
2
2
 
3
+ >[!WARNING]
4
+ >Legacy Pattern > This hook has become significantly complex and "heavy" due to the need to support legacy stripes-smart-components patterns while managing dynamic context injection.
5
+ > It is possible that this pattern will be significantly reworked in future versions to separate data-fetching logic from UI component generation in a more modular way.
6
+
3
7
  A comprehensive hook that manages the retrieval and configuration of settings data for one or multiple sections. It orchestrates multiple queries with `react-query`, constructs dynamic pages for each settings section, and returns a pre-configured `SettingsComponent` for rendering the settings UI.
4
8
 
5
9
  ## Overview
@@ -45,24 +49,25 @@ const SettingsContainer = () => {
45
49
 
46
50
  `useSettings` accepts an optional settings props object (`settingsProps`) that may include the following properties:
47
51
 
48
- | Name | Type | Description | Required |
49
- |------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
50
- | `allowGlobalEdit` | `boolean`| Global flag to enable or disable editing of settings. Defaults to `true`. | ✕ |
51
- | `dynamicPageExclusions`| `array` | Array of section names to be excluded from dynamic page generation. | ✕ |
52
- | `intlKey` | `string` | Base internationalization key for resolving labels. | ✕ |
53
- | `intlNS` | `string` | Internationalization namespace. | ✕ |
54
- | `labelOverrides` | `object` | Custom label overrides for specific settings keys. | ✕ |
55
- | `pages` | `array` | If provided, acts as a passthrough configuration for either sections or standalone pages, disabling query execution. | ✕ |
56
- | `persistentPages` | `array` | Array of pages that persist regardless of dynamic query results. | ✕ |
57
- | `preventQueries` | `boolean`| Flag to disable querying if settings data is provided externally. | ✕ |
58
- | `refdataEndpoint` | `string` | The API endpoint to retrieve reference data for settings. | ✕ |
59
- | `renderSingleSection` | `boolean`| When only one section is available, determines if it should be rendered as a single section with its own label. | ✕ |
60
- | `sectionPermission` | `string` | Permission string that, if provided, restricts the rendering of a section unless the current user has the specified permission. | ✕ |
61
- | `sectionRoute` | `string` | Base route path to be used when constructing dynamic page routes for settings sections. | ✕ |
62
- | `sections` | `array` | Array of section configuration objects. Each object can override or extend the global settings props for that specific section. This means that the shape here matches more or less the shape for the props of `useSettings` itself. | ✕ |
63
- | `settingEndpoint` | `string` | The base URL endpoint for fetching and updating settings. | ✕ |
64
- | `templateEndpoint` | `string` | The endpoint for retrieving settings templates (if applicable). | ✕ |
65
- | `render` | `func` | A custom render function for rendering individual setting fields. This function is passed down to the underlying settings components for specialized display logic. See `EditableSettingsList` for more information on how render is used. | ✕ |
52
+ | Name | Type | Description | Required |
53
+ |-------------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
54
+ | `allowGlobalEdit` | `boolean` | Global flag to enable or disable editing of settings. Defaults to `true`. | ✕ |
55
+ | `contextPerPage` | `boolean` | If `true`, wraps every individual page component in a Context Provider. Set to `false` if encountering redraw issues with SASQ components. Defaults to `true`, see "Performance & Redraws" section below for more information. | ✕ |
56
+ | `dynamicPageExclusions` | `array` | Array of section names to be excluded from dynamic page generation. | ✕ |
57
+ | `intlKey` | `string` | Base internationalization key for resolving labels. | ✕ |
58
+ | `intlNS` | `string` | Internationalization namespace. | ✕ |
59
+ | `labelOverrides` | `object` | Custom label overrides for specific settings keys. | ✕ |
60
+ | `pages` | `array` | If provided, acts as a passthrough configuration for either sections or standalone pages, disabling query execution. | ✕ |
61
+ | `persistentPages` | `array` | Array of pages that persist regardless of dynamic query results. | ✕ |
62
+ | `preventQueries` | `boolean` | Flag to disable querying if settings data is provided externally. | ✕ |
63
+ | `refdataEndpoint` | `string` | The API endpoint to retrieve reference data for settings. | ✕ |
64
+ | `renderSingleSection` | `boolean` | When only one section is available, determines if it should be rendered as a single section with its own label. | ✕ |
65
+ | `sectionPermission` | `string` | Permission string that, if provided, restricts the rendering of a section unless the current user has the specified permission. | ✕ |
66
+ | `sectionRoute` | `string` | Base route path to be used when constructing dynamic page routes for settings sections. | ✕ |
67
+ | `sections` | `array` | Array of section configuration objects. Each object can override or extend the global settings props for that specific section. This means that the shape here matches more or less the shape for the props of `useSettings` itself. | ✕ |
68
+ | `settingEndpoint` | `string` | The base URL endpoint for fetching and updating settings. | ✕ |
69
+ | `templateEndpoint` | `string` | The endpoint for retrieving settings templates (if applicable). | ✕ |
70
+ | `render` | `func` | A custom render function for rendering individual setting fields. This function is passed down to the underlying settings components for specialized display logic. See `EditableSettingsList` for more information on how render is used. | ✕ |
66
71
 
67
72
  ## Returns
68
73
 
@@ -81,4 +86,29 @@ The hook returns an object containing:
81
86
  A component pre-configured with the pages and sections that renders the settings UI. This component wraps the settings in the required `Settings` component from `@folio/stripes/smart-components`.
82
87
 
83
88
  - **`SettingsContextProvider`** (`React Component`):
84
- A context provider component for settings configuration. If only one section is available, it is provided directly; otherwise, it defaults to a pass-through provider.
89
+ A context provider component for settings configuration. If only one section is available, it is provided directly; otherwise, it defaults to a pass-through provider.
90
+
91
+ ## Performance and redraws
92
+ Because SettingsComponent is generated within the hook, its function reference changes whenever the underlying settings data (like pageList or sections) updates.
93
+
94
+ In some complex scenarios (e.g., using SearchAndSortQuery inside a settings page), this can cause the entire settings pane to unmount and remount (a "redraw"). If you experience lost input focus or flickering, instead of using the returned SettingsComponent, manually render the Settings component using the pageList or sections provided by the hook:
95
+
96
+ ```javascript
97
+ import { Settings } from '@k-int/stripes-kint-components';
98
+
99
+ const { isLoading, pageList, sections } = useSettings({
100
+ contextPerPage: false, // This should be turned off for this pattern
101
+ ...restOfConfig
102
+ });
103
+
104
+ if (isLoading) return null;
105
+
106
+ return (
107
+ <Settings
108
+ {...props}
109
+ pages={pageList}
110
+ sections={sections}
111
+ paneTitle={<FormattedMessage id="my-app.settings.title" />}
112
+ />
113
+ );
114
+ ```