@k-int/stripes-kint-components 2.8.3 → 2.8.5

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 (316) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +6 -19
  3. package/es/artifacts/coverage-jest/lcov-report/prettify.js +2 -182
  4. package/es/artifacts/coverage-jest/lcov-report/sorter.js +64 -94
  5. package/es/index.js +0 -27
  6. package/es/lib/ActionList/ActionList.js +18 -38
  7. package/es/lib/ActionList/ActionListFieldArray.js +57 -112
  8. package/es/lib/ActionList/index.js +0 -2
  9. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +32 -63
  10. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +2 -13
  11. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +89 -138
  12. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +3 -22
  13. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +14 -50
  14. package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +17 -34
  15. package/es/lib/CustomProperties/Config/CustomPropertyView.js +3 -12
  16. package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -26
  17. package/es/lib/CustomProperties/Config/index.js +0 -5
  18. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +6 -12
  19. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +1 -13
  20. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +24 -39
  21. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +1 -13
  22. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +25 -69
  23. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +3 -23
  24. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +26 -77
  25. package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +6 -33
  26. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +19 -33
  27. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +3 -14
  28. package/es/lib/CustomProperties/Edit/index.js +0 -6
  29. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +33 -70
  30. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +2 -18
  31. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +14 -44
  32. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -10
  33. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +4 -23
  34. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +2 -19
  35. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +8 -22
  36. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +2 -20
  37. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +9 -27
  38. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +1 -32
  39. package/es/lib/CustomProperties/Filter/index.js +0 -7
  40. package/es/lib/CustomProperties/Filter/useOperators.js +5 -21
  41. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +3 -15
  42. package/es/lib/CustomProperties/Filter/useValueProps.js +5 -20
  43. package/es/lib/CustomProperties/View/CustomPropertiesView.js +6 -12
  44. package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +1 -10
  45. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +43 -65
  46. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +1 -13
  47. package/es/lib/CustomProperties/View/CustomPropertyCard.js +10 -38
  48. package/es/lib/CustomProperties/View/index.js +0 -4
  49. package/es/lib/CustomProperties/index.js +0 -4
  50. package/es/lib/CycleButton/CycleButton.js +8 -33
  51. package/es/lib/CycleButton/index.js +0 -2
  52. package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +85 -131
  53. package/es/lib/EditableRefdataCategoryList/index.js +0 -2
  54. package/es/lib/EditableRefdataList/EditableRefdataList.js +90 -139
  55. package/es/lib/EditableRefdataList/index.js +0 -2
  56. package/es/lib/EditableSettingsList/EditableSettingsList.js +3 -13
  57. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +2 -15
  58. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +4 -19
  59. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +3 -25
  60. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +19 -26
  61. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +2 -20
  62. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +14 -35
  63. package/es/lib/EditableSettingsList/SettingField/SettingField.js +15 -51
  64. package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +6 -31
  65. package/es/lib/EditableSettingsList/SettingField/index.js +0 -4
  66. package/es/lib/EditableSettingsList/index.js +0 -4
  67. package/es/lib/FormModal/FormModal.js +14 -34
  68. package/es/lib/FormModal/index.js +0 -2
  69. package/es/lib/IconSelect/IconSelect.js +29 -67
  70. package/es/lib/IconSelect/index.js +0 -2
  71. package/es/lib/NoResultsMessage/NoResultsMessage.js +13 -22
  72. package/es/lib/NoResultsMessage/index.js +0 -2
  73. package/es/lib/QueryTypedown/QueryTypedown.js +9 -36
  74. package/es/lib/QueryTypedown/index.js +0 -2
  75. package/es/lib/RefdataButtons/RefdataButtons.js +5 -24
  76. package/es/lib/RefdataButtons/index.js +0 -2
  77. package/es/lib/RichSelect/RichSelect.js +39 -67
  78. package/es/lib/RichSelect/index.js +0 -3
  79. package/es/lib/RichSelect/useSelectedOption.js +3 -14
  80. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +36 -80
  81. package/es/lib/SASQLookupComponent/TableBody/TableBody.js +16 -29
  82. package/es/lib/SASQLookupComponent/TableBody/index.js +0 -2
  83. package/es/lib/SASQLookupComponent/index.js +0 -3
  84. package/es/lib/SASQRoute/SASQRoute.js +6 -23
  85. package/es/lib/SASQRoute/index.js +0 -2
  86. package/es/lib/SASQViewComponent/SASQViewComponent.js +17 -36
  87. package/es/lib/SASQViewComponent/index.js +0 -2
  88. package/es/lib/SearchField/SearchField.js +1 -17
  89. package/es/lib/SearchField/index.js +0 -2
  90. package/es/lib/SettingPage/SettingPage.js +6 -21
  91. package/es/lib/SettingPage/SettingPagePane.js +2 -17
  92. package/es/lib/SettingPage/index.js +0 -3
  93. package/es/lib/Typedown/Typedown.js +51 -82
  94. package/es/lib/Typedown/index.js +0 -2
  95. package/es/lib/contexts/SettingsContext.js +0 -2
  96. package/es/lib/contexts/index.js +0 -2
  97. package/es/lib/hooks/index.js +0 -16
  98. package/es/lib/hooks/settingsHooks/index.js +0 -4
  99. package/es/lib/hooks/settingsHooks/useAppSettings.js +6 -27
  100. package/es/lib/hooks/settingsHooks/useSettingSection.js +10 -20
  101. package/es/lib/hooks/settingsHooks/useSettings.js +10 -43
  102. package/es/lib/hooks/typedownHooks/index.js +0 -4
  103. package/es/lib/hooks/typedownHooks/useTypedown.js +17 -37
  104. package/es/lib/hooks/typedownHooks/useTypedownData.js +12 -26
  105. package/es/lib/hooks/typedownHooks/useTypedownToggle.js +5 -19
  106. package/es/lib/hooks/useActiveElement.js +3 -15
  107. package/es/lib/hooks/useAvailableCustomProperties.js +3 -22
  108. package/es/lib/hooks/useCustomProperties.js +11 -25
  109. package/es/lib/hooks/useHelperApp.js +7 -30
  110. package/es/lib/hooks/useInvalidateRefdata.js +0 -4
  111. package/es/lib/hooks/useKiwtFieldArray.js +5 -29
  112. package/es/lib/hooks/useKiwtSASQuery.js +12 -37
  113. package/es/lib/hooks/useLocalStorageState.js +5 -21
  114. package/es/lib/hooks/useMutateCustomProperties.js +11 -28
  115. package/es/lib/hooks/useMutateRefdataCategory.js +9 -29
  116. package/es/lib/hooks/useMutateRefdataValue.js +10 -27
  117. package/es/lib/hooks/useQIndex.js +3 -27
  118. package/es/lib/hooks/useRefdata.js +7 -16
  119. package/es/lib/hooks/useTemplates.js +6 -17
  120. package/es/lib/utils/buildUrl.js +1 -10
  121. package/es/lib/utils/generateKiwtQuery.js +0 -4
  122. package/es/lib/utils/generateKiwtQueryParams.js +24 -62
  123. package/es/lib/utils/groupCustomPropertiesByCtx.js +0 -14
  124. package/es/lib/utils/highlightString.js +6 -23
  125. package/es/lib/utils/index.js +0 -15
  126. package/es/lib/utils/matchString.js +0 -6
  127. package/es/lib/utils/parseErrorResponse.js +2 -24
  128. package/es/lib/utils/refdataQueryKey.js +0 -4
  129. package/es/lib/utils/renderHelpText.js +0 -7
  130. package/es/lib/utils/selectorSafe.js +0 -2
  131. package/es/lib/utils/sortByLabel.js +0 -6
  132. package/es/lib/utils/toCamelCase.js +6 -5
  133. package/es/lib/utils/typedownQueryKey.js +0 -4
  134. package/es/lib/utils/validators.js +4 -35
  135. package/junit.xml +151 -151
  136. package/package.json +1 -1
  137. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
  138. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +1 -1
  139. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +1 -1
  140. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
  141. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
  142. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +4 -4
  143. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
  144. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +1 -1
  145. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +5 -5
  146. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
  147. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +793 -0
  148. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
  149. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
  150. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +6 -9
  151. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +29 -92
  152. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
  153. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +24 -24
  154. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
  155. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +1 -1
  156. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +1 -1
  157. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
  158. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
  159. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
  160. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
  161. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +1 -1
  162. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
  163. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +1 -1
  164. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +1 -1
  165. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
  166. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +1 -1
  167. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +1 -1
  168. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +17 -17
  169. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +1 -1
  170. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +15 -15
  171. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
  172. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
  173. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
  174. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
  175. package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +1 -1
  176. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +1 -1
  177. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +1 -1
  178. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
  179. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +1 -1
  180. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
  181. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +1 -1
  182. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +1 -1
  183. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
  184. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +1 -1
  185. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +1 -1
  186. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
  187. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +1 -1
  188. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +1 -1
  189. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
  190. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
  191. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +1 -1
  192. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
  193. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +1 -1
  194. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +1 -1
  195. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
  196. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +3 -3
  197. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +1 -1
  198. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +1 -1
  199. package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +28 -22
  200. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +1 -1
  201. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
  202. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +2 -2
  203. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
  204. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
  205. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
  206. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
  207. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
  208. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +1 -1
  209. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
  210. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
  211. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +535 -0
  212. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +146 -0
  213. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +88 -0
  214. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +253 -0
  215. package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +5 -2
  216. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +1 -1
  217. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +1 -1
  218. package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +1 -1
  219. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +99 -12
  220. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
  221. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
  222. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
  223. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +9 -9
  224. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
  225. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +53 -8
  226. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +7 -7
  227. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
  228. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +65 -11
  229. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +9 -9
  230. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
  231. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
  232. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
  233. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
  234. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +1 -1
  235. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
  236. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +1 -1
  237. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
  238. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
  239. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
  240. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
  241. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
  242. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
  243. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
  244. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
  245. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
  246. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
  247. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +24 -9
  248. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +5 -2
  249. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +1 -1
  250. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
  251. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +1 -1
  252. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +1 -1
  253. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +1 -1
  254. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
  255. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
  256. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
  257. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
  258. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  259. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +1 -1
  260. package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +205 -0
  261. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +1 -1
  262. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +1 -1
  263. package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +1 -1
  264. package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +3 -3
  265. package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +1 -1
  266. package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +1 -1
  267. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
  268. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
  269. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
  270. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +1 -1
  271. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +1 -1
  272. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +1 -1
  273. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
  274. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +1 -1
  275. package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +187 -0
  276. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
  277. package/src/artifacts/coverage-jest/lcov-report/index.html +74 -59
  278. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
  279. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +9 -9
  280. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +63 -21
  281. package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +2 -2
  282. package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
  283. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +33 -33
  284. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
  285. package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +2 -2
  286. package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +2 -2
  287. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
  288. package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
  289. package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +166 -0
  290. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +2 -2
  291. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
  292. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -2
  293. package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
  294. package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +39 -39
  295. package/src/artifacts/coverage-jest/lcov.info +755 -537
  296. package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +0 -1
  297. package/src/lib/utils/parseErrorResponse.js +1 -1
  298. package/translate.sh +4 -0
  299. package/translations/stripes-kint-components/ar.json +12 -12
  300. package/translations/stripes-kint-components/cs_CZ.json +4 -4
  301. package/translations/stripes-kint-components/de.json +41 -41
  302. package/translations/stripes-kint-components/en_GB.json +1 -0
  303. package/translations/stripes-kint-components/en_SE.json +1 -0
  304. package/translations/stripes-kint-components/es_419.json +122 -0
  305. package/translations/stripes-kint-components/es_ES.json +122 -0
  306. package/translations/stripes-kint-components/fr.json +105 -1
  307. package/translations/stripes-kint-components/fr_FR.json +105 -0
  308. package/translations/stripes-kint-components/hu.json +12 -12
  309. package/translations/stripes-kint-components/it_IT.json +6 -6
  310. package/translations/stripes-kint-components/ja.json +43 -43
  311. package/translations/stripes-kint-components/ko.json +49 -49
  312. package/translations/stripes-kint-components/pt_PT.json +6 -6
  313. package/translations/stripes-kint-components/ru.json +1 -1
  314. package/translations/stripes-kint-components/sv.json +7 -7
  315. package/translations/stripes-kint-components/zh_TW.json +122 -0
  316. package/yarn-error.log +147 -0
