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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/es/index.js +78 -79
  3. package/es/lib/ActionList/ActionList.js +38 -51
  4. package/es/lib/ActionList/ActionListFieldArray.js +159 -194
  5. package/es/lib/ActionList/index.js +1 -1
  6. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +59 -83
  7. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +15 -19
  8. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +124 -177
  9. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +30 -73
  10. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +93 -106
  11. package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +83 -129
  12. package/es/lib/CustomProperties/Config/CustomPropertyView.js +42 -43
  13. package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +48 -153
  14. package/es/lib/CustomProperties/Config/index.js +4 -4
  15. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +20 -23
  16. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +11 -16
  17. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +33 -32
  18. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +11 -16
  19. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +88 -111
  20. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +26 -69
  21. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +134 -134
  22. package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +95 -192
  23. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +46 -48
  24. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +23 -27
  25. package/es/lib/CustomProperties/Edit/index.js +5 -5
  26. package/es/lib/CustomProperties/Edit/testResources.js +14 -39
  27. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +64 -91
  28. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +23 -63
  29. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +53 -77
  30. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +17 -16
  31. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +34 -31
  32. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +18 -49
  33. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +19 -22
  34. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +23 -56
  35. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +44 -49
  36. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +77 -257
  37. package/es/lib/CustomProperties/Filter/index.js +6 -6
  38. package/es/lib/CustomProperties/Filter/testResources.js +13 -37
  39. package/es/lib/CustomProperties/Filter/useOperators.js +18 -18
  40. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +18 -33
  41. package/es/lib/CustomProperties/Filter/useValueProps.js +23 -29
  42. package/es/lib/CustomProperties/View/CustomPropertiesView.js +20 -23
  43. package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +11 -16
  44. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +63 -80
  45. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +14 -23
  46. package/es/lib/CustomProperties/View/CustomPropertyCard.js +25 -31
  47. package/es/lib/CustomProperties/View/index.js +3 -3
  48. package/es/lib/CustomProperties/View/testResources.js +5 -9
  49. package/es/lib/CustomProperties/index.js +18 -18
  50. package/es/lib/CycleButton/CycleButton.js +19 -35
  51. package/es/lib/CycleButton/index.js +1 -1
  52. package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +105 -164
  53. package/es/lib/EditableRefdataCategoryList/index.js +1 -1
  54. package/es/lib/EditableRefdataList/EditableRefdataList.js +119 -181
  55. package/es/lib/EditableRefdataList/index.js +1 -1
  56. package/es/lib/EditableSettingsList/EditableSettingsList.js +15 -13
  57. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +19 -26
  58. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +61 -96
  59. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +27 -41
  60. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +99 -83
  61. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +25 -30
  62. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +187 -299
  63. package/es/lib/EditableSettingsList/SettingField/SettingField.js +76 -111
  64. package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +51 -172
  65. package/es/lib/EditableSettingsList/SettingField/index.js +3 -3
  66. package/es/lib/EditableSettingsList/index.js +3 -3
  67. package/es/lib/FormModal/FormModal.js +44 -48
  68. package/es/lib/FormModal/index.js +1 -1
  69. package/es/lib/FormattedKintMessage/FormattedKintMessage.js +27 -35
  70. package/es/lib/FormattedKintMessage/index.js +1 -1
  71. package/es/lib/IconSelect/IconSelect.js +52 -77
  72. package/es/lib/IconSelect/index.js +1 -1
  73. package/es/lib/NoResultsMessage/NoResultsMessage.js +23 -23
  74. package/es/lib/NoResultsMessage/index.js +1 -1
  75. package/es/lib/QueryTypedown/QueryTypedown.js +16 -35
  76. package/es/lib/QueryTypedown/index.js +1 -1
  77. package/es/lib/RefdataButtons/RefdataButtons.js +30 -34
  78. package/es/lib/RefdataButtons/index.js +1 -1
  79. package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +77 -95
  80. package/es/lib/ResponsiveButtonGroup/index.js +1 -1
  81. package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +24 -39
  82. package/es/lib/RichSelect/RichSelect.js +78 -100
  83. package/es/lib/RichSelect/index.js +2 -2
  84. package/es/lib/RichSelect/useSelectedOption.js +5 -16
  85. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +107 -139
  86. package/es/lib/SASQLookupComponent/TableBody/TableBody.js +43 -52
  87. package/es/lib/SASQLookupComponent/TableBody/index.js +1 -1
  88. package/es/lib/SASQLookupComponent/index.js +2 -2
  89. package/es/lib/SASQRoute/SASQRoute.js +34 -41
  90. package/es/lib/SASQRoute/index.js +1 -1
  91. package/es/lib/SASQViewComponent/SASQViewComponent.js +37 -49
  92. package/es/lib/SASQViewComponent/index.js +1 -1
  93. package/es/lib/SearchField/SearchField.js +11 -18
  94. package/es/lib/SearchField/index.js +1 -1
  95. package/es/lib/SettingPage/SettingPage.js +20 -19
  96. package/es/lib/SettingPage/SettingPagePane.js +11 -10
  97. package/es/lib/SettingPage/index.js +2 -2
  98. package/es/lib/Typedown/Typedown.js +73 -98
  99. package/es/lib/Typedown/index.js +1 -1
  100. package/es/lib/constants/customProperties.js +11 -22
  101. package/es/lib/constants/eventCodes.js +3 -6
  102. package/es/lib/contexts/SettingsContext.js +2 -3
  103. package/es/lib/contexts/index.js +1 -1
  104. package/es/lib/hooks/__mocks__/index.js +9 -29
  105. package/es/lib/hooks/index.js +20 -20
  106. package/es/lib/hooks/settingsHooks/index.js +3 -3
  107. package/es/lib/hooks/settingsHooks/useAppSettings.js +22 -34
  108. package/es/lib/hooks/settingsHooks/useSettingSection.js +17 -19
  109. package/es/lib/hooks/settingsHooks/useSettings.js +58 -72
  110. package/es/lib/hooks/typedownHooks/index.js +3 -3
  111. package/es/lib/hooks/typedownHooks/useTypedown.js +49 -50
  112. package/es/lib/hooks/typedownHooks/useTypedownData.js +12 -23
  113. package/es/lib/hooks/typedownHooks/useTypedownToggle.js +13 -22
  114. package/es/lib/hooks/useActiveElement.js +10 -20
  115. package/es/lib/hooks/useCustomProperties.js +23 -32
  116. package/es/lib/hooks/useHelperApp.js +31 -51
  117. package/es/lib/hooks/useIntlKey.js +4 -7
  118. package/es/lib/hooks/useIntlKeyStore.js +42 -51
  119. package/es/lib/hooks/useInvalidateRefdata.js +4 -7
  120. package/es/lib/hooks/useKintIntl.js +31 -41
  121. package/es/lib/hooks/useKiwtFieldArray.js +35 -47
  122. package/es/lib/hooks/useKiwtSASQuery.js +40 -51
  123. package/es/lib/hooks/useLocalStorageState.js +7 -20
  124. package/es/lib/hooks/useMutateCustomProperties.js +23 -73
  125. package/es/lib/hooks/useMutateRefdataCategory.js +22 -68
  126. package/es/lib/hooks/useMutateRefdataValue.js +31 -73
  127. package/es/lib/hooks/useQIndex.js +17 -32
  128. package/es/lib/hooks/useRefdata.js +19 -22
  129. package/es/lib/hooks/useSASQQueryMeta.js +14 -22
  130. package/es/lib/hooks/useTemplates.js +16 -16
  131. package/es/lib/utils/buildUrl.js +6 -6
  132. package/es/lib/utils/generateKiwtQuery.js +4 -7
  133. package/es/lib/utils/generateKiwtQueryParams.js +77 -96
  134. package/es/lib/utils/groupCustomPropertiesByCtx.js +9 -21
  135. package/es/lib/utils/highlightString.js +17 -37
  136. package/es/lib/utils/index.js +21 -21
  137. package/es/lib/utils/matchString.js +5 -10
  138. package/es/lib/utils/parseErrorResponse.js +22 -67
  139. package/es/lib/utils/refdataOptions.js +2 -3
  140. package/es/lib/utils/refdataQueryKey.js +3 -4
  141. package/es/lib/utils/selectorSafe.js +2 -3
  142. package/es/lib/utils/sortByLabel.js +4 -6
  143. package/es/lib/utils/toCamelCase.js +8 -14
  144. package/es/lib/utils/typedownQueryKey.js +3 -4
  145. package/es/lib/utils/validators.js +25 -32
  146. package/package.json +12 -2
  147. package/src/lib/CustomProperties/View/CustomPropertyCard.js +3 -3
  148. package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -69
  149. package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -814
  150. package/es/artifacts/coverage-jest/lcov-report/sorter.js +0 -181
  151. package/junit.xml +0 -273
  152. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +0 -364
  153. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +0 -1426
  154. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +0 -146
  155. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +0 -88
  156. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +0 -667
  157. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +0 -1162
  158. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +0 -1474
  159. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +0 -733
  160. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +0 -176
  161. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +0 -97
  162. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +0 -793
  163. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +0 -208
  164. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +0 -352
  165. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +0 -826
  166. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +0 -1297
  167. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +0 -454
  168. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +0 -206
  169. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +0 -100
  170. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +0 -271
  171. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +0 -499
  172. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +0 -568
  173. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +0 -415
  174. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +0 -340
  175. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +0 -502
  176. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +0 -251
  177. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +0 -103
  178. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +0 -223
  179. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +0 -271
  180. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +0 -199
  181. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +0 -253
  182. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +0 -211
  183. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +0 -445
  184. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +0 -619
  185. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +0 -176
  186. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +0 -94
  187. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +0 -571
  188. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +0 -116
  189. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +0 -175
  190. package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +0 -217
  191. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +0 -131
  192. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +0 -88
  193. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +0 -664
  194. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +0 -131
  195. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +0 -88
  196. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +0 -730
  197. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +0 -131
  198. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +0 -88
  199. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +0 -271
  200. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -250
  201. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +0 -412
  202. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +0 -313
  203. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +0 -559
  204. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +0 -161
  205. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +0 -94
  206. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +0 -146
  207. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +0 -94
  208. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +0 -379
  209. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +0 -131
  210. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +0 -88
  211. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +0 -247
  212. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +0 -131
  213. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +0 -88
  214. package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +0 -508
  215. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +0 -131
  216. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +0 -88
  217. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +0 -361
  218. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +0 -131
  219. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +0 -88
  220. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +0 -190
  221. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +0 -131
  222. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +0 -88
  223. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +0 -370
  224. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +0 -131
  225. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +0 -88
  226. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +0 -571
  227. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +0 -146
  228. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +0 -88
  229. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +0 -253
  230. package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +0 -718
  231. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +0 -146
  232. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +0 -91
  233. package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +0 -127
  234. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +0 -1069
  235. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +0 -400
  236. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +0 -131
  237. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +0 -88
  238. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +0 -131
  239. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +0 -91
  240. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +0 -346
  241. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +0 -131
  242. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +0 -88
  243. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +0 -307
  244. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +0 -131
  245. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +0 -88
  246. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +0 -214
  247. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +0 -131
  248. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +0 -88
  249. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +0 -208
  250. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +0 -208
  251. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +0 -146
  252. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +0 -91
  253. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +0 -901
  254. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +0 -131
  255. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +0 -88
  256. package/src/artifacts/coverage-jest/lcov-report/base.css +0 -224
  257. package/src/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -87
  258. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +0 -121
  259. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +0 -94
  260. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +0 -131
  261. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +0 -97
  262. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +0 -131
  263. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +0 -91
  264. package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
  265. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +0 -371
  266. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +0 -139
  267. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +0 -161
  268. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +0 -94
  269. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +0 -292
  270. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +0 -214
  271. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +0 -463
  272. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +0 -161
  273. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +0 -94
  274. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +0 -520
  275. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +0 -181
  276. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +0 -163
  277. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +0 -157
  278. package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +0 -205
  279. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +0 -325
  280. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +0 -283
  281. package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +0 -151
  282. package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +0 -199
  283. package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +0 -118
  284. package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +0 -238
  285. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +0 -274
  286. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +0 -196
  287. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +0 -136
  288. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +0 -283
  289. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +0 -274
  290. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +0 -322
  291. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +0 -208
  292. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +0 -265
  293. package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +0 -187
  294. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +0 -166
  295. package/src/artifacts/coverage-jest/lcov-report/index.html +0 -581
  296. package/src/artifacts/coverage-jest/lcov-report/prettify.css +0 -1
  297. package/src/artifacts/coverage-jest/lcov-report/prettify.js +0 -2
  298. package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
  299. package/src/artifacts/coverage-jest/lcov-report/sorter.js +0 -196
  300. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +0 -193
  301. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +0 -109
  302. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +0 -631
  303. package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +0 -124
  304. package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +0 -211
  305. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +0 -341
  306. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +0 -193
  307. package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +0 -127
  308. package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +0 -142
  309. package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +0 -280
  310. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +0 -109
  311. package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +0 -112
  312. package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +0 -166
  313. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +0 -103
  314. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +0 -130
  315. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +0 -127
  316. package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +0 -112
  317. package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +0 -370
  318. package/src/artifacts/coverage-jest/lcov.info +0 -4957
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
@@ -11,43 +10,33 @@ var _components = require("@folio/stripes/components");
11
10
  var CUSTOM_PROPERTY_TYPES = _interopRequireWildcard(require("../../constants/customProperties"));
