@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
@@ -4,25 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.TYPE_CLASS_PREFIX = exports.TEXT_CLASS_NAME = exports.REFDATA_DEFINITION_CLASS_NAME = exports.REFDATA_CLASS_NAME = exports.MULTI_REFDATA_CLASS_NAME = exports.INTEGER_CLASS_NAME = exports.DECIMAL_CLASS_NAME = exports.DATE_CLASS_NAME = exports.CONTAINER_CLASS_NAME = exports.BOOLEAN_CLASS_NAME = exports.BLOB_CLASS_NAME = void 0;
7
- var TYPE_CLASS_PREFIX = 'com.k_int.web.toolkit.custprops.types.CustomProperty';
8
- exports.TYPE_CLASS_PREFIX = TYPE_CLASS_PREFIX;
9
- var BLOB_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyBlob';
10
- exports.BLOB_CLASS_NAME = BLOB_CLASS_NAME;
11
- var BOOLEAN_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyBoolean';
12
- exports.BOOLEAN_CLASS_NAME = BOOLEAN_CLASS_NAME;
13
- var CONTAINER_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyContainer';
14
- exports.CONTAINER_CLASS_NAME = CONTAINER_CLASS_NAME;
15
- var DECIMAL_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyDecimal';
16
- exports.DECIMAL_CLASS_NAME = DECIMAL_CLASS_NAME;
17
- var INTEGER_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyInteger';
18
- exports.INTEGER_CLASS_NAME = INTEGER_CLASS_NAME;
19
- var REFDATA_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata';
20
- exports.REFDATA_CLASS_NAME = REFDATA_CLASS_NAME;
21
- var MULTI_REFDATA_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyMultiRefdata';
22
- exports.MULTI_REFDATA_CLASS_NAME = MULTI_REFDATA_CLASS_NAME;
23
- var REFDATA_DEFINITION_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdataDefinition';
24
- exports.REFDATA_DEFINITION_CLASS_NAME = REFDATA_DEFINITION_CLASS_NAME;
25
- var TEXT_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyText';
26
- exports.TEXT_CLASS_NAME = TEXT_CLASS_NAME;
27
- var DATE_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyLocalDate';
28
- exports.DATE_CLASS_NAME = DATE_CLASS_NAME;
7
+ const TYPE_CLASS_PREFIX = exports.TYPE_CLASS_PREFIX = 'com.k_int.web.toolkit.custprops.types.CustomProperty';
8
+ const BLOB_CLASS_NAME = exports.BLOB_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyBlob';
9
+ const BOOLEAN_CLASS_NAME = exports.BOOLEAN_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyBoolean';
10
+ const CONTAINER_CLASS_NAME = exports.CONTAINER_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyContainer';
11
+ const DECIMAL_CLASS_NAME = exports.DECIMAL_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyDecimal';
12
+ const INTEGER_CLASS_NAME = exports.INTEGER_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyInteger';
13
+ const REFDATA_CLASS_NAME = exports.REFDATA_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata';
14
+ const MULTI_REFDATA_CLASS_NAME = exports.MULTI_REFDATA_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyMultiRefdata';
15
+ const REFDATA_DEFINITION_CLASS_NAME = exports.REFDATA_DEFINITION_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdataDefinition';
16
+ const TEXT_CLASS_NAME = exports.TEXT_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyText';
17
+ const DATE_CLASS_NAME = exports.DATE_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyLocalDate';
@@ -4,9 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.UP_ARROW = exports.TAB = exports.DOWN_ARROW = void 0;
7
- var UP_ARROW = 'ArrowUp';
8
- exports.UP_ARROW = UP_ARROW;
9
- var DOWN_ARROW = 'ArrowDown';
10
- exports.DOWN_ARROW = DOWN_ARROW;
11
- var TAB = 'Tab';
12
- exports.TAB = TAB;
7
+ const UP_ARROW = exports.UP_ARROW = 'ArrowUp';
8
+ const DOWN_ARROW = exports.DOWN_ARROW = 'ArrowDown';
9
+ const TAB = exports.TAB = 'Tab';
@@ -5,6 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _react = require("react");
8
- var SettingsContext = /*#__PURE__*/(0, _react.createContext)();
9
- var _default = SettingsContext;
10
- exports.default = _default;
8
+ const SettingsContext = /*#__PURE__*/(0, _react.createContext)();
9
+ var _default = exports.default = SettingsContext;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "SettingsContext", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _SettingsContext.default;
10
10
  }