@@ -1,63 +1,39 @@
1
1
  "use strict";
2
2
 
3
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
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _react = _interopRequireWildcard(require("react"));
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  var _reactQuery = require("react-query");
15
-
16
11
  var _reactIntl = require("react-intl");
17
-
18
12
  var _core = require("@folio/stripes/core");
19
-
20
13
  var _smartComponents = require("@folio/stripes/smart-components");
21
-
22
14
  var _SettingPage = require("../../SettingPage");
23
-
24
15
  var _contexts = require("../../contexts");
25
-
26
16
  var _utils = require("../../utils");
27
-
28
17
  var _jsxRuntime = require("react/jsx-runtime");
29
-
30
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
-
32
19
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
-
34
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
-
36
21
  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; }
37
-
38
22
  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; }
39
-
40
23
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
41
-
42
24
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
43
-
44
25
  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."); }
45
-
46
26
  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); }
47
-
48
27
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
49
-
50
28
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
51
-
52
29
  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; }
53
-
54
30
  var useSettings = function useSettings(_ref) {
55
31
  var dynamicPageExclusions = _ref.dynamicPageExclusions,
56
- intlKey = _ref.intlKey,
57
- persistentPages = _ref.persistentPages,
58
- refdataEndpoint = _ref.refdataEndpoint,
59
- settingEndpoint = _ref.settingEndpoint,
60
- templateEndpoint = _ref.templateEndpoint;
32
+ intlKey = _ref.intlKey,
33
+ persistentPages = _ref.persistentPages,
34
+ refdataEndpoint = _ref.refdataEndpoint,
35
+ settingEndpoint = _ref.settingEndpoint,
36
+ templateEndpoint = _ref.templateEndpoint;
61
37
  var ky = (0, _core.useOkapiKy)();
62
38
  var intl = (0, _reactIntl.useIntl)();
63
39
  var queryParams = (0, _utils.generateKiwtQueryParams)({
@@ -71,18 +47,15 @@ var useSettings = function useSettings(_ref) {
71
47
  perPage: 100,
72
48
  stats: false
73
49
  }, {});
74
-
75
50
  var _useQuery = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSettings', 'appSettings', settingEndpoint, queryParams], function () {
76
- return ky("".concat(settingEndpoint, "?").concat(queryParams === null || queryParams === void 0 ? void 0 : queryParams.join('&'))).json();
77
- }),
78
- _useQuery$data = _useQuery.data,
79
- appSettings = _useQuery$data === void 0 ? [] : _useQuery$data,
80
- isLoading = _useQuery.isLoading;
81
-
51
+ return ky("".concat(settingEndpoint, "?").concat(queryParams === null || queryParams === void 0 ? void 0 : queryParams.join('&'))).json();
52
+ }),
53
+ _useQuery$data = _useQuery.data,
54
+ appSettings = _useQuery$data === void 0 ? [] : _useQuery$data,
55
+ isLoading = _useQuery.isLoading;
82
56
  var sections = _toConsumableArray(new Set(appSettings.map(function (s) {
83
57
  return s.section;
84
58
  })));
