@k-int/stripes-kint-components 2.8.3 → 2.8.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 (313) hide show
  1. package/CHANGELOG.md +3 -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 +5 -23
  138. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +48 -282
  139. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +9 -9
  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 +39 -171
  142. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +53 -272
  143. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +74 -293
  144. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +54 -126
  145. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +56 -41
  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 +5 -23
  149. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +42 -54
  150. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +54 -216
  151. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +37 -319
  152. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +68 -41
  153. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +53 -53
  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 +3077 -74
  156. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +45 -45
  157. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +64 -103
  158. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +63 -54
  159. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +16 -49
  160. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +18 -69
  161. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +81 -81
  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 +786 -33
  164. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +45 -45
  165. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +6 -6
  166. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +28 -43
  167. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +2 -20
  168. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +39 -45
  169. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +74 -53
  170. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +24 -24
  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 +32 -86
  179. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +3 -3
  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 +37 -109
  182. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +3 -3
  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 +14 -41
  185. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +6 -45
  186. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +11 -47
  187. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +14 -65
  188. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +31 -154
  189. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +26 -26
  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 +18 -18
  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 +17 -35
  194. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +15 -15
  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 +14 -41
  200. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +7 -7
  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 +6 -48
  203. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +7 -7
  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 +3 -3
  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 +82 -22
  216. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +3 -3
  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 +7 -52
  220. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +4 -31
  221. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +3 -3
  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 +7 -7
  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 +1 -1
  226. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
  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 +1 -1
  229. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
  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 +27 -24
  235. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +17 -47
  236. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +22 -22
  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 +106 -136
  248. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +3 -9
  249. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +25 -25
  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 +7 -7
  252. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +7 -7
  253. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +22 -61
  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 +7 -7
  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 +37 -37
  262. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
  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 +7 -7
  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 +7 -7
  268. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +9 -9
  269. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +7 -7
  270. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +7 -7
  271. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +7 -7
  272. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +7 -7
  273. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +7 -7
  274. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +9 -9
  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 +7 -7
  277. package/src/artifacts/coverage-jest/lcov-report/index.html +129 -144
  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 +16 -16
  280. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +66 -66
  281. package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +7 -7
  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 +55 -40
  284. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +3 -33
  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 +3 -3
  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 +80 -128
  295. package/src/artifacts/coverage-jest/lcov.info +2284 -2232
  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/en_GB.json +1 -0
  302. package/translations/stripes-kint-components/en_SE.json +1 -0
  303. package/translations/stripes-kint-components/es_419.json +122 -0
  304. package/translations/stripes-kint-components/es_ES.json +122 -0
  305. package/translations/stripes-kint-components/fr.json +105 -1
  306. package/translations/stripes-kint-components/fr_FR.json +105 -0
  307. package/translations/stripes-kint-components/hu.json +12 -12
  308. package/translations/stripes-kint-components/it_IT.json +6 -6
  309. package/translations/stripes-kint-components/pt_PT.json +6 -6
  310. package/translations/stripes-kint-components/ru.json +1 -1
  311. package/translations/stripes-kint-components/sv.json +7 -7
  312. package/translations/stripes-kint-components/zh_TW.json +122 -0
  313. package/yarn-error.log +147 -0
@@ -1,72 +1,42 @@
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 _reactIntl = require("react-intl");
15
-
16
11
  var _get = _interopRequireDefault(require("lodash/get"));
17
-
18
12
  var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
19
-
20
13
  var _reactFinalForm = require("react-final-form");
21
-
22
14
  var _components = require("@folio/stripes/components");
23
-
24
15
  var _ActionListFieldArray = _interopRequireDefault(require("../../../styles/ActionListFieldArray.css"));
25
-
26
16
  var _jsxRuntime = require("react/jsx-runtime");
27
-
28
17
  var _excluded = ["actionAssigner", "actionCalls", "columnMapping", "creatableFields", "createCallback", "defaultNewObject", "editableFields", "fields", "fieldComponents", "hideCreateButton", "label", "validateFields", "visibleFields", "triggerFormSubmit"],
29
- _excluded2 = ["actionListActions", "fieldName", "fieldIndex"],
30
- _excluded3 = ["actionListActions", "fieldName", "fieldIndex"],
31
- _excluded4 = ["actionListActions"],
32
- _excluded5 = ["formatter"];
33
-
18
+ _excluded2 = ["actionListActions", "fieldName", "fieldIndex"],
19
+ _excluded3 = ["actionListActions", "fieldName", "fieldIndex"],
20
+ _excluded4 = ["actionListActions"],
21
+ _excluded5 = ["formatter"];
34
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
-
36
23
  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); }