11
11
  });
@@ -6,36 +6,16 @@ var _useKintIntl = _interopRequireDefault(require("../useKintIntl"));
6
6
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7
7
  // We have to do this up here too so that our passed useKintIntl
8
8
  // ALSO has a mocked useIntlKeyStore... I think anyway
9
- jest.mock('../useIntlKeyStore', function () {
10
- return function () {
11
- return function () {
12
- return 'ui-test-implementor';
13
- };
14
- };
15
- });
9
+ jest.mock('../useIntlKeyStore', () => () => () => 'ui-test-implementor');
16
10
  module.exports = {
17
- useRefdata: function useRefdata() {
18
- return _refdata.default;
19
- },
20
- useTemplates: function useTemplates() {
21
- return [];
22
- },
11
+ useRefdata: () => _refdata.default,
12
+ useTemplates: () => [],
23
13
  // We should set up some templates to test this properly
24
- useCustomProperties: function useCustomProperties() {
25
- return {
26
- data: _customProperties.default,
27
- isLoading: false
28
- };
29
- },
30
- useMutateCustomProperties: function useMutateCustomProperties() {
31
- return [];
32
- },
33
- useIntlKeyStore: function useIntlKeyStore() {
34
- return function () {
35
- return function () {
36
- return 'ui-test-implementor';
37
- };
38
- };
39
- },
14
+ useCustomProperties: () => ({
15
+ data: _customProperties.default,
16
+ isLoading: false
17
+ }),
18
+ useMutateCustomProperties: () => [],
19
+ useIntlKeyStore: () => () => () => 'ui-test-implementor',
40
20
  useKintIntl: _useKintIntl.default // Use the "proper" useKintIntl but with a mocked intlKeyStore which returns the ui-test-implementor
41
21
  };