85
-
86
59
  var dynamic = sections.map(function (section) {
87
60
  return {
88
61
  route: section,
@@ -101,7 +74,6 @@ var useSettings = function useSettings(_ref) {
101
74
  };
102
75
  });
103
76
  var pageList = persistentPages.concat(dynamic).sort(_utils.sortByLabel);
104
-
105
77
  var SettingsContextProvider = function SettingsContextProvider(_ref2) {
106
78
  var children = _ref2.children;
107
79
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_contexts.SettingsContext.Provider, {
@@ -114,11 +86,9 @@ var useSettings = function useSettings(_ref) {
114
86
  children: children
115
87
  });
116
88
  };
117
-
118
89
  SettingsContextProvider.propTypes = {
119
90
  children: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node])
120
91
  };
121
-
122
92
  var SettingsComponent = function SettingsComponent(props) {
123
93
  var settingsData = (0, _react.useContext)(_contexts.SettingsContext);
124
94
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_smartComponents.Settings, _objectSpread({
@@ -128,13 +98,11 @@ var useSettings = function useSettings(_ref) {
128
98
  })
129
99
  }, props));
130
100
  };
131
-
132
101
  var SettingsComponentWithContext = function SettingsComponentWithContext(props) {
133
102
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(SettingsContextProvider, {
134
103
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SettingsComponent, _objectSpread({}, props))
135
104
  });