37
-
38
24
  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; }
39
-
40
25
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
41
-
42
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."); }
43
-
44
27
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
45
-
46
28
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
47
-
48
29
  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; }
49
-
50
30
  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; }
51
-
52
31
  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; }
53
-
54
32
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
55
-
56
33
  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."); }
57
-
58
34
  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); }
59
-
60
35
  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; }
61
-
62
36
  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; }
63
-
64
37
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
65
-
66
38
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
67
-
68
39
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
69
-
70
40
  var EDITING_ACTIONS_WIDTH = 25;
71
41
  var NON_EDITING_ACTIONS_WIDTH = 20;
72
42
  var TOTAL_WIDTH = 100;
@@ -89,44 +59,40 @@ var propTypes = {
89
59
  };
90
60
  var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
91
61
  var actionAssigner = _ref.actionAssigner,
92
- actionCalls = _ref.actionCalls,
93
- columnMapping = _ref.columnMapping,
94
- creatableFields = _ref.creatableFields,
95
- createCallback = _ref.createCallback,
96
- defaultNewObject = _ref.defaultNewObject,
97
- editableFields = _ref.editableFields,
98
- fields = _ref.fields,
99
- fieldComponents = _ref.fieldComponents,
100
- _ref$hideCreateButton = _ref.hideCreateButton,
101
- hideCreateButton = _ref$hideCreateButton === void 0 ? false : _ref$hideCreateButton,
102
- label = _ref.label,
103
- validateFields = _ref.validateFields,
104
- visibleFields = _ref.visibleFields,
105
- triggerFormSubmit = _ref.triggerFormSubmit,
106
- mclProps = _objectWithoutProperties(_ref, _excluded);
107
-
62
+ actionCalls = _ref.actionCalls,
63
+ columnMapping = _ref.columnMapping,
64
+ creatableFields = _ref.creatableFields,
65
+ createCallback = _ref.createCallback,
66
+ defaultNewObject = _ref.defaultNewObject,
67
+ editableFields = _ref.editableFields,
68
+ fields = _ref.fields,
69
+ fieldComponents = _ref.fieldComponents,
70
+ _ref$hideCreateButton = _ref.hideCreateButton,
71
+ hideCreateButton = _ref$hideCreateButton === void 0 ? false : _ref$hideCreateButton,
72
+ label = _ref.label,
73
+ validateFields = _ref.validateFields,
74
+ visibleFields = _ref.visibleFields,
75
+ triggerFormSubmit = _ref.triggerFormSubmit,
76
+ mclProps = _objectWithoutProperties(_ref, _excluded);
108
77
  // Grab finalForm functions/values from form hooks
109
78
  var _useForm = (0, _reactFinalForm.useForm)(),
110
- change = _useForm.change;
111
-
79
+ change = _useForm.change;
112
80
  var _useFormState = (0, _reactFinalForm.useFormState)(),
113
- hasValidationErrors = _useFormState.hasValidationErrors,
114
- initialValues = _useFormState.initialValues,
115
- pristine = _useFormState.pristine,
116
- submitting = _useFormState.submitting,
117
- values = _useFormState.values;
81
+ hasValidationErrors = _useFormState.hasValidationErrors,
82
+ initialValues = _useFormState.initialValues,
83
+ pristine = _useFormState.pristine,
84
+ submitting = _useFormState.submitting,
85
+ values = _useFormState.values;
86
+
118
87
  /*
119
88
  Keep track of which field we are editing.
120
89
  null for no field, string id if we are editing an existing field and
121
90
  'NEW_ROW' for a new row
122
91
  */
123
-
124
-
125
92
  var _useState = (0, _react.useState)(null),
126
- _useState2 = _slicedToArray(_useState, 2),
127
- editing = _useState2[0],
128
- setEditing = _useState2[1];
129
-
93
+ _useState2 = _slicedToArray(_useState, 2),
94
+ editing = _useState2[0],
95
+ setEditing = _useState2[1];
130
96
  var toggleEditing = function toggleEditing(id) {
131
97
  if (editing) {
132
98
  setEditing(null);
@@ -134,21 +100,18 @@ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
134
100
  setEditing(id);
135
101
  }
136
102
  };
