@k-int/stripes-kint-components 5.31.4 → 5.32.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 (394) hide show
  1. package/CHANGELOG.md +7 -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 +158 -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 +69 -63
  82. package/es/lib/Tags/Tags.js +8 -5
  83. package/es/lib/Tags/hooks/useTags.js +1 -1
  84. package/es/lib/Tags/hooks/useTagsEnabled.js +3 -2
  85. package/es/lib/Tags/tagsConfig.js +1 -1
  86. package/es/lib/Typedown/Typedown.js +31 -21
  87. package/es/lib/hooks/__mocks__/index.js +7 -3
  88. package/es/lib/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js +26 -20
  89. package/es/lib/hooks/intlHooks/useKintIntl/useKintIntl.js +34 -24
  90. package/es/lib/hooks/typedownHooks/useTypedown.js +12 -11
  91. package/es/lib/hooks/typedownHooks/useTypedownToggle.js +2 -2
  92. package/es/lib/hooks/useActionListRef.js +1 -1
  93. package/es/lib/hooks/useActiveElement.js +1 -1
  94. package/es/lib/hooks/useCustomProperties.js +10 -6
  95. package/es/lib/hooks/useHelperApp.js +16 -13
  96. package/es/lib/hooks/useKiwtFieldArray.js +8 -7
  97. package/es/lib/hooks/useKiwtSASQuery.js +19 -15
  98. package/es/lib/hooks/useLocalPageStore.js +10 -7
  99. package/es/lib/hooks/useModConfigEntries.js +2 -2
  100. package/es/lib/hooks/useMutateCustomProperties/useMutateCustomProperties.js +17 -10
  101. package/es/lib/hooks/useMutateGeneric/useMutateGeneric.js +2 -2
  102. package/es/lib/hooks/useMutateModConfigEntry.js +2 -2
  103. package/es/lib/hooks/useMutateRefdataCategory/useMutateRefdataCategory.js +21 -15
  104. package/es/lib/hooks/useMutateRefdataValue/useMutateRefdataValue.js +23 -16
  105. package/es/lib/hooks/usePrevNextPagination.js +19 -17
  106. package/es/lib/hooks/useQIndex.js +14 -11
  107. package/es/lib/hooks/useRefdata.js +3 -3
  108. package/es/lib/hooks/useStandaloneSASQQueryParameter/useStandaloneSASQQueryParameter.js +13 -9
  109. package/es/lib/hooks/useTemplates.js +4 -4
  110. package/es/lib/utils/buildUrl.js +3 -2
  111. package/es/lib/utils/filterParsers/deparseKiwtQueryFilters.js +5 -5
  112. package/es/lib/utils/filterParsers/parseKiwtQueryFilters.js +2 -2
  113. package/es/lib/utils/filterParsers/parseKiwtQueryGroups.js +5 -4
  114. package/es/lib/utils/filterParsers/parseKiwtQueryString.js +1 -1
  115. package/es/lib/utils/generateKiwtQueryParams/generateKiwtQueryParams.js +107 -94
  116. package/es/lib/utils/groupCustomPropertiesByCtx.js +9 -5
  117. package/es/lib/utils/matchString.js +7 -5
  118. package/es/lib/utils/parseErrorResponse.js +7 -3
  119. package/es/lib/utils/selectorSafe.js +3 -2
  120. package/es/lib/utils/sortByLabel.js +3 -2
  121. package/es/lib/validators/validators.js +9 -6
  122. package/package.json +1 -1
  123. package/src/artifacts/coverage-jest/ActionList/ActionList.js.html +1 -1
  124. package/src/artifacts/coverage-jest/ActionList/ActionListFieldArray.js.html +1 -1
  125. package/src/artifacts/coverage-jest/ActionList/index.html +1 -1
  126. package/src/artifacts/coverage-jest/ActionList/index.js.html +1 -1
  127. package/src/artifacts/coverage-jest/ButtonTypedown/ButtonTypedown.js.html +215 -23
  128. package/src/artifacts/coverage-jest/ButtonTypedown/index.html +17 -17
  129. package/src/artifacts/coverage-jest/ButtonTypedown/index.js.html +1 -1
  130. package/src/artifacts/coverage-jest/ComboButton/ComboButton.js.html +1 -1
  131. package/src/artifacts/coverage-jest/ComboButton/index.html +1 -1
  132. package/src/artifacts/coverage-jest/ComboButton/index.js.html +1 -1
  133. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
  134. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesSettings.js.html +1 -1
  135. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
  136. package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyView.js.html +1 -1
  137. package/src/artifacts/coverage-jest/CustomProperties/Config/index.html +1 -1
  138. package/src/artifacts/coverage-jest/CustomProperties/Config/index.js.html +1 -1
  139. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
  140. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
  141. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
  142. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyField.js.html +1 -1
  143. package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
  144. package/src/artifacts/coverage-jest/CustomProperties/Edit/index.html +1 -1
  145. package/src/artifacts/coverage-jest/CustomProperties/Edit/index.js.html +1 -1
  146. package/src/artifacts/coverage-jest/CustomProperties/Edit/testResources.js.html +1 -1
  147. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilter.js.html +1 -1
  148. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
  149. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
  150. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
  151. package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
  152. package/src/artifacts/coverage-jest/CustomProperties/Filter/index.html +1 -1
  153. package/src/artifacts/coverage-jest/CustomProperties/Filter/index.js.html +1 -1
  154. package/src/artifacts/coverage-jest/CustomProperties/Filter/testResources.js.html +1 -1
  155. package/src/artifacts/coverage-jest/CustomProperties/Filter/useOperators.js.html +1 -1
  156. package/src/artifacts/coverage-jest/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
  157. package/src/artifacts/coverage-jest/CustomProperties/Filter/useValueProps.js.html +1 -1
  158. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesView.js.html +1 -1
  159. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesViewCtx.js.html +1 -1
  160. package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertyCard.js.html +1 -1
  161. package/src/artifacts/coverage-jest/CustomProperties/View/index.html +1 -1
  162. package/src/artifacts/coverage-jest/CustomProperties/View/index.js.html +1 -1
  163. package/src/artifacts/coverage-jest/CustomProperties/View/testResources.js.html +1 -1
  164. package/src/artifacts/coverage-jest/CustomProperties/index.html +1 -1
  165. package/src/artifacts/coverage-jest/CustomProperties/index.js.html +1 -1
  166. package/src/artifacts/coverage-jest/CycleButton/CycleButton.js.html +1 -1
  167. package/src/artifacts/coverage-jest/CycleButton/index.html +1 -1
  168. package/src/artifacts/coverage-jest/CycleButton/index.js.html +1 -1
  169. package/src/artifacts/coverage-jest/FieldLabel/FieldLabel.js.html +1 -1
  170. package/src/artifacts/coverage-jest/FieldLabel/index.html +1 -1
  171. package/src/artifacts/coverage-jest/FieldLabel/index.js.html +1 -1
  172. package/src/artifacts/coverage-jest/FormModal/FormModal.js.html +1 -1
  173. package/src/artifacts/coverage-jest/FormModal/index.html +1 -1
  174. package/src/artifacts/coverage-jest/FormModal/index.js.html +1 -1
  175. package/src/artifacts/coverage-jest/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
  176. package/src/artifacts/coverage-jest/FormattedKintMessage/index.html +1 -1
  177. package/src/artifacts/coverage-jest/FormattedKintMessage/index.js.html +1 -1
  178. package/src/artifacts/coverage-jest/IconSelect/IconSelect.js.html +1 -1
  179. package/src/artifacts/coverage-jest/IconSelect/index.html +1 -1
  180. package/src/artifacts/coverage-jest/IconSelect/index.js.html +1 -1
  181. package/src/artifacts/coverage-jest/NoResultsMessage/NoResultsMessage.js.html +1 -1
  182. package/src/artifacts/coverage-jest/NoResultsMessage/index.html +1 -1
  183. package/src/artifacts/coverage-jest/NoResultsMessage/index.js.html +1 -1
  184. package/src/artifacts/coverage-jest/NumberField/NumberField.js.html +1 -1
  185. package/src/artifacts/coverage-jest/NumberField/index.html +1 -1
  186. package/src/artifacts/coverage-jest/NumberField/index.js.html +1 -1
  187. package/src/artifacts/coverage-jest/QueryTypedown/QueryTypedown.js.html +1 -1
  188. package/src/artifacts/coverage-jest/QueryTypedown/index.html +1 -1
  189. package/src/artifacts/coverage-jest/QueryTypedown/index.js.html +1 -1
  190. package/src/artifacts/coverage-jest/RefdataButtons/RefdataButtons.js.html +1 -1
  191. package/src/artifacts/coverage-jest/RefdataButtons/index.html +1 -1
  192. package/src/artifacts/coverage-jest/RefdataButtons/index.js.html +1 -1
  193. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +1 -1
  194. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.html +1 -1
  195. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.js.html +1 -1
  196. package/src/artifacts/coverage-jest/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +1 -1
  197. package/src/artifacts/coverage-jest/RichSelect/RichSelect.js.html +1 -1
  198. package/src/artifacts/coverage-jest/RichSelect/index.html +1 -1
  199. package/src/artifacts/coverage-jest/RichSelect/index.js.html +1 -1
  200. package/src/artifacts/coverage-jest/RichSelect/useSelectedOption.js.html +1 -1
  201. package/src/artifacts/coverage-jest/SASQLookupComponent/SASQLookupComponent.js.html +31 -31
  202. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
  203. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.html +1 -1
  204. package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.js.html +1 -1
  205. package/src/artifacts/coverage-jest/SASQLookupComponent/index.html +1 -1
  206. package/src/artifacts/coverage-jest/SASQLookupComponent/index.js.html +1 -1
  207. package/src/artifacts/coverage-jest/SASQRoute/SASQRoute.js.html +1 -1
  208. package/src/artifacts/coverage-jest/SASQRoute/index.html +1 -1
  209. package/src/artifacts/coverage-jest/SASQRoute/index.js.html +1 -1
  210. package/src/artifacts/coverage-jest/SASQViewComponent/SASQViewComponent.js.html +1 -1
  211. package/src/artifacts/coverage-jest/SASQViewComponent/index.html +1 -1
  212. package/src/artifacts/coverage-jest/SASQViewComponent/index.js.html +1 -1
  213. package/src/artifacts/coverage-jest/SearchField/SearchField.js.html +1 -1
  214. package/src/artifacts/coverage-jest/SearchField/index.html +1 -1
  215. package/src/artifacts/coverage-jest/SearchField/index.js.html +1 -1
  216. package/src/artifacts/coverage-jest/SearchKeyControl/SearchKeyControl.js.html +1 -1
  217. package/src/artifacts/coverage-jest/SearchKeyControl/index.html +1 -1
  218. package/src/artifacts/coverage-jest/SearchKeyControl/index.js.html +1 -1
  219. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
  220. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.html +1 -1
  221. package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.js.html +1 -1
  222. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/EditableRefdataList.js.html +1 -1
  223. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.html +1 -1
  224. package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.js.html +1 -1
  225. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsList.js.html +1 -1
  226. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js.html +1 -1
  227. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.html +1 -1
  228. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.js.html +1 -1
  229. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/EditSettingValue.js.html +1 -1
  230. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.html +1 -1
  231. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.js.html +1 -1
  232. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/RenderSettingValue.js.html +1 -1
  233. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.html +1 -1
  234. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.js.html +1 -1
  235. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/SettingField.js.html +1 -1
  236. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.html +1 -1
  237. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.js.html +1 -1
  238. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.html +1 -1
  239. package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.js.html +1 -1
  240. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/RefdataCategoriesSettings.js.html +1 -1
  241. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.html +1 -1
  242. package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.js.html +1 -1
  243. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPage.js.html +1 -1
  244. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/SettingPagePane.js.html +1 -1
  245. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.html +1 -1
  246. package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.js.html +1 -1
  247. package/src/artifacts/coverage-jest/Settings/SettingPage/index.html +1 -1
  248. package/src/artifacts/coverage-jest/Settings/SettingPage/index.js.html +1 -1
  249. package/src/artifacts/coverage-jest/Settings/Settings/Settings.js.html +643 -0
  250. package/src/artifacts/coverage-jest/Settings/Settings/index.html +131 -0
  251. package/src/artifacts/coverage-jest/Settings/Settings/index.js.html +88 -0
  252. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/SettingsFormContainer.js.html +1 -1
  253. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.html +1 -1
  254. package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.js.html +1 -1
  255. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsField.js.html +1 -1
  256. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/StaticSettingsFieldComponent.js.html +1 -1
  257. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.html +1 -1
  258. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.js.html +1 -1
  259. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.html +1 -1
  260. package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.js.html +1 -1
  261. package/src/artifacts/coverage-jest/Settings/constants/index.html +1 -1
  262. package/src/artifacts/coverage-jest/Settings/constants/index.js.html +1 -1
  263. package/src/artifacts/coverage-jest/Settings/constants/queryKeys.js.html +1 -1
  264. package/src/artifacts/coverage-jest/Settings/contexts/SettingsContext.js.html +1 -1
  265. package/src/artifacts/coverage-jest/Settings/contexts/index.html +1 -1
  266. package/src/artifacts/coverage-jest/Settings/contexts/index.js.html +1 -1
  267. package/src/artifacts/coverage-jest/Settings/hooks/index.html +1 -1
  268. package/src/artifacts/coverage-jest/Settings/hooks/index.js.html +1 -1
  269. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.html +1 -1
  270. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.js.html +1 -1
  271. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.html +1 -1
  272. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.js.html +1 -1
  273. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/useSettingCallout.js.html +1 -1
  274. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.html +1 -1
  275. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.js.html +1 -1
  276. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/useSettingsSectionInitalValues.js.html +1 -1
  277. package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useStaticSettingsSection.js.html +1 -1
  278. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.html +1 -1
  279. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.js.html +1 -1
  280. package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/useAppSettings.js.html +1 -1
  281. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.html +1 -1
  282. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.js.html +1 -1
  283. package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/useSettingSection.js.html +1 -1
  284. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.html +12 -12
  285. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.js.html +1 -1
  286. package/src/artifacts/coverage-jest/Settings/hooks/useSettings/useSettings.js.html +32 -14
  287. package/src/artifacts/coverage-jest/Settings/index.html +1 -1
  288. package/src/artifacts/coverage-jest/Settings/index.js.html +1 -1
  289. package/src/artifacts/coverage-jest/Tags/Tags.js.html +1 -1
  290. package/src/artifacts/coverage-jest/Tags/hooks/index.html +1 -1
  291. package/src/artifacts/coverage-jest/Tags/hooks/index.js.html +1 -1
  292. package/src/artifacts/coverage-jest/Tags/hooks/useTags.js.html +1 -1
  293. package/src/artifacts/coverage-jest/Tags/hooks/useTagsEnabled.js.html +1 -1
  294. package/src/artifacts/coverage-jest/Tags/index.html +1 -1
  295. package/src/artifacts/coverage-jest/Tags/index.js.html +1 -1
  296. package/src/artifacts/coverage-jest/Tags/tagsConfig.js.html +1 -1
  297. package/src/artifacts/coverage-jest/Typedown/Typedown.js.html +13 -4
  298. package/src/artifacts/coverage-jest/Typedown/index.html +3 -3
  299. package/src/artifacts/coverage-jest/Typedown/index.js.html +1 -1
  300. package/src/artifacts/coverage-jest/cobertura-coverage.xml +433 -268
  301. package/src/artifacts/coverage-jest/constants/comparators.js.html +1 -1
  302. package/src/artifacts/coverage-jest/constants/customProperties.js.html +1 -1
  303. package/src/artifacts/coverage-jest/constants/endpoints.js.html +1 -1
  304. package/src/artifacts/coverage-jest/constants/eventCodes.js.html +1 -1
  305. package/src/artifacts/coverage-jest/constants/index.html +1 -1
  306. package/src/artifacts/coverage-jest/constants/pagination.js.html +1 -1
  307. package/src/artifacts/coverage-jest/hooks/index.html +1 -1
  308. package/src/artifacts/coverage-jest/hooks/index.js.html +1 -1
  309. package/src/artifacts/coverage-jest/hooks/intlHooks/index.html +1 -1
  310. package/src/artifacts/coverage-jest/hooks/intlHooks/index.js.html +1 -1
  311. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.html +1 -1
  312. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.js.html +1 -1
  313. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/useIntlKey.js.html +7 -7
  314. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.html +1 -1
  315. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.js.html +1 -1
  316. package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js.html +6 -6
  317. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.html +1 -1
  318. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.js.html +1 -1
  319. package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/useKintIntl.js.html +6 -6
  320. package/src/artifacts/coverage-jest/hooks/typedownHooks/index.html +1 -1
  321. package/src/artifacts/coverage-jest/hooks/typedownHooks/index.js.html +1 -1
  322. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedown.js.html +1 -1
  323. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownData.js.html +1 -1
  324. package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  325. package/src/artifacts/coverage-jest/hooks/useActionListRef.js.html +1 -1
  326. package/src/artifacts/coverage-jest/hooks/useActiveElement.js.html +1 -1
  327. package/src/artifacts/coverage-jest/hooks/useCustomProperties.js.html +1 -1
  328. package/src/artifacts/coverage-jest/hooks/useHelperApp.js.html +1 -1
  329. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.html +1 -1
  330. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.js.html +1 -1
  331. package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/useInvalidateRefdata.js.html +1 -1
  332. package/src/artifacts/coverage-jest/hooks/useKiwtFieldArray.js.html +1 -1
  333. package/src/artifacts/coverage-jest/hooks/useKiwtSASQuery.js.html +9 -9
  334. package/src/artifacts/coverage-jest/hooks/useLocalPageStore.js.html +1 -1
  335. package/src/artifacts/coverage-jest/hooks/useLocalStorageState.js.html +5 -5
  336. package/src/artifacts/coverage-jest/hooks/useModConfigEntries.js.html +1 -1
  337. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.html +1 -1
  338. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.js.html +1 -1
  339. package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/useMutateCustomProperties.js.html +1 -1
  340. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.html +1 -1
  341. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.js.html +1 -1
  342. package/src/artifacts/coverage-jest/hooks/useMutateGeneric/useMutateGeneric.js.html +1 -1
  343. package/src/artifacts/coverage-jest/hooks/useMutateModConfigEntry.js.html +1 -1
  344. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.html +1 -1
  345. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.js.html +1 -1
  346. package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/useMutateRefdataCategory.js.html +1 -1
  347. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.html +1 -1
  348. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.js.html +1 -1
  349. package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/useMutateRefdataValue.js.html +1 -1
  350. package/src/artifacts/coverage-jest/hooks/usePrevNextPagination.js.html +20 -20
  351. package/src/artifacts/coverage-jest/hooks/useQIndex.js.html +8 -8
  352. package/src/artifacts/coverage-jest/hooks/useRefdata.js.html +1 -1
  353. package/src/artifacts/coverage-jest/hooks/useSASQQueryMeta.js.html +1 -1
  354. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.html +1 -1
  355. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.js.html +1 -1
  356. package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/useStandaloneSASQQueryParameter.js.html +1 -1
  357. package/src/artifacts/coverage-jest/hooks/useTemplates.js.html +1 -1
  358. package/src/artifacts/coverage-jest/index.html +40 -25
  359. package/src/artifacts/coverage-jest/utils/buildUrl.js.html +1 -1
  360. package/src/artifacts/coverage-jest/utils/filterParsers/deparseKiwtQueryFilters.js.html +1 -1
  361. package/src/artifacts/coverage-jest/utils/filterParsers/index.html +1 -1
  362. package/src/artifacts/coverage-jest/utils/filterParsers/index.js.html +1 -1
  363. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryFilters.js.html +1 -1
  364. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryGroups.js.html +1 -1
  365. package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryString.js.html +1 -1
  366. package/src/artifacts/coverage-jest/utils/generateKiwtQuery.js.html +1 -1
  367. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/generateKiwtQueryParams.js.html +1 -1
  368. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.html +1 -1
  369. package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.js.html +1 -1
  370. package/src/artifacts/coverage-jest/utils/groupCustomPropertiesByCtx.js.html +1 -1
  371. package/src/artifacts/coverage-jest/utils/highlightString.js.html +1 -1
  372. package/src/artifacts/coverage-jest/utils/index.html +1 -1
  373. package/src/artifacts/coverage-jest/utils/index.js.html +1 -1
  374. package/src/artifacts/coverage-jest/utils/matchString.js.html +1 -1
  375. package/src/artifacts/coverage-jest/utils/modConfigEntriesQueryKey.js.html +1 -1
  376. package/src/artifacts/coverage-jest/utils/parseErrorResponse.js.html +1 -1
  377. package/src/artifacts/coverage-jest/utils/parseModConfigEntry.js.html +1 -1
  378. package/src/artifacts/coverage-jest/utils/refdataOptions.js.html +1 -1
  379. package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.html +1 -1
  380. package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.js.html +1 -1
  381. package/src/artifacts/coverage-jest/utils/refdataQueryKey/refdataQueryKey.js.html +1 -1
  382. package/src/artifacts/coverage-jest/utils/selectorSafe.js.html +1 -1
  383. package/src/artifacts/coverage-jest/utils/sortByLabel.js.html +1 -1
  384. package/src/artifacts/coverage-jest/utils/toCamelCase.js.html +1 -1
  385. package/src/artifacts/coverage-jest/utils/typedownQueryKey.js.html +1 -1
  386. package/src/artifacts/coverage-jest/validators/index.html +1 -1
  387. package/src/artifacts/coverage-jest/validators/index.js.html +1 -1
  388. package/src/artifacts/coverage-jest/validators/validators.js.html +1 -1
  389. package/src/lib/ButtonTypedown/ButtonTypedown.js +77 -13
  390. package/src/lib/Settings/Settings/Settings.js +186 -0
  391. package/src/lib/Settings/Settings/index.js +1 -0
  392. package/src/lib/Settings/hooks/useSettings/useSettings.js +13 -7
  393. package/src/lib/Typedown/Typedown.js +4 -1
  394. package/styles/TypeDown.css +2 -2