136
105
  };
137
-
138
106
  return {
139
107
  isLoading: isLoading,
140
108
  pageList: pageList,
@@ -142,6 +110,5 @@ var useSettings = function useSettings(_ref) {
142
110
  SettingsContextProvider: SettingsContextProvider
143
111
  };
144
112
  };
145
-
146
113
  var _default = useSettings;
147
114
  exports.default = _default;
@@ -21,11 +21,7 @@ Object.defineProperty(exports, "useTypedownToggle", {
21
21
  return _useTypedownToggle.default;
22
22
  }
23
23
  });
24
-
25
24
  var _useTypedown = _interopRequireDefault(require("./useTypedown"));
26
-
27
25
  var _useTypedownToggle = _interopRequireDefault(require("./useTypedownToggle"));
28
-
29
26
  var _useTypedownData = _interopRequireDefault(require("./useTypedownData"));
30
-
31
27
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -4,30 +4,24 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  var _reactResizeDetector = require("react-resize-detector");
11
-
12
9
  var _components = require("@folio/stripes/components");
13
-
14
10
  var _eventCodes = require("../../constants/eventCodes");
15
-
16
11
  var _selectorSafe = _interopRequireDefault(require("../../utils/selectorSafe"));
17
-
18
12
  var _useTypedownToggle2 = _interopRequireDefault(require("./useTypedownToggle"));