137
-
138
103
  var handleSave = function handleSave(index) {
139
104
  var _actionAssigner, _actionAssigner$find;
140
-
141
105
  var _fields$value$index = fields.value[index],
142
- _a = _fields$value$index.actionListActions,
143
- _fn = _fields$value$index.fieldName,
144
- _fi = _fields$value$index.fieldIndex,
145
- rowData = _objectWithoutProperties(_fields$value$index, _excluded2); // Find "edit" entry in actionAssigner
146
-
106
+ _a = _fields$value$index.actionListActions,
107
+ _fn = _fields$value$index.fieldName,
108
+ _fi = _fields$value$index.fieldIndex,
109
+ rowData = _objectWithoutProperties(_fields$value$index, _excluded2);
147
110
 
111
+ // Find "edit" entry in actionAssigner
148
112
  var editCallback = (_actionAssigner = actionAssigner(rowData)) === null || _actionAssigner === void 0 ? void 0 : (_actionAssigner$find = _actionAssigner.find(function (act) {
149
113
  return act.name === 'edit';
150
114
  })) === null || _actionAssigner$find === void 0 ? void 0 : _actionAssigner$find.callback;
151
-
152
115
  if (editCallback) {
153
116
  editCallback(rowData);
154
117
  } else {
@@ -158,11 +121,10 @@ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
158
121
 
159
122
  var handleCreate = function handleCreate(index) {
160
123
  var _fields$value$index2 = fields.value[index],
161
- _a = _fields$value$index2.actionListActions,
162
- _fn = _fields$value$index2.fieldName,
163
- _fi = _fields$value$index2.fieldIndex,
164
- rowData = _objectWithoutProperties(_fields$value$index2, _excluded3);
165
-
124
+ _a = _fields$value$index2.actionListActions,
125
+ _fn = _fields$value$index2.fieldName,
126
+ _fi = _fields$value$index2.fieldIndex,
127
+ rowData = _objectWithoutProperties(_fields$value$index2, _excluded3);
166
128
  if (createCallback) {
167
129
  createCallback(rowData);
168
130
  } else {
@@ -173,16 +135,15 @@ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
173
135
  var handleClickCreate = function handleClickCreate() {
174
136
  toggleEditing('NEW_ROW');
175
137
  fields.unshift(defaultNewObject);
176
- }; // Way to go into create mode from external component, and way to tell internal editing state
177
-
138
+ };
178
139
 
140
+ // Way to go into create mode from external component, and way to tell internal editing state
179
141
  (0, _react.useImperativeHandle)(ref, function () {
180
142
  return {
181
143
  create: handleClickCreate,
182
144
  editing: editing
183
145
  };
184
146
  });
185
-
186
147
  var getColumnWidths = function getColumnWidths() {
187
148
  var widthNotInUseByActions = editing ? TOTAL_WIDTH - EDITING_ACTIONS_WIDTH : TOTAL_WIDTH - NON_EDITING_ACTIONS_WIDTH;
188
149
  var staticWidth = widthNotInUseByActions / visibleFields.length;
@@ -195,13 +156,10 @@ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
195
156
  widthsObject.actionListActions = editing ? "".concat(EDITING_ACTIONS_WIDTH, "%") : "".concat(NON_EDITING_ACTIONS_WIDTH, "%");
196
157
  return widthsObject;
197
158
  };
198
-
199
159
  var renderActionButtons = function renderActionButtons(data) {
200
160
  var fieldName = "contentData[".concat(data.rowIndex, "]");
201
-
202
161
  var actions = data.actionListActions,
203
- rest = _objectWithoutProperties(data, _excluded4);
204
-
162
+ rest = _objectWithoutProperties(data, _excluded4);
205
163
  if (data.id === editing || !data.id && editing === 'NEW_ROW') {
206
164
  // Render the save/cancel buttons
207
165
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
@@ -218,7 +176,6 @@ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
218
176
  } else {
219
177
  handleSave(data.rowIndex);
220
178
  }
221
-
222
179
  toggleEditing(data.id);
223
180
  }
224
181
  },
@@ -244,35 +201,28 @@ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
244
201
  }, "cancel[".concat(data.rowIndex, "]"))]
245
202
  });
246
203
  }