@@ -5,121 +5,121 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "useActiveElement", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _useActiveElement.default;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "useAppSettings", {
13
13
  enumerable: true,
14
- get: function get() {
14
+ get: function () {
15
15
  return _settingsHooks.useAppSettings;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "useCustomProperties", {
19
19
  enumerable: true,
20
- get: function get() {
20
+ get: function () {
21
21
  return _useCustomProperties.default;
22
22
  }
23
23
  });
24
24
  Object.defineProperty(exports, "useHelperApp", {
25
25
  enumerable: true,
26
- get: function get() {
26
+ get: function () {
27
27
  return _useHelperApp.default;
28
28
  }
29
29
  });
30
30
  Object.defineProperty(exports, "useIntlKey", {
31
31
  enumerable: true,
32
- get: function get() {
32
+ get: function () {
33
33
  return _useIntlKey.default;
34
34
  }
35
35
  });
36
36
  Object.defineProperty(exports, "useIntlKeyStore", {
37
37
  enumerable: true,
38
- get: function get() {
38
+ get: function () {
39
39
  return _useIntlKeyStore.default;
40
40
  }
41
41
  });
42
42
  Object.defineProperty(exports, "useInvalidateRefdata", {
43
43
  enumerable: true,
44
- get: function get() {
44
+ get: function () {
45
45
  return _useInvalidateRefdata.default;
46
46
  }
47
47
  });
48
48
  Object.defineProperty(exports, "useKintIntl", {
49
49
  enumerable: true,
50
- get: function get() {
50
+ get: function () {
51
51
  return _useKintIntl.default;
52
52
  }
53
53
  });
54
54
  Object.defineProperty(exports, "useKiwtFieldArray", {
55
55
  enumerable: true,
56
- get: function get() {
56
+ get: function () {
57
57
  return _useKiwtFieldArray.default;
58
58
  }
59
59
  });
60
60
  Object.defineProperty(exports, "useKiwtSASQuery", {
61
61
  enumerable: true,
62
- get: function get() {
62
+ get: function () {
63
63
  return _useKiwtSASQuery.default;
64
64
  }
65
65
  });
66
66
  Object.defineProperty(exports, "useLocalStorageState", {
67
67
  enumerable: true,
68
- get: function get() {
68
+ get: function () {
69
69
  return _useLocalStorageState.default;
70
70
  }
71
71
  });
72
72
  Object.defineProperty(exports, "useMutateCustomProperties", {
73
73
  enumerable: true,
74
- get: function get() {
74
+ get: function () {
75
75
  return _useMutateCustomProperties.default;
76
76
  }
77
77
  });
78
78
  Object.defineProperty(exports, "useMutateRefdataCategory", {
79
79
  enumerable: true,
80
- get: function get() {
80
+ get: function () {
81
81
  return _useMutateRefdataCategory.default;
82
82
  }
83
83
  });
84
84
  Object.defineProperty(exports, "useMutateRefdataValue", {
85
85
  enumerable: true,
86
- get: function get() {
86
+ get: function () {
87
87
  return _useMutateRefdataValue.default;
88
88
  }
89
89
  });
90
90
  Object.defineProperty(exports, "useQIndex", {
91
91
  enumerable: true,
92
- get: function get() {
92
+ get: function () {
93
93
  return _useQIndex.default;
94
94
  }
95
95
  });
96
96
  Object.defineProperty(exports, "useRefdata", {
97
97
  enumerable: true,
98
- get: function get() {
98
+ get: function () {
99
99
  return _useRefdata.default;
100
100
  }
101
101
  });
102
102
  Object.defineProperty(exports, "useSASQQueryMeta", {
103
103
  enumerable: true,
104
- get: function get() {
104
+ get: function () {
105
105
  return _useSASQQueryMeta.default;
106
106
  }
107
107
  });
108
108
  Object.defineProperty(exports, "useSettingSection", {
109
109
  enumerable: true,
110
- get: function get() {
110
+ get: function () {
111
111
  return _settingsHooks.useSettingSection;
112
112
  }
113
113
  });
114
114
  Object.defineProperty(exports, "useSettings", {
115
115
  enumerable: true,
116
- get: function get() {
116
+ get: function () {
117
117
  return _settingsHooks.useSettings;
118
118
  }
119
119
  });
120
120
  Object.defineProperty(exports, "useTemplates", {
121
121
  enumerable: true,
122
- get: function get() {
122
+ get: function () {
123
123
  return _useTemplates.default;
124
124
  }
125
125
  });
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "useAppSettings", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _useAppSettings.default;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "useSettingSection", {
13
13
  enumerable: true,
14
- get: function get() {
14
+ get: function () {
15
15
  return _useSettingSection.default;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "useSettings", {
19
19
  enumerable: true,
20
- get: function get() {
20
+ get: function () {
21
21
  return _useSettings.default;
22
22
  }
23
23
  });
@@ -7,57 +7,45 @@ exports.default = void 0;
7
7
  var _reactQuery = require("react-query");
8
8
  var _core = require("@folio/stripes/core");
9
9
  var _utils = require("../../utils");
10
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
11
- 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."); }
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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
14
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
15
- 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; }
16
- var useAppSettings = function useAppSettings(_ref) {
17
- var _ref2, _ref3, _queryObject$data2;
18
- var endpoint = _ref.endpoint,
19
- keyName = _ref.keyName,
20
- options = _ref.options,
21
- _ref$returnQueryObjec = _ref.returnQueryObject,
22
- returnQueryObject = _ref$returnQueryObjec === void 0 ? false : _ref$returnQueryObjec,
23
- sectionName = _ref.sectionName,
24
- queryParams = _ref.queryParams;
25
- var ky = (0, _core.useOkapiKy)();
26
- var defaultQueryParamObject = {
10
+ const useAppSettings = _ref => {
11
+ let {
12
+ endpoint,
13
+ keyName,
14
+ options,
15
+ returnQueryObject = false,
16
+ sectionName,
17
+ queryParams
18
+ } = _ref;
19
+ const ky = (0, _core.useOkapiKy)();
20
+ const defaultQueryParamObject = {
27
21
  perPage: 100,
28
22
  stats: false
29
23
  };
30
- var namespaceArray = [endpoint];
24
+ const namespaceArray = [endpoint];
31
25
  if (sectionName) {
32
- var _defaultQueryParamObj;
33
- defaultQueryParamObject.filters = [].concat(_toConsumableArray((_defaultQueryParamObj = defaultQueryParamObject.filters) !== null && _defaultQueryParamObj !== void 0 ? _defaultQueryParamObj : []), [{
26
+ defaultQueryParamObject.filters = [...(defaultQueryParamObject.filters ?? []), {
34
27
  path: 'section',
35
28
  value: sectionName
36
- }]);
29
+ }];
37
30
  namespaceArray.push(sectionName);
38
31
  }
39
32
  if (keyName) {
40
- var _defaultQueryParamObj2;
41
- defaultQueryParamObject.filters = [].concat(_toConsumableArray((_defaultQueryParamObj2 = defaultQueryParamObject.filters) !== null && _defaultQueryParamObj2 !== void 0 ? _defaultQueryParamObj2 : []), [{
33
+ defaultQueryParamObject.filters = [...(defaultQueryParamObject.filters ?? []), {
42
34
  path: 'key',
43
35
  value: keyName
44
- }]);
36
+ }];
45
37
  defaultQueryParamObject.perPage = 1;
46
38
  namespaceArray.push(keyName);
47
39
  }
48
- var queryParamArray = (0, _utils.generateKiwtQueryParams)(options !== null && options !== void 0 ? options : defaultQueryParamObject, {});
40
+ const queryParamArray = (0, _utils.generateKiwtQueryParams)(options ?? defaultQueryParamObject, {});
49
41
  namespaceArray.push(queryParamArray);
50
- var queryObject = (0, _reactQuery.useQuery)(namespaceArray, function () {
51
- return ky("".concat(endpoint, "?").concat(queryParamArray === null || queryParamArray === void 0 ? void 0 : queryParamArray.join('&'))).json();
52
- }, queryParams);
42
+ const queryObject = (0, _reactQuery.useQuery)(namespaceArray, () => ky(`${endpoint}?${queryParamArray?.join('&')}`).json(), queryParams);
53
43
  if (returnQueryObject) {
54
44
  return queryObject;
55
45
  }
56
- 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) {
57
- var _queryObject$data$, _queryObject$data;
58
- return (_queryObject$data$ = queryObject === null || queryObject === void 0 ? 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] ?? {};
59
48
  }
60
- return (_queryObject$data2 = queryObject === null || queryObject === void 0 ? void 0 : queryObject.data) !== null && _queryObject$data2 !== void 0 ? _queryObject$data2 : [];
49
+ return queryObject?.data ?? [];
61
50
  };
62
- var _default = useAppSettings;
63
- exports.default = _default;
51
+ var _default = exports.default = useAppSettings;
@@ -9,11 +9,13 @@ var _reactQuery = require("react-query");
9
9
  var _core = require("@folio/stripes/core");
10
10
  var _utils = require("../../utils");
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- var useSettingSection = function useSettingSection(_ref) {
13
- var sectionName = _ref.sectionName,
14
- settingEndpoint = _ref.settingEndpoint;
15
- var ky = (0, _core.useOkapiKy)();
16
- var queryParams = (0, _utils.generateKiwtQueryParams)({
12
+ const useSettingSection = _ref => {
13
+ let {
14
+ sectionName,
15
+ settingEndpoint
16
+ } = _ref;
17
+ const ky = (0, _core.useOkapiKy)();
18
+ const queryParams = (0, _utils.generateKiwtQueryParams)({
17
19
  filters: [{
18
20
  path: 'section',
19
21
  value: sectionName
@@ -24,21 +26,17 @@ var useSettingSection = function useSettingSection(_ref) {
24
26
  perPage: 100,
25
27
  stats: false
26
28
  }, {});
27
- var _useQuery = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSetting', 'appSettings', queryParams, sectionName], function () {
28
- return ky("".concat(settingEndpoint, "?").concat(queryParams === null || queryParams === void 0 ? void 0 : queryParams.join('&'))).json();
29
- }),
30
- _useQuery$data = _useQuery.data,
31
- settings = _useQuery$data === void 0 ? [] : _useQuery$data;
32
- var _useMutation = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useSetting', 'putSetting', sectionName], function (data) {
33
- return ky.put("".concat(settingEndpoint).concat(data.id ? '/' + data.id : ''), {
34
- json: data
35
- });
36
- }),
37
- putSetting = _useMutation.mutateAsync;
29
+ const {
30
+ data: settings = []
31
+ } = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSetting', 'appSettings', queryParams, sectionName], () => ky(`${settingEndpoint}?${queryParams?.join('&')}`).json());
32
+ const {
33
+ mutateAsync: putSetting
34
+ } = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useSetting', 'putSetting', sectionName], data => ky.put(`${settingEndpoint}${data.id ? '/' + data.id : ''}`, {
35
+ json: data
36
+ }));
38
37
  return {
39
38
  handleSubmit: putSetting,
40
- settings: settings
39
+ settings
41
40
  };
42
41
  };
43
- var _default = useSettingSection;
44
- exports.default = _default;
42
+ var _default = exports.default = useSettingSection;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- 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); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
@@ -17,82 +16,67 @@ var _useKintIntl = _interopRequireDefault(require("../useKintIntl"));
17
16
  var _useIntlKey = _interopRequireDefault(require("../useIntlKey"));
18
17
  var _jsxRuntime = require("react/jsx-runtime");
19
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
- 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; }
21
- 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; }
22
- 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; }
23
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
24
- 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); }
25
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
26
- 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."); }
27
- 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); }
28
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
29
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
30
- 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; }
31
- var useSettings = function useSettings(_ref) {
32
- var dynamicPageExclusions = _ref.dynamicPageExclusions,
33
- passedIntlKey = _ref.intlKey,
34
- passedIntlNS = _ref.intlNS,
35
- _ref$labelOverrides = _ref.labelOverrides,
36
- labelOverrides = _ref$labelOverrides === void 0 ? {} : _ref$labelOverrides,
37
- persistentPages = _ref.persistentPages,
38
- refdataEndpoint = _ref.refdataEndpoint,
39
- settingEndpoint = _ref.settingEndpoint,
40
- templateEndpoint = _ref.templateEndpoint;
41
- var ky = (0, _core.useOkapiKy)();
42
- var kintIntl = (0, _useKintIntl.default)(passedIntlKey, passedIntlNS);
43
- var queryParams = (0, _utils.generateKiwtQueryParams)({
44
- filters: dynamicPageExclusions === null || dynamicPageExclusions === void 0 ? void 0 : dynamicPageExclusions.map(function (dpe) {
45
- return {
46
- path: 'section',
47
- comparator: '!=',
48
- value: dpe
49
- };
50
- }),
19
+ const useSettings = _ref => {
20
+ let {
21
+ dynamicPageExclusions,
22
+ intlKey: passedIntlKey,
23
+ intlNS: passedIntlNS,
24
+ labelOverrides = {},
25
+ persistentPages,
26
+ refdataEndpoint,
27
+ settingEndpoint,
28
+ templateEndpoint
29
+ } = _ref;
30
+ const ky = (0, _core.useOkapiKy)();
31
+ const kintIntl = (0, _useKintIntl.default)(passedIntlKey, passedIntlNS);
32
+ const queryParams = (0, _utils.generateKiwtQueryParams)({
33
+ filters: dynamicPageExclusions?.map(dpe => ({
34
+ path: 'section',
35
+ comparator: '!=',
36
+ value: dpe
37
+ })),
51
38
  perPage: 100,
52
39
  stats: false
53
40
  }, {});
54
- var _useQuery = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSettings', 'appSettings', settingEndpoint, queryParams], function () {
55
- return ky("".concat(settingEndpoint, "?").concat(queryParams === null || queryParams === void 0 ? void 0 : queryParams.join('&'))).json();
56
- }),
57
- _useQuery$data = _useQuery.data,
58
- appSettings = _useQuery$data === void 0 ? [] : _useQuery$data,
59
- isLoading = _useQuery.isLoading;
60
- var sections = _toConsumableArray(new Set(appSettings.map(function (s) {
61
- return s.section;
62
- })));
63
- var dynamic = sections.map(function (section) {
41
+ const {
42
+ data: appSettings = [],
43
+ isLoading
44
+ } = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSettings', 'appSettings', settingEndpoint, queryParams], () => ky(`${settingEndpoint}?${queryParams?.join('&')}`).json());
45
+ const sections = [...new Set(appSettings.map(s => s.section))];
46
+ const dynamic = sections.map(section => {
64
47
  return {
65
48
  route: section,
66
49
  label: kintIntl.formatKintMessage({
67
- id: "settings.settingsSection.".concat((0, _utils.toCamelCase)(section)),
50
+ id: `settings.settingsSection.${(0, _utils.toCamelCase)(section)}`,
68
51
  fallbackMessage: section
69
52
  }),
70
- component: function component(props) {
71
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingPage.SettingPagePane, {
53
+ component: props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingPage.SettingPagePane, {
54
+ intlKey: passedIntlKey,
55
+ intlNS: passedIntlNS,
56
+ sectionName: section,
57
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingPage.SettingPage, {
72
58
  intlKey: passedIntlKey,
73
59
  intlNS: passedIntlNS,
60
+ labelOverrides: labelOverrides,
74
61
  sectionName: section,
75
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingPage.SettingPage, _objectSpread({
76
- intlKey: passedIntlKey,
77
- intlNS: passedIntlNS,
78
- labelOverrides: labelOverrides,
79
- sectionName: section
80
- }, props))
81
- });
82
- }
62
+ ...props
63
+ })
64
+ })
83
65
  };
84
66
  });
85
- var pageList = persistentPages.concat(dynamic).sort(_utils.sortByLabel);
86
- var intlKey = (0, _useIntlKey.default)(passedIntlKey, passedIntlNS);
87
- var SettingsContextProvider = function SettingsContextProvider(_ref2) {
88
- var children = _ref2.children;
67
+ const pageList = persistentPages.concat(dynamic).sort(_utils.sortByLabel);
68
+ const intlKey = (0, _useIntlKey.default)(passedIntlKey, passedIntlNS);
69
+ const SettingsContextProvider = _ref2 => {
70
+ let {
71
+ children
72
+ } = _ref2;
89
73
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_contexts.SettingsContext.Provider, {
90
74
  value: {
91
- intlKey: intlKey,
75
+ intlKey,
92
76
  // This is only here for backwards compatibility... is now grabbed from useIntlKey instead of what's passed in directly
93
- refdataEndpoint: refdataEndpoint,
94
- settingEndpoint: settingEndpoint,
95
- templateEndpoint: templateEndpoint
77
+ refdataEndpoint,
78
+ settingEndpoint,
79
+ templateEndpoint
96
80
  },
97
81
  children: children
98
82
  });
@@ -100,25 +84,27 @@ var useSettings = function useSettings(_ref) {
100
84
  SettingsContextProvider.propTypes = {
101
85
  children: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node])
102
86
  };
103
- var SettingsComponent = function SettingsComponent(props) {
104
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_smartComponents.Settings, _objectSpread({
87
+ const SettingsComponent = props => {
88
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_smartComponents.Settings, {
105
89
  pages: pageList,
106
90
  paneTitle: kintIntl.formatKintMessage({
107
91
  id: 'meta.title'
108
- })
109
- }, props));
92
+ }),
93
+ ...props
94
+ });
110
95
  };
111
- var SettingsComponentWithContext = function SettingsComponentWithContext(props) {
96
+ const SettingsComponentWithContext = props => {
112
97
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(SettingsContextProvider, {
113
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SettingsComponent, _objectSpread({}, props))
98
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SettingsComponent, {
99
+ ...props
100
+ })
114
101
  });
115
102
  };
116
103
  return {
117
- isLoading: isLoading,
118
- pageList: pageList,
104
+ isLoading,
105
+ pageList,
119
106
  SettingsComponent: SettingsComponentWithContext,
120
- SettingsContextProvider: SettingsContextProvider
107
+ SettingsContextProvider
121
108
  };
122
109
  };
123
- var _default = useSettings;
124
- exports.default = _default;
110
+ var _default = exports.default = useSettings;
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "useTypedown", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _useTypedown.default;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "useTypedownData", {
13
13
  enumerable: true,
14
- get: function get() {
14
+ get: function () {
15
15
  return _useTypedownData.default;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "useTypedownToggle", {
19
19
  enumerable: true,
20
- get: function get() {
20
+ get: function () {
21
21
  return _useTypedownToggle.default;
22
22
  }
23
23
  });