19
-
20
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
14
  var useTypedown = function useTypedown(name) {
23
15
  // SEARCHFIELD COMPONENT
24
- var searchFieldComponent = document.getElementById("typedown-searchField-".concat((0, _selectorSafe.default)(name))); // SET UP REFS
16
+ var searchFieldComponent = document.getElementById("typedown-searchField-".concat((0, _selectorSafe.default)(name)));
25
17
 
18
+ // SET UP REFS
26
19
  var listRef = (0, _react.useRef)();
27
20
  var triggerRef = (0, _react.useRef)();
28
21
  var overlayRef = (0, _react.useRef)();
29
22
  var footerRef = (0, _react.useRef)();
30
- var footer = document.getElementById("typedown-footer-".concat((0, _selectorSafe.default)(name))); // Add an event listener to the footer, so that we can control tab behaviour between footer elements
23
+ var footer = document.getElementById("typedown-footer-".concat((0, _selectorSafe.default)(name)));
24
+ // Add an event listener to the footer, so that we can control tab behaviour between footer elements
31
25
 
32
26
  if (footer && footer.getAttribute('hasListener') !== 'true') {
33
27
  footer.addEventListener('keydown', function (e) {
@@ -37,7 +31,6 @@ var useTypedown = function useTypedown(name) {
37
31
  e.preventDefault();
38
32
  var focusFunc = e.shiftKey ? _components.getPreviousFocusable : _components.getNextFocusable;
39
33
  var elem = focusFunc(footerRef.current, true, true, false, true);
40
-
41
34
  if (elem) {
42
35
  // Focus on next focusable element
43
36
  elem.focus();
@@ -51,32 +44,28 @@ var useTypedown = function useTypedown(name) {
51
44
  }
52
45
  });
53
46
  footer.setAttribute('hasListener', 'true');
54
- } // SET UP HANDLERS
55
-
47
+ }
56
48
 
49
+ // SET UP HANDLERS
57
50
  var searchFieldKeyDownHandler = function searchFieldKeyDownHandler(e) {
58
51
  if (e.code === _eventCodes.UP_ARROW) {
59
52
  var elem = (0, _components.getLastFocusable)(listRef.current, true, true);
60
-
61
53
  if (elem) {
62
54
  elem.focus();
63
55
  }
64
56
  }
65
-
66
57
  if (e.code === _eventCodes.DOWN_ARROW) {
67
58
  var _elem = (0, _components.getFirstFocusable)(listRef.current, true, true);
68
-
69
59
  if (_elem) {
70
60
  _elem.focus();
71
61
  }
72
- } // Tab key (But not while shifting)
73
-
62
+ }
74
63
 
64
+ // Tab key (But not while shifting)
75
65
  if (e.code === _eventCodes.TAB && !e.shiftKey) {
76
- e.preventDefault(); // If we have focusable elements in the footer, then focus on them, else unfocus searchbar
77
-
66
+ e.preventDefault();
67
+ // If we have focusable elements in the footer, then focus on them, else unfocus searchbar
78
68
  var _elem2 = (0, _components.getNextFocusable)(footerRef.current, true, true, true, true);
79
-
80
69
  if (_elem2) {
81
70
  _elem2.focus();
82
71
  } else {
@@ -84,24 +73,18 @@ var useTypedown = function useTypedown(name) {
84
73
  }
85
74
  }
86
75
  };
87
-
88
76
  var listKeyDownHandler = function listKeyDownHandler(e) {
89
77
  if (e.code === _eventCodes.DOWN_ARROW) {
90
78
  var elem = (0, _components.getNextFocusable)(listRef.current, true, true);
91
79
  elem.focus();
92
80
  }
93
-
94
81
  if (e.code === _eventCodes.UP_ARROW) {
95
82
  var _elem3 = (0, _components.getPreviousFocusable)(listRef.current, true, true);
96
-
97
83
  _elem3.focus();
98
84
  }
99
-
100
85
  if (e.code === _eventCodes.TAB) {
101
86
  e.preventDefault();
102
-
103
87
  var _elem4;
104
-
105
88
  if (!e.shiftKey && !footerRef.current) {
106
89
  _elem4 = (0, _components.getNextFocusable)(searchFieldComponent, false);
107
90
  } else if (!e.shiftKey) {
@@ -109,25 +92,23 @@ var useTypedown = function useTypedown(name) {
109
92
  } else {
110
93
  _elem4 = searchFieldComponent;
111
94
  }
112
-
113
95
  _elem4.focus();
114
96
  }
115
97
  };
116
-
117
98
  var handleNextFocus = function handleNextFocus() {
118
99
  return (0, _components.getNextFocusable)(searchFieldComponent, false).focus();
119
- }; // SET UP VARIABLES
120
-
100
+ };
121
101
 
102
+ // SET UP VARIABLES
122
103
  var _useTypedownToggle = (0, _useTypedownToggle2.default)(name),
123
- open = _useTypedownToggle.open; // RESIZE STUFF
124
-
104
+ open = _useTypedownToggle.open;
125
105
 
106
+ // RESIZE STUFF
126
107
  var _useResizeDetector = (0, _reactResizeDetector.useResizeDetector)(),
127
- searchWidth = _useResizeDetector.width,
128
- resizeRef = _useResizeDetector.ref; // OVERLAY PORTAL
129
-
108
+ searchWidth = _useResizeDetector.width,
109
+ resizeRef = _useResizeDetector.ref;
130
110
 
111
+ // OVERLAY PORTAL
131
112
  var portal = document.getElementById('OverlayContainer');
132
113
  return {
133
114
  refs: {
@@ -149,6 +130,5 @@ var useTypedown = function useTypedown(name) {
149
130
  }
150
131
  };
151
132
  };
152
-
153
133
  var _default = useTypedown;
154
134
  exports.default = _default;
@@ -4,48 +4,35 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  var _reactQuery = require("react-query");
11
-
12
9
  var _core = require("@folio/stripes/core");
13
-
14
10
  var _utils = require("../../utils");
15
-
16
11
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
17
-
18
12
  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."); }
19
-
20
13
  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); }