247
-
248
204
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
249
205
  children: actions === null || actions === void 0 ? void 0 : actions.map(function (action) {
250
206
  var _action$label;
251
-
252
207
  var actionFunction;
253
-
254
208
  if (action.callback) {
255
209
  actionFunction = function actionFunction() {
256
210
  return action.callback(rest);
257
211
  };
258
212
  }
259
-
260
213
  if (!actionFunction && actionCalls[action.name]) {
261
214
  actionFunction = function actionFunction() {
262
215
  return actionCalls[action.name](rest);
263
216
  }; // DEPRECATED
217
+ }
264
218
 
265
- } // Edit has special action functionality, revealing fields etc.
266
-
267
-
219
+ // Edit has special action functionality, revealing fields etc.
268
220
  if (action.name === 'edit') {
269
221
  actionFunction = function actionFunction() {
270
222
  return toggleEditing(data.id);
271
223
  };
272
224
  }
273
-
274
225
  var ariaLabel = "action-".concat(action.name, "[").concat(data.rowIndex, "]");
275
-
276
226
  if (action !== null && action !== void 0 && action.ariaLabel) {
277
227
  if (typeof action.ariaLabel === 'function') {
278
228
  ariaLabel = action.ariaLabel(data);
@@ -281,9 +231,9 @@ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
281
231
  } else {
282
232
  throw new Error("Provided ariaLabel for action \"".concat(action.name, "\" must be a function or a string."));
283
233
  }
284
- } // If we're handed an icon, use that for the action button
285
-
234
+ }
286
235
 
236
+ // If we're handed an icon, use that for the action button
287
237
  if (action.icon) {
288
238
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.IconButton, {
289
239
  ariaLabel: ariaLabel,
@@ -296,9 +246,9 @@ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
296
246
  },
297
247
  to: action.to
298
248
  }, "action-".concat(action.name, "[").concat(data.rowIndex, "]"));
299
- } // Else return a button with the label, or failing that the name of the action
300
-
249
+ }
301
250
 
251
+ // Else return a button with the label, or failing that the name of the action
302
252
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
303
253
  ariaLabel: ariaLabel,
304
254
  disabled: editing,
@@ -314,7 +264,6 @@ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
314
264
  })
315
265
  });
316
266
  };
317
-
318
267
  var assignActions = function assignActions() {
319
268
  return fields.map(function (fieldName, fieldIndex) {
320
269
  // Fetch the content from the field Values
@@ -326,26 +275,25 @@ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
326
275
  });
327
276
  });
328
277
  };
329
-
330
278
  var formatter = mclProps.formatter,
331
- restOfMclProps = _objectWithoutProperties(mclProps, _excluded5); // Destructure formatter part of mclProps
332
-
333
-
279
+ restOfMclProps = _objectWithoutProperties(mclProps, _excluded5); // Destructure formatter part of mclProps
334
280
  var fieldAwareFormatter = function fieldAwareFormatter() {
335
- var returnObj = {}; // For each visible field, if it's being edited then ignore passed formatters, else use them
336
- // Track whether we've autoFocused on a field yet
281
+ var returnObj = {};
282
+ // For each visible field, if it's being edited then ignore passed formatters, else use them
337
283
 
284
+ // Track whether we've autoFocused on a field yet
338
285
  var autoFocus = true;
339
286
  visibleFields.forEach(function (key) {
340
287
  returnObj[key] = function (cd) {
341
288
  // Row is being edited if it has no id, or its id is in the editing string
342
- var editingRow = cd.id === editing || !cd.id; // Default to the passed formatter values
289
+ var editingRow = cd.id === editing || !cd.id;
343
290
 
344
- var returnValue = formatter !== null && formatter !== void 0 && formatter[key] ? formatter[key](cd) : cd[key]; // If editing, replace values with fields
291
+ // Default to the passed formatter values
292
+ var returnValue = formatter !== null && formatter !== void 0 && formatter[key] ? formatter[key](cd) : cd[key];
345
293
 
294
+ // If editing, replace values with fields
346
295
  if (editingRow) {
347
296
  var _editableFields$key, _creatableFields$key;
348
-
349
297
  /*
350
298
  Check if the property is a visible field.
351
299
  If it is not then we don't allow editing in this component.
@@ -363,7 +311,6 @@ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
363
311
  For both checks
364
312
  true => Field, false => display value
365
313
  */
366
-
367
314
  if (!cd.id && createFunction(cd) || !!cd.id && editFunction(cd)) {
368
315
  var validateFunction = validateFields !== null && validateFields !== void 0 && validateFields[key] ? validateFields === null || validateFields === void 0 ? void 0 : validateFields[key](cd) : null;
369
316
  returnValue = fieldComponents[key] ? fieldComponents[key]({
@@ -377,18 +324,16 @@ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, r
377
324
  return v;
378
325
  },
379
326
  validate: validateFunction
380
- }); // After first field, every other field should not autofocus
381
-
327
+ });
328
+ // After first field, every other field should not autofocus
382
329
  autoFocus = false;
383
330
  }
384
331
  }
385
-
386
332
  return returnValue;
387
333
  };
