@k-int/stripes-kint-components 5.1.1 → 5.1.3

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 (284) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/es/index.js +2 -2
  3. package/es/lib/ActionList/ActionList.js +2 -2
  4. package/es/lib/ActionList/ActionListFieldArray.js +31 -34
  5. package/es/lib/ComboButton/ComboButton.js +5 -6
  6. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +4 -7
  7. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +29 -32
  8. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +58 -58
  9. package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +2 -2
  10. package/es/lib/CustomProperties/Config/CustomPropertyView.js +32 -33
  11. package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -1
  12. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -1
  13. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +3 -3
  14. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +8 -10
  15. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +22 -28
  16. package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +5 -5
  17. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -2
  18. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +3 -3
  19. package/es/lib/CustomProperties/Edit/testResources.js +11 -12
  20. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +6 -11
  21. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +20 -28
  22. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -1
  23. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +6 -6
  24. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +8 -8
  25. package/es/lib/CustomProperties/Filter/testResources.js +1 -2
  26. package/es/lib/CustomProperties/Filter/useOperators.js +2 -2
  27. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +1 -2
  28. package/es/lib/CustomProperties/Filter/useValueProps.js +2 -2
  29. package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -1
  30. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +18 -26
  31. package/es/lib/CustomProperties/View/CustomPropertyCard.js +9 -13
  32. package/es/lib/CycleButton/CycleButton.js +1 -1
  33. package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +23 -34
  34. package/es/lib/EditableRefdataList/EditableRefdataList.js +28 -35
  35. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +1 -1
  36. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +5 -5
  37. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +10 -12
  38. package/es/lib/EditableSettingsList/SettingField/SettingField.js +6 -6
  39. package/es/lib/FormattedKintMessage/FormattedKintMessage.js +4 -7
  40. package/es/lib/IconSelect/IconSelect.js +7 -11
  41. package/es/lib/NoResultsMessage/NoResultsMessage.js +4 -4
  42. package/es/lib/QueryTypedown/QueryTypedown.js +2 -2
  43. package/es/lib/RefdataButtons/RefdataButtons.js +3 -3
  44. package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +21 -28
  45. package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +5 -6
  46. package/es/lib/RichSelect/RichSelect.js +14 -19
  47. package/es/lib/RichSelect/useSelectedOption.js +1 -2
  48. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +14 -17
  49. package/es/lib/SASQLookupComponent/TableBody/TableBody.js +4 -6
  50. package/es/lib/SASQRoute/SASQRoute.js +2 -2
  51. package/es/lib/SASQViewComponent/SASQViewComponent.js +5 -9
  52. package/es/lib/SettingPage/SettingPage.js +2 -2
  53. package/es/lib/SettingPage/SettingPagePane.js +2 -2
  54. package/es/lib/SettingsFormContainer/SettingsFormContainer.js +2 -2
  55. package/es/lib/Typedown/Typedown.js +21 -28
  56. package/es/lib/hooks/typedownHooks/useTypedown.js +2 -2
  57. package/es/lib/hooks/typedownHooks/useTypedownToggle.js +2 -2
  58. package/es/lib/hooks/useActiveElement.js +1 -1
  59. package/es/lib/hooks/useCustomProperties.js +2 -2
  60. package/es/lib/hooks/useHelperApp.js +8 -8
  61. package/es/lib/hooks/useIntlKeyStore.js +4 -7
  62. package/es/lib/hooks/useKintIntl.js +5 -11
  63. package/es/lib/hooks/useKiwtSASQuery.js +1 -1
  64. package/es/lib/hooks/useLocalStorageState.js +2 -2
  65. package/es/lib/hooks/useModConfigEntries.js +2 -2
  66. package/es/lib/hooks/useMutateCustomProperties.js +8 -8
  67. package/es/lib/hooks/useMutateModConfigEntry.js +2 -2
  68. package/es/lib/hooks/useMutateRefdataCategory.js +4 -4
  69. package/es/lib/hooks/useMutateRefdataValue.js +6 -6
  70. package/es/lib/hooks/useQIndex.js +7 -7
  71. package/es/lib/hooks/useRefdata.js +3 -3
  72. package/es/lib/hooks/useTemplates.js +4 -4
  73. package/es/lib/settingsHooks/useAppSettings.js +7 -11
  74. package/es/lib/settingsHooks/useSettingSection.js +2 -2
  75. package/es/lib/settingsHooks/useSettings.js +3 -3
  76. package/es/lib/utils/buildUrl.js +2 -3
  77. package/es/lib/utils/filterParsers/deparseKiwtQueryFilters.js +6 -6
  78. package/es/lib/utils/filterParsers/index.js +2 -2
  79. package/es/lib/utils/filterParsers/parseKiwtQueryFilters.js +2 -2
  80. package/es/lib/utils/filterParsers/parseKiwtQueryGroups.js +4 -5
  81. package/es/lib/utils/filterParsers/parseKiwtQueryString.js +1 -1
  82. package/es/lib/utils/generateKiwtQueryParams.js +28 -37
  83. package/es/lib/utils/groupCustomPropertiesByCtx.js +2 -3
  84. package/es/lib/utils/matchString.js +1 -1
  85. package/es/lib/utils/parseErrorResponse.js +2 -3
  86. package/es/lib/utils/selectorSafe.js +2 -3
  87. package/es/lib/utils/sortByLabel.js +2 -3
  88. package/es/lib/validators/validators.js +3 -3
  89. package/junit.xml +162 -162
  90. package/package.json +2 -1
  91. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
  92. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +1 -1
  93. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +1 -1
  94. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
  95. package/src/artifacts/coverage-jest/lcov-report/ComboButton/ComboButton.js.html +1 -1
  96. package/src/artifacts/coverage-jest/lcov-report/ComboButton/index.html +1 -1
  97. package/src/artifacts/coverage-jest/lcov-report/ComboButton/index.js.html +1 -1
  98. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
  99. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +1 -1
  100. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
  101. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +1 -1
  102. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +1 -1
  103. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
  104. package/src/artifacts/coverage-jest/lcov-report/{SettingsActionList/SettingsActionList.js.html → CustomProperties/Config/testResources.js.html} +313 -256
  105. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
  106. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
  107. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +15 -6
  108. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +10 -7
  109. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
  110. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +10 -10
  111. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
  112. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +1 -1
  113. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +1 -1
  114. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
  115. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
  116. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
  117. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
  118. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +1 -1
  119. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
  120. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +1 -1
  121. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +1 -1
  122. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
  123. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +1 -1
  124. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +1 -1
  125. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +1 -1
  126. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +1 -1
  127. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +1 -1
  128. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
  129. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
  130. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
  131. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
  132. package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +1 -1
  133. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +1 -1
  134. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +1 -1
  135. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
  136. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +1 -1
  137. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
  138. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +1 -1
  139. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +1 -1
  140. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
  141. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +1 -1
  142. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +1 -1
  143. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
  144. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +1 -1
  145. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +1 -1
  146. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
  147. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
  148. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +1 -1
  149. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
  150. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +1 -1
  151. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +1 -1
  152. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
  153. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
  154. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +1 -1
  155. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +1 -1
  156. package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +1 -1
  157. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +1 -1
  158. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
  159. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
  160. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
  161. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
  162. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
  163. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
  164. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
  165. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +1 -1
  166. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
  167. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
  168. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +1 -1
  169. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +1 -1
  170. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +1 -1
  171. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +1 -1
  172. package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +1 -1
  173. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +1 -1
  174. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +1 -1
  175. package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +1 -1
  176. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +1 -1
  177. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
  178. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
  179. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
  180. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
  181. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
  182. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
  183. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
  184. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
  185. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
  186. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
  187. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
  188. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
  189. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
  190. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
  191. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +1 -1
  192. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
  193. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +1 -1
  194. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
  195. package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/SettingsFormContainer.js.html +1 -1
  196. package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.html +1 -1
  197. package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.js.html +1 -1
  198. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
  199. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
  200. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
  201. package/src/artifacts/coverage-jest/lcov-report/constants/comparators.js.html +5 -2
  202. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
  203. package/src/artifacts/coverage-jest/lcov-report/constants/endpoints.js.html +1 -1
  204. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
  205. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
  206. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
  207. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
  208. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
  209. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +1 -1
  210. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
  211. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +1 -1
  212. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
  213. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +1 -1
  214. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +1 -1
  215. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +1 -1
  216. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
  217. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
  218. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
  219. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
  220. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  221. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +1 -1
  222. package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +205 -0
  223. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +1 -1
  224. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +1 -1
  225. package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +1 -1
  226. package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +1 -1
  227. package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +1 -1
  228. package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +1 -1
  229. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
  230. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
  231. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
  232. package/src/artifacts/coverage-jest/lcov-report/hooks/useModConfigEntries.js.html +1 -1
  233. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +1 -1
  234. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateModConfigEntry.js.html +1 -1
  235. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +1 -1
  236. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +1 -1
  237. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
  238. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +1 -1
  239. package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +1 -1
  240. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
  241. package/src/artifacts/coverage-jest/lcov-report/index.html +10 -10
  242. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.html +1 -1
  243. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.js.html +1 -1
  244. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useAppSettings.js.html +1 -1
  245. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettingSection.js.html +1 -1
  246. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettings.js.html +1 -1
  247. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
  248. package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/deparseKiwtQueryFilters.js.html +1 -1
  249. package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/index.html +1 -1
  250. package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/index.js.html +1 -1
  251. package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryFilters.js.html +1 -1
  252. package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryGroups.js.html +1 -1
  253. package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryString.js.html +1 -1
  254. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +1 -1
  255. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +1 -1
  256. package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +1 -1
  257. package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +1 -1
  258. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +1 -1
  259. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
  260. package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +1 -1
  261. package/src/artifacts/coverage-jest/lcov-report/utils/modConfigEntriesQueryKey.js.html +1 -1
  262. package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +1 -1
  263. package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +2 -2
  264. package/src/artifacts/coverage-jest/lcov-report/utils/parseModConfigEntry.js.html +1 -1
  265. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
  266. package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +1 -1
  267. package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +166 -0
  268. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +1 -1
  269. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +1 -1
  270. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +1 -1
  271. package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +1 -1
  272. package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +1 -1
  273. package/src/artifacts/coverage-jest/lcov-report/validators/index.html +1 -1
  274. package/src/artifacts/coverage-jest/lcov-report/validators/index.js.html +1 -1
  275. package/src/artifacts/coverage-jest/lcov-report/validators/validators.js.html +1 -1
  276. package/src/artifacts/coverage-jest/lcov.info +231 -230
  277. package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +3 -0
  278. package/src/lib/CustomProperties/Edit/CustomPropertyField.js +4 -3
  279. package/yarn-error.log +129 -0
  280. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionTrigger.js.html +0 -418
  281. package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/EditSettingValue.js.html +0 -514
  282. package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/RenderSettingValue.js.html +0 -358
  283. package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/index.html +0 -161
  284. package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/index.js.html +0 -88
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _localStorage = require("@rehooks/local-storage");
9
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
9
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
10
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
11
11
  const useLocalStorageState = (key, defaultValue) => {
12
12
  const [local] = (0, _localStorage.useLocalStorage)(key, defaultValue);
13
13
  const [localState, setLocalState] = (0, _react.useState)(local);
@@ -18,8 +18,8 @@ const useModConfigEntries = _ref => {
18
18
  queryParams
19
19
  } = _ref;
20
20
  const ky = (0, _core.useOkapiKy)();
21
- const query = "?query=(module=".concat(moduleName, " and configName=").concat(configName, ")");
22
- const path = "".concat(_endpoints.MOD_SETTINGS_ENDPOINT).concat(query);
21
+ const query = `?query=(module=${moduleName} and configName=${configName})`;
22
+ const path = `${_endpoints.MOD_SETTINGS_ENDPOINT}${query}`;
23
23
  const namespace = (0, _utils.modConfigEntriesQueryKey)({
24
24
  configName,
25
25
  moduleName,
@@ -21,24 +21,24 @@ const useMutateCustomProperties = _ref => {
21
21
  } = _ref;
22
22
  const returnObj = {};
23
23
  const ky = (0, _core.useOkapiKy)();
24
- const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateCustomProperties', 'delete', id], async () => ky.delete("".concat(endpoint, "/").concat(id)).json().then(afterQueryCalls === null || afterQueryCalls === void 0 ? void 0 : afterQueryCalls.delete).catch(catchQueryCalls === null || catchQueryCalls === void 0 ? void 0 : catchQueryCalls.delete), queryParams === null || queryParams === void 0 ? void 0 : queryParams.delete);
25
- const putQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateCustomProperties', 'put', id], async data => ky.put("".concat(endpoint, "/").concat(id), {
24
+ const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateCustomProperties', 'delete', id], async () => ky.delete(`${endpoint}/${id}`).json().then(afterQueryCalls?.delete).catch(catchQueryCalls?.delete), queryParams?.delete);
25
+ const putQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateCustomProperties', 'put', id], async data => ky.put(`${endpoint}/${id}`, {
26
26
  json: data
27
- }).json().then(afterQueryCalls === null || afterQueryCalls === void 0 ? void 0 : afterQueryCalls.put).catch(catchQueryCalls === null || catchQueryCalls === void 0 ? void 0 : catchQueryCalls.put), queryParams === null || queryParams === void 0 ? void 0 : queryParams.put);
28
- const postQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateCustomProperties', 'post'], async data => ky.post("".concat(endpoint), {
27
+ }).json().then(afterQueryCalls?.put).catch(catchQueryCalls?.put), queryParams?.put);
28
+ const postQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateCustomProperties', 'post'], async data => ky.post(`${endpoint}`, {
29
29
  json: data