21
-
22
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; }
23
-
24
15
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
25
-
26
16
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
-
28
17
  var useTypedownData = function useTypedownData(path, callPath) {
29
18
  var ky = (0, _core.useOkapiKy)();
30
19
  var queryKey = (0, _utils.typedownQueryKey)(path);
31
-
32
20
  if (callPath) {
33
21
  queryKey.push(callPath);
34
22
  }
35
-
36
- var _useQuery = (0, _reactQuery.useQuery)( // Ensure when multiple apps are using this function that each one gets memoized individually
37
- queryKey, function () {
38
- return ky(callPath).json();
39
- }),
40
- data = _useQuery.data,
41
- isLoading = _useQuery.isLoading; // Smooth out transitions while data changes by only displaying once call has been loaded.
42
-
43
-
23
+ var _useQuery = (0, _reactQuery.useQuery)(
24
+ // Ensure when multiple apps are using this function that each one gets memoized individually
25
+ queryKey, function () {
26
+ return ky(callPath).json();
27
+ }),
28
+ data = _useQuery.data,
29
+ isLoading = _useQuery.isLoading;
30
+
31
+ // Smooth out transitions while data changes by only displaying once call has been loaded.
44
32
  var _useState = (0, _react.useState)(),
45
- _useState2 = _slicedToArray(_useState, 2),
46
- contentData = _useState2[0],
47
- setContentData = _useState2[1];
48
-
33
+ _useState2 = _slicedToArray(_useState, 2),
34
+ contentData = _useState2[0],
35
+ setContentData = _useState2[1];
49
36
  (0, _react.useEffect)(function () {
50
37
  if (!isLoading) {
51
38
  setContentData(data);
@@ -53,6 +40,5 @@ var useTypedownData = function useTypedownData(path, callPath) {
53
40
  }, [data, isLoading]);
54
41
  return contentData;
55
42
  };
56
-
57
43
  var _default = useTypedownData;
58
44
  exports.default = _default;
@@ -4,41 +4,28 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  var _useActiveElement2 = _interopRequireDefault(require("../useActiveElement"));
11
-
12
9
  var _selectorSafe = _interopRequireDefault(require("../../utils/selectorSafe"));
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
17
-
18
12
  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."); }
19
-
20
13
  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); }