388
334
  });
389
335
  return returnObj;
390
336
  };
391
-
392
337
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
393
338
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
394
339
  className: _ActionListFieldArray.default.header,
@@ -9,7 +9,5 @@ Object.defineProperty(exports, "default", {
9
9
  return _ActionList.default;
10
10
  }
11
11
  });
12
-
13
12
  var _ActionList = _interopRequireDefault(require("./ActionList"));
14
-
15
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -4,96 +4,69 @@ 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 _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  var _reactIntl = require("react-intl");
13
-
14
10
  var _components = require("@folio/stripes/components");
15
-
16
11
  var _reactFinalForm = require("react-final-form");
17
-
18
12
  var _SearchField = _interopRequireDefault(require("../../SearchField"));
19
-
20
13
  var _hooks = require("../../hooks");
21
-
22
14
  var _CustomProperties = _interopRequireDefault(require("../../../../styles/CustomProperties.css"));
23
-
24
15
  var _jsxRuntime = require("react/jsx-runtime");
25
-
26
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
-
28
17
  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; }
29
-
30
18
  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; }
31
-
32
19
  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; }
33
-
34
20
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
35
-
36
21
  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."); }
37
-
38
22
  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); }
39
-
40
23
  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; }
41
-
42
24
  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; }
43
-
44
25
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
-
46
26
  var CustomPropertiesLookup = function CustomPropertiesLookup(_ref) {
47
27
  var _labelOverrides$label, _labelOverrides$prima, _labelOverrides$ctx, _labelOverrides$weigh, _labelOverrides$type, _labelOverrides$categ;
48
-
49
28
  var contextFilterOptions = _ref.contextFilterOptions,
50
- endpoint = _ref.customPropertiesEndpoint,
51
- _ref$labelOverrides = _ref.labelOverrides,
52
- labelOverrides = _ref$labelOverrides === void 0 ? {} : _ref$labelOverrides,
53
- mclProps = _ref.mclProps,
54
- onSelectCustomProperty = _ref.onSelectCustomProperty,
55
- queryParams = _ref.queryParams;
56
-
29
+ endpoint = _ref.customPropertiesEndpoint,
30
+ _ref$labelOverrides = _ref.labelOverrides,
31
+ labelOverrides = _ref$labelOverrides === void 0 ? {} : _ref$labelOverrides,
32
+ mclProps = _ref.mclProps,
33
+ onSelectCustomProperty = _ref.onSelectCustomProperty,
34
+ queryParams = _ref.queryParams;
57
35
  var _useState = (0, _react.useState)({
58
- sort: 'label'
59
- }),
60
- _useState2 = _slicedToArray(_useState, 2),
61
- nsValues = _useState2[0],
62
- setNsValues = _useState2[1];
63
-
36
+ sort: 'label'
37
+ }),
38
+ _useState2 = _slicedToArray(_useState, 2),
39
+ nsValues = _useState2[0],
40
+ setNsValues = _useState2[1];
64
41
  var _useState3 = (0, _react.useState)(),
65
- _useState4 = _slicedToArray(_useState3, 2),
66
- selectedContext = _useState4[0],
67
- setSelectedContext = _useState4[1];
68
-
42
+ _useState4 = _slicedToArray(_useState3, 2),
43
+ selectedContext = _useState4[0],
44
+ setSelectedContext = _useState4[1];
69
45
  var _useCustomProperties = (0, _hooks.useCustomProperties)({
70
- endpoint: endpoint,
71
- nsValues: nsValues,
72
- queryParams: queryParams,
73
- returnQueryObject: true,
74
- ctx: selectedContext,
75
- options: {
76
- sort: [{
77
- path: 'ctx'
78
- }, {
79
- path: 'weight'
80
- }]
81
- }
82
- }),
83
- custprops = _useCustomProperties.data,
84
- isLoading = _useCustomProperties.isLoading;
85
-
46
+ endpoint: endpoint,
47
+ nsValues: nsValues,
48
+ queryParams: queryParams,
49
+ returnQueryObject: true,
50
+ ctx: selectedContext,
51
+ options: {
52
+ sort: [{
53
+ path: 'ctx'
54
+ }, {
55
+ path: 'weight'
56
+ }]
57
+ }
58
+ }),
59
+ custprops = _useCustomProperties.data,
60
+ isLoading = _useCustomProperties.isLoading;
86
61
  var handleSearch = function handleSearch(query) {
87
62
  setNsValues(_objectSpread(_objectSpread({}, nsValues), {}, {
88
63
  query: query
89
64
  }));
90
65
  };