@@ -8,7 +8,15 @@ var _react = require("react");
8
8
  var _reactRouterDom = require("react-router-dom");
9
9
  var _buildUrl = _interopRequireDefault(require("../utils/buildUrl"));
10
10
  var _useQIndex = _interopRequireDefault(require("./useQIndex"));
11
+ const _excluded = ["nsValues"];
11
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ 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; }
14
+ 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; }
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); }
12
20
  const locationQuerySetter = _ref => {
13
21
  let {
14
22
  location,
@@ -24,10 +32,10 @@ const locationQuerySetter = _ref => {
24
32
 
25
33
  // Do not push to history if the url didn't change
26
34
  // https://issues.folio.org/browse/STSMACOM-637
27
- if (`${pathname}${search}` !== url) {
35
+ if ("".concat(pathname).concat(search) !== url) {
28
36
  // Only PUSH to history if we're not doing an initialisation OR changing from external-location
29
37
  // This is the SASQ state being used here
30
- if (['external-location', 'init.reset'].includes(state?.changeType)) {
38
+ if (['external-location', 'init.reset'].includes(state === null || state === void 0 ? void 0 : state.changeType)) {
31
39
  history.replace(url);
32
40
  } else {
33
41
  history.push(url);
@@ -42,27 +50,23 @@ const useKiwtSASQuery = () => {
42
50
  const [qindex] = (0, _useQIndex.default)();
43
51
  // Ensure we update the query along with the querySetter
44
52
  if (query.qindex !== qindex) {
45
- setQuery({
46
- ...query,
53
+ setQuery(_objectSpread(_objectSpread({}, query), {}, {
47
54
  qindex
48
- });
55
+ }));
49
56
  }
50
57
  const querySetter = _ref2 => {
51
58
  let {
52
- nsValues,
53
- ...rest
54
- } = _ref2;
55
- setQuery({
56
- ...query,
57
- ...nsValues,
59
+ nsValues
60
+ } = _ref2,
61
+ rest = _objectWithoutProperties(_ref2, _excluded);
62
+ setQuery(_objectSpread(_objectSpread(_objectSpread({}, query), nsValues), {}, {
58
63
  qindex
59
- });
60
- locationQuerySetter({
61
- ...rest,
64
+ }));
65
+ locationQuerySetter(_objectSpread(_objectSpread({}, rest), {}, {
62
66
  location,
63
67
  history,
64
68
  nsValues
65
- });
69
+ }));
66
70
  };
67
71
  return {
68
72
  query,
@@ -6,20 +6,23 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _zustand = require("zustand");
8
8
  var _pagination = require("../constants/pagination");
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); }
9
14
  // Any time that usePrevNextPagination is NOT synced to location,
10
15
  // store a keyed currentPage here instead
11
16
  const useLocalPageStore = (0, _zustand.create)(set => ({
12
17
  pageStore: {},
13
18
  setPage: (id, page) => set(state => {
14
19
  // Any non-id keyed pages will go into a single storage slot
15
- const key = id ?? _pagination.DEFAULT_PAGE_KEY;
16
- return {
17
- ...state,
18
- pageStore: {
19
- ...state.pageStore,
20
+ const key = id !== null && id !== void 0 ? id : _pagination.DEFAULT_PAGE_KEY;
21
+ return _objectSpread(_objectSpread({}, state), {}, {
22
+ pageStore: _objectSpread(_objectSpread({}, state.pageStore), {}, {
20
23
  [key]: page
21
- }
22
- };
24
+ })
25
+ });
23
26
  })
24
27
  }));
25
28
  var _default = exports.default = useLocalPageStore;
@@ -22,8 +22,8 @@ const useModConfigEntries = _ref => {
22
22
  // eslint-disable-next-line no-console
23
23
  console.warn('useModConfigEntries is deprecated, as it utilises mod-config');
24
24
  const ky = (0, _core.useOkapiKy)();
25
- const query = `?query=(module=${moduleName} and configName=${configName})`;
26
- const path = `${_endpoints.MOD_SETTINGS_ENDPOINT}${query}`;
25
+ const query = "?query=(module=".concat(moduleName, " and configName=").concat(configName, ")");
26
+ const path = "".concat(_endpoints.MOD_SETTINGS_ENDPOINT).concat(query);
27
27
  const namespace = (0, _utils.modConfigEntriesQueryKey)({
28
28
  configName,
29
29
  moduleName,
@@ -5,22 +5,29 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _useMutateGeneric = _interopRequireDefault(require("../useMutateGeneric"));
8
+ const _excluded = ["endpoint", "id"];
8
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ 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; }
11
+ 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; }
12
+ 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; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
14
+ 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); }
15
+ 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; }
16
+ 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; }
9
17
  const useMutateCustomProperties = _ref => {
10
18
  let {
11
- endpoint,
12
- id,
13
- ...mutateGenericProps
14
- } = _ref;
15
- return (0, _useMutateGeneric.default)({
19
+ endpoint,
20
+ id
21
+ } = _ref,
22
+ mutateGenericProps = _objectWithoutProperties(_ref, _excluded);
23
+ return (0, _useMutateGeneric.default)(_objectSpread({
16
24
  endpoint,
17
25
  endpointMutators: {
18
- delete: () => `${endpoint}/${id}`,
19
- put: () => `${endpoint}/${id}`
26
+ delete: () => "".concat(endpoint, "/").concat(id),
27
+ put: () => "".concat(endpoint, "/").concat(id)
20
28
  },
21
29
  id,
22
- queryKey: ['stripes-kint-components', 'useMutateCustomProperties', id],
23
- ...mutateGenericProps
24
- });
30
+ queryKey: ['stripes-kint-components', 'useMutateCustomProperties', id]
31
+ }, mutateGenericProps));
25
32
  };
26
33
  var _default = exports.default = useMutateCustomProperties;
@@ -25,9 +25,9 @@ const useMutateGeneric = function () {
25
25
  } = {},
26
26
  endpoint,
27
27
  endpointMutators: {
28
- delete: endpointMutatorDelete = id => `${endpoint}/${id}`,
28
+ delete: endpointMutatorDelete = id => "".concat(endpoint, "/").concat(id),
29
29
  post: endpointMutatorPost = () => endpoint,
30
- put: endpointMutatorPut = data => `${endpoint}/${data.id}`
30
+ put: endpointMutatorPut = data => "".concat(endpoint, "/").concat(data.id)
31
31
  } = {},
32
32
  payloadMutators: {
33
33
  post: payloadMutatorPost = data => ({
@@ -25,12 +25,12 @@ const useMutateModConfigEntry = _ref => {
25
25
  configName,
26
26
  moduleName
27
27
  });
28
- const putQueryObject = (0, _reactQuery.useMutation)([...baseNamespace, 'putConfigEntry', id], async data => ky.put(`${_endpoints.MOD_SETTINGS_ENDPOINT}/${id}`, {
28
+ const putQueryObject = (0, _reactQuery.useMutation)([...baseNamespace, 'putConfigEntry', id], async data => ky.put("".concat(_endpoints.MOD_SETTINGS_ENDPOINT, "/").concat(id), {
29
29
  json: data
30
30
  }).json().then(() => {
31
31
  queryClient.invalidateQueries(baseNamespace);
32
32
  }));
33
- const postQueryObject = (0, _reactQuery.useMutation)([...baseNamespace, 'postConfigEntry'], async data => ky.post(`${_endpoints.MOD_SETTINGS_ENDPOINT}`, {
33
+ const postQueryObject = (0, _reactQuery.useMutation)([...baseNamespace, 'postConfigEntry'], async data => ky.post("".concat(_endpoints.MOD_SETTINGS_ENDPOINT), {
34
34
  json: data
35
35
  }).json().then(() => {
36
36
  queryClient.invalidateQueries(baseNamespace);
@@ -7,19 +7,27 @@ exports.default = void 0;
7
7
  var _noop = _interopRequireDefault(require("lodash/noop"));
8
8
  var _useInvalidateRefdata = _interopRequireDefault(require("../useInvalidateRefdata"));
9
9
  var _useMutateGeneric = _interopRequireDefault(require("../useMutateGeneric"));
10
+ const _excluded = ["afterQueryCalls", "endpoint"];
10
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ 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; }
13
+ 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; }
14
+ 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; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
16
+ 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); }
17
+ 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; }
18
+ 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; }
11
19
  const useMutateRefdataCategory = _ref => {
12
20
  let {
13
- afterQueryCalls: {
14
- delete: afterQueryDelete = _noop.default,
15
- post: afterQueryPost = _noop.default,
16
- put: afterQueryPut = _noop.default
17
- } = {},
18
- endpoint,
19
- ...mutateGenericProps
20
- } = _ref;
21
+ afterQueryCalls: {
22
+ delete: afterQueryDelete = _noop.default,
23
+ post: afterQueryPost = _noop.default,
24
+ put: afterQueryPut = _noop.default
25
+ } = {},
26
+ endpoint
27
+ } = _ref,
28
+ mutateGenericProps = _objectWithoutProperties(_ref, _excluded);
21
29
  const invalidateRefdata = (0, _useInvalidateRefdata.default)();
22
- return (0, _useMutateGeneric.default)({
30
+ return (0, _useMutateGeneric.default)(_objectSpread({
23
31
  afterQueryCalls: {
24
32
  delete: res => {
25
33
  invalidateRefdata().then(() => {
@@ -40,14 +48,12 @@ const useMutateRefdataCategory = _ref => {
40
48
  endpoint,
41
49
  payloadMutators: {
42
50
  post: data => ({
43
- json: {
44
- ...data,
51
+ json: _objectSpread(_objectSpread({}, data), {}, {
45
52
  values: []
46
- }
53
+ })
47
54
  })
48
55
  },
49
- queryKey: ['stripes-kint-components', 'useMutateRefdataCategory'],
50
- ...mutateGenericProps
51
- });
56
+ queryKey: ['stripes-kint-components', 'useMutateRefdataCategory']
57
+ }, mutateGenericProps));
52
58
  };
53
59
  var _default = exports.default = useMutateRefdataCategory;
@@ -7,20 +7,28 @@ exports.default = void 0;
7
7
  var _noop = _interopRequireDefault(require("lodash/noop"));
8
8
  var _useInvalidateRefdata = _interopRequireDefault(require("../useInvalidateRefdata"));
9
9
  var _useMutateGeneric = _interopRequireDefault(require("../useMutateGeneric"));
10
+ const _excluded = ["afterQueryCalls", "endpoint", "id"];
10
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ 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; }
13
+ 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; }
14
+ 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; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
16
+ 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); }
17
+ 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; }
18
+ 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; }
11
19
  const useMutateRefdataValue = _ref => {
12
20
  let {
13
- afterQueryCalls: {
14
- delete: afterQueryDelete = _noop.default,
15
- post: afterQueryPost = _noop.default,
16
- put: afterQueryPut = _noop.default
17
- } = {},
18
- endpoint,
19
- id,
20
- ...mutateGenericProps
21
- } = _ref;
21
+ afterQueryCalls: {
22
+ delete: afterQueryDelete = _noop.default,
23
+ post: afterQueryPost = _noop.default,
24
+ put: afterQueryPut = _noop.default
25
+ } = {},
26
+ endpoint,
27
+ id
28
+ } = _ref,
29
+ mutateGenericProps = _objectWithoutProperties(_ref, _excluded);
22
30
  const invalidateRefdata = (0, _useInvalidateRefdata.default)();
23
- return (0, _useMutateGeneric.default)({
31
+ return (0, _useMutateGeneric.default)(_objectSpread({
24
32
  afterQueryCalls: {
25
33
  delete: res => {
26
34
  invalidateRefdata().then(() => {
@@ -41,7 +49,7 @@ const useMutateRefdataValue = _ref => {
41
49
  endpoint,
42
50
  id,
43
51
  promiseReturns: {
44
- delete: (delId, ky) => ky.put(`${endpoint}/${id}`, {
52
+ delete: (delId, ky) => ky.put("".concat(endpoint, "/").concat(id), {
45
53
  json: {
46
54
  id,
47
55
  values: [{
@@ -50,21 +58,20 @@ const useMutateRefdataValue = _ref => {
50
58
  }]
51
59
  }
52
60
  }).json(),
53
- post: (data, ky) => ky.put(`${endpoint}/${id}`, {
61
+ post: (data, ky) => ky.put("".concat(endpoint, "/").concat(id), {
54
62
  json: {
55
63
  id,
56
64
  values: [data]
57
65
  }
58
66
  }).json(),
59
- put: (data, ky) => ky.put(`${endpoint}/${id}`, {
67
+ put: (data, ky) => ky.put("".concat(endpoint, "/").concat(id), {
60
68
  json: {
61
69
  id,
62
70
  values: [data]
63
71
  }
64
72
  }).json()
65
73
  },
66
- queryKey: ['stripes-kint-components', 'useMutateRefdataValue', id],
67
- ...mutateGenericProps
68
- });
74
+ queryKey: ['stripes-kint-components', 'useMutateRefdataValue', id]
75
+ }, mutateGenericProps));
69
76
  };
70
77
  var _default = exports.default = useMutateRefdataValue;
@@ -10,6 +10,11 @@ var _queryString = _interopRequireDefault(require("query-string"));
10
10
  var _pagination = require("../constants/pagination");
11
11
  var _useLocalPageStore = _interopRequireDefault(require("./useLocalPageStore"));
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ 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; }
14
+ 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; }
15
+ 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; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
17
+ 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); }
13
18
  // Currently there are several places in which this hook is used twice within the same component
14
19
  // Once in order to get the current page, and again in order to handle changes to paginations
15
20
  // This hook should be refactored in order to resolve these issue - @EthanFreestone
@@ -69,14 +74,13 @@ const usePrevNextPagination = function () {
69
74
  // change the store and the currentPage will update below
70
75
  setPage(id, newPage);
71
76
  setCurrentPage(newPage);
72
- } else if (newPage !== urlQuery?.page) {
73
- const newQuery = {
74
- ...urlQuery,
77
+ } else if (newPage !== (urlQuery === null || urlQuery === void 0 ? void 0 : urlQuery.page)) {
78
+ const newQuery = _objectSpread(_objectSpread({}, urlQuery), {}, {
75
79
  page: newPage
76
- };
80
+ });
77
81
  history.push({
78
82
  pathname: location.pathname,
79
- search: `?${_queryString.default.stringify(newQuery)}`
83
+ search: "?".concat(_queryString.default.stringify(newQuery))
80
84
  });
81
85
  }
82
86
  }, [currentPage, history, id, location.pathname, location.search, setPage, syncToLocation]);
@@ -92,30 +96,28 @@ const usePrevNextPagination = function () {
92
96
  (0, _react.useEffect)(() => {
93
97
  if (syncToLocation) {
94
98
  const urlQuery = _queryString.default.parse(location.search);
95
- if (urlQuery?.page && currentPage !== urlQuery?.page) {
96
- setCurrentPage(Number(urlQuery?.page));
97
- } else if (!urlQuery?.page && defaultToPageOne) {
99
+ if (urlQuery !== null && urlQuery !== void 0 && urlQuery.page && currentPage !== (urlQuery === null || urlQuery === void 0 ? void 0 : urlQuery.page)) {
100
+ setCurrentPage(Number(urlQuery === null || urlQuery === void 0 ? void 0 : urlQuery.page));
101
+ } else if (!(urlQuery !== null && urlQuery !== void 0 && urlQuery.page) && defaultToPageOne) {
98
102
  // If url query "page" is not yet set, set it to 1
99
103
  setCurrentPage(1);
100
- const newQuery = {
101
- ...urlQuery,
104
+ const newQuery = _objectSpread(_objectSpread({}, urlQuery), {}, {
102
105
  page: 1
103
- };
106
+ });
104
107
 
105
108
  // We use replace instead of push for the defaulting so we don't add unnecessary history entries
106
109
  history.replace({
107
110
  pathname: location.pathname,
108
- search: `?${_queryString.default.stringify(newQuery)}`
111
+ search: "?".concat(_queryString.default.stringify(newQuery))
109
112
  });
110
113
  }
111
114
  if (resetPageState) {
112
- const newQuery = {
113
- ...urlQuery,
115
+ const newQuery = _objectSpread(_objectSpread({}, urlQuery), {}, {
114
116
  page: 1
115
- };
117
+ });
116
118
  history.push({
117
119
  pathname: location.pathname,
118
- search: `?${_queryString.default.stringify(newQuery)}`
120
+ search: "?".concat(_queryString.default.stringify(newQuery))
119
121
  });
120
122
  setResetPageState(false);
121
123
  }
@@ -127,7 +129,7 @@ const usePrevNextPagination = function () {
127
129
  }, [currentPage, defaultToPageOne, history, id, location, pageStore, resetPageState, syncToLocation]);
128
130
 
129
131
  // Set up MCL specific props based on page
130
- const pagingCanGoNext = hasNextPage ?? (currentPage && currentPage < Number(count) / pageSize);
132
+ const pagingCanGoNext = hasNextPage !== null && hasNextPage !== void 0 ? hasNextPage : currentPage && currentPage < Number(count) / pageSize;
131
133
  const pagingCanGoPrevious = currentPage && Number(currentPage) > 1;
132
134
  const pagingOffset = currentPage ? (currentPage - 1) * pageSize : 0;
133
135
  const onNeedMoreData = function () {
@@ -9,35 +9,38 @@ var _reactRouterDom = require("react-router-dom");
9
9
  var _queryString = _interopRequireDefault(require("query-string"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ 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; }
13
+ 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; }
14
+ 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; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
16
+ 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); }
12
17
  const useQIndex = () => {
13
18
  const history = (0, _reactRouterDom.useHistory)();
14
19
  const location = (0, _reactRouterDom.useLocation)();
15
20
  const query = _queryString.default.parse(location.search);
16
- const [currentQindex, setCurrentQindex] = (0, _react.useState)(query?.qindex);
21
+ const [currentQindex, setCurrentQindex] = (0, _react.useState)(query === null || query === void 0 ? void 0 : query.qindex);
17
22
  const handleQindexChange = newQindex => {
18
23
  setCurrentQindex(newQindex);
19
- if (newQindex !== query?.qindex) {
24
+ if (newQindex !== (query === null || query === void 0 ? void 0 : query.qindex)) {
20
25
  let newQuery;
21
26
  if (newQindex !== '') {
22
- newQuery = {
23
- ...query,
27
+ newQuery = _objectSpread(_objectSpread({}, query), {}, {
24
28
  qindex: newQindex
25
- };
29
+ });
26
30
  } else {
27
- newQuery = {
28
- ...query,
31
+ newQuery = _objectSpread(_objectSpread({}, query), {}, {
29
32
  qindex: undefined
30
- };
33
+ });
31
34
  }
32
35
  history.push({
33
36
  pathname: location.pathname,
34
- search: `?${_queryString.default.stringify(newQuery)}`
37
+ search: "?".concat(_queryString.default.stringify(newQuery))
35
38
  });
36
39
  }
37
40
  };
38
41
  (0, _react.useEffect)(() => {
39
- if (currentQindex !== query?.qindex) {
40
- setCurrentQindex(query?.qindex);
42
+ if (currentQindex !== (query === null || query === void 0 ? void 0 : query.qindex)) {
43
+ setCurrentQindex(query === null || query === void 0 ? void 0 : query.qindex);
41
44
  }
42
45
  }, [currentQindex, history, location, query]);
43
46
  return [currentQindex, handleQindexChange];
@@ -28,13 +28,13 @@ const useRefdata = _ref => {
28
28
 
29
29
  if (Array.isArray(desc)) {
30
30
  // If we have an array, append a desc filter for each desc given
31
- nsValues.filters = desc.map(d => `DescKey.${d}`).join(',');
31
+ nsValues.filters = desc.map(d => "DescKey.".concat(d)).join(',');
32
32
  } else if (desc) {
33
33
  // If we just have a string, append a single desc filter
34
- nsValues.filters = `DescKey.${desc}`;
34
+ nsValues.filters = "DescKey.".concat(desc);
35
35
  }
36
36
  const query = (0, _utils.generateKiwtQuery)(options, nsValues);
37
- const path = `${endpoint}${query}`;
37
+ const path = "".concat(endpoint).concat(query);
38
38
  const queryObject = (0, _reactQuery.useQuery)((0, _utils.refdataQueryKey)(desc), () => ky(path).json(), queryParams);
39
39
  if (returnQueryObject) {
40
40
  return queryObject || {};
@@ -8,6 +8,11 @@ var _react = require("react");
8
8
  var _reactRouter = require("react-router");
9
9
  var _queryString = _interopRequireDefault(require("query-string"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ 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; }
12
+ 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; }
13
+ 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; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
15
+ 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); }
11
16
  // !WARNING! This pattern is not recommended
12
17
  // You likely want to make use of the filterConfig valuesMapping/filterPrefix
13
18
  // instead so SASQ filters can be used natively
@@ -40,28 +45,27 @@ const useStandaloneSASQQueryParameter = _ref => {
40
45
  const urlQuery = _queryString.default.parse(location.search);
41
46
  const param = urlQuery[name];
42
47
  const handler = _ref2 => {
48
+ var _values$;
43
49
  let {
44
50
  name: _name,
45
51
  values
46
52
  } = _ref2;
47
- const newQuery = {
48
- ...urlQuery,
49
- [name]: values[1] ?? fallbackValue // SECOND value is the new one
50
- };
53
+ const newQuery = _objectSpread(_objectSpread({}, urlQuery), {}, {
54
+ [name]: (_values$ = values[1]) !== null && _values$ !== void 0 ? _values$ : fallbackValue // SECOND value is the new one
55
+ });
51
56
  history.push({
52
57
  pathname: location.pathname,
53
- search: `?${_queryString.default.stringify(newQuery)}`
58
+ search: "?".concat(_queryString.default.stringify(newQuery))
54
59
  });
55
60
  };
56
61
  (0, _react.useEffect)(() => {
57
62
  if (!param) {
58
- const newQuery = {
59
- ...urlQuery,
63
+ const newQuery = _objectSpread(_objectSpread({}, urlQuery), {}, {
60
64
  [name]: defaultValue
61
- };
65
+ });
62
66
  history.push({
63
67
  pathname: location.pathname,
64
- search: `?${_queryString.default.stringify(newQuery)}`
68
+ search: "?".concat(_queryString.default.stringify(newQuery))
65
69
  });
66
70
  }
67
71
  }, [defaultValue, history, location.pathname, name, param, urlQuery]);
@@ -18,16 +18,16 @@ const useTemplates = _ref => {
18
18
  const ky = (0, _core.useOkapiKy)();
19
19
  const extraPathItems = [];
20
20
  if (context) {
21
- extraPathItems.push(`filters=context=${context}`);
21
+ extraPathItems.push("filters=context=".concat(context));
22
22
  }
23
23
  if (sort) {
24
- extraPathItems.push(`sort=${sort}`);
24
+ extraPathItems.push("sort=".concat(sort));
25
25
  }
26
26
  extraPathItems.push('max=500');
27
- const path = `${endpoint}?${extraPathItems.join('&')}`;
27
+ const path = "".concat(endpoint, "?").concat(extraPathItems.join('&'));
28
28
  const {
29
29
  data: templates
30
- } = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useTemplates', 'templates', context ?? ''], () => ky(path).json(), queryParams);
30
+ } = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useTemplates', 'templates', context !== null && context !== void 0 ? context : ''], () => ky(path).json(), queryParams);
31
31
  return templates || [];
32
32
  };
33
33
  var _default = exports.default = useTemplates;
@@ -17,12 +17,13 @@ function removeEmpty(obj) {
17
17
  return cleanObj;
18
18
  }
19
19
  function buildUrl(location, values, basePath) {
20
- const locationQuery = location?.query ?? _queryString.default.parse(location.search);
20
+ var _location$query;
21
+ const locationQuery = (_location$query = location === null || location === void 0 ? void 0 : location.query) !== null && _location$query !== void 0 ? _location$query : _queryString.default.parse(location.search);
21
22
  let url = values._path || basePath || location.pathname;
22
23
  const params = removeEmpty(Object.assign(locationQuery, values));
23
24
  (0, _lodash.unset)(params, '_path');
24
25
  if (!(0, _lodash.isEmpty)(params)) {
25
- url += `?${_queryString.default.stringify(params)}`;
26
+ url += "?".concat(_queryString.default.stringify(params));
26
27
  }
27
28
  return url;
28
29
  }
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.deparseKiwtQueryFiltersObject = exports.default = void 0;
7
7
  // Does not validate object... make sure you pass it the right thing
8
8
  const deparseKiwtQueryFiltersObject = queryObject => {
9
- let returnString = `${queryObject.path}${queryObject.comparator}`;
9
+ let returnString = "".concat(queryObject.path).concat(queryObject.comparator);
10
10
  if (queryObject.value) {
11
- returnString += `${queryObject.value}`;
11
+ returnString += "".concat(queryObject.value);
12
12
  }
13
13
  return returnString;
14
14
  };
@@ -20,17 +20,17 @@ const deparseKiwtQueryFilters = queryArray => {
20
20
  let returnString = '';
21
21
  queryArray.forEach(qa => {
22
22
  if (Array.isArray(qa)) {
23
- returnString += `(${deparseKiwtQueryFilters(qa)})`;
23
+ returnString += "(".concat(deparseKiwtQueryFilters(qa), ")");
24
24
  } else if (typeof qa === 'string') {
25
25
  returnString += qa;
26
26
  } else {
27
27
  // Assuming object at this stage
28
- returnString += `${deparseKiwtQueryFiltersObject(qa)}`;
28
+ returnString += "".concat(deparseKiwtQueryFiltersObject(qa));
29
29
  }
30
30
  });
31
31
  return returnString.trim();
32
32
  } else {
33
- throw new Error(`deparseKiwtQuery expects a parameter of type Array, passed: ${queryArray}`);
33
+ throw new Error("deparseKiwtQuery expects a parameter of type Array, passed: ".concat(queryArray));
34
34
  }
35
35
  };
36
36
  var _default = exports.default = deparseKiwtQueryFilters;
@@ -21,7 +21,7 @@ const parseKiwtQueryFiltersRecursive = query => {
21
21
  return (0, _parseKiwtQueryString.default)(query);
22
22
  }
23
23
  } else {
24
- throw new Error(`Unexpected query type: ${query}`);
24
+ throw new Error("Unexpected query type: ".concat(query));
25
25
  }
26
26
  };
27
27
 
@@ -33,7 +33,7 @@ const parseKiwtQueryFilters = queryString => {
33
33
  const queryGroups = (0, _parseKiwtQueryGroups.default)(queryString);
34
34
  return parseKiwtQueryFiltersRecursive(queryGroups);
35
35
  } else {
36
- throw new Error(`parseKiwtQuery expects a parameter of type String, passed: ${queryString}`);
36
+ throw new Error("parseKiwtQuery expects a parameter of type String, passed: ".concat(queryString));
37
37
  }
38
38
  };
39
39