21
-
22
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; }
23
-
24
15
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
25
-
26
16
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
-
28
17
  var useTypedownToggle = function useTypedownToggle(name) {
29
18
  var _useState = (0, _react.useState)(false),
30
- _useState2 = _slicedToArray(_useState, 2),
31
- open = _useState2[0],
32
- setOpen = _useState2[1];
33
-
19
+ _useState2 = _slicedToArray(_useState, 2),
20
+ open = _useState2[0],
21
+ setOpen = _useState2[1];
34
22
  var onToggle = (0, _react.useCallback)(function () {
35
23
  setOpen(!open);
36
24
  }, [open, setOpen]);
37
-
38
25
  var _useActiveElement = (0, _useActiveElement2.default)(),
39
- hasParent = _useActiveElement.hasParent; // Trawl up element stack and check if a typedown-parent exists, use that to toggle
40
-
26
+ hasParent = _useActiveElement.hasParent;
41
27
 
28
+ // Trawl up element stack and check if a typedown-parent exists, use that to toggle
42
29
  var openBool = !open && hasParent("typedown-parent-".concat((0, _selectorSafe.default)(name)));
43
30
  var closeBool = open && !hasParent("typedown-parent-".concat((0, _selectorSafe.default)(name)));
44
31
  (0, _react.useEffect)(function () {
@@ -51,6 +38,5 @@ var useTypedownToggle = function useTypedownToggle(name) {
51
38
  onToggle: onToggle
52
39
  };
53
40
  };
54
-
55
41
  var _default = useTypedownToggle;
56
42
  exports.default = _default;
@@ -4,35 +4,24 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
-
12
9
  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."); }
13
-
14
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); }
15
-
16
11
  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; }
17
-
18
12
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
19
-
20
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
-
22
14
  var useActiveElement = function useActiveElement() {
23
15
  var _useState = (0, _react.useState)(document.activeElement),
24
- _useState2 = _slicedToArray(_useState, 2),
25
- active = _useState2[0],
26
- setActive = _useState2[1];
27
-
16
+ _useState2 = _slicedToArray(_useState, 2),
17
+ active = _useState2[0],
18
+ setActive = _useState2[1];
28
19
  var handleFocusIn = function handleFocusIn() {
29
20
  setActive(document.activeElement);
30
21
  };
31
-
32
22
  var hasParent = function hasParent(id) {
33
23
  return active.closest("[id^=".concat(id, "]")) !== null;
34
24
  };
35
-
36
25
  (0, _react.useEffect)(function () {
37
26
  document.addEventListener('focusin', handleFocusIn);
38
27
  return function () {
@@ -44,6 +33,5 @@ var useActiveElement = function useActiveElement() {
44
33
  hasParent: hasParent
45
34
  };
46
35
  };
47
-
48
36
  var _default = useActiveElement;
49
37
  exports.default = _default;
@@ -4,47 +4,30 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  var _reactIntl = require("react-intl");
11
-
12
9
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
13
-
14
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."); }
15
-
16
11
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
17
-
18
12
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
19
-
20
13
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
21
-
22
14
  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."); }
23
-
24
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); }
25
-
26
16
  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; }
