@k-int/stripes-kint-components 5.32.0 → 5.33.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 (420) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/LICENSE +1 -1
  3. package/es/__mocks__/@folio/stripes/components.js +3 -7
  4. package/es/__mocks__/@folio/stripes/core.js +4 -6
  5. package/es/__mocks__/@folio/stripes/smart-components.js +4 -6
  6. package/es/__mocks__/react-query.js +4 -6
  7. package/es/__mocks__/react-router-dom.js +6 -6
  8. package/es/lib/ActionList/ActionList.js +26 -33
  9. package/es/lib/ActionList/ActionListFieldArray.js +103 -119
  10. package/es/lib/ButtonTypedown/ButtonTypedown.js +25 -33
  11. package/es/lib/ComboButton/ComboButton.js +42 -47
  12. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +11 -17
  13. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +42 -46
  14. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +58 -58
  15. package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +4 -8
  16. package/es/lib/CustomProperties/Config/CustomPropertyView.js +32 -33
  17. package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -1
  18. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -1
  19. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +3 -3
  20. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +29 -35
  21. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +61 -59
  22. package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +20 -20
  23. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -2
  24. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +1 -1
  25. package/es/lib/CustomProperties/Edit/testResources.js +11 -12
  26. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +22 -33
  27. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +24 -37
  28. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -1
  29. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +6 -6
  30. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +3 -6
  31. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +4 -8
  32. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +15 -19
  33. package/es/lib/CustomProperties/Filter/testResources.js +1 -2
  34. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +1 -2
  35. package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -1
  36. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +17 -25
  37. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +3 -6
  38. package/es/lib/CustomProperties/View/CustomPropertyCard.js +7 -11
  39. package/es/lib/CycleButton/CycleButton.js +9 -17
  40. package/es/lib/FormModal/FormModal.js +24 -32
  41. package/es/lib/FormattedKintMessage/FormattedKintMessage.js +23 -30
  42. package/es/lib/IconSelect/IconSelect.js +22 -32
  43. package/es/lib/NoResultsMessage/NoResultsMessage.js +4 -5
  44. package/es/lib/NumberField/NumberField.js +17 -25
  45. package/es/lib/NumberField/NumberField.test.js +6 -7
  46. package/es/lib/QueryTypedown/QueryTypedown.js +8 -15
  47. package/es/lib/RefdataButtons/RefdataButtons.js +6 -9
  48. package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +48 -60
  49. package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +5 -6
  50. package/es/lib/RichSelect/RichSelect.js +31 -36
  51. package/es/lib/RichSelect/useSelectedOption.js +1 -2
  52. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +91 -94
  53. package/es/lib/SASQLookupComponent/SASQLookupComponent.test.js +44 -36
  54. package/es/lib/SASQLookupComponent/TableBody/TableBody.js +42 -53
  55. package/es/lib/SASQLookupComponent/TableBody/TableBody.test.js +19 -23
  56. package/es/lib/SASQRoute/SASQRoute.js +25 -29
  57. package/es/lib/SASQRoute/SASQRoute.test.js +11 -13
  58. package/es/lib/SASQViewComponent/SASQViewComponent.js +68 -76
  59. package/es/lib/SASQViewComponent/SASQViewComponent.test.js +4 -8
  60. package/es/lib/SearchField/SearchField.js +7 -13
  61. package/es/lib/SearchKeyControl/SearchKeyControl.js +8 -13
  62. package/es/lib/SearchKeyControl/SearchKeyControl.test.js +2 -6
  63. package/es/lib/Settings/EditableRefdataCategoryList/EditableRefdataCategoryList.js +30 -46
  64. package/es/lib/Settings/EditableRefdataList/EditableRefdataList.js +33 -43
  65. package/es/lib/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js +7 -11
  66. package/es/lib/Settings/EditableSettingsList/SettingField/EditSettingValue/EditSettingValue.js +13 -20
  67. package/es/lib/Settings/EditableSettingsList/SettingField/RenderSettingValue/RenderSettingValue.js +10 -12
  68. package/es/lib/Settings/EditableSettingsList/SettingField/SettingField.js +10 -15
  69. package/es/lib/Settings/EditableSettingsList/SettingField/SettingField.test.js +3 -3
  70. package/es/lib/Settings/RefdataCategoriesSettings/RefdataCategoriesSettings.js +19 -26
  71. package/es/lib/Settings/SettingPage/SettingPagePane/SettingPagePane.js +2 -2
  72. package/es/lib/Settings/Settings/Settings.js +31 -13
  73. package/es/lib/Settings/SettingsFormContainer/SettingsFormContainer.js +30 -35
  74. package/es/lib/Settings/StaticSettingsField/StaticSettingsField.js +5 -8
  75. package/es/lib/Settings/StaticSettingsField/StaticSettingsFieldComponent/StaticSettingsFieldComponent.js +18 -22
  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 +3 -7
  79. package/es/lib/Settings/hooks/useAppSettings/useAppSettings.js +7 -11
  80. package/es/lib/Settings/hooks/useSettingSection/useSettingSection.js +16 -22
  81. package/es/lib/Settings/hooks/useSettings/useSettings.js +104 -88
  82. package/es/lib/Settings/index.js +8 -0
  83. package/es/lib/Tags/Tags.js +5 -8
  84. package/es/lib/Tags/hooks/useTags.js +1 -1
  85. package/es/lib/Tags/hooks/useTagsEnabled.js +2 -3
  86. package/es/lib/Tags/tagsConfig.js +1 -1
  87. package/es/lib/Typedown/Typedown.js +21 -28
  88. package/es/lib/hooks/__mocks__/index.js +3 -7
  89. package/es/lib/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js +20 -26
  90. package/es/lib/hooks/intlHooks/useKintIntl/useKintIntl.js +24 -34
  91. package/es/lib/hooks/typedownHooks/useTypedown.js +11 -12
  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 +6 -10
  96. package/es/lib/hooks/useHelperApp.js +13 -16
  97. package/es/lib/hooks/useKiwtFieldArray.js +7 -8
  98. package/es/lib/hooks/useKiwtSASQuery.js +15 -19
  99. package/es/lib/hooks/useLocalPageStore.js +7 -10
  100. package/es/lib/hooks/useModConfigEntries.js +2 -2
  101. package/es/lib/hooks/useMutateCustomProperties/useMutateCustomProperties.js +10 -17
  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 +15 -21
  105. package/es/lib/hooks/useMutateRefdataValue/useMutateRefdataValue.js +16 -23
  106. package/es/lib/hooks/usePrevNextPagination.js +17 -19
  107. package/es/lib/hooks/useQIndex.js +11 -14
  108. package/es/lib/hooks/useRefdata.js +3 -3
  109. package/es/lib/hooks/useStandaloneSASQQueryParameter/useStandaloneSASQQueryParameter.js +9 -13
  110. package/es/lib/hooks/useTemplates.js +4 -4
  111. package/es/lib/utils/buildUrl.js +2 -3
  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 +4 -5
  115. package/es/lib/utils/filterParsers/parseKiwtQueryString.js +1 -1
  116. package/es/lib/utils/generateKiwtQueryParams/generateKiwtQueryParams.js +94 -107
  117. package/es/lib/utils/groupCustomPropertiesByCtx.js +5 -9
  118. package/es/lib/utils/index.js +34 -13
  119. package/es/lib/utils/matchString/index.js +13 -0
  120. package/es/lib/utils/{matchString.js → matchString/matchString.js} +8 -9
  121. package/es/lib/utils/matchString/matchString.test.js +40 -0
  122. package/es/lib/utils/parseErrorResponse.js +3 -7
  123. package/es/lib/utils/selectorSafe.js +2 -3
  124. package/es/lib/utils/sortByLabel.js +2 -3
  125. package/es/lib/utils/stringStyling/boldString.js +30 -0
  126. package/es/lib/utils/stringStyling/boldString.test.js +47 -0
  127. package/es/lib/utils/stringStyling/highlightString.js +30 -0
  128. package/es/lib/utils/stringStyling/highlightString.test.js +51 -0
  129. package/es/lib/utils/stringStyling/index.js +20 -0
  130. package/es/lib/validators/validators.js +6 -9
  131. package/package.json +1 -1
  132. package/src/artifacts/coverage-jest/ActionList/ActionList.js.html +1 -1
  133. package/src/artifacts/coverage-jest/ActionList/ActionListFieldArray.js.html +1 -1
  134. package/src/artifacts/coverage-jest/ActionList/index.html +1 -1
  135. package/src/artifacts/coverage-jest/ActionList/index.js.html +1 -1
  136. package/src/artifacts/coverage-jest/ButtonTypedown/ButtonTypedown.js.html +1 -1
  137. package/src/artifacts/coverage-jest/ButtonTypedown/index.html +1 -1
  138. package/src/artifacts/coverage-jest/ButtonTypedown/index.js.html +1 -1
  139. package/src/artifacts/coverage-jest/ComboButton/ComboButton.js.html +1 -1
  140. package/src/artifacts/coverage-jest/ComboButton/index.html +1 -1
  141. package/src/artifacts/coverage-jest/ComboButton/index.js.html +1 -1
  142. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
  143. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesSettings.js.html +1 -1
  144. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
  145. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyView.js.html +1 -1
  146. package/src/artifacts/coverage-jest/CustomProperties/Config/index.html +1 -1
  147. package/src/artifacts/coverage-jest/CustomProperties/Config/index.js.html +1 -1
  148. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
  149. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
  150. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
  151. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyField.js.html +1 -1
  152. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
  153. package/src/artifacts/coverage-jest/CustomProperties/Edit/index.html +1 -1
  154. package/src/artifacts/coverage-jest/CustomProperties/Edit/index.js.html +1 -1
  155. package/src/artifacts/coverage-jest/CustomProperties/Edit/testResources.js.html +1 -1
  156. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilter.js.html +1 -1
  157. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
  158. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
  159. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
  160. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
  161. package/src/artifacts/coverage-jest/CustomProperties/Filter/index.html +1 -1
  162. package/src/artifacts/coverage-jest/CustomProperties/Filter/index.js.html +1 -1
  163. package/src/artifacts/coverage-jest/CustomProperties/Filter/testResources.js.html +1 -1
  164. package/src/artifacts/coverage-jest/CustomProperties/Filter/useOperators.js.html +1 -1
  165. package/src/artifacts/coverage-jest/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
  166. package/src/artifacts/coverage-jest/CustomProperties/Filter/useValueProps.js.html +1 -1
  167. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesView.js.html +1 -1
  168. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesViewCtx.js.html +1 -1
  169. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertyCard.js.html +1 -1
  170. package/src/artifacts/coverage-jest/CustomProperties/View/index.html +1 -1
  171. package/src/artifacts/coverage-jest/CustomProperties/View/index.js.html +1 -1
  172. package/src/artifacts/coverage-jest/CustomProperties/View/testResources.js.html +1 -1
  173. package/src/artifacts/coverage-jest/CustomProperties/index.html +1 -1
  174. package/src/artifacts/coverage-jest/CustomProperties/index.js.html +1 -1
  175. package/src/artifacts/coverage-jest/CycleButton/CycleButton.js.html +1 -1
  176. package/src/artifacts/coverage-jest/CycleButton/index.html +1 -1
  177. package/src/artifacts/coverage-jest/CycleButton/index.js.html +1 -1
  178. package/src/artifacts/coverage-jest/FieldLabel/FieldLabel.js.html +1 -1
  179. package/src/artifacts/coverage-jest/FieldLabel/index.html +1 -1
  180. package/src/artifacts/coverage-jest/FieldLabel/index.js.html +1 -1
  181. package/src/artifacts/coverage-jest/FormModal/FormModal.js.html +1 -1
  182. package/src/artifacts/coverage-jest/FormModal/index.html +1 -1
  183. package/src/artifacts/coverage-jest/FormModal/index.js.html +1 -1
  184. package/src/artifacts/coverage-jest/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
  185. package/src/artifacts/coverage-jest/FormattedKintMessage/index.html +1 -1
  186. package/src/artifacts/coverage-jest/FormattedKintMessage/index.js.html +1 -1
  187. package/src/artifacts/coverage-jest/IconSelect/IconSelect.js.html +1 -1
  188. package/src/artifacts/coverage-jest/IconSelect/index.html +1 -1
  189. package/src/artifacts/coverage-jest/IconSelect/index.js.html +1 -1
  190. package/src/artifacts/coverage-jest/NoResultsMessage/NoResultsMessage.js.html +1 -1
  191. package/src/artifacts/coverage-jest/NoResultsMessage/index.html +1 -1
  192. package/src/artifacts/coverage-jest/NoResultsMessage/index.js.html +1 -1
  193. package/src/artifacts/coverage-jest/NumberField/NumberField.js.html +15 -15
  194. package/src/artifacts/coverage-jest/NumberField/index.html +1 -1
  195. package/src/artifacts/coverage-jest/NumberField/index.js.html +1 -1
  196. package/src/artifacts/coverage-jest/QueryTypedown/QueryTypedown.js.html +1 -1
  197. package/src/artifacts/coverage-jest/QueryTypedown/index.html +1 -1
  198. package/src/artifacts/coverage-jest/QueryTypedown/index.js.html +1 -1
  199. package/src/artifacts/coverage-jest/RefdataButtons/RefdataButtons.js.html +1 -1
  200. package/src/artifacts/coverage-jest/RefdataButtons/index.html +1 -1
  201. package/src/artifacts/coverage-jest/RefdataButtons/index.js.html +1 -1
  202. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +1 -1
  203. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.html +1 -1
  204. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.js.html +1 -1
  205. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +1 -1
  206. package/src/artifacts/coverage-jest/RichSelect/RichSelect.js.html +1 -1
  207. package/src/artifacts/coverage-jest/RichSelect/index.html +1 -1
  208. package/src/artifacts/coverage-jest/RichSelect/index.js.html +1 -1
  209. package/src/artifacts/coverage-jest/RichSelect/useSelectedOption.js.html +1 -1
  210. package/src/artifacts/coverage-jest/SASQLookupComponent/SASQLookupComponent.js.html +31 -31
  211. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
  212. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.html +1 -1
  213. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.js.html +1 -1
  214. package/src/artifacts/coverage-jest/SASQLookupComponent/index.html +1 -1
  215. package/src/artifacts/coverage-jest/SASQLookupComponent/index.js.html +1 -1
  216. package/src/artifacts/coverage-jest/SASQRoute/SASQRoute.js.html +1 -1
  217. package/src/artifacts/coverage-jest/SASQRoute/index.html +1 -1
  218. package/src/artifacts/coverage-jest/SASQRoute/index.js.html +1 -1
  219. package/src/artifacts/coverage-jest/SASQViewComponent/SASQViewComponent.js.html +1 -1
  220. package/src/artifacts/coverage-jest/SASQViewComponent/index.html +1 -1
  221. package/src/artifacts/coverage-jest/SASQViewComponent/index.js.html +1 -1
  222. package/src/artifacts/coverage-jest/SearchField/SearchField.js.html +1 -1
  223. package/src/artifacts/coverage-jest/SearchField/index.html +1 -1
  224. package/src/artifacts/coverage-jest/SearchField/index.js.html +1 -1
  225. package/src/artifacts/coverage-jest/SearchKeyControl/SearchKeyControl.js.html +1 -1
  226. package/src/artifacts/coverage-jest/SearchKeyControl/index.html +1 -1
  227. package/src/artifacts/coverage-jest/SearchKeyControl/index.js.html +1 -1
  228. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
  229. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.html +1 -1
  230. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.js.html +1 -1
  231. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/EditableRefdataList.js.html +1 -1
  232. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.html +1 -1
  233. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.js.html +1 -1
  234. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsList.js.html +1 -1
  235. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js.html +1 -1
  236. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.html +1 -1
  237. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.js.html +1 -1
  238. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/EditSettingValue.js.html +1 -1
  239. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.html +1 -1
  240. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.js.html +1 -1
  241. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/RenderSettingValue.js.html +1 -1
  242. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.html +1 -1
  243. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.js.html +1 -1
  244. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/SettingField.js.html +1 -1
  245. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.html +1 -1
  246. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.js.html +1 -1
  247. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.html +1 -1
  248. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.js.html +1 -1
  249. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/RefdataCategoriesSettings.js.html +1 -1
  250. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.html +1 -1
  251. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.js.html +1 -1
  252. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPage.js.html +1 -1
  253. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/SettingPagePane.js.html +1 -1
  254. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.html +1 -1
  255. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.js.html +1 -1
  256. package/src/artifacts/coverage-jest/Settings/SettingPage/index.html +1 -1
  257. package/src/artifacts/coverage-jest/Settings/SettingPage/index.js.html +1 -1
  258. package/src/artifacts/coverage-jest/Settings/Settings/Settings.js.html +96 -9
  259. package/src/artifacts/coverage-jest/Settings/Settings/index.html +14 -14
  260. package/src/artifacts/coverage-jest/Settings/Settings/index.js.html +1 -1
  261. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/SettingsFormContainer.js.html +1 -1
  262. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.html +1 -1
  263. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.js.html +1 -1
  264. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsField.js.html +1 -1
  265. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/StaticSettingsFieldComponent.js.html +1 -1
  266. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.html +1 -1
  267. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.js.html +1 -1
  268. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.html +1 -1
  269. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.js.html +1 -1
  270. package/src/artifacts/coverage-jest/Settings/constants/index.html +1 -1
  271. package/src/artifacts/coverage-jest/Settings/constants/index.js.html +1 -1
  272. package/src/artifacts/coverage-jest/Settings/constants/queryKeys.js.html +1 -1
  273. package/src/artifacts/coverage-jest/Settings/contexts/SettingsContext.js.html +1 -1
  274. package/src/artifacts/coverage-jest/Settings/contexts/index.html +1 -1
  275. package/src/artifacts/coverage-jest/Settings/contexts/index.js.html +1 -1
  276. package/src/artifacts/coverage-jest/Settings/hooks/index.html +1 -1
  277. package/src/artifacts/coverage-jest/Settings/hooks/index.js.html +1 -1
  278. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.html +1 -1
  279. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.js.html +1 -1
  280. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.html +1 -1
  281. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.js.html +1 -1
  282. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/useSettingCallout.js.html +1 -1
  283. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.html +1 -1
  284. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.js.html +1 -1
  285. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/useSettingsSectionInitalValues.js.html +1 -1
  286. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useStaticSettingsSection.js.html +1 -1
  287. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.html +1 -1
  288. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.js.html +1 -1
  289. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/useAppSettings.js.html +1 -1
  290. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.html +1 -1
  291. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.js.html +1 -1
  292. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/useSettingSection.js.html +1 -1
  293. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.html +13 -13
  294. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.js.html +1 -1
  295. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/useSettings.js.html +105 -69
  296. package/src/artifacts/coverage-jest/Settings/index.html +1 -1
  297. package/src/artifacts/coverage-jest/Settings/index.js.html +11 -2
  298. package/src/artifacts/coverage-jest/Tags/Tags.js.html +1 -1
  299. package/src/artifacts/coverage-jest/Tags/hooks/index.html +1 -1
  300. package/src/artifacts/coverage-jest/Tags/hooks/index.js.html +1 -1
  301. package/src/artifacts/coverage-jest/Tags/hooks/useTags.js.html +1 -1
  302. package/src/artifacts/coverage-jest/Tags/hooks/useTagsEnabled.js.html +1 -1
  303. package/src/artifacts/coverage-jest/Tags/index.html +1 -1
  304. package/src/artifacts/coverage-jest/Tags/index.js.html +1 -1
  305. package/src/artifacts/coverage-jest/Tags/tagsConfig.js.html +1 -1
  306. package/src/artifacts/coverage-jest/Typedown/Typedown.js.html +1 -1
  307. package/src/artifacts/coverage-jest/Typedown/index.html +1 -1
  308. package/src/artifacts/coverage-jest/Typedown/index.js.html +1 -1
  309. package/src/artifacts/coverage-jest/cobertura-coverage.xml +371 -334
  310. package/src/artifacts/coverage-jest/constants/comparators.js.html +1 -1
  311. package/src/artifacts/coverage-jest/constants/customProperties.js.html +1 -1
  312. package/src/artifacts/coverage-jest/constants/endpoints.js.html +1 -1
  313. package/src/artifacts/coverage-jest/constants/eventCodes.js.html +1 -1
  314. package/src/artifacts/coverage-jest/constants/index.html +1 -1
  315. package/src/artifacts/coverage-jest/constants/pagination.js.html +1 -1
  316. package/src/artifacts/coverage-jest/hooks/index.html +1 -1
  317. package/src/artifacts/coverage-jest/hooks/index.js.html +1 -1
  318. package/src/artifacts/coverage-jest/hooks/intlHooks/index.html +1 -1
  319. package/src/artifacts/coverage-jest/hooks/intlHooks/index.js.html +1 -1
  320. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.html +1 -1
  321. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.js.html +1 -1
  322. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/useIntlKey.js.html +7 -7
  323. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.html +1 -1
  324. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.js.html +1 -1
  325. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js.html +6 -6
  326. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.html +1 -1
  327. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.js.html +1 -1
  328. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/useKintIntl.js.html +6 -6
  329. package/src/artifacts/coverage-jest/hooks/typedownHooks/index.html +1 -1
  330. package/src/artifacts/coverage-jest/hooks/typedownHooks/index.js.html +1 -1
  331. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedown.js.html +1 -1
  332. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownData.js.html +1 -1
  333. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  334. package/src/artifacts/coverage-jest/hooks/useActionListRef.js.html +1 -1
  335. package/src/artifacts/coverage-jest/hooks/useActiveElement.js.html +1 -1
  336. package/src/artifacts/coverage-jest/hooks/useCustomProperties.js.html +1 -1
  337. package/src/artifacts/coverage-jest/hooks/useHelperApp.js.html +1 -1
  338. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.html +1 -1
  339. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.js.html +1 -1
  340. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/useInvalidateRefdata.js.html +1 -1
  341. package/src/artifacts/coverage-jest/hooks/useKiwtFieldArray.js.html +1 -1
  342. package/src/artifacts/coverage-jest/hooks/useKiwtSASQuery.js.html +9 -9
  343. package/src/artifacts/coverage-jest/hooks/useLocalPageStore.js.html +1 -1
  344. package/src/artifacts/coverage-jest/hooks/useLocalStorageState.js.html +5 -5
  345. package/src/artifacts/coverage-jest/hooks/useModConfigEntries.js.html +1 -1
  346. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.html +1 -1
  347. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.js.html +1 -1
  348. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/useMutateCustomProperties.js.html +1 -1
  349. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.html +1 -1
  350. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.js.html +1 -1
  351. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/useMutateGeneric.js.html +1 -1
  352. package/src/artifacts/coverage-jest/hooks/useMutateModConfigEntry.js.html +1 -1
  353. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.html +1 -1
  354. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.js.html +1 -1
  355. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/useMutateRefdataCategory.js.html +1 -1
  356. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.html +1 -1
  357. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.js.html +1 -1
  358. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/useMutateRefdataValue.js.html +1 -1
  359. package/src/artifacts/coverage-jest/hooks/usePrevNextPagination.js.html +20 -20
  360. package/src/artifacts/coverage-jest/hooks/useQIndex.js.html +8 -8
  361. package/src/artifacts/coverage-jest/hooks/useRefdata.js.html +1 -1
  362. package/src/artifacts/coverage-jest/hooks/useSASQQueryMeta.js.html +1 -1
  363. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.html +1 -1
  364. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.js.html +1 -1
  365. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/useStandaloneSASQQueryParameter.js.html +1 -1
  366. package/src/artifacts/coverage-jest/hooks/useTemplates.js.html +1 -1
  367. package/src/artifacts/coverage-jest/index.html +63 -33
  368. package/src/artifacts/coverage-jest/utils/buildUrl.js.html +1 -1
  369. package/src/artifacts/coverage-jest/utils/filterParsers/deparseKiwtQueryFilters.js.html +1 -1
  370. package/src/artifacts/coverage-jest/utils/filterParsers/index.html +1 -1
  371. package/src/artifacts/coverage-jest/utils/filterParsers/index.js.html +1 -1
  372. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryFilters.js.html +1 -1
  373. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryGroups.js.html +1 -1
  374. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryString.js.html +1 -1
  375. package/src/artifacts/coverage-jest/utils/generateKiwtQuery.js.html +1 -1
  376. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/generateKiwtQueryParams.js.html +1 -1
  377. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.html +1 -1
  378. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.js.html +1 -1
  379. package/src/artifacts/coverage-jest/utils/groupCustomPropertiesByCtx.js.html +1 -1
  380. package/src/artifacts/coverage-jest/utils/index.html +9 -39
  381. package/src/artifacts/coverage-jest/utils/index.js.html +2 -2
  382. package/src/artifacts/coverage-jest/utils/matchString/index.html +131 -0
  383. package/src/artifacts/coverage-jest/utils/matchString/index.js.html +88 -0
  384. package/src/artifacts/coverage-jest/utils/{matchString.js.html → matchString/matchString.js.html} +82 -55
  385. package/src/artifacts/coverage-jest/utils/modConfigEntriesQueryKey.js.html +1 -1
  386. package/src/artifacts/coverage-jest/utils/parseErrorResponse.js.html +1 -1
  387. package/src/artifacts/coverage-jest/utils/parseModConfigEntry.js.html +1 -1
  388. package/src/artifacts/coverage-jest/utils/refdataOptions.js.html +1 -1
  389. package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.html +1 -1
  390. package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.js.html +1 -1
  391. package/src/artifacts/coverage-jest/utils/refdataQueryKey/refdataQueryKey.js.html +1 -1
  392. package/src/artifacts/coverage-jest/utils/selectorSafe.js.html +1 -1
  393. package/src/artifacts/coverage-jest/utils/sortByLabel.js.html +1 -1
  394. package/src/artifacts/coverage-jest/utils/stringStyling/boldString.js.html +190 -0
  395. package/src/artifacts/coverage-jest/utils/stringStyling/highlightString.js.html +190 -0
  396. package/src/artifacts/coverage-jest/utils/stringStyling/index.html +146 -0
  397. package/src/artifacts/coverage-jest/utils/stringStyling/index.js.html +91 -0
  398. package/src/artifacts/coverage-jest/utils/toCamelCase.js.html +1 -1
  399. package/src/artifacts/coverage-jest/utils/typedownQueryKey.js.html +1 -1
  400. package/src/artifacts/coverage-jest/validators/index.html +1 -1
  401. package/src/artifacts/coverage-jest/validators/index.js.html +1 -1
  402. package/src/artifacts/coverage-jest/validators/validators.js.html +1 -1
  403. package/src/lib/Settings/Settings/Settings.js +30 -1
  404. package/src/lib/Settings/hooks/useSettings/README.md +49 -19
  405. package/src/lib/Settings/hooks/useSettings/useSettings.js +60 -48
  406. package/src/lib/Settings/index.js +3 -0
  407. package/src/lib/utils/index.js +1 -1
  408. package/src/lib/utils/matchString/index.js +1 -0
  409. package/src/lib/utils/matchString/matchString.js +44 -0
  410. package/src/lib/utils/matchString/matchString.test.js +68 -0
  411. package/src/lib/utils/stringStyling/boldString.js +35 -0
  412. package/src/lib/utils/stringStyling/boldString.test.js +59 -0
  413. package/src/lib/utils/stringStyling/highlightString.js +35 -0
  414. package/src/lib/utils/stringStyling/highlightString.test.js +67 -0
  415. package/src/lib/utils/stringStyling/index.js +2 -0
  416. package/styles/stringMatchStyles.css +3 -0
  417. package/es/lib/utils/highlightString.js +0 -45
  418. package/src/artifacts/coverage-jest/utils/highlightString.js.html +0 -259
  419. package/src/lib/utils/highlightString.js +0 -58
  420. package/src/lib/utils/matchString.js +0 -35
