@k-int/stripes-kint-components 3.2.3 → 3.2.4

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 (325) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/es/index.js +78 -79
  3. package/es/lib/ActionList/ActionList.js +38 -51
  4. package/es/lib/ActionList/ActionListFieldArray.js +159 -194
  5. package/es/lib/ActionList/index.js +1 -1
  6. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +59 -83
  7. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +15 -19
  8. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +124 -175
  9. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +30 -67
  10. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +93 -106
  11. package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +83 -121
  12. package/es/lib/CustomProperties/Config/CustomPropertyView.js +42 -43
  13. package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +48 -135
  14. package/es/lib/CustomProperties/Config/index.js +4 -4
  15. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +20 -23
  16. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +11 -16
  17. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +33 -32
  18. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +11 -16
  19. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +88 -111
  20. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +26 -63
  21. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +134 -134
  22. package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +95 -176
  23. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +46 -48
  24. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +23 -27
  25. package/es/lib/CustomProperties/Edit/index.js +5 -5
  26. package/es/lib/CustomProperties/Edit/testResources.js +14 -39
  27. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +64 -91
  28. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +23 -57
  29. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +53 -77
  30. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +17 -16
  31. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +34 -31
  32. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +18 -45
  33. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +19 -22
  34. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +23 -52
  35. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +44 -49
  36. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +77 -225
  37. package/es/lib/CustomProperties/Filter/index.js +6 -6
  38. package/es/lib/CustomProperties/Filter/testResources.js +13 -37
  39. package/es/lib/CustomProperties/Filter/useOperators.js +18 -18
  40. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +18 -33
  41. package/es/lib/CustomProperties/Filter/useValueProps.js +23 -29
  42. package/es/lib/CustomProperties/View/CustomPropertiesView.js +20 -23
  43. package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +11 -16
  44. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +63 -80
  45. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +14 -23
  46. package/es/lib/CustomProperties/View/CustomPropertyCard.js +23 -29
  47. package/es/lib/CustomProperties/View/index.js +3 -3
  48. package/es/lib/CustomProperties/View/testResources.js +5 -9
  49. package/es/lib/CustomProperties/index.js +18 -18
  50. package/es/lib/CycleButton/CycleButton.js +19 -35
  51. package/es/lib/CycleButton/index.js +1 -1
  52. package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +105 -162
  53. package/es/lib/EditableRefdataCategoryList/index.js +1 -1
  54. package/es/lib/EditableRefdataList/EditableRefdataList.js +119 -179
  55. package/es/lib/EditableRefdataList/index.js +1 -1
  56. package/es/lib/EditableSettingsList/EditableSettingsList.js +15 -13
  57. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +19 -26
  58. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +61 -90
  59. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +27 -41
  60. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +99 -83
  61. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +25 -30
  62. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +187 -275
  63. package/es/lib/EditableSettingsList/SettingField/SettingField.js +76 -111
  64. package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +52 -157
  65. package/es/lib/EditableSettingsList/SettingField/index.js +3 -3
  66. package/es/lib/EditableSettingsList/index.js +3 -3
  67. package/es/lib/FormModal/FormModal.js +44 -48
  68. package/es/lib/FormModal/index.js +1 -1
  69. package/es/lib/FormattedKintMessage/FormattedKintMessage.js +27 -35
  70. package/es/lib/FormattedKintMessage/index.js +1 -1
  71. package/es/lib/IconSelect/IconSelect.js +52 -77
  72. package/es/lib/IconSelect/index.js +1 -1
  73. package/es/lib/NoResultsMessage/NoResultsMessage.js +23 -23
  74. package/es/lib/NoResultsMessage/index.js +1 -1
  75. package/es/lib/QueryTypedown/QueryTypedown.js +16 -35
  76. package/es/lib/QueryTypedown/index.js +1 -1
  77. package/es/lib/RefdataButtons/RefdataButtons.js +30 -34
  78. package/es/lib/RefdataButtons/index.js +1 -1
  79. package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +77 -95
  80. package/es/lib/ResponsiveButtonGroup/index.js +1 -1
  81. package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +24 -39
  82. package/es/lib/RichSelect/RichSelect.js +78 -100
  83. package/es/lib/RichSelect/index.js +2 -2
  84. package/es/lib/RichSelect/useSelectedOption.js +5 -16
  85. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +107 -139
  86. package/es/lib/SASQLookupComponent/TableBody/TableBody.js +43 -52
  87. package/es/lib/SASQLookupComponent/TableBody/index.js +1 -1
  88. package/es/lib/SASQLookupComponent/index.js +2 -2
  89. package/es/lib/SASQRoute/SASQRoute.js +34 -41
  90. package/es/lib/SASQRoute/index.js +1 -1
  91. package/es/lib/SASQViewComponent/SASQViewComponent.js +37 -49
  92. package/es/lib/SASQViewComponent/index.js +1 -1
  93. package/es/lib/SearchField/SearchField.js +11 -18
  94. package/es/lib/SearchField/index.js +1 -1
  95. package/es/lib/SettingPage/SettingPage.js +20 -19
  96. package/es/lib/SettingPage/SettingPagePane.js +11 -10
  97. package/es/lib/SettingPage/index.js +2 -2
  98. package/es/lib/Typedown/Typedown.js +73 -98
  99. package/es/lib/Typedown/index.js +1 -1
  100. package/es/lib/constants/customProperties.js +11 -22
  101. package/es/lib/constants/eventCodes.js +3 -6
  102. package/es/lib/contexts/SettingsContext.js +2 -3
  103. package/es/lib/contexts/index.js +1 -1
  104. package/es/lib/hooks/__mocks__/index.js +9 -29
  105. package/es/lib/hooks/index.js +20 -20
  106. package/es/lib/hooks/settingsHooks/index.js +3 -3
  107. package/es/lib/hooks/settingsHooks/useAppSettings.js +22 -34
  108. package/es/lib/hooks/settingsHooks/useSettingSection.js +17 -19
  109. package/es/lib/hooks/settingsHooks/useSettings.js +58 -72
  110. package/es/lib/hooks/typedownHooks/index.js +3 -3
  111. package/es/lib/hooks/typedownHooks/useTypedown.js +49 -50
  112. package/es/lib/hooks/typedownHooks/useTypedownData.js +12 -23
  113. package/es/lib/hooks/typedownHooks/useTypedownToggle.js +13 -22
  114. package/es/lib/hooks/useActiveElement.js +10 -20
  115. package/es/lib/hooks/useCustomProperties.js +23 -32
  116. package/es/lib/hooks/useHelperApp.js +31 -51
  117. package/es/lib/hooks/useIntlKey.js +4 -7
  118. package/es/lib/hooks/useIntlKeyStore.js +42 -51
  119. package/es/lib/hooks/useInvalidateRefdata.js +4 -7
  120. package/es/lib/hooks/useKintIntl.js +31 -41
  121. package/es/lib/hooks/useKiwtFieldArray.js +35 -47
  122. package/es/lib/hooks/useKiwtSASQuery.js +40 -51
  123. package/es/lib/hooks/useLocalStorageState.js +7 -20
  124. package/es/lib/hooks/useMutateCustomProperties.js +23 -67
  125. package/es/lib/hooks/useMutateRefdataCategory.js +22 -64
  126. package/es/lib/hooks/useMutateRefdataValue.js +31 -69
  127. package/es/lib/hooks/useQIndex.js +17 -32
  128. package/es/lib/hooks/useRefdata.js +19 -22
  129. package/es/lib/hooks/useSASQQueryMeta.js +14 -22
  130. package/es/lib/hooks/useTemplates.js +16 -16
  131. package/es/lib/utils/buildUrl.js +6 -6
  132. package/es/lib/utils/generateKiwtQuery.js +4 -7
  133. package/es/lib/utils/generateKiwtQueryParams.js +77 -96
  134. package/es/lib/utils/groupCustomPropertiesByCtx.js +9 -21
  135. package/es/lib/utils/highlightString.js +17 -37
  136. package/es/lib/utils/index.js +21 -21
  137. package/es/lib/utils/matchString.js +5 -10
  138. package/es/lib/utils/parseErrorResponse.js +22 -65
  139. package/es/lib/utils/refdataOptions.js +2 -3
  140. package/es/lib/utils/refdataQueryKey.js +3 -4
  141. package/es/lib/utils/selectorSafe.js +2 -3
  142. package/es/lib/utils/sortByLabel.js +4 -6
  143. package/es/lib/utils/toCamelCase.js +8 -14
  144. package/es/lib/utils/typedownQueryKey.js +3 -4
  145. package/es/lib/utils/validators.js +25 -32
  146. package/package.json +12 -2
  147. package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -69
  148. package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -814
  149. package/es/artifacts/coverage-jest/lcov-report/sorter.js +0 -181
  150. package/junit.xml +0 -1543
  151. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +0 -373
  152. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +0 -1465
  153. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +0 -146
  154. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +0 -88
  155. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +0 -667
  156. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +0 -1240
  157. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +0 -1474
  158. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +0 -733
  159. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +0 -176
  160. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +0 -97
  161. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +0 -793
  162. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +0 -208
  163. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +0 -352
  164. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +0 -826
  165. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +0 -1297
  166. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +0 -454
  167. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +0 -206
  168. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +0 -100
  169. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +0 -271
  170. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +0 -499
  171. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +0 -568
  172. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +0 -415
  173. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +0 -340
  174. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +0 -502
  175. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +0 -251
  176. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +0 -103
  177. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +0 -223
  178. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +0 -271
  179. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +0 -199
  180. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +0 -253
  181. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +0 -211
  182. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +0 -445
  183. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +0 -619
  184. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +0 -176
  185. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +0 -94
  186. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +0 -571
  187. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +0 -116
  188. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +0 -175
  189. package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +0 -217
  190. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +0 -131
  191. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +0 -88
  192. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +0 -751
  193. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +0 -131
  194. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +0 -88
  195. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +0 -853
  196. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +0 -131
  197. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +0 -88
  198. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +0 -280
  199. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -259
  200. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +0 -412
  201. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +0 -313
  202. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +0 -574
  203. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +0 -161
  204. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +0 -94
  205. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +0 -146
  206. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +0 -94
  207. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +0 -379
  208. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +0 -131
  209. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +0 -88
  210. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +0 -247
  211. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +0 -131
  212. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +0 -88
  213. package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +0 -508
  214. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +0 -131
  215. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +0 -88
  216. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +0 -361
  217. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +0 -131
  218. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +0 -88
  219. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +0 -205
  220. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +0 -131
  221. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +0 -88
  222. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +0 -370
  223. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +0 -131
  224. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +0 -88
  225. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +0 -580
  226. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +0 -146
  227. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +0 -88
  228. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +0 -301
  229. package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +0 -718
  230. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +0 -146
  231. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +0 -91
  232. package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +0 -127
  233. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +0 -1069
  234. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +0 -400
  235. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +0 -131
  236. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +0 -88
  237. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +0 -131
  238. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +0 -91
  239. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +0 -346
  240. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +0 -131
  241. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +0 -88
  242. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +0 -307
  243. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +0 -131
  244. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +0 -88
  245. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +0 -214
  246. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +0 -131
  247. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +0 -88
  248. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +0 -220
  249. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +0 -208
  250. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +0 -146
  251. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +0 -91
  252. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +0 -913
  253. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +0 -131
  254. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +0 -88
  255. package/src/artifacts/coverage-jest/lcov-report/base.css +0 -224
  256. package/src/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -87
  257. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +0 -121
  258. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +0 -94
  259. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +0 -131
  260. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +0 -97
  261. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +0 -131
  262. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +0 -91
  263. package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
  264. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +0 -371
  265. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +0 -136
  266. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +0 -161
  267. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +0 -94
  268. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +0 -292
  269. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +0 -214
  270. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +0 -463
  271. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +0 -161
  272. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +0 -94
  273. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +0 -520
  274. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +0 -181
  275. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +0 -163
  276. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +0 -157
  277. package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +0 -205
  278. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +0 -325
  279. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +0 -295
  280. package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +0 -151
  281. package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +0 -199
  282. package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +0 -118
  283. package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +0 -238
  284. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +0 -274
  285. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +0 -196
  286. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +0 -136
  287. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +0 -283
  288. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +0 -274
  289. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +0 -322
  290. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +0 -208
  291. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +0 -265
  292. package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +0 -187
  293. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +0 -166
  294. package/src/artifacts/coverage-jest/lcov-report/index.html +0 -596
  295. package/src/artifacts/coverage-jest/lcov-report/prettify.css +0 -1
  296. package/src/artifacts/coverage-jest/lcov-report/prettify.js +0 -2
  297. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.html +0 -161
  298. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.js.html +0 -94
  299. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useAppSettings.js.html +0 -292
  300. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettingSection.js.html +0 -211
  301. package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettings.js.html +0 -466
  302. package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
  303. package/src/artifacts/coverage-jest/lcov-report/sorter.js +0 -196
  304. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +0 -193
  305. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +0 -109
  306. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +0 -631
  307. package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +0 -124
  308. package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +0 -211
  309. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +0 -326
  310. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +0 -160
  311. package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +0 -127
  312. package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +0 -142
  313. package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +0 -361
  314. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +0 -109
  315. package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +0 -112
  316. package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +0 -166
  317. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +0 -145
  318. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +0 -130
  319. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +0 -127
  320. package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +0 -112
  321. package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +0 -370
  322. package/src/artifacts/coverage-jest/lcov-report/validators/index.html +0 -131
  323. package/src/artifacts/coverage-jest/lcov-report/validators/index.js.html +0 -88
  324. package/src/artifacts/coverage-jest/lcov-report/validators/validators.js.html +0 -370
  325. package/src/artifacts/coverage-jest/lcov.info +0 -5065