27
-
28
17
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
29
-
30
18
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
31
-
32
19
  var useAvailableCustomProperties = function useAvailableCustomProperties() {
33
20
  var customProperties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
34
21
  var intl = (0, _reactIntl.useIntl)();
35
-
36
22
  var _useState = (0, _react.useState)([]),
37
- _useState2 = _slicedToArray(_useState, 2),
38
- custProps = _useState2[0],
39
- setCustProps = _useState2[1];
40
-
23
+ _useState2 = _slicedToArray(_useState, 2),
24
+ custProps = _useState2[0],
25
+ setCustProps = _useState2[1];
41
26
  (0, _react.useEffect)(function () {
42
27
  if (customProperties.length !== custProps.length) {
43
28
  setCustProps(customProperties.map(function (customProperty) {
44
29
  var _customProperty$categ;
45
-
46
30
  var options = customProperty === null || customProperty === void 0 ? void 0 : (_customProperty$categ = customProperty.category) === null || _customProperty$categ === void 0 ? void 0 : _customProperty$categ.values;
47
-
48
31
  if (options) {
49
32
  options = [{
50
33
  label: intl.formatMessage({
@@ -53,7 +36,6 @@ var useAvailableCustomProperties = function useAvailableCustomProperties() {
53
36
  value: ''
54
37
  }].concat(_toConsumableArray(options));
55
38
  }
56
-
57
39
  return {
58
40
  description: customProperty.description,
59
41
  label: customProperty.label,
@@ -68,6 +50,5 @@ var useAvailableCustomProperties = function useAvailableCustomProperties() {
68
50
  }, [custProps, customProperties, intl]);
69
51
  return custProps;
70
52
  };
71
-
72
53
  var _default = useAvailableCustomProperties;
73
54
  exports.default = _default;
@@ -4,37 +4,27 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
-
10
8
  var _reactQuery = require("react-query");
11
-
12
9
  var _core = require("@folio/stripes/core");
13
-
14
10
  var _utils = require("../utils");
15
-
16
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
12
  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; }
19
-
20
13
  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; }
21
-
22
14
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
-
24
15
  var useCustomProperties = function useCustomProperties(_ref) {
25
16
  var endpoint = _ref.endpoint,
26
- ctx = _ref.ctx,
27
- _ref$nsValues = _ref.nsValues,
28
- nsValues = _ref$nsValues === void 0 ? {
29
- sort: 'id'
30
- } : _ref$nsValues,
31
- _ref$options = _ref.options,
32
- options = _ref$options === void 0 ? {} : _ref$options,
33
- queryParams = _ref.queryParams,
34
- _ref$returnQueryObjec = _ref.returnQueryObject,
35
- returnQueryObject = _ref$returnQueryObjec === void 0 ? false : _ref$returnQueryObjec;
17
+ ctx = _ref.ctx,
18
+ _ref$nsValues = _ref.nsValues,
19
+ nsValues = _ref$nsValues === void 0 ? {
20
+ sort: 'id'
21
+ } : _ref$nsValues,
22
+ _ref$options = _ref.options,
23
+ options = _ref$options === void 0 ? {} : _ref$options,
24
+ queryParams = _ref.queryParams,
25
+ _ref$returnQueryObjec = _ref.returnQueryObject,
26
+ returnQueryObject = _ref$returnQueryObjec === void 0 ? false : _ref$returnQueryObjec;
36
27
  var ky = (0, _core.useOkapiKy)();
37
-
38
28
  var custPropOptions = _objectSpread({
39
29
  searchKey: 'label,name,description',
40
30
  filterKeys: {
@@ -49,9 +39,9 @@ var useCustomProperties = function useCustomProperties(_ref) {
49
39
  stats: false,
50
40
  max: 100
51
41
  }, options);
52
-
53
42
  if (Array.isArray(ctx)) {
54
43
  // If we have an array, append a context filter for each ctx given
44
+
55
45
  // Special case if one is isNull
56
46
  custPropOptions.filters.push({
57
47
  values: ctx.map(function (c) {
@@ -69,21 +59,17 @@ var useCustomProperties = function useCustomProperties(_ref) {
69
59
  value: ctx
70
60
  });
71
61
  }
72
-
73
62
  var query = (0, _utils.generateKiwtQuery)(custPropOptions, nsValues);
74
63
  var path = "".concat(endpoint).concat(query);
75
64
  var queryObject = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useCustomProperties', 'custprops', ctx, path], function () {
76
65
  return ky(path).json();
77
66
  }, queryParams);
78
-
79
67
  if (returnQueryObject) {
80
68
  return queryObject || {};
81
69
  }
82
-
83
70
  var custprops = queryObject.data;
84
71
  return custprops || [];
85
72
  };
86
-
87
73
  useCustomProperties.propTypes = {
88
74
  endpoint: _propTypes.default.string,
89
75
  ctx: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),