@@ -10,43 +10,34 @@ var _reactRouterDom = require("react-router-dom");
10
10
  var _components = require("@folio/stripes/components");
11
11
  var _NoResultsMessage = _interopRequireDefault(require("../../NoResultsMessage"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
- const _excluded = ["formatter"];
14
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
17
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
18
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
19
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
21
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
22
14
  const TableBody = _ref => {
23
- var _query$sort, _match$params2;
24
15
  let {
25
- data,
26
- error,
27
- fetchNextPage,
28
- filterPaneVisible,
29
- intlKey: passedIntlKey,
30
- intlNS: passedIntlNS,
31
- isError,
32
- isLoading,
33
- labelOverrides = {},
34
- match,
35
- mclProps: {
36
- formatter = {}
37
- } = {},
38
- noResultsProps = {},
39
- onSort,
40
- path,
41
- resultColumns,
42
- rowNavigation = true,
43
- // Default navigation onRowClick
44
- getNavigationIdentifier = row => row === null || row === void 0 ? void 0 : row.id,
45
- toggleFilterPane,
46
- query
47
- } = _ref,
48
- mclProps = _objectWithoutProperties(_ref.mclProps, _excluded);
49
- const sortOrder = (_query$sort = query.sort) !== null && _query$sort !== void 0 ? _query$sort : '';
16
+ data,
17
+ error,
18
+ fetchNextPage,
19
+ filterPaneVisible,
20
+ intlKey: passedIntlKey,
21
+ intlNS: passedIntlNS,
22
+ isError,
23
+ isLoading,
24
+ labelOverrides = {},
25
+ match,
26
+ mclProps: {
27
+ formatter = {},
28
+ ...mclProps
29
+ } = {},
30
+ noResultsProps = {},
31
+ onSort,
32
+ path,
33
+ resultColumns,
34
+ rowNavigation = true,
35
+ // Default navigation onRowClick
36
+ getNavigationIdentifier = row => row?.id,
37
+ toggleFilterPane,
38
+ query
39
+ } = _ref;
40
+ const sortOrder = query.sort ?? '';
50
41
  const history = (0, _reactRouterDom.useHistory)();
51
42
  const location = (0, _reactRouterDom.useLocation)();
52
43
  const onNeedMoreData = (_askAmount, index) => {
@@ -61,10 +52,9 @@ const TableBody = _ref => {
61
52
  // Build the list of visible columns
62
53
  const visibleColumns = resultColumns.map(e => e.propertyPath);
63
54
  const getRowUrl = (0, _react.useCallback)(rowData => {
64
- var _location$search;
65
- const baseUrl = "".concat(path, "/").concat(getNavigationIdentifier(rowData));
55
+ const baseUrl = `${path}/${getNavigationIdentifier(rowData)}`;
66
56
  return {
67
- url: "".concat(baseUrl).concat((_location$search = location === null || location === void 0 ? void 0 : location.search) !== null && _location$search !== void 0 ? _location$search : ''),
57
+ url: `${baseUrl}${location?.search ?? ''}`,
68
58
  path,
69
59
  baseUrl,
70
60
  location
@@ -74,9 +64,10 @@ const TableBody = _ref => {
74
64
  const enhancedFormatter = {};
75
65
  for (const [key, value] of Object.entries(formatter)) {
76
66
  if (typeof value === 'function') {
77
- enhancedFormatter[key] = item => value(_objectSpread(_objectSpread({}, item), {}, {
67
+ enhancedFormatter[key] = item => value({
68
+ ...item,
78
69
  defaultRowUrl: getRowUrl(item)
79
- }));
70
+ });
80
71
  } else {
81
72
  enhancedFormatter[key] = value;
82
73
  }
@@ -92,25 +83,21 @@ const TableBody = _ref => {
92
83
  return null;
93
84
  }, [getRowUrl, history, rowNavigation]);
94
85
  const isSelected = (0, _react.useCallback)(_ref2 => {
95
- var _match$params;
96
86
  let {
97
87
  item
98
88
  } = _ref2;
99
- return getNavigationIdentifier(item) === (match === null || match === void 0 || (_match$params = match.params) === null || _match$params === void 0 ? void 0 : _match$params.id);
100
- }, [getNavigationIdentifier, match === null || match === void 0 || (_match$params2 = match.params) === null || _match$params2 === void 0 ? void 0 : _match$params2.id]);
101
- const NoResultsComponent = (0, _react.useMemo)(() => {
102
- var _noResultsProps$compo;
103
- return (_noResultsProps$compo = noResultsProps === null || noResultsProps === void 0 ? void 0 : noResultsProps.component) !== null && _noResultsProps$compo !== void 0 ? _noResultsProps$compo : _NoResultsMessage.default;
104
- }, [noResultsProps === null || noResultsProps === void 0 ? void 0 : noResultsProps.component]);
105
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList, _objectSpread({
89
+ return getNavigationIdentifier(item) === match?.params?.id;
90
+ }, [getNavigationIdentifier, match?.params?.id]);
91
+ const NoResultsComponent = (0, _react.useMemo)(() => noResultsProps?.component ?? _NoResultsMessage.default, [noResultsProps?.component]);
92
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList, {
106
93
  autosize: true,
107
94
  columnMapping: columnMapping,
108
- contentData: data === null || data === void 0 ? void 0 : data.results,
95
+ contentData: data?.results,
109
96
  formatter: getEnhancedFormatter() // Pass enhanced formatter
110
97
  ,
111
98
  hasMargin: true,
112
99
  interactive: rowNavigation,
113
- isEmptyMessage: /*#__PURE__*/(0, _jsxRuntime.jsx)(NoResultsComponent, _objectSpread({}, _objectSpread({
100
+ isEmptyMessage: /*#__PURE__*/(0, _jsxRuntime.jsx)(NoResultsComponent, {
114
101
  error,
115
102
  filterPaneIsVisible: filterPaneVisible,
116
103
  intlKey: passedIntlKey,
@@ -119,8 +106,9 @@ const TableBody = _ref => {
119
106
  isLoading,
120
107
  labelOverrides,
121
108
  searchTerm: query.query,
122
- toggleFilterPane
123
- }, noResultsProps))),
109
+ toggleFilterPane,
110
+ ...noResultsProps // Anything passed in directly takes precedence
111
+ }),
124
112
  isSelected: isSelected,
125
113
  onHeaderClick: onSort,
126
114
  onNeedMoreData: onNeedMoreData,
@@ -129,8 +117,9 @@ const TableBody = _ref => {
129
117
  sortDirection: sortOrder.startsWith('-') ? 'descending' : 'ascending',
130
118
  sortOrder: sortOrder.replace(/^-/, '').replace(/,.*/, ''),
131
119
  totalCount: data.totalRecords,
132
- visibleColumns: visibleColumns
133
- }, mclProps));
120
+ visibleColumns: visibleColumns,
121
+ ...mclProps
122
+ });
134
123
  };
135
124
  TableBody.propTypes = {
136
125
  data: _propTypes.default.shape({
@@ -6,20 +6,16 @@ var _jest = require("../../../../test/jest");
6
6
  var _TableBody = _interopRequireDefault(require("./TableBody"));
7
7
  var _jsxRuntime = require("react/jsx-runtime");
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
12
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
13
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
14
9
  const mockHistoryPush = jest.fn();
15
10
 
16
11
  // We want to use the ACTUAL location, but to mock history push so we can inspect it
17
12
  jest.mock('react-router-dom', () => {
18
- return _objectSpread(_objectSpread({}, jest.requireActual('react-router-dom')), {}, {
13
+ return {
14
+ ...jest.requireActual('react-router-dom'),
19
15
  useHistory: () => ({
20
16
  push: mockHistoryPush
21
17
  })
22
- });
18
+ };
23
19
  });
24
20
  const mockFetchNextPage = jest.fn();
25
21
  const mockToggleFilterPane = jest.fn();
@@ -28,10 +24,7 @@ const nameFormatterMock = jest.fn(item => item.name);
28
24
  const defaultMCLProps = {
29
25
  formatter: {
30
26
  name: item => item.name || '',
31
- status: item => {
32
- var _item$status;
33
- return ((_item$status = item.status) === null || _item$status === void 0 ? void 0 : _item$status.label) || '';
34
- },
27
+ status: item => item.status?.label || '',
35
28
  description: item => item.description || ''
36
29
  },
37
30
  columnWidths: {
@@ -110,11 +103,13 @@ describe('TableBody', () => {
110
103
  }, {
111
104
  label: 'enhanced formatter check',
112
105
  initialEntries: ['/test/items'],
113
- mclProps: _objectSpread(_objectSpread({}, defaultMCLProps), {}, {
114
- formatter: _objectSpread(_objectSpread({}, defaultMCLProps.formatter), {}, {
106
+ mclProps: {
107
+ ...defaultMCLProps,
108
+ formatter: {
109
+ ...defaultMCLProps.formatter,
115
110
  name: nameFormatterMock
116
- })
117
- }),
111
+ }
112
+ },
118
113
  checkEnhancedFormatter: true
119
114
  }])('Testing $label', _ref => {
120
115
  let {
@@ -132,7 +127,8 @@ describe('TableBody', () => {
132
127
  initialEntries: initialEntries,
133
128
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Route, {
134
129
  path: "/test/items/:id?",
135
- render: routeProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_TableBody.default, _objectSpread(_objectSpread({}, routeProps), {}, {
130
+ render: routeProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_TableBody.default, {
131
+ ...routeProps,
136
132
  data: mockData,
137
133
  fetchNextPage: mockFetchNextPage,
138
134
  filterPaneVisible: false,
@@ -146,7 +142,7 @@ describe('TableBody', () => {
146
142
  resultColumns: resultColumns,
147
143
  rowNavigation: true,
148
144
  toggleFilterPane: mockToggleFilterPane
149
- }))
145
+ })
150
146
  })
151
147
  }));
152
148
  });
@@ -161,21 +157,21 @@ describe('TableBody', () => {
161
157
  }).exists();
162
158
  });
163
159
  if (expectedSortOrder) {
164
- test("renders ".concat(expectedSortOrder, " header with ").concat(expectedSortDirection, " sort"), async () => {
160
+ test(`renders ${expectedSortOrder} header with ${expectedSortDirection} sort`, async () => {
165
161
  await (0, _stripesErmTesting.MultiColumnListHeader)(expectedSortOrder).has({
166
162
  sort: expectedSortDirection
167
163
  });
168
164
  });
169
165
  }
170
166
  if (selectedRowIndex !== undefined) {
171
- test("row ".concat(selectedRowIndex, " is selected"), async () => {
167
+ test(`row ${selectedRowIndex} is selected`, async () => {
172
168
  await (0, _stripesErmTesting.MultiColumnListRow)({
173
169
  index: selectedRowIndex
174
170
  }).has({
175
171
  selected: ['mclSelected']
176
172
  });
177
173
  });
178
- test("row ".concat(selectedRowIndex - 1, " is not selected"), async () => {
174
+ test(`row ${selectedRowIndex - 1} is not selected`, async () => {
179
175
  await (0, _stripesErmTesting.MultiColumnListRow)({
180
176
  index: selectedRowIndex - 1
181
177
  }).has({
@@ -202,7 +198,7 @@ describe('TableBody', () => {
202
198
  hasLabel
203
199
  } = _ref2;
204
200
  const expectedValue = hasLabel ? mockData.results[index][property].label : mockData.results[index][property];
205
- test("renders expected ".concat(property, " content: ").concat(expectedValue), async () => {
201
+ test(`renders expected ${property} content: ${expectedValue}`, async () => {
206
202
  await (0, _stripesErmTesting.MultiColumnListCell)({
207
203
  row: index,
208
204
  columnIndex: col
@@ -249,8 +245,8 @@ describe('TableBody', () => {
249
245
  columnIndex: 0
250
246
  }).click();
251
247
  });
252
- test("useHistory called with expected path to ".concat(expectedId), () => {
253
- expect(mockHistoryPush).toHaveBeenCalledWith("/test/items/".concat(expectedId).concat(expectedPushQuery));
248
+ test(`useHistory called with expected path to ${expectedId}`, () => {
249
+ expect(mockHistoryPush).toHaveBeenCalledWith(`/test/items/${expectedId}${expectedPushQuery}`);
254
250
  });
255
251
  });
256
252
  });
@@ -10,33 +10,28 @@ var _reactRouterDom = require("react-router-dom");
10
10
  var _SASQLookupComponent = require("../SASQLookupComponent");
11
11
  var _SASQViewComponent = _interopRequireDefault(require("../SASQViewComponent"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
- const _excluded = ["children", "fetchParameters", "getPathLookup", "getPathView", "SASQLookupComponent", "path", "SASQViewComponent"];
14
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
17
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
18
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
19
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
21
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
22
14
  const SASQRoute = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
23
15
  let {
24
- children,
25
- fetchParameters,
26
- getPathLookup = path => "".concat(path, "/:id?"),
27
- getPathView = path => "".concat(path, "/:id"),
28
- SASQLookupComponent: RouteLookupComponent = _SASQLookupComponent.SASQLookupComponent,
29
- path,
30
- SASQViewComponent: RouteViewComponent = _SASQViewComponent.default
31
- } = _ref,
32
- props = _objectWithoutProperties(_ref, _excluded);
16
+ children,
17
+ fetchParameters,
18
+ getPathLookup = path => `${path}/:id?`,
19
+ getPathView = path => `${path}/:id`,
20
+ SASQLookupComponent: RouteLookupComponent = _SASQLookupComponent.SASQLookupComponent,
21
+ path,
22
+ SASQViewComponent: RouteViewComponent = _SASQViewComponent.default,
23
+ ...props
24
+ } = _ref;
33
25
  // Grab the SASQ_MAP and tweak it
34
26
  const {
35
27
  SASQ_MAP = {}
36
28
  } = fetchParameters;
37
29
  const lookupRef = (0, _react.useRef)();
38
30
  const viewRef = (0, _react.useRef)();
39
- (0, _react.useImperativeHandle)(ref, () => _objectSpread(_objectSpread({}, lookupRef.current), viewRef.current));
31
+ (0, _react.useImperativeHandle)(ref, () => ({
32
+ ...lookupRef.current,
33
+ ...viewRef.current
34
+ }));
40
35
  if (!SASQ_MAP.perPage) {
41
36
  SASQ_MAP.perPage = 25;
42
37
  }
@@ -47,25 +42,26 @@ const SASQRoute = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
47
42
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Route, {
48
43
  path: getPathLookup(path),
49
44
  render: routeProps => {
50
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(RouteLookupComponent, _objectSpread(_objectSpread(_objectSpread({
51
- ref: lookupRef
52
- }, routeProps), {}, {
45
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(RouteLookupComponent, {
46
+ ref: lookupRef,
47
+ ...routeProps,
53
48
  fetchParameters: fetchParameters,
54
- path: path
55
- }, props), {}, {
49
+ path: path,
50
+ ...props,
56
51
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactRouterDom.Switch, {
57
52
  children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Route, {
58
53
  path: getPathView(path),
59
- render: innerProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(RouteViewComponent, _objectSpread(_objectSpread({
60
- ref: viewRef
61
- }, innerProps), {}, {
54
+ render: innerProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(RouteViewComponent, {
55
+ ref: viewRef,
56
+ ...innerProps,
62
57
  fetchParameters: fetchParameters,
63
58
  path: path,
64
- ViewComponent: props.ViewComponent
65
- }, props))
59
+ ViewComponent: props.ViewComponent,
60
+ ...props
61
+ })
66
62
  })]
67
63
  })
68
- }));
64
+ });
69
65
  }
70
66
  });
71
67
  });
@@ -11,11 +11,8 @@ var _SASQLookupComponent = require("../SASQLookupComponent");
11
11
  var _SASQViewComponent = require("../SASQViewComponent");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
17
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
18
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } // We can import these special render-mocks once we manually mock the modules
14
+ // We can import these special render-mocks once we manually mock the modules
15
+
19
16
  // Using Manual mocks
20
17
  jest.mock('../SASQLookupComponent');
21
18
  jest.mock('../SASQViewComponent');
@@ -182,12 +179,13 @@ describe('SASQRoute', () => {
182
179
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Route, {
183
180
  path: "/hello",
184
181
  children: "Hello world"
185
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SASQRoute.default, _objectSpread({
182
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SASQRoute.default, {
186
183
  ref: theRef
187
184
  // Allow for testing of fetch parameters
188
185
  ,
189
- testFetchParametersOnClick: testFetchParametersOnClick
190
- }, props))]
186
+ testFetchParametersOnClick: testFetchParametersOnClick,
187
+ ...props
188
+ })]
191
189
  })]
192
190
  }));
193
191
  });
@@ -206,7 +204,7 @@ describe('SASQRoute', () => {
206
204
  test('ref is unset', () => {
207
205
  expect(theRef.current).toEqual(null);
208
206
  });
209
- describe("navigating to ".concat(expectedPath), () => {
207
+ describe(`navigating to ${expectedPath}`, () => {
210
208
  beforeEach(async () => {
211
209
  await (0, _react2.waitFor)(async () => {
212
210
  await (0, _stripesErmTesting.Button)('SASQRouteButton').click();
@@ -218,13 +216,13 @@ describe('SASQRoute', () => {
218
216
  } = renderComponent;
219
217
  expect(queryByText('Hello world')).not.toBeInTheDocument();
220
218
  });
221
- test("renders SASQRoute lookup component on ".concat(expectedPath), () => {
219
+ test(`renders SASQRoute lookup component on ${expectedPath}`, () => {
222
220
  const {
223
221
  getByText
224
222
  } = renderComponent;
225
223
  expect(getByText(lookupComponentText)).toBeInTheDocument();
226
224
  });
227
- test("does not render SASQRoute view component on ".concat(expectedPath), () => {
225
+ test(`does not render SASQRoute view component on ${expectedPath}`, () => {
228
226
  const {
229
227
  queryByText
230
228
  } = renderComponent;
@@ -245,13 +243,13 @@ describe('SASQRoute', () => {
245
243
  expect(testFetchParametersOnClick).toHaveBeenCalledWith(expectedFetchParameters);
246
244
  });
247
245
  });
248
- describe("navigating to ".concat(expectedViewPath), () => {
246
+ describe(`navigating to ${expectedViewPath}`, () => {
249
247
  beforeEach(async () => {
250
248
  await (0, _react2.waitFor)(async () => {
251
249
  await (0, _stripesErmTesting.Button)('SASQViewButton').click();
252
250
  });
253
251
  });
254
- test("renders SASQRoute view component on ".concat(expectedViewPath), () => {
252
+ test(`renders SASQRoute view component on ${expectedViewPath}`, () => {
255
253
  const {
256
254
  getByText
257
255
  } = renderComponent;
@@ -9,94 +9,86 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _reactQuery = require("react-query");
10
10
  var _core = require("@folio/stripes/core");
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
- const _excluded = ["fetchParameters", "history", "id", "location", "match", "path", "viewQueryPromise", "viewResponseTransform", "ViewComponent", "viewQueryNamespaceGenerator"],
13
- _excluded2 = ["data"];
14
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
17
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
18
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
19
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
21
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
22
13
  const SASQViewComponent = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
23
- var _fetchParameters$item, _match$params, _match$params3;
24
14
  let {
25
- fetchParameters,
26
- history,
27
- id,
28
- location,
29
- match,
30
- path,
31
- viewQueryPromise = _ref2 => {
32
- let {
33
- endpoint,
34
- ky,
35
- resourceId
36
- } = _ref2;
37
- return ky.get("".concat(endpoint, "/").concat(resourceId)).json();
38
- },
39
- viewResponseTransform = response => response,
40
- ViewComponent,
41
- viewQueryNamespaceGenerator = _ref3 => {
42
- let {
43
- namespace,
44
- componentId,
45
- id: passedId
46
- } = _ref3;
47
- const queryNamespace = [namespace, 'SASQ'];
48
- if (componentId) {
49
- queryNamespace.push(componentId);
50
- }
51
- queryNamespace.push('view');
52
- queryNamespace.push(passedId);
53
- return queryNamespace;
15
+ fetchParameters,
16
+ history,
17
+ id,
18
+ location,
19
+ match,
20
+ path,
21
+ viewQueryPromise = _ref2 => {
22
+ let {
23
+ endpoint,
24
+ ky,
25
+ resourceId
26
+ } = _ref2;
27
+ return ky.get(`${endpoint}/${resourceId}`).json();
28
+ },
29
+ viewResponseTransform = response => response,
30
+ ViewComponent,
31
+ viewQueryNamespaceGenerator = _ref3 => {
32
+ let {
33
+ namespace,
34
+ componentId,
35
+ id: passedId
36
+ } = _ref3;
37
+ const queryNamespace = [namespace, 'SASQ'];
38
+ if (componentId) {
39
+ queryNamespace.push(componentId);
54
40
  }
55
- } = _ref,
56
- props = _objectWithoutProperties(_ref, _excluded);
41
+ queryNamespace.push('view');
42
+ queryNamespace.push(passedId);
43
+ return queryNamespace;
44
+ },
45
+ ...props
46
+ } = _ref;
57
47
  const {
58
48
  0: namespace
59
49
  } = (0, _core.useNamespace)();
60
50
 
61
51
  // If itemEndpoint is available, use that, otherwise use standard endpoint
62
- const endpoint = (_fetchParameters$item = fetchParameters === null || fetchParameters === void 0 ? void 0 : fetchParameters.itemEndpoint) !== null && _fetchParameters$item !== void 0 ? _fetchParameters$item : fetchParameters === null || fetchParameters === void 0 ? void 0 : fetchParameters.endpoint;
52
+ const endpoint = fetchParameters?.itemEndpoint ?? fetchParameters?.endpoint;
63
53
  const ky = (0, _core.useOkapiKy)();
64
- const _useQuery = (0, _reactQuery.useQuery)(viewQueryNamespaceGenerator({
65
- componentId: id,
66
- namespace,
67
- endpoint,
68
- id: match === null || match === void 0 || (_match$params = match.params) === null || _match$params === void 0 ? void 0 : _match$params.id,
69
- match
70
- }), () => {
71
- var _match$params2;
72
- return viewQueryPromise({
73
- ky,
74
- resourceId: match === null || match === void 0 || (_match$params2 = match.params) === null || _match$params2 === void 0 ? void 0 : _match$params2.id,
75
- endpoint
76
- });
77
- }, {
78
- enabled: !!(match !== null && match !== void 0 && (_match$params3 = match.params) !== null && _match$params3 !== void 0 && _match$params3.id),
79
- // select is a parameter supported by useQuery to transform the response
80
- // Could be possible to instead pass this down along with the queryOptions
81
- // Additionally this is assuming the viewResponseTransform is a func as opposed to an object
82
- select: selectData => {
83
- return viewResponseTransform(selectData);
84
- }
85
- }),
86
- {
87
- data = {}
88
- } = _useQuery,
89
- rest = _objectWithoutProperties(_useQuery, _excluded2);
54
+ const {
55
+ data = {},
56
+ ...rest
57
+ } = (0, _reactQuery.useQuery)(viewQueryNamespaceGenerator({
58
+ componentId: id,
59
+ namespace,
60
+ endpoint,
61
+ id: match?.params?.id,
62
+ match
63
+ }), () => {
64
+ return viewQueryPromise({
65
+ ky,
66
+ resourceId: match?.params?.id,
67
+ endpoint
68
+ });
69
+ }, {
70
+ enabled: !!match?.params?.id,
71
+ // select is a parameter supported by useQuery to transform the response
72
+ // Could be possible to instead pass this down along with the queryOptions
73
+ // Additionally this is assuming the viewResponseTransform is a func as opposed to an object
74
+ select: selectData => {
75
+ return viewResponseTransform(selectData);
76
+ }
77
+ });
90
78
  (0, _react.useImperativeHandle)(ref, () => ({
91
- queryProps: _objectSpread({
92
- data
93
- }, rest)
79
+ queryProps: {
80
+ data,
81
+ ...rest
82
+ }
94
83
  }));
95
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(ViewComponent, _objectSpread({
96
- onClose: () => history.push("".concat(path).concat(location.search)),
97
- queryProps: _objectSpread({}, rest),
98
- resource: data
99
- }, props));
84
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(ViewComponent, {
85
+ onClose: () => history.push(`${path}${location.search}`),
86
+ queryProps: {
87
+ ...rest
88
+ },
89
+ resource: data,
90
+ ...props
91
+ });
100
92
  });
101
93
  SASQViewComponent.propTypes = {
102
94
  fetchParameters: _propTypes.default.object,
@@ -12,11 +12,6 @@ var _jest = require("../../../test/jest");
12
12
  var _SASQViewComponent = _interopRequireDefault(require("./SASQViewComponent"));
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
17
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
18
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
19
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
15
  const ViewComponentRender = exports.ViewComponentRender = jest.fn();
21
16
  const MockViewComponent = jest.fn(props => {
22
17
  ViewComponentRender(props);
@@ -57,7 +52,8 @@ describe('SASQViewComponent', () => {
57
52
  initialEntries: [startingLocation],
58
53
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Route, {
59
54
  path: "/testPath/:id",
60
- render: routeProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SASQViewComponent.default, _objectSpread(_objectSpread({}, routeProps), {}, {
55
+ render: routeProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SASQViewComponent.default, {
56
+ ...routeProps,
61
57
  ref: theRef,
62
58
  fetchParameters: {
63
59
  endpoint: '/test',
@@ -69,7 +65,7 @@ describe('SASQViewComponent', () => {
69
65
  id: "sasq-test",
70
66
  path: "/testPath",
71
67
  ViewComponent: MockViewComponent
72
- }))
68
+ })
73
69
  })
74
70
  }));
75
71
  });
@@ -90,7 +86,7 @@ describe('SASQViewComponent', () => {
90
86
  await (0, _react2.waitFor)(async () => {
91
87
  await (0, _stripesErmTesting.Button)('Close').click();
92
88
  });
93
- expect(historyPush).toHaveBeenCalledWith("".concat(expectedPath).concat(expectedSearch));
89
+ expect(historyPush).toHaveBeenCalledWith(`${expectedPath}${expectedSearch}`);
94
90
  });
95
91
  test('ref exposes onClose function', async () => {
96
92
  await (0, _react2.waitFor)(() => {