30
- }).json().then(afterQueryCalls === null || afterQueryCalls === void 0 ? void 0 : afterQueryCalls.post).catch(catchQueryCalls === null || catchQueryCalls === void 0 ? void 0 : catchQueryCalls.post), queryParams === null || queryParams === void 0 ? void 0 : queryParams.post);
31
- if (returnQueryObject !== null && returnQueryObject !== void 0 && returnQueryObject.delete) {
30
+ }).json().then(afterQueryCalls?.post).catch(catchQueryCalls?.post), queryParams?.post);
31
+ if (returnQueryObject?.delete) {
32
32
  returnObj.delete = deleteQueryObject;
33
33
  } else {
34
34
  returnObj.delete = deleteQueryObject.mutateAsync;
35
35
  }
36
- if (returnQueryObject !== null && returnQueryObject !== void 0 && returnQueryObject.put) {
36
+ if (returnQueryObject?.put) {
37
37
  returnObj.put = putQueryObject;
38
38
  } else {
39
39
  returnObj.put = putQueryObject.mutateAsync;
40
40
  }
41
- if (returnQueryObject !== null && returnQueryObject !== void 0 && returnQueryObject.post) {
41
+ if (returnQueryObject?.post) {
42
42
  returnObj.post = postQueryObject;
43
43
  } else {
44
44
  returnObj.post = postQueryObject.mutateAsync;
@@ -21,12 +21,12 @@ const useMutateModConfigEntry = _ref => {
21
21
  configName,
22
22
  moduleName
23
23
  });
24
- const putQueryObject = (0, _reactQuery.useMutation)([...baseNamespace, 'putConfigEntry', id], async data => ky.put("".concat(_endpoints.MOD_SETTINGS_ENDPOINT, "/").concat(id), {
24
+ const putQueryObject = (0, _reactQuery.useMutation)([...baseNamespace, 'putConfigEntry', id], async data => ky.put(`${_endpoints.MOD_SETTINGS_ENDPOINT}/${id}`, {
25
25
  json: data
26
26
  }).json().then(() => {
27
27
  queryClient.invalidateQueries(baseNamespace);
28
28
  }));
29
- const postQueryObject = (0, _reactQuery.useMutation)([...baseNamespace, 'postConfigEntry'], async data => ky.post("".concat(_endpoints.MOD_SETTINGS_ENDPOINT), {
29
+ const postQueryObject = (0, _reactQuery.useMutation)([...baseNamespace, 'postConfigEntry'], async data => ky.post(`${_endpoints.MOD_SETTINGS_ENDPOINT}`, {
30
30
  json: data
31
31
  }).json().then(() => {
32
32
  queryClient.invalidateQueries(baseNamespace);
@@ -22,19 +22,19 @@ const useMutateRefdataCategory = _ref => {
22
22
  const returnObj = {};
23
23
  const ky = (0, _core.useOkapiKy)();
24
24
  const invalidateRefdata = (0, _useInvalidateRefdata.default)();
25
- const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateRefdataCategory', 'delete'], async id => ky.delete("".concat(endpoint, "/").concat(id)).json().then(afterQueryCalls === null || afterQueryCalls === void 0 ? void 0 : afterQueryCalls.delete).then(() => invalidateRefdata()).catch(catchQueryCalls === null || catchQueryCalls === void 0 ? void 0 : catchQueryCalls.delete), queryParams === null || queryParams === void 0 ? void 0 : queryParams.delete);
25
+ const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateRefdataCategory', 'delete'], async id => ky.delete(`${endpoint}/${id}`).json().then(afterQueryCalls?.delete).then(() => invalidateRefdata()).catch(catchQueryCalls?.delete), queryParams?.delete);
26
26
  const postQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateRefdataCategory', 'post'], async payload => ky.post(endpoint, {
27
27
  json: {
28
28
  ...payload,
29
29
  values: []
30
30
  }
31
- }).json().then(afterQueryCalls === null || afterQueryCalls === void 0 ? void 0 : afterQueryCalls.post).then(() => invalidateRefdata()).catch(catchQueryCalls === null || catchQueryCalls === void 0 ? void 0 : catchQueryCalls.post), queryParams === null || queryParams === void 0 ? void 0 : queryParams.post);
32
- if (returnQueryObject !== null && returnQueryObject !== void 0 && returnQueryObject.delete) {
31
+ }).json().then(afterQueryCalls?.post).then(() => invalidateRefdata()).catch(catchQueryCalls?.post), queryParams?.post);
32
+ if (returnQueryObject?.delete) {
33
33
  returnObj.delete = deleteQueryObject;
34
34
  } else {
35
35
  returnObj.delete = deleteQueryObject.mutateAsync;
36
36
  }
37
- if (returnQueryObject !== null && returnQueryObject !== void 0 && returnQueryObject.post) {
37
+ if (returnQueryObject?.post) {
38
38
  returnObj.post = postQueryObject;
39
39
  } else {
40
40
  returnObj.post = postQueryObject.mutateAsync;
@@ -23,7 +23,7 @@ const useMutateRefdataValue = _ref => {
23
23
  const returnObj = {};
24
24
  const ky = (0, _core.useOkapiKy)();
25
25
  const invalidateRefdata = (0, _useInvalidateRefdata.default)();
26
- const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateRefdataValue', 'delete', id], async data => ky.put("".concat(endpoint, "/").concat(id), {
26
+ const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateRefdataValue', 'delete', id], async data => ky.put(`${endpoint}/${id}`, {
27
27
  json: {
28
28
  id,
29
29
  values: [{
@@ -31,19 +31,19 @@ const useMutateRefdataValue = _ref => {
31
31
  _delete: true
32
32
  }]
33
33
  }
34
- }).json().then(afterQueryCalls === null || afterQueryCalls === void 0 ? void 0 : afterQueryCalls.delete).then(() => invalidateRefdata()).catch(catchQueryCalls === null || catchQueryCalls === void 0 ? void 0 : catchQueryCalls.delete), queryParams === null || queryParams === void 0 ? void 0 : queryParams.delete);
35
- const putQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'editableRefdataList', 'editValue', id], async data => ky.put("".concat(endpoint, "/").concat(id), {
34
+ }).json().then(afterQueryCalls?.delete).then(() => invalidateRefdata()).catch(catchQueryCalls?.delete), queryParams?.delete);
35
+ const putQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'editableRefdataList', 'editValue', id], async data => ky.put(`${endpoint}/${id}`, {
36
36
  json: {
37
37
  id,
38
38
  values: [data]
39
39
  }
40
- }).json().then(afterQueryCalls === null || afterQueryCalls === void 0 ? void 0 : afterQueryCalls.put).then(() => invalidateRefdata()).catch(catchQueryCalls === null || catchQueryCalls === void 0 ? void 0 : catchQueryCalls.put), queryParams === null || queryParams === void 0 ? void 0 : queryParams.put);
41
- if (returnQueryObject !== null && returnQueryObject !== void 0 && returnQueryObject.delete) {
40
+ }).json().then(afterQueryCalls?.put).then(() => invalidateRefdata()).catch(catchQueryCalls?.put), queryParams?.put);
41
+ if (returnQueryObject?.delete) {
42
42
  returnObj.delete = deleteQueryObject;
43
43
  } else {
44
44
  returnObj.delete = deleteQueryObject.mutateAsync;
45
45
  }
46
- if (returnQueryObject !== null && returnQueryObject !== void 0 && returnQueryObject.put) {
46
+ if (returnQueryObject?.put) {
47
47
  returnObj.put = putQueryObject;
48
48
  } else {
49
49
  returnObj.put = putQueryObject.mutateAsync;
@@ -8,29 +8,29 @@ var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactRouterDom = require("react-router-dom");
9
9
  var _queryString = _interopRequireDefault(require("query-string"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
13
  const useQIndex = () => {
14
14
  const history = (0, _reactRouterDom.useHistory)();
15
15
  const location = (0, _reactRouterDom.useLocation)();
16
16
  const query = _queryString.default.parse(location.search);
17
- const [currentQindex, setCurrentQindex] = (0, _react.useState)(query === null || query === void 0 ? void 0 : query.qindex);
17
+ const [currentQindex, setCurrentQindex] = (0, _react.useState)(query?.qindex);
18
18
  const handleQindexChange = newQindex => {
19
19
  setCurrentQindex(newQindex);
20
- if (newQindex !== (query === null || query === void 0 ? void 0 : query.qindex)) {
20
+ if (newQindex !== query?.qindex) {
21
21
  const newQuery = {
22
22
  ...query,
23
23
  qindex: newQindex
24
24
  };
25
25
  history.push({
26
26
  pathname: location.pathname,
27
- search: "?".concat(_queryString.default.stringify(newQuery))
27
+ search: `?${_queryString.default.stringify(newQuery)}`
28
28
  });
29
29
  }
30
30
  };
31
31
  (0, _react.useEffect)(() => {
32
- if (currentQindex !== (query === null || query === void 0 ? void 0 : query.qindex)) {
33
- setCurrentQindex(query === null || query === void 0 ? void 0 : query.qindex);
32
+ if (currentQindex !== query?.qindex) {
33
+ setCurrentQindex(query?.qindex);
34
34
  }
35
35
  }, [currentQindex, history, location, query]);
36
36
  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.".concat(d)).join(',');
31
+ nsValues.filters = desc.map(d => `DescKey.${d}`).join(',');
32
32
  } else if (desc) {
33
33
  // If we just have a string, append a single desc filter
34
- nsValues.filters = "DescKey.".concat(desc);
34
+ nsValues.filters = `DescKey.${desc}`;
35
35
  }
36
36
  const query = (0, _utils.generateKiwtQuery)(options, nsValues);
37
- const path = "".concat(endpoint).concat(query);
37
+ const path = `${endpoint}${query}`;
38
38
  const queryObject = (0, _reactQuery.useQuery)((0, _utils.refdataQueryKey)(desc), () => ky(path).json(), queryParams);
39
39
  if (returnQueryObject) {
40
40
  return queryObject || {};
@@ -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=".concat(context));
21
+ extraPathItems.push(`filters=context=${context}`);
22
22
  }
23
23
  if (sort) {
24
- extraPathItems.push("sort=".concat(sort));
24
+ extraPathItems.push(`sort=${sort}`);
25
25
  }
26
26
  extraPathItems.push('max=500');
27
- const path = "".concat(endpoint, "?").concat(extraPathItems.join('&'));
27
+ const path = `${endpoint}?${extraPathItems.join('&')}`;
28
28
  const {
29
29
  data: templates
30
- } = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useTemplates', 'templates', context !== null && context !== void 0 ? context : ''], () => ky(path).json(), queryParams);
30
+ } = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useTemplates', 'templates', context ?? ''], () => ky(path).json(), queryParams);
31
31
  return templates || [];
32
32
  };
33
33
  var _default = exports.default = useTemplates;
@@ -8,7 +8,6 @@ var _reactQuery = require("react-query");
8
8
  var _core = require("@folio/stripes/core");
9
9
  var _utils = require("../utils");
10
10
  const useAppSettings = _ref => {
11
- var _ref2, _ref3, _queryObject$data2;
12
11
  let {
13
12
  endpoint,
14
13
  keyName,
@@ -24,32 +23,29 @@ const useAppSettings = _ref => {
24
23
  };
25
24
  const namespaceArray = [endpoint];
26
25
  if (sectionName) {
27
- var _defaultQueryParamObj;
28
- defaultQueryParamObject.filters = [...((_defaultQueryParamObj = defaultQueryParamObject.filters) !== null && _defaultQueryParamObj !== void 0 ? _defaultQueryParamObj : []), {
26
+ defaultQueryParamObject.filters = [...(defaultQueryParamObject.filters ?? []), {
29
27
  path: 'section',
30
28
  value: sectionName
31
29
  }];
32
30
  namespaceArray.push(sectionName);
33
31
  }
34
32
  if (keyName) {
35
- var _defaultQueryParamObj2;
36
- defaultQueryParamObject.filters = [...((_defaultQueryParamObj2 = defaultQueryParamObject.filters) !== null && _defaultQueryParamObj2 !== void 0 ? _defaultQueryParamObj2 : []), {
33
+ defaultQueryParamObject.filters = [...(defaultQueryParamObject.filters ?? []), {
37
34
  path: 'key',
38
35
  value: keyName
39
36
  }];
40
37
  defaultQueryParamObject.perPage = 1;
41
38
  namespaceArray.push(keyName);
42
39
  }
43
- const queryParamArray = (0, _utils.generateKiwtQueryParams)(options !== null && options !== void 0 ? options : defaultQueryParamObject, {});
40
+ const queryParamArray = (0, _utils.generateKiwtQueryParams)(options ?? defaultQueryParamObject, {});
44
41
  namespaceArray.push(queryParamArray);
45
- const queryObject = (0, _reactQuery.useQuery)(namespaceArray, () => ky("".concat(endpoint, "?").concat(queryParamArray === null || queryParamArray === void 0 ? void 0 : queryParamArray.join('&'))).json(), queryParams);
42
+ const queryObject = (0, _reactQuery.useQuery)(namespaceArray, () => ky(`${endpoint}?${queryParamArray?.join('&')}`).json(), queryParams);
46
43
  if (returnQueryObject) {
47
44
  return queryObject;
48
45
  }
49
- if ((_ref2 = queryParams !== null && queryParams !== void 0 ? queryParams : defaultQueryParamObject) !== null && _ref2 !== void 0 && _ref2.perPage && ((_ref3 = queryParams !== null && queryParams !== void 0 ? queryParams : defaultQueryParamObject) === null || _ref3 === void 0 ? void 0 : _ref3.perPage) === 1) {
50
- var _queryObject$data$, _queryObject$data;
51
- return (_queryObject$data$ = queryObject === null || queryObject === void 0 || (_queryObject$data = queryObject.data) === null || _queryObject$data === void 0 ? void 0 : _queryObject$data[0]) !== null && _queryObject$data$ !== void 0 ? _queryObject$data$ : {};
46
+ if ((queryParams ?? defaultQueryParamObject)?.perPage && (queryParams ?? defaultQueryParamObject)?.perPage === 1) {
47
+ return queryObject?.data?.[0] ?? {};
52
48
  }
53
- return (_queryObject$data2 = queryObject === null || queryObject === void 0 ? void 0 : queryObject.data) !== null && _queryObject$data2 !== void 0 ? _queryObject$data2 : [];
49
+ return queryObject?.data ?? [];
54
50
  };
55
51
  var _default = exports.default = useAppSettings;
@@ -26,10 +26,10 @@ const useSettingSection = _ref => {
26
26
  }, {});
27
27
  const {
28
28
  data: settings = []
29
- } = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSetting', 'appSettings', queryParams, sectionName], () => ky("".concat(settingEndpoint, "?").concat(queryParams === null || queryParams === void 0 ? void 0 : queryParams.join('&'))).json());
29
+ } = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSetting', 'appSettings', queryParams, sectionName], () => ky(`${settingEndpoint}?${queryParams?.join('&')}`).json());
30
30
  const {
31
31
  mutateAsync: putSetting
32
- } = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useSetting', 'putSetting', sectionName], data => ky.put("".concat(settingEndpoint).concat(data.id ? '/' + data.id : ''), {
32
+ } = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useSetting', 'putSetting', sectionName], data => ky.put(`${settingEndpoint}${data.id ? '/' + data.id : ''}`, {
33
33
  json: data
34
34
  }));
35
35
  return {
@@ -30,7 +30,7 @@ const useSettings = _ref => {
30
30
  const ky = (0, _core.useOkapiKy)();
31
31
  const kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
32
32
  const queryParams = (0, _utils.generateKiwtQueryParams)({
33
- filters: dynamicPageExclusions === null || dynamicPageExclusions === void 0 ? void 0 : dynamicPageExclusions.map(dpe => ({
33
+ filters: dynamicPageExclusions?.map(dpe => ({
34
34
  path: 'section',
35
35
  comparator: '!=',
36
36
  value: dpe
@@ -41,13 +41,13 @@ const useSettings = _ref => {
41
41
  const {
42
42
  data: appSettings = [],
43
43
  isLoading
44
- } = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSettings', 'appSettings', settingEndpoint, queryParams], () => ky("".concat(settingEndpoint, "?").concat(queryParams === null || queryParams === void 0 ? void 0 : queryParams.join('&'))).json());
44
+ } = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSettings', 'appSettings', settingEndpoint, queryParams], () => ky(`${settingEndpoint}?${queryParams?.join('&')}`).json());
45
45
  const sections = [...new Set(appSettings.map(s => s.section))];
46
46
  const dynamic = sections.map(section => {
47
47
  return {
48
48
  route: section,
49
49
  label: kintIntl.formatKintMessage({
50
- id: "settings.settingsSection.".concat((0, _utils.toCamelCase)(section)),
50
+ id: `settings.settingsSection.${(0, _utils.toCamelCase)(section)}`,
51
51
  fallbackMessage: section
52
52
  }),
53
53
  component: props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingPage.SettingPagePane, {
@@ -17,13 +17,12 @@ function removeEmpty(obj) {
17
17
  return cleanObj;
18
18
  }
19
19
  function buildUrl(location, values, basePath) {
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);
20
+ const locationQuery = location?.query ?? _queryString.default.parse(location.search);
22
21
  let url = values._path || basePath || location.pathname;
23
22
  const params = removeEmpty(Object.assign(locationQuery, values));
24
23
  (0, _lodash.unset)(params, '_path');
25
24
  if (!(0, _lodash.isEmpty)(params)) {
26
- url += "?".concat(_queryString.default.stringify(params));
25
+ url += `?${_queryString.default.stringify(params)}`;
27
26
  }
28
27
  return url;
29
28
  }
@@ -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 = "".concat(queryObject.path, " ").concat(queryObject.comparator);
9
+ let returnString = `${queryObject.path} ${queryObject.comparator}`;
10
10
  if (queryObject.value) {
11
- returnString += " ".concat(queryObject.value);
11
+ returnString += ` ${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 += " (".concat(deparseKiwtQueryFilters(qa), ")");
23
+ returnString += ` (${deparseKiwtQueryFilters(qa)})`;
24
24
  } else if (typeof qa === 'string') {
25
- returnString += " ".concat(qa);
25
+ returnString += ` ${qa}`;
26
26
  } else {
27
27
  // Assuming object at this stage
28
- returnString += " ".concat(deparseKiwtQueryFiltersObject(qa));
28
+ returnString += ` ${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: ".concat(queryArray));
33
+ throw new Error(`deparseKiwtQuery expects a parameter of type Array, passed: ${queryArray}`);
34
34
  }
35
35
  };
36
36
  var _default = exports.default = deparseKiwtQueryFilters;
@@ -43,6 +43,6 @@ var _parseKiwtQueryGroups = _interopRequireDefault(require("./parseKiwtQueryGrou
43
43
  var _parseKiwtQueryString = _interopRequireDefault(require("./parseKiwtQueryString"));
44
44
  var _parseKiwtQueryFilters = _interopRequireWildcard(require("./parseKiwtQueryFilters"));
45
45
  var _deparseKiwtQueryFilters = _interopRequireWildcard(require("./deparseKiwtQueryFilters"));
46
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
47
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
46
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
47
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
48
48
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -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: ".concat(query));
24
+ throw new Error(`Unexpected query type: ${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: ".concat(queryString));
36
+ throw new Error(`parseKiwtQuery expects a parameter of type String, passed: ${queryString}`);
37
37
  }
38
38
  };
39
39
 
@@ -44,8 +44,7 @@ const parseKiwtQueryGroups = query => {
44
44
  let nestLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
45
45
  const group = [];
46
46
  // Iterate over each element in the array, recursively calling this when hitting parens
47
- parseArray === null || parseArray === void 0 || parseArray.every((element, index) => {
48
- var _skipCount;
47
+ parseArray?.every((element, index) => {
49
48
  if (skipCount[nestLevel] > 0) {
50
49
  skipCount[nestLevel] -= 1;
51
50
  return true; // Equivalent to BREAK -- move onto next element
@@ -57,14 +56,14 @@ const parseKiwtQueryGroups = query => {
57
56
  }
58
57
 
59
58
  // At the levels below all of the following will need
60
- skipCount = (_skipCount = skipCount) === null || _skipCount === void 0 ? void 0 : _skipCount.map((n, i) => {
59
+ skipCount = skipCount?.map((n, i) => {
61
60
  if (i < nestLevel) {
62
61
  return n + 1;
63
62
  }
64
63
  return n;
65
64
  });
66
65
  if (element !== '(' && element !== ')') {
67
- group === null || group === void 0 || group.push(element);
66
+ group?.push(element);
68
67
  } else if (element === ')') {
69
68
  // Remove the corresponding skipCount level because we're going down a nesting level
70
69
  skipCount.pop();
@@ -74,7 +73,7 @@ const parseKiwtQueryGroups = query => {
74
73
  // Add next index to skipcount for the nesting
75
74
  skipCount.push(0);
76
75
  unclosedParens += 1;
77
- group.push(groupParser(parseArray.slice(index + 1, parseArray === null || parseArray === void 0 ? void 0 : parseArray.length), nestLevel + 1));
76
+ group.push(groupParser(parseArray.slice(index + 1, parseArray?.length), nestLevel + 1));
78
77
  }
79
78
 
80
79
  // If all is well, continue on parsing
@@ -16,7 +16,7 @@ const FIRST = 0;
16
16
  const SECOND = 1;
17
17
  const THIRD = 2;
18
18
  const parseKiwtQueryString = queryString => {
19
- const comparatorMatch = new RegExp("(".concat(_comparators.default.join('|'), ")"));
19
+ const comparatorMatch = new RegExp(`(${_comparators.default.join('|')})`);
20
20
  // See parseKiwtQueryGroups for breakdown of why this filter is needed
21
21
  const splitString = queryString.split(comparatorMatch).map(ss => ss.trim()).filter(Boolean);
22
22
 
@@ -17,40 +17,36 @@ const conditionalEncodeURIComponent = function (str) {
17
17
  const buildFilterOptionBlock = function (opf) {
18
18
  let isNested = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
19
19
  let encode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
20
- if (opf !== null && opf !== void 0 && opf.groupValues) {
20
+ if (opf?.groupValues) {
21
21
  const groupValues = opf.groupValues;
22
22
 
23
23
  // Small utility function to add negation and brackets to the options block where necessary
24
- const negationAndNesting = str => "".concat(groupValues !== null && groupValues !== void 0 && groupValues.NOT ? '!' : '').concat(isNested || groupValues !== null && groupValues !== void 0 && groupValues.NOT ? '(' : '').concat(str).concat(isNested || groupValues !== null && groupValues !== void 0 && groupValues.NOT ? ')' : '');
24
+ const negationAndNesting = str => `${groupValues?.NOT ? '!' : ''}${isNested || groupValues?.NOT ? '(' : ''}${str}${isNested || groupValues?.NOT ? ')' : ''}`;
25
25
 
26
26
  // First check whether groupValues is ANDed or ORed together
27
- if (groupValues !== null && groupValues !== void 0 && groupValues.AND && Array.isArray(groupValues.AND) || groupValues !== null && groupValues !== void 0 && groupValues.OR && Array.isArray(groupValues.OR)) {
28
- var _groupValues$OR;
27
+ if (groupValues?.AND && Array.isArray(groupValues.AND) || groupValues?.OR && Array.isArray(groupValues.OR)) {
29
28
  // AND takes precedence
30
29
  if (groupValues.AND) {
31
- var _groupValues$AND;
32
- return negationAndNesting(groupValues === null || groupValues === void 0 || (_groupValues$AND = groupValues.AND) === null || _groupValues$AND === void 0 || (_groupValues$AND = _groupValues$AND.map(gvo => buildFilterOptionBlock(gvo, true, encode))) === null || _groupValues$AND === void 0 ? void 0 : _groupValues$AND.join('&&'));
30
+ return negationAndNesting(groupValues?.AND?.map(gvo => buildFilterOptionBlock(gvo, true, encode))?.join('&&'));
33
31
  }
34
- return negationAndNesting(groupValues === null || groupValues === void 0 || (_groupValues$OR = groupValues.OR) === null || _groupValues$OR === void 0 || (_groupValues$OR = _groupValues$OR.map(gvo => buildFilterOptionBlock(gvo, true, encode))) === null || _groupValues$OR === void 0 ? void 0 : _groupValues$OR.join('||'));
32
+ return negationAndNesting(groupValues?.OR?.map(gvo => buildFilterOptionBlock(gvo, true, encode))?.join('||'));
35
33
  }
36
34
  // If neither valid OR nor AND exist, ignore the block
37
- } else if (opf !== null && opf !== void 0 && opf.values) {
35
+ } else if (opf?.values) {
38
36
  // Build the values filter block
39
37
  const innerFilters = [];
40
38
  opf.values.forEach(opfv => {
41
39
  if (opf.path) {
42
- var _opf$comparator;
43
- innerFilters.push("".concat(opf.path).concat((_opf$comparator = opf.comparator) !== null && _opf$comparator !== void 0 ? _opf$comparator : '==').concat(opfv));
40
+ innerFilters.push(`${opf.path}${opf.comparator ?? '=='}${opfv}`);
44
41
  } else {
45
42
  innerFilters.push(opfv);
46
43
  }
47
44
  });
48
45
  return conditionalEncodeURIComponent(innerFilters.join('||'), encode);
49
- } else if (opf !== null && opf !== void 0 && opf.value) {
46
+ } else if (opf?.value) {
50
47
  // If no value OR values, then ignore
51
48
  if (opf.path) {
52
- var _opf$comparator2;
53
- const filterString = "".concat(opf.path).concat((_opf$comparator2 = opf.comparator) !== null && _opf$comparator2 !== void 0 ? _opf$comparator2 : '==').concat(opf.value);
49
+ const filterString = `${opf.path}${opf.comparator ?? '=='}${opf.value}`;
54
50
  return conditionalEncodeURIComponent(filterString, encode);
55
51
  }
56
52
  return conditionalEncodeURIComponent(opf.value, encode);
@@ -108,9 +104,8 @@ const generateKiwtQueryParams = function (options, nsValues) {
108
104
  } = options;
109
105
  const paramsArray = [];
110
106
  if (query) {
111
- var _split, _ref;
112
- paramsArray.push(...((_split = (_ref = qindex || searchKey) === null || _ref === void 0 ? void 0 : _ref.split(',')) !== null && _split !== void 0 ? _split : []).map(m => "match=".concat(conditionalEncodeURIComponent(m, encode))));
113
- paramsArray.push("term=".concat(conditionalEncodeURIComponent(query, encode)));
107
+ paramsArray.push(...((qindex || searchKey)?.split(',') ?? []).map(m => `match=${conditionalEncodeURIComponent(m, encode)}`));
108
+ paramsArray.push(`term=${conditionalEncodeURIComponent(query, encode)}`);
114
109
  }
115
110
 
116
111
  // Actually build the optionsFilters block (Moved logic to its own function to allow recursion)
@@ -118,71 +113,67 @@ const generateKiwtQueryParams = function (options, nsValues) {
118
113
  optionsFilters.forEach(opf => {
119
114
  const optionsBlock = buildFilterOptionBlock(opf, false, encode);
120
115
  if (optionsBlock) {
121
- paramsArray.push("filters=".concat(optionsBlock));
116
+ paramsArray.push(`filters=${optionsBlock}`);
122
117
  }
123
118
  });
124
119
  }
125
120
  if (filters) {
126
121
  const filterMap = {};
127
122
  filters.split(',').forEach(filter => {
128
- var _filter$trim$split, _filter$trim;
129
- const [filterName, ...filterRest] = (_filter$trim$split = (_filter$trim = filter.trim()) === null || _filter$trim === void 0 ? void 0 : _filter$trim.split('.')) !== null && _filter$trim$split !== void 0 ? _filter$trim$split : [];
123
+ const [filterName, ...filterRest] = filter.trim()?.split('.') ?? [];
130
124
  const filterValue = filterRest.join('.');
131
125
  if (filterMap[filterName] === undefined) filterMap[filterName] = [];
132
126
  filterMap[filterName].push(filterValue);
133
127
  });
134
128
 
135
129
  // We now have a filterMap of shape { status: ['active', 'cancelled'], type: ['local'] }
136
- Object.entries(filterMap).forEach(_ref2 => {
137
- let [filterName, filterValues] = _ref2;
130
+ Object.entries(filterMap).forEach(_ref => {
131
+ let [filterName, filterValues] = _ref;
138
132
  const filterConfigEntry = filterConfig.find(conf => conf.name === filterName);
139
133
  const filterKey = filterKeys[filterName];
140
134
  if (filterConfigEntry) {
141
135
  // We have a direct mapping instruction, use it
142
136
  const filterString = filterValues.map(v => {
143
- var _filterConfigEntry$va;
144
- const fceValue = filterConfigEntry === null || filterConfigEntry === void 0 || (_filterConfigEntry$va = filterConfigEntry.values) === null || _filterConfigEntry$va === void 0 || (_filterConfigEntry$va = _filterConfigEntry$va.find(fce => fce.name === v)) === null || _filterConfigEntry$va === void 0 ? void 0 : _filterConfigEntry$va.value;
145
- return "".concat(filterName, "==").concat(fceValue !== null && fceValue !== void 0 ? fceValue : v);
137
+ const fceValue = filterConfigEntry?.values?.find(fce => fce.name === v)?.value;
138
+ return `${filterName}==${fceValue ?? v}`;
146
139
  }).join('||');
147
- paramsArray.push("filters=".concat(conditionalEncodeURIComponent(filterString, encode)));
140
+ paramsArray.push(`filters=${conditionalEncodeURIComponent(filterString, encode)}`);
148
141
  } else if (!filterKey) {
149
142
  // These filters have no key mapping so we just pass the values to the backend as-is.
150
- paramsArray.push(...(filterValues !== null && filterValues !== void 0 ? filterValues : []).map(f => "filters=".concat(conditionalEncodeURIComponent(f, encode))));
143
+ paramsArray.push(...(filterValues ?? []).map(f => `filters=${conditionalEncodeURIComponent(f, encode)}`));
151
144
  } else {
152
- const filterString = filterValues.map(v => "".concat(filterKey, "==").concat(v)).join('||');
153
- paramsArray.push("filters=".concat(conditionalEncodeURIComponent(filterString, encode)));
145
+ const filterString = filterValues.map(v => `${filterKey}==${v}`).join('||');
146
+ paramsArray.push(`filters=${conditionalEncodeURIComponent(filterString, encode)}`);
154
147
  }
155
148
  });
156
149
  }
157
150
  if (optionsSort && optionsSort.length > 0) {
158
151
  optionsSort.forEach(os => {
159
152
  if (os.value) {
160
- paramsArray.push("sort=".concat(conditionalEncodeURIComponent(os.value, encode)));
153
+ paramsArray.push(`sort=${conditionalEncodeURIComponent(os.value, encode)}`);
161
154
  } else if (os.path) {
162
- var _os$direction;
163
155
  // If no path then ignore
164
- const sortString = "".concat(os.path, ";").concat((_os$direction = os.direction) !== null && _os$direction !== void 0 ? _os$direction : 'asc');
165
- paramsArray.push("sort=".concat(conditionalEncodeURIComponent(sortString, encode)));
156
+ const sortString = `${os.path};${os.direction ?? 'asc'}`;
157
+ paramsArray.push(`sort=${conditionalEncodeURIComponent(sortString, encode)}`);
166
158
  }
167
159
  });
168
160
  }
169
161
  if (sort) {
170
- var _sort$trim$split, _sort$trim;
171
- paramsArray.push(...((_sort$trim$split = (_sort$trim = sort.trim()) === null || _sort$trim === void 0 ? void 0 : _sort$trim.split(',')) !== null && _sort$trim$split !== void 0 ? _sort$trim$split : []).map(sortKey => {
162
+ paramsArray.push(...(sort.trim()?.split(',') ?? []).map(sortKey => {
172
163
  const descending = sortKey.startsWith('-');
173
164
  let term = sortKey.replace('-', '');
174
165
  if (term in sortKeys) {
175
166
  term = term.replace(term, sortKeys[term]);
176
167
  }
177
- const sortString = "".concat(term, ";").concat(descending ? 'desc' : 'asc');
178
- return "sort=".concat(conditionalEncodeURIComponent(sortString, encode));
168
+ const sortString = `${term};${descending ? 'desc' : 'asc'}`;
169
+ return `sort=${conditionalEncodeURIComponent(sortString, encode)}`;
179
170
  }));
180
171
  }
181
172
  if (stats) {
182
173
  paramsArray.push('stats=true');
183
174
  }
184
175
  for (const [key, value] of Object.entries(rest)) {
185
- paramsArray.push("".concat(key, "=").concat(conditionalEncodeURIComponent(value, encode)));
176
+ paramsArray.push(`${key}=${conditionalEncodeURIComponent(value, encode)}`);
186
177
  }
187
178
  return paramsArray;
188
179
  };