12
11
  var _hooks = require("../../hooks");
13
12
  var _jsxRuntime = require("react/jsx-runtime");
14
- 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); }
15
- 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; }
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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; }
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; }
19
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
21
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
22
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
23
- 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."); }
24
- 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
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
26
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
27
- 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; }
28
- var CustomPropertyField = function CustomPropertyField(_ref) {
29
- var availableCustomProperties = _ref.availableCustomProperties,
30
- customProperty = _ref.customProperty,
31
- customPropertyType = _ref.customPropertyType,
32
- customProperties = _ref.customProperties,
33
- index = _ref.index,
34
- passedIntlKey = _ref.intlKey,
35
- passedIntlNS = _ref.intlNS,
36
- _ref$labelOverrides = _ref.labelOverrides,
37
- labelOverrides = _ref$labelOverrides === void 0 ? {} : _ref$labelOverrides,
38
- name = _ref.name,
39
- _onChange = _ref.onChange,
40
- value = _ref.value,
41
- setCustomProperties = _ref.setCustomProperties;
42
- var kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
16
+ const CustomPropertyField = _ref => {
17
+ let {
18
+ availableCustomProperties,
19
+ customProperty,
20
+ customPropertyType,
21
+ customProperties,
22
+ index,
23
+ intlKey: passedIntlKey,
24
+ intlNS: passedIntlNS,
25
+ labelOverrides = {},
26
+ name,
27
+ onChange,
28
+ value,
29
+ setCustomProperties
30
+ } = _ref;
31
+ const kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
43
32
 
44
33
  // Set up the validator for the customProperty
45
- var customPropertyValidator = function customPropertyValidator(fieldValue, allValues) {
46
- var _allValues$customProp, _allValues$customProp2, _allValues$customProp3;
47
- var _ref2 = (_allValues$customProp = allValues === null || allValues === void 0 ? void 0 : (_allValues$customProp2 = allValues.customProperties) === null || _allValues$customProp2 === void 0 ? void 0 : (_allValues$customProp3 = _allValues$customProp2[customProperty === null || customProperty === void 0 ? void 0 : customProperty.value]) === null || _allValues$customProp3 === void 0 ? void 0 : _allValues$customProp3[0]) !== null && _allValues$customProp !== void 0 ? _allValues$customProp : {},
48
- note = _ref2.note,
49
- publicNote = _ref2.publicNote,
50
- currentValue = _ref2.value;
34
+ const customPropertyValidator = (fieldValue, allValues) => {
35
+ const {
36
+ note,
37
+ publicNote,
38
+ value: currentValue
39
+ } = allValues?.customProperties?.[customProperty?.value]?.[0] ?? {};
51
40
  if (note && !currentValue || publicNote && !currentValue) {
52
41
  if (customProperty.type === CUSTOM_PROPERTY_TYPES.DECIMAL_CLASS_NAME || customProperty.type === CUSTOM_PROPERTY_TYPES.INTEGER_CLASS_NAME) {
53
42
  return kintIntl.formatKintMessage({
@@ -62,21 +51,21 @@ var CustomPropertyField = function CustomPropertyField(_ref) {
62
51
  }
63
52
  }
64
53
  if (customProperty.type === CUSTOM_PROPERTY_TYPES.DECIMAL_CLASS_NAME) {
65
- var regexp = /^-?[\d]*(\.[\d]{0,2})?$/;
54
+ const regexp = /^-?[\d]*(\.[\d]{0,2})?$/;
66
55
  return fieldValue && !regexp.test(fieldValue) ? kintIntl.formatKintMessage({
67
56
  id: 'errors.maxTwoDecimals',
68
57
  overrideValue: labelOverrides.maxTwoDecimalsError
69
58
  }) : undefined;
70
59
  }
71
60
  if (customProperty.type === CUSTOM_PROPERTY_TYPES.INTEGER_CLASS_NAME) {
72
- var min = Number.MIN_SAFE_INTEGER;
73
- var max = Number.MAX_SAFE_INTEGER;
61
+ const min = Number.MIN_SAFE_INTEGER;
62
+ const max = Number.MAX_SAFE_INTEGER;
74
63
  return fieldValue && (fieldValue > max || fieldValue < min) ? kintIntl.formatKintMessage({
75
64
  id: 'errors.valueNotInRange',
76
65
  overrideValue: labelOverrides.valueNotInRangeError
77
66
  }, {
78
- min: min,
79
- max: max
67
+ min,
68
+ max
80
69
  }) : undefined;
81
70
  }
82
71
  if (!customProperty.primary && !currentValue) {
@@ -86,43 +75,38 @@ var CustomPropertyField = function CustomPropertyField(_ref) {
86
75
  }
87
76
  return undefined;
88
77
  };
89
- var getCustomProperty = function getCustomProperty(customPropertyValue) {
90
- return availableCustomProperties.find(function (cp) {
91
- return cp.value === customPropertyValue;
92
- });
78
+ const getCustomProperty = customPropertyValue => {
79
+ return availableCustomProperties.find(cp => cp.value === customPropertyValue);
93
80
  };
94
- var renderCustomPropertyName = function renderCustomPropertyName() {
95
- var _customPropertyValue$;
96
- var unsetCustomProperties = availableCustomProperties.filter(function (t) {
97
- var _custPropValue$;
81
+ const renderCustomPropertyName = () => {
82
+ const unsetCustomProperties = availableCustomProperties.filter(t => {
98
83
  // Only optional properties can be set
99
84
  if (t.primary) return false;
100
- var custPropValue = value[t.value];
85
+ const custPropValue = value[t.value];
101
86
 
102
87
  // The customProperty is unset and has no value.
103
88
  if (custPropValue === undefined) return true;
104
89
 
105
90
  // The customProperty is set but is marked for deletion. Allow reuse.
106
- if ((_custPropValue$ = custPropValue[0]) !== null && _custPropValue$ !== void 0 && _custPropValue$._delete) return true;
91
+ if (custPropValue[0]?._delete) return true;
107
92
  return false;
108
93
  });
109
- var customPropertyValue = value[customProperty.value];
110
- var id = customPropertyValue === null || customPropertyValue === void 0 ? void 0 : (_customPropertyValue$ = customPropertyValue[0]) === null || _customPropertyValue$ === void 0 ? void 0 : _customPropertyValue$.id;
94
+ const customPropertyValue = value[customProperty.value];
95
+ const id = customPropertyValue?.[0]?.id;
111
96
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Select, {
112
97
  autoFocus: !id,
113
- dataOptions: [customProperty].concat(_toConsumableArray(unsetCustomProperties)) // The selected customProperty, and the available unset customProperties
98
+ dataOptions: [customProperty, ...unsetCustomProperties] // The selected customProperty, and the available unset customProperties
114
99
  ,
115
- id: "edit-customproperty-".concat(index, "-name"),
100
+ id: `edit-customproperty-${index}-name`,
116
101
  label: kintIntl.formatKintMessage({
117
102
  id: 'customProperties.name',
118
103
  overrideValue: labelOverrides.name
119
104
  }),
120
- onChange: function onChange(e) {
121
- var _objectSpread2;
122
- var newValue = e.target.value;
105
+ onChange: e => {
106
+ const newValue = e.target.value;
123
107
 
124
108
  // Update `state.customProperties` which controls what customProperties are being edited.
125
- var newCustomProperties = _toConsumableArray(customProperties);
109
+ const newCustomProperties = [...customProperties];
126
110
  newCustomProperties[index] = getCustomProperty(newValue);
127
111
  setCustomProperties(newCustomProperties);
128
112
 
@@ -130,83 +114,92 @@ var CustomPropertyField = function CustomPropertyField(_ref) {
130
114
  // in essence we're deleting a customProperty and creating a new customProperty.
131
115
  // We do this by 1) marking the current customProperty for deletion and 2) initing
132
116
  // the new customProperty to an empty object.
133
- var currentValue = value[customProperty.value] ? value[customProperty.value][0] : {};
134
- _onChange(_objectSpread(_objectSpread({}, value), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, customProperty.value, [{
135
- id: currentValue.id,
136
- _delete: true
137
- }]), _defineProperty(_objectSpread2, newValue, [{}]), _objectSpread2)));
117
+ const currentValue = value[customProperty.value] ? value[customProperty.value][0] : {};
118
+ onChange({
119
+ ...value,
120
+ [customProperty.value]: [{
121
+ id: currentValue.id,
122
+ _delete: true
123
+ }],
124
+ [newValue]: [{}]
125
+ });
138
126
  },
139
127
  required: true,
140
128
  value: customProperty.value
141
129
  });
142
130
  };
143
- var renderCustomPropertyValue = function renderCustomPropertyValue() {
144
- var _customProperty$optio;
145
- var currentValue = value[customProperty.value] ? value[customProperty.value][0] : {};
146
- var min = Number.MIN_SAFE_INTEGER;
147
- var max = Number.MAX_SAFE_INTEGER;
131
+ const renderCustomPropertyValue = () => {
132
+ const currentValue = value[customProperty.value] ? value[customProperty.value][0] : {};
133
+ const min = Number.MIN_SAFE_INTEGER;
134
+ const max = Number.MAX_SAFE_INTEGER;
148
135
 
149
136
  // Default change handler
150
- var handleChange = function handleChange(e) {
151
- _onChange(_objectSpread(_objectSpread({}, value), {}, _defineProperty({}, customProperty.value, [_objectSpread(_objectSpread({}, currentValue), {}, {
152
- _delete: e.target.value === '',
153
- // Delete customProperty if removing the value.
154
- value: e.target.value // send down the number for integers and decimal types
155
- })])));
137
+ let handleChange = e => {
138
+ onChange({
139
+ ...value,
140
+ [customProperty.value]: [{
141
+ ...currentValue,
142
+ _delete: e.target.value === '',
143
+ // Delete customProperty if removing the value.
144
+ value: e.target.value // send down the number for integers and decimal types
145
+ }]
146
+ });
156
147
  };
157
148
  // Figure out which component we're rendering and specify its unique props.
158
- var fieldProps;
149
+ let fieldProps;
159
150
  switch (customProperty.type) {
160
151
  case CUSTOM_PROPERTY_TYPES.REFDATA_CLASS_NAME:
161
152
  fieldProps = {
162
153
  component: _components.Select,
163
154
  dataOptions: customProperty.options,
164
- format: function format(v) {
165
- return v === null || v === void 0 ? void 0 : v.value;
166
- }
155
+ format: v => v?.value
167
156
  };
168
157
  break;
169
158
  case CUSTOM_PROPERTY_TYPES.MULTI_REFDATA_CLASS_NAME:
170
159
  fieldProps = {
171
160
  component: _components.MultiSelection,
172
161
  // The "not set" value is not relevant for a multi select
173
- dataOptions: (_customProperty$optio = customProperty.options) === null || _customProperty$optio === void 0 ? void 0 : _customProperty$optio.filter(function (opt) {
174
- return !!(opt !== null && opt !== void 0 && opt.value);
175
- }),
162
+ dataOptions: customProperty.options?.filter(opt => !!opt?.value),
176
163
  renderToOverlay: true
177
164
  };
178
165
  // MultiSelection passes the changed array as a value not an event
179
- handleChange = function handleChange(refdataArray) {
180
- _onChange(_objectSpread(_objectSpread({}, value), {}, _defineProperty({}, customProperty.value, [_objectSpread(_objectSpread({}, currentValue), {}, {
181
- _delete: (refdataArray === null || refdataArray === void 0 ? void 0 : refdataArray.length) === 0 ? true : undefined,
182
- // Delete customProperty if removing all values.
183
- value: refdataArray
184
- })])));
166
+ handleChange = refdataArray => {
167
+ onChange({
168
+ ...value,
169
+ [customProperty.value]: [{
170
+ ...currentValue,
171
+ _delete: refdataArray?.length === 0 ? true : undefined,
172
+ // Delete customProperty if removing all values.
173
+ value: refdataArray
174
+ }]
175
+ });
185
176
  };
186
177
  break;
187
178
  case CUSTOM_PROPERTY_TYPES.INTEGER_CLASS_NAME:
188
179
  case CUSTOM_PROPERTY_TYPES.DECIMAL_CLASS_NAME:
189
180
  fieldProps = {
190
181
  component: _components.TextField,
191
- max: max,
192
- min: min,
182
+ max,
183
+ min,
193
184
  step: 'any',
194
185
  type: 'number'
195
186
  };
196
- handleChange = function handleChange(e) {
197
- _onChange(_objectSpread(_objectSpread({}, value), {}, _defineProperty({}, customProperty.value, [_objectSpread(_objectSpread({}, currentValue), {}, {
198
- _delete: e.target.value === '' ? true : undefined,
199
- // Delete customProperty if removing the value.
200
- value: parseFloat(e.target.value)
201
- })])));
187
+ handleChange = e => {
188
+ onChange({
189
+ ...value,
190
+ [customProperty.value]: [{
191
+ ...currentValue,
192
+ _delete: e.target.value === '' ? true : undefined,
193
+ // Delete customProperty if removing the value.
194
+ value: parseFloat(e.target.value)
195
+ }]
196
+ });
202
197
  };
203
198
  break;
204
199
  case CUSTOM_PROPERTY_TYPES.TEXT_CLASS_NAME:
205
200
  fieldProps = {
206
201
  component: _components.TextArea,
207
- parse: function parse(v) {
208
- return v;
209
- } // Lets us send an empty string instead of `undefined`
202
+ parse: v => v // Lets us send an empty string instead of `undefined`
210
203
  };
211
204
 
212
205
  break;
@@ -224,28 +217,30 @@ var CustomPropertyField = function CustomPropertyField(_ref) {
224
217
  };
225
218
  break;
226
219
  }
227
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, _objectSpread({
220
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
228
221
  "data-test-customproperty-value": true,
229
- id: "edit-customproperty-".concat(index, "-value"),
222
+ id: `edit-customproperty-${index}-value`,
230
223
  label: kintIntl.formatKintMessage({
231
224
  id: 'customProperties.value',
232
225
  overrideValue: labelOverrides.value
233
226
  }),
234
- name: "".concat(name, ".").concat(customProperty.value, "[0].value"),
227
+ name: `${name}.${customProperty.value}[0].value`,
235
228
  onChange: handleChange,
236
229
  required: !customProperty.primary,
237
- validate: function validate(fieldValue, allValues) {
238
- return customPropertyValidator(fieldValue, allValues);
239
- }
240
- }, fieldProps));
230
+ validate: (fieldValue, allValues) => customPropertyValidator(fieldValue, allValues),
231
+ ...fieldProps
232
+ });
241
233
  };
242
- var renderCustomPropertyVisibility = function renderCustomPropertyVisibility() {
243
- var _value$customProperty, _value$customProperty2, _customPropertyObject;
244
- var customPropertyObject = (_value$customProperty = (_value$customProperty2 = value[customProperty.value]) === null || _value$customProperty2 === void 0 ? void 0 : _value$customProperty2[0]) !== null && _value$customProperty !== void 0 ? _value$customProperty : {};
245
- var handleChange = function handleChange(e) {
246
- _onChange(_objectSpread(_objectSpread({}, value), {}, _defineProperty({}, customProperty.value, [_objectSpread(_objectSpread({}, customPropertyObject), {}, {
247
- internal: e.target.value
248
- })])));
234
+ const renderCustomPropertyVisibility = () => {
235
+ const customPropertyObject = value[customProperty.value]?.[0] ?? {};
236
+ const handleChange = e => {
237
+ onChange({
238
+ ...value,
239
+ [customProperty.value]: [{
240
+ ...customPropertyObject,
241
+ internal: e.target.value
242
+ }]
243
+ });
249
244
  };
250
245
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Select, {
251
246
  "data-test-customproperty-visibility": true,
@@ -262,51 +257,57 @@ var CustomPropertyField = function CustomPropertyField(_ref) {
262
257
  overrideValue: labelOverrides.internalFalse
263
258
  })
264
259
  }],
265
- id: "edit-customproperty-".concat(index, "-visibility"),
260
+ id: `edit-customproperty-${index}-visibility`,
266
261
  label: kintIntl.formatKintMessage({
267
262
  id: 'customProperties.visibility',
268
263
  overrideValue: labelOverrides.visibility
269
264
  }),
270
265
  onChange: handleChange,
271
- value: (_customPropertyObject = customPropertyObject === null || customPropertyObject === void 0 ? void 0 : customPropertyObject.internal) !== null && _customPropertyObject !== void 0 ? _customPropertyObject : customProperty.defaultInternal
266
+ value: customPropertyObject?.internal ?? customProperty.defaultInternal
272
267
  });
273
268
  };
274
- var renderCustomPropertyNoteInternal = function renderCustomPropertyNoteInternal() {
275
- var _value$customProperty3, _value$customProperty4;
276
- var customPropertyObject = (_value$customProperty3 = (_value$customProperty4 = value[customProperty.value]) === null || _value$customProperty4 === void 0 ? void 0 : _value$customProperty4[0]) !== null && _value$customProperty3 !== void 0 ? _value$customProperty3 : {};
277
- var handleChange = function handleChange(e) {
278
- _onChange(_objectSpread(_objectSpread({}, value), {}, _defineProperty({}, customProperty.value, [_objectSpread(_objectSpread({}, customPropertyObject), {}, {
279
- note: e.target.value
280
- })])));
269
+ const renderCustomPropertyNoteInternal = () => {
270
+ const customPropertyObject = value[customProperty.value]?.[0] ?? {};
271
+ const handleChange = e => {
272
+ onChange({
273
+ ...value,
274
+ [customProperty.value]: [{
275
+ ...customPropertyObject,
276
+ note: e.target.value
277
+ }]
278
+ });
281
279
  };
282
280
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextArea, {
283
281
  "data-test-customproperty-note": true,
284
- id: "edit-customproperty-".concat(index, "-internal-note"),
282
+ id: `edit-customproperty-${index}-internal-note`,
285
283
  label: kintIntl.formatKintMessage({
286
284
  id: 'customProperties.internalNote',
287
285
  overrideValue: labelOverrides.internalNote
288
286
  }),
289
287
  onChange: handleChange,
290
- value: customPropertyObject === null || customPropertyObject === void 0 ? void 0 : customPropertyObject.note
288
+ value: customPropertyObject?.note
291
289
  });
292
290
  };
293
- var renderCustomPropertyNotePublic = function renderCustomPropertyNotePublic() {
294
- var _value$customProperty5, _value$customProperty6;
295
- var customPropertyObject = (_value$customProperty5 = (_value$customProperty6 = value[customProperty.value]) === null || _value$customProperty6 === void 0 ? void 0 : _value$customProperty6[0]) !== null && _value$customProperty5 !== void 0 ? _value$customProperty5 : {};
296
- var handleChange = function handleChange(e) {
297
- _onChange(_objectSpread(_objectSpread({}, value), {}, _defineProperty({}, customProperty.value, [_objectSpread(_objectSpread({}, customPropertyObject), {}, {
298
- publicNote: e.target.value
299
- })])));
291
+ const renderCustomPropertyNotePublic = () => {
292
+ const customPropertyObject = value[customProperty.value]?.[0] ?? {};
293
+ const handleChange = e => {
294
+ onChange({
295
+ ...value,
296
+ [customProperty.value]: [{
297
+ ...customPropertyObject,
298
+ publicNote: e.target.value
299
+ }]
300
+ });
300
301
  };
301
302
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextArea, {
302
303
  "data-test-customproperty-public-note": true,
303
- id: "edit-customproperty-".concat(index, "-public-note"),
304
+ id: `edit-customproperty-${index}-public-note`,
304
305
  label: kintIntl.formatKintMessage({
305
306
  id: 'customProperties.publicNote',
306
307
  overrideValue: labelOverrides.publicNote
307
308
  }),
308
309
  onChange: handleChange,
309
- value: customPropertyObject === null || customPropertyObject === void 0 ? void 0 : customPropertyObject.publicNote
310
+ value: customPropertyObject?.publicNote
310
311
  });
311
312
  };
312
313
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
@@ -355,5 +356,4 @@ CustomPropertyField.propTypes = {
355
356
  setCustomProperties: _propTypes.default.func,
356
357
  value: _propTypes.default.object
357
358
  };
358
- var _default = CustomPropertyField;
359
- exports.default = _default;
359
+ var _default = exports.default = CustomPropertyField;