91
-
92
66
  var _useState5 = (0, _react.useState)(''),
93
- _useState6 = _slicedToArray(_useState5, 2),
94
- searchTerm = _useState6[0],
95
- setSearchTerm = _useState6[1];
96
-
67
+ _useState6 = _slicedToArray(_useState5, 2),
68
+ searchTerm = _useState6[0],
69
+ setSearchTerm = _useState6[1];
97
70
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
98
71
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Form, {
99
72
  enableReinitialize: true,
@@ -103,7 +76,6 @@ var CustomPropertiesLookup = function CustomPropertiesLookup(_ref) {
103
76
  },
104
77
  children: function children(_ref2) {
105
78
  var _labelOverrides$searc;
106
-
107
79
  var handleSubmit = _ref2.handleSubmit;
108
80
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("form", {
109
81
  className: _CustomProperties.default.lookupSearchContainer,
@@ -177,14 +149,12 @@ var CustomPropertiesLookup = function CustomPropertiesLookup(_ref) {
177
149
  },
178
150
  type: function type(data) {
179
151
  var _labelOverrides$data$;
180
-
181
152
  return (_labelOverrides$data$ = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides[data === null || data === void 0 ? void 0 : data.type]) !== null && _labelOverrides$data$ !== void 0 ? _labelOverrides$data$ : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
182
153
  id: "stripes-kint-components.customProperties.type.".concat(data === null || data === void 0 ? void 0 : data.type)
183
154
  });
184
155
  },
185
156
  category: function category(data) {
186
157
  var _data$category;
187
-
188
158
  return data === null || data === void 0 ? void 0 : (_data$category = data.category) === null || _data$category === void 0 ? void 0 : _data$category.desc;
189
159
  }
190
160
  },
@@ -193,7 +163,6 @@ var CustomPropertiesLookup = function CustomPropertiesLookup(_ref) {
193
163
  }, mclProps))]
194
164
  });
195
165
  };
196
-
197
166
  CustomPropertiesLookup.propTypes = {
198
167
  contextFilterOptions: _propTypes.default.arrayOf(_propTypes.default.shape({
199
168
  value: _propTypes.default.string,
@@ -1,27 +1,16 @@
1
1
  "use strict";
2
2
 
3
3
  var _react = _interopRequireDefault(require("react"));
4
-
5
4
  require("@folio/stripes-erm-components/test/jest/__mock__");
6
-
7
5
  var _reactRouterDom = require("react-router-dom");
8
-
9
6
  var _helpers = require("../../../../test/jest/helpers");
10
-
11
7
  var _testResources = require("./testResources");
12
-
13
8
  var _CustomPropertiesLookup = _interopRequireDefault(require("./CustomPropertiesLookup"));
14
-
15
9
  var _jsxRuntime = require("react/jsx-runtime");
16
-
17
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
-
19
11
  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; }
20
-
21
12
  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
-
23
13
  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; }
24
-
25
14
  jest.mock('../../SearchField', function () {
26
15
  return function () {
27
16
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -40,14 +29,14 @@ describe('CustomPropertiesLookup', function () {
40
29
  });
41
30
  it('renders expected options', function () {
42
31
  var _renderComponent = renderComponent,
43
- getByText = _renderComponent.getByText;
32
+ getByText = _renderComponent.getByText;
44
33
  expect(getByText('All')).toBeInTheDocument();
45
34
  expect(getByText('OpenAccess')).toBeInTheDocument();
46
35
  expect(getByText('None')).toBeInTheDocument();
47
36
  });
48
37
  it('renders SearchField component ', function () {
49
38
  var _renderComponent2 = renderComponent,
50
- getByText = _renderComponent2.getByText;
39
+ getByText = _renderComponent2.getByText;
51
40
  expect(getByText('SearchField')).toBeInTheDocument();
52
41
  });
53
42
  });