@@ -6,30 +6,23 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _reactQuery = require("react-query");
8
8
  var _core = require("@folio/stripes/core");
9
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
10
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
13
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
14
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
15
- var useSASQQueryMeta = function useSASQQueryMeta(id) {
16
- var _useNamespace = (0, _core.useNamespace)(),
17
- namespace = _useNamespace[0];
18
- var queryClient = (0, _reactQuery.useQueryClient)();
19
- var queryNSBase = [namespace, 'SASQ'];
9
+ const useSASQQueryMeta = id => {
10
+ const {
11
+ 0: namespace
12
+ } = (0, _core.useNamespace)();
13
+ const queryClient = (0, _reactQuery.useQueryClient)();
14
+ const queryNSBase = [namespace, 'SASQ'];
20
15
  if (id) {
21
16
  queryNSBase.push(id);
22
17
  }
23
- var lookupQueryNS = [].concat(queryNSBase, ['viewAll']);
24
- var viewQueryNS = [].concat(queryNSBase, ['view']);
18
+ const lookupQueryNS = [...queryNSBase, 'viewAll'];
19
+ const viewQueryNS = [...queryNSBase, 'view'];
25
20
  return {
26
- lookupQueryNS: lookupQueryNS,
27
- viewQueryNS: viewQueryNS,
28
- invalidateLookupQuery: function invalidateLookupQuery() {
29
- return queryClient.invalidateQueries(lookupQueryNS);
30
- },
31
- invalidateViewQuery: function invalidateViewQuery(viewId) {
32
- var invalidateNS = _toConsumableArray(viewQueryNS);
21
+ lookupQueryNS,
22
+ viewQueryNS,
23
+ invalidateLookupQuery: () => queryClient.invalidateQueries(lookupQueryNS),
24
+ invalidateViewQuery: viewId => {
25
+ const invalidateNS = [...viewQueryNS];
33
26
  if (viewId) {
34
27
  invalidateNS.push(viewId);
35
28
  }
@@ -37,5 +30,4 @@ var useSASQQueryMeta = function useSASQQueryMeta(id) {
37
30
  }
38
31
  };
39
32
  };
40
- var _default = useSASQQueryMeta;
41
- exports.default = _default;
33
+ var _default = exports.default = useSASQQueryMeta;
@@ -8,26 +8,26 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _reactQuery = require("react-query");
9
9
  var _core = require("@folio/stripes/core");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- var useTemplates = function useTemplates(_ref) {
12
- var context = _ref.context,
13
- endpoint = _ref.endpoint,
14
- queryParams = _ref.queryParams,
15
- sort = _ref.sort;
16
- var ky = (0, _core.useOkapiKy)();
17
- var extraPathItems = [];
11
+ const useTemplates = _ref => {
12
+ let {
13
+ context,
14
+ endpoint,
15
+ queryParams,
16
+ sort
17
+ } = _ref;
18
+ const ky = (0, _core.useOkapiKy)();
19
+ const extraPathItems = [];
18
20
  if (context) {
19
- extraPathItems.push("filters=context=".concat(context));
21
+ extraPathItems.push(`filters=context=${context}`);
20
22
  }
21
23
  if (sort) {
22
- extraPathItems.push("sort=".concat(sort));
24
+ extraPathItems.push(`sort=${sort}`);
23
25
  }
24
26
  extraPathItems.push('max=500');
25
- var path = "".concat(endpoint, "?").concat(extraPathItems.join('&'));
26
- var _useQuery = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useTemplates', 'templates', context !== null && context !== void 0 ? context : ''], function () {
27
- return ky(path).json();
28
- }, queryParams),
29
- templates = _useQuery.data;
27
+ const path = `${endpoint}?${extraPathItems.join('&')}`;
28
+ const {
29
+ data: templates
30
+ } = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useTemplates', 'templates', context ?? ''], () => ky(path).json(), queryParams);
30
31
  return templates || [];
31
32
  };
32
- var _default = useTemplates;
33
- exports.default = _default;
33
+ var _default = exports.default = useTemplates;
@@ -15,19 +15,19 @@ function getLocationQuery(location) {
15
15
  return location.query ? location.query : _queryString.default.parse(location.search);
16
16
  }
17
17
  function removeEmpty(obj) {
18
- var cleanObj = {};
19
- (0, _forOwn2.default)(obj, function (value, key) {
18
+ const cleanObj = {};
19
+ (0, _forOwn2.default)(obj, (value, key) => {
20
20
  if (value) cleanObj[key] = value;
21
21
  });
22
22
  return cleanObj;
23
23
  }
24
24
  function buildUrl(location, values, basePath) {
25
- var locationQuery = getLocationQuery(location);
26
- var url = values._path || basePath || location.pathname;
27
- var params = removeEmpty(Object.assign(locationQuery, values));
25
+ const locationQuery = getLocationQuery(location);
26
+ let url = values._path || basePath || location.pathname;
27
+ const params = removeEmpty(Object.assign(locationQuery, values));
28
28
  (0, _unset2.default)(params, '_path');
29
29
  if (!(0, _isEmpty2.default)(params)) {
30
- url += "?".concat(_queryString.default.stringify(params));
30
+ url += `?${_queryString.default.stringify(params)}`;
31
31
  }
32
32
  return url;
33
33
  }
@@ -6,11 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _generateKiwtQueryParams = _interopRequireDefault(require("./generateKiwtQueryParams"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- var generateKiwtQuery = function generateKiwtQuery(options, nsValues) {
10
- var paramsArray = (0, _generateKiwtQueryParams.default)(options, nsValues);
11
- return paramsArray.length ? '?' + paramsArray.map(function (p) {
12
- return encodeURI(p);
13
- }).join('&') : '';
9
+ const generateKiwtQuery = (options, nsValues) => {
10
+ const paramsArray = (0, _generateKiwtQueryParams.default)(options, nsValues);
11
+ return paramsArray.length ? '?' + paramsArray.map(p => encodeURI(p)).join('&') : '';
14
12
  };
15
- var _default = generateKiwtQuery;
16
- exports.default = _default;
13
+ var _default = exports.default = generateKiwtQuery;
@@ -4,148 +4,129 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _excluded = ["searchKey", "filterConfig", "filterKeys", "sortKeys", "stats", "sort", "filters"];
8
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
10
- function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
11
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
14
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
17
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
18
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
19
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
20
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
21
- var generateKiwtQueryParams = function generateKiwtQueryParams(options, nsValues) {
22
- var qindex = nsValues.qindex,
23
- query = nsValues.query,
24
- filters = nsValues.filters,
25
- sort = nsValues.sort;
26
- var _options$searchKey = options.searchKey,
27
- searchKey = _options$searchKey === void 0 ? '' : _options$searchKey,
28
- _options$filterConfig = options.filterConfig,
29
- filterConfig = _options$filterConfig === void 0 ? [] : _options$filterConfig,
30
- _options$filterKeys = options.filterKeys,
31
- filterKeys = _options$filterKeys === void 0 ? {} : _options$filterKeys,
32
- _options$sortKeys = options.sortKeys,
33
- sortKeys = _options$sortKeys === void 0 ? {} : _options$sortKeys,
34
- _options$stats = options.stats,
35
- stats = _options$stats === void 0 ? true : _options$stats,
36
- optionsSort = options.sort,
37
- optionsFilters = options.filters,
38
- rest = _objectWithoutProperties(options, _excluded);
39
- var paramsArray = [];
7
+ const generateKiwtQueryParams = (options, nsValues) => {
8
+ const {
9
+ qindex,
10
+ query,
11
+ filters,
12
+ sort
13
+ } = nsValues;
14
+ const {
15
+ searchKey = '',
16
+ filterConfig = [],
17
+ /* Assumtion made that if no filterKey is provided then the given filterValues for that key are standalaone, ie require no comparator or key */
18
+ filterKeys = {},
19
+ sortKeys = {},
20
+ stats = true,
21
+ /* Of the form [{ path: 'this.is.some.path', direction: 'asc'/'desc', value: 'someOverrideValue'}, ...]
22
+ * If only path is passed then assume asc.
23
+ * If value is passed then we ignore path/direction and append "sort=${value}" directly
24
+ */
25
+ sort: optionsSort,
26
+ /* Of the form
27
+ [
28
+ {
29
+ path: 'this.is.some.path'
30
+ comparator: '=='
31
+ value: 'this is a value' //OR
32
+ values: ['value1', 'value2']
33
+ },
34
+ ...
35
+ ]
36
+ * This (with value instead of values) will construct a query param: "filters=this.is.some.path==this is a value"
37
+ * If only value is passed, then it will construct directly: "filters=value"
38
+ * If no comparator is passed, it assumes '=='
39
+ * Values overwrites value and will construct "filters=this.is.some.path==value1||this.is.some.path==value2"
40
+ * Values WITHOUT path will construct "filters=value1||value2"
41
+ * If more complex query building is desired, this should be done externally and passed in as a standalone 'value'
42
+ */
43
+ filters: optionsFilters,
44
+ ...rest
45
+ } = options;
46
+ const paramsArray = [];
40
47
  if (query) {
41
- var _split;
42
- paramsArray.push.apply(paramsArray, _toConsumableArray((_split = (qindex || searchKey).split(',')) === null || _split === void 0 ? void 0 : _split.map(function (m) {
43
- return "match=".concat(m);
44
- })));
45
- paramsArray.push("term=".concat(query));
48
+ paramsArray.push(...(qindex || searchKey).split(',')?.map(m => `match=${m}`));
49
+ paramsArray.push(`term=${query}`);
46
50
  }
47
51
  if (optionsFilters) {
48
- optionsFilters.forEach(function (opf) {
49
- if (opf !== null && opf !== void 0 && opf.values) {
52
+ optionsFilters.forEach(opf => {
53
+ if (opf?.values) {
50
54
  // Build the values filter block
51
- var innerFilters = [];
52
- opf.values.forEach(function (opfv) {
55
+ const innerFilters = [];
56
+ opf.values.forEach(opfv => {
53
57
  if (opf.path) {
54
- var _opf$comparator;
55
- innerFilters.push("".concat(opf.path).concat((_opf$comparator = opf.comparator) !== null && _opf$comparator !== void 0 ? _opf$comparator : '==').concat(opfv));
58
+ innerFilters.push(`${opf.path}${opf.comparator ?? '=='}${opfv}`);
56
59
  } else {
57
60
  innerFilters.push(opfv);
58
61
  }
59
62
  });
60
- paramsArray.push("filters=".concat(innerFilters.join('||')));
61
- } else if (opf !== null && opf !== void 0 && opf.value) {
63
+ paramsArray.push(`filters=${innerFilters.join('||')}`);
64
+ } else if (opf?.value) {
62
65
  // If no value OR values, then ignore
63
66
  if (opf.path) {
64
- var _opf$comparator2;
65
- paramsArray.push("filters=".concat(opf.path).concat((_opf$comparator2 = opf.comparator) !== null && _opf$comparator2 !== void 0 ? _opf$comparator2 : '==').concat(opf.value));
67
+ paramsArray.push(`filters=${opf.path}${opf.comparator ?? '=='}${opf.value}`);
66
68
  } else {
67
- paramsArray.push("filters=".concat(opf.value));
69
+ paramsArray.push(`filters=${opf.value}`);
68
70
  }
69
71
  }
70
72
  });
71
73
  }
72
74
  if (filters) {
73
- var filterMap = {};
74
- filters.split(',').forEach(function (filter) {
75
- var _filter$trim;
76
- var _filter$trim$split = (_filter$trim = filter.trim()) === null || _filter$trim === void 0 ? void 0 : _filter$trim.split('.'),
77
- _filter$trim$split2 = _toArray(_filter$trim$split),
78
- filterName = _filter$trim$split2[0],
79
- filterRest = _filter$trim$split2.slice(1);
80
- var filterValue = filterRest.join('.');
75
+ const filterMap = {};
76
+ filters.split(',').forEach(filter => {
77
+ const [filterName, ...filterRest] = filter.trim()?.split('.');
78
+ const filterValue = filterRest.join('.');
81
79
  if (filterMap[filterName] === undefined) filterMap[filterName] = [];
82
80
  filterMap[filterName].push(filterValue);
83
81
  });
84
82
 
85
83
  // We now have a filterMap of shape { status: ['active', 'cancelled'], type: ['local'] }
86
- Object.entries(filterMap).forEach(function (_ref) {
87
- var _ref2 = _slicedToArray(_ref, 2),
88
- filterName = _ref2[0],
89
- filterValues = _ref2[1];
90
- var filterConfigEntry = filterConfig.find(function (conf) {
91
- return conf.name === filterName;
92
- });
93
- var filterKey = filterKeys[filterName];
84
+ Object.entries(filterMap).forEach(_ref => {
85
+ let [filterName, filterValues] = _ref;
86
+ const filterConfigEntry = filterConfig.find(conf => conf.name === filterName);
87
+ const filterKey = filterKeys[filterName];
94
88
  if (filterConfigEntry) {
95
89
  // We have a direct mapping instruction, use it
96
- var filterString = filterValues.map(function (v) {
97
- var _filterConfigEntry$va, _filterConfigEntry$va2;
98
- var fceValue = filterConfigEntry === null || filterConfigEntry === void 0 ? void 0 : (_filterConfigEntry$va = filterConfigEntry.values) === null || _filterConfigEntry$va === void 0 ? void 0 : (_filterConfigEntry$va2 = _filterConfigEntry$va.find(function (fce) {
99
- return fce.name === v;
100
- })) === null || _filterConfigEntry$va2 === void 0 ? void 0 : _filterConfigEntry$va2.value;
101
- return "".concat(filterName, "==").concat(fceValue !== null && fceValue !== void 0 ? fceValue : v);
90
+ const filterString = filterValues.map(v => {
91
+ const fceValue = filterConfigEntry?.values?.find(fce => fce.name === v)?.value;
92
+ return `${filterName}==${fceValue ?? v}`;
102
93
  }).join('||');
103
- paramsArray.push("filters=".concat(filterString));
94
+ paramsArray.push(`filters=${filterString}`);
104
95
  } else if (!filterKey) {
105
96
  // These filters have no key mapping so we just pass the values to the backend as-is.
106
- paramsArray.push.apply(paramsArray, _toConsumableArray(filterValues === null || filterValues === void 0 ? void 0 : filterValues.map(function (f) {
107
- return "filters=".concat(f);
108
- })));
97
+ paramsArray.push(...filterValues?.map(f => `filters=${f}`));
109
98
  } else {
110
- var _filterString = filterValues.map(function (v) {
111
- return "".concat(filterKey, "==").concat(v);
112
- }).join('||');
113
- paramsArray.push("filters=".concat(_filterString));
99
+ const filterString = filterValues.map(v => `${filterKey}==${v}`).join('||');
100
+ paramsArray.push(`filters=${filterString}`);
114
101
  }
115
102
  });
116
103
  }
117
104
  if (optionsSort && optionsSort.length > 0) {
118
- optionsSort.forEach(function (os) {
105
+ optionsSort.forEach(os => {
119
106
  if (os.value) {
120
- paramsArray.push("sort=".concat(os.value));
107
+ paramsArray.push(`sort=${os.value}`);
121
108
  } else if (os.path) {
122
- var _os$direction;
123
109
  // If no path then ignore
124
- paramsArray.push("sort=".concat(os.path, ";").concat((_os$direction = os.direction) !== null && _os$direction !== void 0 ? _os$direction : 'asc'));
110
+ paramsArray.push(`sort=${os.path};${os.direction ?? 'asc'}`);
125
111
  }
126
112
  });
127
113
  }
128
114
  if (sort) {
129
- var _sort$trim;
130
- paramsArray.push.apply(paramsArray, _toConsumableArray((_sort$trim = sort.trim()) === null || _sort$trim === void 0 ? void 0 : _sort$trim.split(',').map(function (sortKey) {
131
- var descending = sortKey.startsWith('-');
132
- var term = sortKey.replace('-', '');
115
+ paramsArray.push(...sort.trim()?.split(',').map(sortKey => {
116
+ const descending = sortKey.startsWith('-');
117
+ let term = sortKey.replace('-', '');
133
118
  if (term in sortKeys) {
134
119
  term = term.replace(term, sortKeys[term]);
135
120
  }
136
- return "sort=".concat(term, ";").concat(descending ? 'desc' : 'asc');
137
- })));
121
+ return `sort=${term};${descending ? 'desc' : 'asc'}`;
122
+ }));
138
123
  }
139
124
  if (stats) {
140
125
  paramsArray.push('stats=true');
141
126
  }
142
- for (var _i2 = 0, _Object$entries = Object.entries(rest); _i2 < _Object$entries.length; _i2++) {
143
- var _Object$entries$_i = _slicedToArray(_Object$entries[_i2], 2),
144
- key = _Object$entries$_i[0],
145
- value = _Object$entries$_i[1];
146
- paramsArray.push("".concat(key, "=").concat(value));
127
+ for (const [key, value] of Object.entries(rest)) {
128
+ paramsArray.push(`${key}=${value}`);
147
129
  }
148
130
  return paramsArray;
149
131
  };
150
- var _default = generateKiwtQueryParams;
151
- exports.default = _default;
132
+ var _default = exports.default = generateKiwtQueryParams;
@@ -4,27 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
8
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
9
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
12
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
13
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
14
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
18
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
- var groupCustomPropertiesByCtx = function groupCustomPropertiesByCtx() {
20
- var customProperties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
21
- return customProperties.reduce(function (acc, curr) {
22
- var _curr$ctx, _acc$ctx;
23
- var ctx = (_curr$ctx = curr.ctx) !== null && _curr$ctx !== void 0 ? _curr$ctx : 'isNull';
24
- var returnObj = _objectSpread({}, acc);
25
- returnObj[ctx] = [].concat(_toConsumableArray((_acc$ctx = acc === null || acc === void 0 ? void 0 : acc[ctx]) !== null && _acc$ctx !== void 0 ? _acc$ctx : []), [curr]);
7
+ const groupCustomPropertiesByCtx = function () {
8
+ let customProperties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
9
+ return customProperties.reduce((acc, curr) => {
10
+ const ctx = curr.ctx ?? 'isNull';
11
+ const returnObj = {
12
+ ...acc
13
+ };
14
+ returnObj[ctx] = [...(acc?.[ctx] ?? []), curr];
26
15
  return returnObj;
27
16
  }, {});
28
17
  };
29
- var _default = groupCustomPropertiesByCtx;
30
- exports.default = _default;
18
+ var _default = exports.default = groupCustomPropertiesByCtx;
@@ -4,46 +4,26 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.highlightString = exports.boldString = void 0;
7
- var _matchString5 = _interopRequireDefault(require("./matchString"));
7
+ var _matchString = _interopRequireDefault(require("./matchString"));
8
8
  var _jsxRuntime = require("react/jsx-runtime");
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
13
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
14
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
15
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
- var highlightString = function highlightString(match, str) {
17
- var ignoreNull = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
18
- var _matchString = (0, _matchString5.default)(match, str, ignoreNull),
19
- _matchString2 = _slicedToArray(_matchString, 2),
20
- parts = _matchString2[0],
21
- regex = _matchString2[1];
22
- return parts.filter(function (part) {
23
- return part;
24
- }).map(function (part, i) {
25
- return regex.test(part) ? /*#__PURE__*/(0, _jsxRuntime.jsx)("mark", {
26
- children: part
27
- }, i) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
28
- children: part
29
- }, i);
30
- });
10
+ const highlightString = function (match, str) {
11
+ let ignoreNull = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
12
+ const [parts, regex] = (0, _matchString.default)(match, str, ignoreNull);
13
+ return parts.filter(part => part).map((part, i) => regex.test(part) ? /*#__PURE__*/(0, _jsxRuntime.jsx)("mark", {
14
+ children: part
15
+ }, i) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
16
+ children: part
17
+ }, i));
31
18
  };
32
19
  exports.highlightString = highlightString;
33
- var boldString = function boldString(match, str) {
34
- var ignoreNull = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
35
- var _matchString3 = (0, _matchString5.default)(match, str, ignoreNull),
36
- _matchString4 = _slicedToArray(_matchString3, 2),
37
- parts = _matchString4[0],
38
- regex = _matchString4[1];
39
- return parts.filter(function (part) {
40
- return part;
41
- }).map(function (part, i) {
42
- return regex.test(part) ? /*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
43
- children: part
44
- }, i) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
45
- children: part
46
- }, i);
47
- });
20
+ const boldString = function (match, str) {
21
+ let ignoreNull = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
22
+ const [parts, regex] = (0, _matchString.default)(match, str, ignoreNull);
23
+ return parts.filter(part => part).map((part, i) => regex.test(part) ? /*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
24
+ children: part
25
+ }, i) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
26
+ children: part
27
+ }, i));
48
28
  };
49
29
  exports.boldString = boldString;
@@ -5,127 +5,127 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "boldString", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _highlightString.boldString;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "buildUrl", {
13
13
  enumerable: true,
14
- get: function get() {
14
+ get: function () {
15
15
  return _buildUrl.default;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "composeValidators", {
19
19
  enumerable: true,
20
- get: function get() {
20
+ get: function () {
21
21
  return _validators.composeValidators;
22
22
  }
23
23
  });
24
24
  Object.defineProperty(exports, "composeValidatorsWithArgs", {
25
25
  enumerable: true,
26
- get: function get() {
26
+ get: function () {
27
27
  return _validators.composeValidatorsWithArgs;
28
28
  }
29
29
  });
30
30
  Object.defineProperty(exports, "generateKiwtQuery", {
31
31
  enumerable: true,
32
- get: function get() {
32
+ get: function () {
33
33
  return _generateKiwtQuery.default;
34
34
  }
35
35
  });
36
36
  Object.defineProperty(exports, "generateKiwtQueryParams", {
37
37
  enumerable: true,
38
- get: function get() {
38
+ get: function () {
39
39
  return _generateKiwtQueryParams.default;
40
40
  }
41
41
  });
42
42
  Object.defineProperty(exports, "groupCustomPropertiesByCtx", {
43
43
  enumerable: true,
44
- get: function get() {
44
+ get: function () {
45
45
  return _groupCustomPropertiesByCtx.default;
46
46
  }
47
47
  });
48
48
  Object.defineProperty(exports, "highlightString", {
49
49
  enumerable: true,
50
- get: function get() {
50
+ get: function () {
51
51
  return _highlightString.highlightString;
52
52
  }
53
53
  });
54
54
  Object.defineProperty(exports, "invalidNumber", {
55
55
  enumerable: true,
56
- get: function get() {
56
+ get: function () {
57
57
  return _validators.invalidNumber;
58
58
  }
59
59
  });
60
60
  Object.defineProperty(exports, "matchString", {
61
61
  enumerable: true,
62
- get: function get() {
62
+ get: function () {
63
63
  return _matchString.default;
64
64
  }
65
65
  });
66
66
  Object.defineProperty(exports, "parseErrorResponse", {
67
67
  enumerable: true,
68
- get: function get() {
68
+ get: function () {
69
69
  return _parseErrorResponse.default;
70
70
  }
71
71
  });
72
72
  Object.defineProperty(exports, "rangeOverflow", {
73
73
  enumerable: true,
74
- get: function get() {
74
+ get: function () {
75
75
  return _validators.rangeOverflow;
76
76
  }
77
77
  });
78
78
  Object.defineProperty(exports, "rangeUnderflow", {
79
79
  enumerable: true,
80
- get: function get() {
80
+ get: function () {
81
81
  return _validators.rangeUnderflow;
82
82
  }
83
83
  });
84
84
  Object.defineProperty(exports, "refdataOptions", {
85
85
  enumerable: true,
86
- get: function get() {
86
+ get: function () {
87
87
  return _refdataOptions.default;
88
88
  }
89
89
  });
90
90
  Object.defineProperty(exports, "refdataQueryKey", {
91
91
  enumerable: true,
92
- get: function get() {
92
+ get: function () {
93
93
  return _refdataQueryKey.default;
94
94
  }
95
95
  });
96
96
  Object.defineProperty(exports, "required", {
97
97
  enumerable: true,
98
- get: function get() {
98
+ get: function () {
99
99
  return _validators.required;
100
100
  }
101
101
  });
102
102
  Object.defineProperty(exports, "requiredObject", {
103
103
  enumerable: true,
104
- get: function get() {
104
+ get: function () {
105
105
  return _validators.requiredObject;
106
106
  }
107
107
  });
108
108
  Object.defineProperty(exports, "selectorSafe", {
109
109
  enumerable: true,
110
- get: function get() {
110
+ get: function () {
111
111
  return _selectorSafe.default;
112
112
  }
113
113
  });
114
114
  Object.defineProperty(exports, "sortByLabel", {
115
115
  enumerable: true,
116
- get: function get() {
116
+ get: function () {
117
117
  return _sortByLabel.default;
118
118
  }
119
119
  });
120
120
  Object.defineProperty(exports, "toCamelCase", {
121
121
  enumerable: true,
122
- get: function get() {
122
+ get: function () {
123
123
  return _toCamelCase.default;
124
124
  }
125
125
  });
126
126
  Object.defineProperty(exports, "typedownQueryKey", {
127
127
  enumerable: true,
128
- get: function get() {
128
+ get: function () {
129
129
  return _typedownQueryKey.default;
130
130
  }
131
131
  });