@k-int/stripes-kint-components 2.8.1 → 3.0.0

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 (328) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/es/index.js +54 -12
  3. package/es/lib/ActionList/ActionList.js +11 -5
  4. package/es/lib/ActionList/ActionListFieldArray.js +147 -77
  5. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +43 -31
  6. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +17 -14
  7. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +67 -47
  8. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +17 -24
  9. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +91 -70
  10. package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +53 -36
  11. package/es/lib/CustomProperties/Config/CustomPropertyView.js +50 -31
  12. package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +13 -14
  13. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +6 -0
  14. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +8 -12
  15. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +22 -24
  16. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +9 -12
  17. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +62 -13
  18. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +12 -13
  19. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +91 -44
  20. package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +80 -73
  21. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +31 -32
  22. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +26 -24
  23. package/es/lib/CustomProperties/Edit/testResources.js +73 -908
  24. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +21 -29
  25. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +12 -10
  26. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +38 -39
  27. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +28 -13
  28. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +29 -44
  29. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +6 -6
  30. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +16 -10
  31. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +12 -12
  32. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +20 -11
  33. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +4 -3
  34. package/es/lib/CustomProperties/Filter/testResources.js +37 -233
  35. package/es/lib/CustomProperties/Filter/useOperators.js +69 -27
  36. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +3 -2
  37. package/es/lib/CustomProperties/Filter/useValueProps.js +7 -2
  38. package/es/lib/CustomProperties/View/CustomPropertiesView.js +6 -0
  39. package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +4 -3
  40. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +13 -19
  41. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +4 -10
  42. package/es/lib/CustomProperties/View/CustomPropertyCard.js +34 -51
  43. package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +38 -28
  44. package/es/lib/EditableRefdataList/EditableRefdataList.js +44 -32
  45. package/es/lib/EditableSettingsList/EditableSettingsList.js +11 -1
  46. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +10 -0
  47. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +19 -11
  48. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +9 -8
  49. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +21 -9
  50. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +1 -0
  51. package/es/lib/EditableSettingsList/SettingField/SettingField.js +83 -16
  52. package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +138 -65
  53. package/es/lib/FormModal/FormModal.js +14 -9
  54. package/es/lib/FormattedKintMessage/FormattedKintMessage.js +91 -0
  55. package/es/lib/FormattedKintMessage/index.js +15 -0
  56. package/es/lib/IconSelect/IconSelect.js +18 -12
  57. package/es/lib/NoResultsMessage/NoResultsMessage.js +13 -2
  58. package/es/lib/RichSelect/RichSelect.js +13 -34
  59. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +16 -5
  60. package/es/lib/SASQLookupComponent/TableBody/TableBody.js +11 -1
  61. package/es/lib/SettingPage/SettingPage.js +12 -13
  62. package/es/lib/SettingPage/SettingPagePane.js +12 -20
  63. package/es/lib/hooks/__mocks__/index.js +46 -0
  64. package/es/lib/hooks/index.js +24 -8
  65. package/es/lib/hooks/settingsHooks/useSettings.js +22 -17
  66. package/es/lib/hooks/useIntlKey.js +34 -0
  67. package/es/lib/hooks/useIntlKeyStore.js +84 -0
  68. package/es/lib/hooks/useKintIntl.js +93 -0
  69. package/es/lib/utils/index.js +48 -4
  70. package/es/lib/utils/parseErrorResponse.js +91 -0
  71. package/es/lib/utils/validators.js +76 -59
  72. package/jest.config.js +4 -1
  73. package/junit.xml +157 -656
  74. package/package.json +54 -33
  75. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +56 -8
  76. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +394 -64
  77. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +10 -10
  78. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
  79. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +187 -52
  80. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +372 -87
  81. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +293 -74
  82. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +126 -54
  83. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +45 -60
  84. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
  85. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +23 -5
  86. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +59 -47
  87. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +259 -97
  88. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +399 -105
  89. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +41 -68
  90. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +57 -57
  91. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
  92. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +67 -688
  93. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +92 -53
  94. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +103 -64
  95. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +54 -63
  96. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +49 -16
  97. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +69 -18
  98. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +89 -89
  99. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
  100. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +33 -786
  101. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +46 -46
  102. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +45 -36
  103. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +43 -28
  104. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +20 -2
  105. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +50 -41
  106. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +54 -75
  107. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +24 -24
  108. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
  109. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
  110. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
  111. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
  112. package/src/artifacts/coverage-jest/lcov-report/{hooks/useAvailableCustomProperties.js.html → CycleButton/CycleButton.js.html} +62 -50
  113. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +131 -0
  114. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +88 -0
  115. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +664 -0
  116. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +131 -0
  117. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +88 -0
  118. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +264 -39
  119. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +9 -9
  120. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
  121. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +41 -14
  122. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +45 -6
  123. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +47 -11
  124. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +65 -14
  125. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +154 -31
  126. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +26 -26
  127. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
  128. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +18 -18
  129. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
  130. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +35 -17
  131. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +15 -15
  132. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
  133. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +247 -0
  134. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +131 -0
  135. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +88 -0
  136. package/src/artifacts/coverage-jest/lcov-report/{CustomProperties/Config/CustomPropertiesView.js.html → IconSelect/IconSelect.js.html} +158 -257
  137. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +131 -0
  138. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +88 -0
  139. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +48 -6
  140. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +7 -7
  141. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
  142. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
  143. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
  144. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
  145. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -3
  146. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
  147. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
  148. package/src/artifacts/coverage-jest/lcov-report/{CustomProperties/Config/testResources.js.html → RichSelect/RichSelect.js.html} +256 -334
  149. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +146 -0
  150. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +91 -0
  151. package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +127 -0
  152. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +52 -7
  153. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +31 -4
  154. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +3 -3
  155. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
  156. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +7 -7
  157. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
  158. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
  159. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
  160. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
  161. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
  162. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
  163. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
  164. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
  165. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
  166. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
  167. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +24 -27
  168. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +47 -17
  169. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +22 -22
  170. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
  171. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
  172. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
  173. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
  174. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
  175. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
  176. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
  177. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +2 -2
  178. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
  179. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
  180. package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
  181. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +142 -97
  182. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +13 -4
  183. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +35 -20
  184. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +5 -2
  185. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +7 -7
  186. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +7 -7
  187. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +61 -22
  188. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
  189. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
  190. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
  191. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
  192. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  193. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +7 -7
  194. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +19 -22
  195. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
  196. package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +151 -0
  197. package/src/artifacts/coverage-jest/lcov-report/{utils/renderHelpText.js.html → hooks/useIntlKeyStore.js.html} +71 -38
  198. package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +7 -7
  199. package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +238 -0
  200. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +7 -7
  201. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +9 -9
  202. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +7 -7
  203. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +23 -11
  204. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +274 -0
  205. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +19 -10
  206. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +7 -7
  207. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +9 -9
  208. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +7 -7
  209. package/src/artifacts/coverage-jest/lcov-report/index.html +205 -130
  210. package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
  211. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
  212. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +2 -2
  213. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +2 -2
  214. package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +7 -7
  215. package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
  216. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +34 -34
  217. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +42 -3
  218. package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +2 -2
  219. package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +139 -0
  220. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +5 -2
  221. package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
  222. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +2 -2
  223. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
  224. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -2
  225. package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
  226. package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +128 -80
  227. package/src/artifacts/coverage-jest/lcov.info +2603 -2086
  228. package/src/index.js +12 -4
  229. package/src/lib/ActionList/ActionList.js +9 -3
  230. package/src/lib/ActionList/ActionListFieldArray.js +115 -37
  231. package/src/lib/ActionList/README.md +2 -1
  232. package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +60 -16
  233. package/src/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +14 -4
  234. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +109 -34
  235. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +16 -9
  236. package/src/lib/CustomProperties/Config/CustomPropertyForm.js +131 -58
  237. package/src/lib/CustomProperties/Config/CustomPropertyForm.test.js +52 -33
  238. package/src/lib/CustomProperties/Config/CustomPropertyView.js +71 -47
  239. package/src/lib/CustomProperties/Config/CustomPropertyView.test.js +8 -6
  240. package/src/lib/CustomProperties/Config/README.md +33 -28
  241. package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.js +6 -0
  242. package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +7 -3
  243. package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +23 -19
  244. package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +5 -3
  245. package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +65 -11
  246. package/src/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +10 -8
  247. package/src/lib/CustomProperties/Edit/CustomPropertyField.js +115 -21
  248. package/src/lib/CustomProperties/Edit/CustomPropertyField.test.js +59 -60
  249. package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.js +24 -33
  250. package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +20 -27
  251. package/src/lib/CustomProperties/Edit/testResources.js +46 -1047
  252. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +22 -22
  253. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +12 -8
  254. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +44 -31
  255. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +26 -13
  256. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +33 -36
  257. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +3 -3
  258. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +19 -8
  259. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +9 -12
  260. package/src/lib/CustomProperties/Filter/CustomPropertiesRule.js +22 -5
  261. package/src/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +3 -1
  262. package/src/lib/CustomProperties/Filter/testResources.js +14 -265
  263. package/src/lib/CustomProperties/Filter/useOperators.js +20 -20
  264. package/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +2 -2
  265. package/src/lib/CustomProperties/Filter/useValueProps.js +8 -3
  266. package/src/lib/CustomProperties/View/CustomPropertiesView.js +6 -0
  267. package/src/lib/CustomProperties/View/CustomPropertiesView.test.js +2 -1
  268. package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.js +15 -13
  269. package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +2 -5
  270. package/src/lib/CustomProperties/View/CustomPropertyCard.js +36 -43
  271. package/src/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +47 -28
  272. package/src/lib/EditableRefdataList/EditableRefdataList.js +58 -33
  273. package/src/lib/EditableSettingsList/EditableSettingsList.js +10 -1
  274. package/src/lib/EditableSettingsList/EditableSettingsListFieldArray.js +14 -1
  275. package/src/lib/EditableSettingsList/SettingField/EditSettingValue.js +17 -5
  276. package/src/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +9 -8
  277. package/src/lib/EditableSettingsList/SettingField/RenderSettingValue.js +24 -7
  278. package/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +1 -0
  279. package/src/lib/EditableSettingsList/SettingField/SettingField.js +57 -16
  280. package/src/lib/EditableSettingsList/SettingField/SettingField.test.js +14 -19
  281. package/src/lib/FormModal/FormModal.js +15 -9
  282. package/src/lib/FormattedKintMessage/FormattedKintMessage.js +54 -0
  283. package/src/lib/FormattedKintMessage/index.js +1 -0
  284. package/src/lib/IconSelect/IconSelect.js +17 -8
  285. package/src/lib/NoResultsMessage/NoResultsMessage.js +15 -1
  286. package/src/lib/RichSelect/RichSelect.js +16 -36
  287. package/src/lib/SASQLookupComponent/SASQLookupComponent.js +17 -2
  288. package/src/lib/SASQLookupComponent/TableBody/TableBody.js +10 -1
  289. package/src/lib/SettingPage/SettingPage.js +12 -13
  290. package/src/lib/SettingPage/SettingPagePane.js +16 -6
  291. package/src/lib/hooks/__mocks__/index.js +17 -0
  292. package/src/lib/hooks/index.js +3 -1
  293. package/src/lib/hooks/settingsHooks/useSettings.js +25 -12
  294. package/src/lib/hooks/useIntlKey.js +22 -0
  295. package/src/lib/hooks/useIntlKeyStore.js +38 -0
  296. package/src/lib/hooks/useKintIntl.js +51 -0
  297. package/src/lib/utils/index.js +14 -1
  298. package/src/lib/utils/parseErrorResponse.js +18 -0
  299. package/src/lib/utils/validators.js +57 -41
  300. package/styles/RichSelect.css +7 -4
  301. package/test/helpers/test-implementor-translations.json +80 -0
  302. package/test/helpers/translationsProperties.js +6 -1
  303. package/test/jest/customProperties.js +166 -0
  304. package/test/jest/helpers/KintHarness.js +1 -1
  305. package/test/jest/helpers/renderWithKintHarness.js +2 -1
  306. package/test/jest/index.js +8 -0
  307. package/test/jest/refdata.js +471 -0
  308. package/test/jest/resolver.js +29 -0
  309. package/translations/stripes-kint-components/ar.json +1 -122
  310. package/translations/stripes-kint-components/cs_CZ.json +1 -122
  311. package/translations/stripes-kint-components/de.json +1 -122
  312. package/translations/stripes-kint-components/en.json +1 -148
  313. package/translations/stripes-kint-components/es.json +1 -122
  314. package/translations/stripes-kint-components/hi_IN.json +1 -122
  315. package/translations/stripes-kint-components/hu.json +1 -122
  316. package/translations/stripes-kint-components/it_IT.json +1 -122
  317. package/translations/stripes-kint-components/ja.json +1 -122
  318. package/translations/stripes-kint-components/ko.json +1 -122
  319. package/translations/stripes-kint-components/pt_PT.json +1 -122
  320. package/translations/stripes-kint-components/ru.json +1 -122
  321. package/translations/stripes-kint-components/sv.json +1 -122
  322. package/translations/stripes-kint-components/zh_CN.json +1 -122
  323. package/es/lib/CustomProperties/Config/testResources.js +0 -198
  324. package/es/lib/hooks/useAvailableCustomProperties.js +0 -73
  325. package/es/lib/utils/renderHelpText.js +0 -80
  326. package/src/lib/CustomProperties/Config/testResources.js +0 -236
  327. package/src/lib/hooks/useAvailableCustomProperties.js +0 -40
  328. package/src/lib/utils/renderHelpText.js +0 -27
@@ -0,0 +1,88 @@
1
+
2
+ <!doctype html>
3
+ <html lang="en">
4
+
5
+ <head>
6
+ <title>Code coverage report for FormattedKintMessage/index.js</title>
7
+ <meta charset="utf-8" />
8
+ <link rel="stylesheet" href="../prettify.css" />
9
+ <link rel="stylesheet" href="../base.css" />
10
+ <link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
11
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
12
+ <style type='text/css'>
13
+ .coverage-summary .sorter {
14
+ background-image: url(../sort-arrow-sprite.png);
15
+ }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <div class='wrapper'>
21
+ <div class='pad1'>
22
+ <h1><a href="../index.html">All files</a> / <a href="index.html">FormattedKintMessage</a> index.js</h1>
23
+ <div class='clearfix'>
24
+
25
+ <div class='fl pad1y space-right2'>
26
+ <span class="strong">0% </span>
27
+ <span class="quiet">Statements</span>
28
+ <span class='fraction'>0/0</span>
29
+ </div>
30
+
31
+
32
+ <div class='fl pad1y space-right2'>
33
+ <span class="strong">0% </span>
34
+ <span class="quiet">Branches</span>
35
+ <span class='fraction'>0/0</span>
36
+ </div>
37
+
38
+
39
+ <div class='fl pad1y space-right2'>
40
+ <span class="strong">0% </span>
41
+ <span class="quiet">Functions</span>
42
+ <span class='fraction'>0/0</span>
43
+ </div>
44
+
45
+
46
+ <div class='fl pad1y space-right2'>
47
+ <span class="strong">0% </span>
48
+ <span class="quiet">Lines</span>
49
+ <span class='fraction'>0/0</span>
50
+ </div>
51
+
52
+
53
+ </div>
54
+ <p class="quiet">
55
+ Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
56
+ </p>
57
+ <template id="filterTemplate">
58
+ <div class="quiet">
59
+ Filter:
60
+ <input oninput="onInput()" type="search" id="fileSearch">
61
+ </div>
62
+ </template>
63
+ </div>
64
+ <div class='status-line low'></div>
65
+ <pre><table class="coverage">
66
+ <tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
67
+ <a name='L2'></a><a href='#L2'>2</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
68
+ <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">export { default } from './FormattedKintMessage';
69
+ &nbsp;</pre></td></tr></table></pre>
70
+
71
+ <div class='push'></div><!-- for sticky footer -->
72
+ </div><!-- /wrapper -->
73
+ <div class='footer quiet pad2 space-top1 center small'>
74
+ Code coverage generated by
75
+ <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
76
+ at 2022-09-16T13:23:25.290Z
77
+ </div>
78
+ <script src="../prettify.js"></script>
79
+ <script>
80
+ window.onload = function () {
81
+ prettyPrint();
82
+ };
83
+ </script>
84
+ <script src="../sorter.js"></script>
85
+ <script src="../block-navigation.js"></script>
86
+ </body>
87
+ </html>
88
+
@@ -3,15 +3,15 @@
3
3
  <html lang="en">
4
4
 
5
5
  <head>
6
- <title>Code coverage report for CustomProperties/Config/CustomPropertiesView.js</title>
6
+ <title>Code coverage report for IconSelect/IconSelect.js</title>
7
7
  <meta charset="utf-8" />
8
- <link rel="stylesheet" href="../../prettify.css" />
9
- <link rel="stylesheet" href="../../base.css" />
10
- <link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
8
+ <link rel="stylesheet" href="../prettify.css" />
9
+ <link rel="stylesheet" href="../base.css" />
10
+ <link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
11
11
  <meta name="viewport" content="width=device-width, initial-scale=1" />
12
12
  <style type='text/css'>
13
13
  .coverage-summary .sorter {
14
- background-image: url(../../sort-arrow-sprite.png);
14
+ background-image: url(../sort-arrow-sprite.png);
15
15
  }
16
16
  </style>
17
17
  </head>
@@ -19,34 +19,34 @@
19
19
  <body>
20
20
  <div class='wrapper'>
21
21
  <div class='pad1'>
22
- <h1><a href="../../index.html">All files</a> / <a href="index.html">CustomProperties/Config</a> CustomPropertiesView.js</h1>
22
+ <h1><a href="../index.html">All files</a> / <a href="index.html">IconSelect</a> IconSelect.js</h1>
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
26
26
  <span class="strong">0% </span>
27
27
  <span class="quiet">Statements</span>
28
- <span class='fraction'>0/3</span>
28
+ <span class='fraction'>0/13</span>
29
29
  </div>
30
30
 
31
31
 
32
32
  <div class='fl pad1y space-right2'>
33
33
  <span class="strong">0% </span>
34
34
  <span class="quiet">Branches</span>
35
- <span class='fraction'>0/34</span>
35
+ <span class='fraction'>0/15</span>
36
36
  </div>
37
37
 
38
38
 
39
39
  <div class='fl pad1y space-right2'>
40
40
  <span class="strong">0% </span>
41
41
  <span class="quiet">Functions</span>
42
- <span class='fraction'>0/1</span>
42
+ <span class='fraction'>0/4</span>
43
43
  </div>
44
44
 
45
45
 
46
46
  <div class='fl pad1y space-right2'>
47
47
  <span class="strong">0% </span>
48
48
  <span class="quiet">Lines</span>
49
- <span class='fraction'>0/3</span>
49
+ <span class='fraction'>0/12</span>
50
50
  </div>
51
51
 
52
52
 
@@ -202,84 +202,7 @@
202
202
  <a name='L137'></a><a href='#L137'>137</a>
203
203
  <a name='L138'></a><a href='#L138'>138</a>
204
204
  <a name='L139'></a><a href='#L139'>139</a>
205
- <a name='L140'></a><a href='#L140'>140</a>
206
- <a name='L141'></a><a href='#L141'>141</a>
207
- <a name='L142'></a><a href='#L142'>142</a>
208
- <a name='L143'></a><a href='#L143'>143</a>
209
- <a name='L144'></a><a href='#L144'>144</a>
210
- <a name='L145'></a><a href='#L145'>145</a>
211
- <a name='L146'></a><a href='#L146'>146</a>
212
- <a name='L147'></a><a href='#L147'>147</a>
213
- <a name='L148'></a><a href='#L148'>148</a>
214
- <a name='L149'></a><a href='#L149'>149</a>
215
- <a name='L150'></a><a href='#L150'>150</a>
216
- <a name='L151'></a><a href='#L151'>151</a>
217
- <a name='L152'></a><a href='#L152'>152</a>
218
- <a name='L153'></a><a href='#L153'>153</a>
219
- <a name='L154'></a><a href='#L154'>154</a>
220
- <a name='L155'></a><a href='#L155'>155</a>
221
- <a name='L156'></a><a href='#L156'>156</a>
222
- <a name='L157'></a><a href='#L157'>157</a>
223
- <a name='L158'></a><a href='#L158'>158</a>
224
- <a name='L159'></a><a href='#L159'>159</a>
225
- <a name='L160'></a><a href='#L160'>160</a>
226
- <a name='L161'></a><a href='#L161'>161</a>
227
- <a name='L162'></a><a href='#L162'>162</a>
228
- <a name='L163'></a><a href='#L163'>163</a>
229
- <a name='L164'></a><a href='#L164'>164</a>
230
- <a name='L165'></a><a href='#L165'>165</a>
231
- <a name='L166'></a><a href='#L166'>166</a>
232
- <a name='L167'></a><a href='#L167'>167</a>
233
- <a name='L168'></a><a href='#L168'>168</a>
234
- <a name='L169'></a><a href='#L169'>169</a>
235
- <a name='L170'></a><a href='#L170'>170</a>
236
- <a name='L171'></a><a href='#L171'>171</a>
237
- <a name='L172'></a><a href='#L172'>172</a>
238
- <a name='L173'></a><a href='#L173'>173</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
239
- <span class="cline-any cline-neutral">&nbsp;</span>
240
- <span class="cline-any cline-neutral">&nbsp;</span>
241
- <span class="cline-any cline-neutral">&nbsp;</span>
242
- <span class="cline-any cline-neutral">&nbsp;</span>
243
- <span class="cline-any cline-neutral">&nbsp;</span>
244
- <span class="cline-any cline-neutral">&nbsp;</span>
245
- <span class="cline-any cline-no">&nbsp;</span>
246
- <span class="cline-any cline-neutral">&nbsp;</span>
247
- <span class="cline-any cline-neutral">&nbsp;</span>
248
- <span class="cline-any cline-neutral">&nbsp;</span>
249
- <span class="cline-any cline-no">&nbsp;</span>
250
- <span class="cline-any cline-neutral">&nbsp;</span>
251
- <span class="cline-any cline-neutral">&nbsp;</span>
252
- <span class="cline-any cline-neutral">&nbsp;</span>
253
- <span class="cline-any cline-neutral">&nbsp;</span>
254
- <span class="cline-any cline-neutral">&nbsp;</span>
255
- <span class="cline-any cline-neutral">&nbsp;</span>
256
- <span class="cline-any cline-neutral">&nbsp;</span>
257
- <span class="cline-any cline-neutral">&nbsp;</span>
258
- <span class="cline-any cline-neutral">&nbsp;</span>
259
- <span class="cline-any cline-neutral">&nbsp;</span>
260
- <span class="cline-any cline-neutral">&nbsp;</span>
261
- <span class="cline-any cline-neutral">&nbsp;</span>
262
- <span class="cline-any cline-neutral">&nbsp;</span>
263
- <span class="cline-any cline-neutral">&nbsp;</span>
264
- <span class="cline-any cline-neutral">&nbsp;</span>
265
- <span class="cline-any cline-neutral">&nbsp;</span>
266
- <span class="cline-any cline-neutral">&nbsp;</span>
267
- <span class="cline-any cline-neutral">&nbsp;</span>
268
- <span class="cline-any cline-neutral">&nbsp;</span>
269
- <span class="cline-any cline-neutral">&nbsp;</span>
270
- <span class="cline-any cline-neutral">&nbsp;</span>
271
- <span class="cline-any cline-neutral">&nbsp;</span>
272
- <span class="cline-any cline-neutral">&nbsp;</span>
273
- <span class="cline-any cline-neutral">&nbsp;</span>
274
- <span class="cline-any cline-neutral">&nbsp;</span>
275
- <span class="cline-any cline-neutral">&nbsp;</span>
276
- <span class="cline-any cline-neutral">&nbsp;</span>
277
- <span class="cline-any cline-neutral">&nbsp;</span>
278
- <span class="cline-any cline-neutral">&nbsp;</span>
279
- <span class="cline-any cline-neutral">&nbsp;</span>
280
- <span class="cline-any cline-neutral">&nbsp;</span>
281
- <span class="cline-any cline-neutral">&nbsp;</span>
282
- <span class="cline-any cline-neutral">&nbsp;</span>
205
+ <a name='L140'></a><a href='#L140'>140</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
283
206
  <span class="cline-any cline-neutral">&nbsp;</span>
284
207
  <span class="cline-any cline-neutral">&nbsp;</span>
285
208
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -295,6 +218,7 @@
295
218
  <span class="cline-any cline-neutral">&nbsp;</span>
296
219
  <span class="cline-any cline-neutral">&nbsp;</span>
297
220
  <span class="cline-any cline-neutral">&nbsp;</span>
221
+ <span class="cline-any cline-no">&nbsp;</span>
298
222
  <span class="cline-any cline-neutral">&nbsp;</span>
299
223
  <span class="cline-any cline-neutral">&nbsp;</span>
300
224
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -309,6 +233,7 @@
309
233
  <span class="cline-any cline-neutral">&nbsp;</span>
310
234
  <span class="cline-any cline-neutral">&nbsp;</span>
311
235
  <span class="cline-any cline-neutral">&nbsp;</span>
236
+ <span class="cline-any cline-no">&nbsp;</span>
312
237
  <span class="cline-any cline-neutral">&nbsp;</span>
313
238
  <span class="cline-any cline-neutral">&nbsp;</span>
314
239
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -319,13 +244,18 @@
319
244
  <span class="cline-any cline-neutral">&nbsp;</span>
320
245
  <span class="cline-any cline-neutral">&nbsp;</span>
321
246
  <span class="cline-any cline-neutral">&nbsp;</span>
247
+ <span class="cline-any cline-no">&nbsp;</span>
322
248
  <span class="cline-any cline-neutral">&nbsp;</span>
323
249
  <span class="cline-any cline-neutral">&nbsp;</span>
324
250
  <span class="cline-any cline-neutral">&nbsp;</span>
325
251
  <span class="cline-any cline-neutral">&nbsp;</span>
252
+ <span class="cline-any cline-no">&nbsp;</span>
253
+ <span class="cline-any cline-no">&nbsp;</span>
326
254
  <span class="cline-any cline-neutral">&nbsp;</span>
327
255
  <span class="cline-any cline-neutral">&nbsp;</span>
328
256
  <span class="cline-any cline-neutral">&nbsp;</span>
257
+ <span class="cline-any cline-no">&nbsp;</span>
258
+ <span class="cline-any cline-no">&nbsp;</span>
329
259
  <span class="cline-any cline-neutral">&nbsp;</span>
330
260
  <span class="cline-any cline-neutral">&nbsp;</span>
331
261
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -337,6 +267,8 @@
337
267
  <span class="cline-any cline-neutral">&nbsp;</span>
338
268
  <span class="cline-any cline-neutral">&nbsp;</span>
339
269
  <span class="cline-any cline-neutral">&nbsp;</span>
270
+ <span class="cline-any cline-no">&nbsp;</span>
271
+ <span class="cline-any cline-no">&nbsp;</span>
340
272
  <span class="cline-any cline-neutral">&nbsp;</span>
341
273
  <span class="cline-any cline-neutral">&nbsp;</span>
342
274
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -346,8 +278,10 @@
346
278
  <span class="cline-any cline-neutral">&nbsp;</span>
347
279
  <span class="cline-any cline-neutral">&nbsp;</span>
348
280
  <span class="cline-any cline-neutral">&nbsp;</span>
281
+ <span class="cline-any cline-no">&nbsp;</span>
349
282
  <span class="cline-any cline-neutral">&nbsp;</span>
350
283
  <span class="cline-any cline-neutral">&nbsp;</span>
284
+ <span class="cline-any cline-no">&nbsp;</span>
351
285
  <span class="cline-any cline-neutral">&nbsp;</span>
352
286
  <span class="cline-any cline-neutral">&nbsp;</span>
353
287
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -372,6 +306,7 @@
372
306
  <span class="cline-any cline-neutral">&nbsp;</span>
373
307
  <span class="cline-any cline-neutral">&nbsp;</span>
374
308
  <span class="cline-any cline-neutral">&nbsp;</span>
309
+ <span class="cline-any cline-no">&nbsp;</span>
375
310
  <span class="cline-any cline-neutral">&nbsp;</span>
376
311
  <span class="cline-any cline-neutral">&nbsp;</span>
377
312
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -386,7 +321,6 @@
386
321
  <span class="cline-any cline-neutral">&nbsp;</span>
387
322
  <span class="cline-any cline-neutral">&nbsp;</span>
388
323
  <span class="cline-any cline-neutral">&nbsp;</span>
389
- <span class="cline-any cline-no">&nbsp;</span>
390
324
  <span class="cline-any cline-neutral">&nbsp;</span>
391
325
  <span class="cline-any cline-neutral">&nbsp;</span>
392
326
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -407,178 +341,145 @@
407
341
  <span class="cline-any cline-neutral">&nbsp;</span>
408
342
  <span class="cline-any cline-neutral">&nbsp;</span>
409
343
  <span class="cline-any cline-neutral">&nbsp;</span>
410
- <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import PropTypes from 'prop-types';
411
- import { FormattedMessage } from 'react-intl';
412
- import { Col, KeyValue, NoValue, Row } from '@folio/stripes/components';
344
+ <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import { forwardRef, useImperativeHandle } from 'react';
345
+ import PropTypes from 'prop-types';
346
+ &nbsp;
347
+ import classnames from 'classnames';
348
+ &nbsp;
349
+ import {
350
+ IconButton,
351
+ Icon,
352
+ } from '@folio/stripes/components';
413
353
  &nbsp;
414
- import { REFDATA_CLASS_NAME } from '../../constants/customProperties';
354
+ import css from '../../../styles/IconSelect.css';
415
355
  &nbsp;
416
- // A default option for CustProp view pane, with the ability to override labels for fields
417
- const CustomPropertiesView = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span></span>
418
- customProperty,
419
- labelOverrides
420
- }) =&gt; {
356
+ import RichSelect, { useSelectedOption } from '../RichSelect';
357
+ import FormattedKintMessage from '../FormattedKintMessage';
358
+ &nbsp;
359
+ // A form component which acts as a "Select for states with corresponding icons"
360
+ const IconSelect = <span class="cstat-no" title="statement not covered" >forwardRef(<span class="fstat-no" title="function not covered" >({</span></span>
361
+ ariaLabel,
362
+ disabled = <span class="branch-0 cbranch-no" title="branch not covered" >false,</span>
363
+ id,
364
+ input,
365
+ intlKey: passedIntlKey,
366
+ intlNS: passedIntlNS,
367
+ label,
368
+ meta,
369
+ notSet,
370
+ onChange,
371
+ options: userOptions = <span class="branch-0 cbranch-no" title="branch not covered" >[],</span>
372
+ required = <span class="branch-0 cbranch-no" title="branch not covered" >false,</span>
373
+ value
374
+ }, ref) =&gt; {
375
+ const defaultNotSet = <span class="cstat-no" title="statement not covered" >{</span>
376
+ icon: 'ellipsis',
377
+ value: '',
378
+ label: &lt;FormattedKintMessage
379
+ id="notSet"
380
+ intlKey={passedIntlKey}
381
+ intlNS={passedIntlNS}
382
+ /&gt;
383
+ };
384
+ &nbsp;
385
+ // Options with notSet
386
+ const options = <span class="cstat-no" title="statement not covered" >[</span>
387
+ notSet ?? defaultNotSet,
388
+ ...userOptions
389
+ ];
390
+ &nbsp;
391
+ const [richSelectRef, selectedOption] = <span class="cstat-no" title="statement not covered" >useSelectedOption();</span>
392
+ <span class="cstat-no" title="statement not covered" > useImperativeHandle(ref, <span class="fstat-no" title="function not covered" >()</span> =&gt; (<span class="cstat-no" title="statement not covered" >{</span></span>
393
+ selectedOption
394
+ }));
395
+ &nbsp;
396
+ const { className: iconButtonClassName, ...buttonProps } = <span class="cstat-no" title="statement not covered" >selectedOption?.buttonProps ?? {};</span>
421
397
  <span class="cstat-no" title="statement not covered" > return (</span>
422
- &lt;&gt;
423
- &lt;Row&gt;
424
- &lt;Col xs={6}&gt;
425
- &lt;KeyValue
426
- label={
427
- labelOverrides?.label ??
428
- &lt;FormattedMessage id="stripes-kint-components.customProperties.label" /&gt;
429
- }
430
- value={customProperty?.label}
431
- /&gt;
432
- &lt;/Col&gt;
433
- &lt;Col xs={6}&gt;
434
- &lt;KeyValue
435
- label={
436
- labelOverrides?.name ??
437
- &lt;FormattedMessage id="stripes-kint-components.customProperties.name" /&gt;
438
- }
439
- value={customProperty?.name}
440
- /&gt;
441
- &lt;/Col&gt;
442
- &lt;/Row&gt;
443
- &lt;Row&gt;
444
- &lt;Col xs={12}&gt;
445
- &lt;KeyValue
446
- label={
447
- labelOverrides?.description ??
448
- &lt;FormattedMessage id="stripes-kint-components.customProperties.description" /&gt;
449
- }
450
- value={customProperty?.description}
451
- /&gt;
452
- &lt;/Col&gt;
453
- &lt;/Row&gt;
454
- &lt;Row&gt;
455
- &lt;Col xs={6}&gt;
456
- &lt;KeyValue
457
- label={
458
- labelOverrides?.primary ??
459
- &lt;FormattedMessage
460
- id="stripes-kint-components.customProperties.primary"
461
- /&gt;
462
- }
463
- value={
464
- &lt;FormattedMessage
465
- id={
466
- customProperty?.primary
467
- ? 'stripes-kint-components.yes'
468
- : 'stripes-kint-components.no'
469
- }
470
- /&gt;
471
- }
472
- /&gt;
473
- &lt;/Col&gt;
474
- &lt;Col xs={6}&gt;
475
- &lt;KeyValue
476
- label={
477
- labelOverrides?.retired ??
478
- &lt;FormattedMessage
479
- id="stripes-kint-components.customProperties.retired"
480
- /&gt;
481
- }
482
- value={
483
- &lt;FormattedMessage
484
- id={
485
- customProperty?.retired
486
- ? 'stripes-kint-components.yes'
487
- : 'stripes-kint-components.no'
488
- }
489
- /&gt;
490
- }
491
- /&gt;
492
- &lt;/Col&gt;
493
- &lt;/Row&gt;
494
- &lt;Row&gt;
495
- &lt;Col xs={6}&gt;
496
- &lt;KeyValue
497
- label={
498
- labelOverrides?.weight ??
499
- &lt;FormattedMessage id="stripes-kint-components.customProperties.weight" /&gt;
500
- }
501
- value={customProperty?.weight}
502
- /&gt;
503
- &lt;/Col&gt;
504
- &lt;Col xs={6}&gt;
505
- &lt;KeyValue
506
- label={
507
- labelOverrides?.defaultVisibility ??
508
- &lt;FormattedMessage id="stripes-kint-components.customProperties.defaultVisibility" /&gt;
509
- }
510
- value={
511
- &lt;FormattedMessage
512
- id={
513
- customProperty?.defaultInternal
514
- ? 'stripes-kint-components.customProperties.internalTrue'
515
- : 'stripes-kint-components.customProperties.internalFalse'
516
- }
517
- /&gt;
518
- }
519
- /&gt;
520
- &lt;/Col&gt;
521
- &lt;/Row&gt;
522
- &lt;Row&gt;
523
- &lt;Col xs={6}&gt;
524
- &lt;KeyValue
525
- label={
526
- labelOverrides?.ctx ??
527
- &lt;FormattedMessage id="stripes-kint-components.customProperties.ctx" /&gt;
528
- }
529
- value={customProperty?.ctx ?? &lt;NoValue /&gt;}
530
- /&gt;
531
- &lt;/Col&gt;
532
- &lt;/Row&gt;
533
- &lt;Row&gt;
534
- &lt;Col xs={6}&gt;
535
- {customProperty?.type &amp;&amp; (
536
- &lt;KeyValue
537
- label={
538
- labelOverrides?.type ??
539
- &lt;FormattedMessage id="stripes-kint-components.customProperties.type" /&gt;
540
- }
541
- value={&lt;FormattedMessage id={`stripes-kint-components.customProperties.type.${customProperty?.type}`} /&gt;}
542
- /&gt;
543
- )}
544
- &lt;/Col&gt;
545
- &lt;Col xs={6}&gt;
546
- {customProperty?.type === REFDATA_CLASS_NAME &amp;&amp; (
547
- &lt;KeyValue
548
- label={
549
- labelOverrides?.category ??
550
- &lt;FormattedMessage id="stripes-kint-components.customProperties.category" /&gt;
551
- }
552
- value={customProperty?.category?.desc ?? &lt;NoValue /&gt;}
553
- /&gt;
554
- )}
555
- &lt;/Col&gt;
556
- &lt;/Row&gt;
557
- &lt;/&gt;
558
- );
559
- };
398
+ &lt;RichSelect
399
+ ref={richSelectRef}
400
+ ariaLabel={ariaLabel}
401
+ disabled={disabled}
402
+ id={id}
403
+ input={input}
404
+ label={label}
405
+ meta={meta}
406
+ onChange={onChange}
407
+ options={options}
408
+ renderOption={<span class="fstat-no" title="function not covered" >(o</span>pt) =&gt; {
409
+ <span class="cstat-no" title="statement not covered" > if (opt.icon) {</span>
410
+ <span class="cstat-no" title="statement not covered" > return (</span>
411
+ &lt;Icon
412
+ icon={opt.icon}
413
+ {...opt.iconProps}
414
+ &gt;
415
+ {opt.label ?? opt.value}
416
+ &lt;/Icon&gt;
417
+ );
418
+ }
560
419
  &nbsp;
561
- <span class="cstat-no" title="statement not covered" >CustomPropertiesView.propTypes = {</span>
562
- customProperty: PropTypes.shape({
563
- id: PropTypes.string,
564
- label: PropTypes.string,
565
- name: PropTypes.string,
566
- description: PropTypes.string,
567
- weight: PropTypes.number,
568
- primary: PropTypes.bool,
569
- retired: PropTypes.bool,
570
- defaultInternal: PropTypes.bool,
571
- ctx: PropTypes.string,
572
- type: PropTypes.string,
573
- category: PropTypes.shape({
574
- desc: PropTypes.string
575
- })
420
+ <span class="cstat-no" title="statement not covered" > return opt.label ?? opt.value;</span>
421
+ }}
422
+ renderTrigger={<span class="fstat-no" title="function not covered" >({</span> onToggle, triggerRef, keyHandler, ariaProps, getTriggerProps }) =&gt; (
423
+ <span class="cstat-no" title="statement not covered" > &lt;IconButton</span>
424
+ ref={triggerRef}
425
+ disabled={disabled}
426
+ icon={selectedOption?.icon ?? 'ellipsis'}
427
+ marginBottom0
428
+ onClick={onToggle}
429
+ onKeyDown={keyHandler}
430
+ type="button"
431
+ {...{
432
+ className: classnames(
433
+ css.buttonStyle,
434
+ iconButtonClassName
435
+ ),
436
+ ...buttonProps
437
+ }}
438
+ {...getTriggerProps()}
439
+ {...ariaProps}
440
+ /&gt;
441
+ )}
442
+ required={required}
443
+ value={value}
444
+ /&gt;
445
+ );
446
+ });
576
447
  &nbsp;
448
+ <span class="cstat-no" title="statement not covered" >IconSelect.propTypes = {</span>
449
+ ariaLabel: PropTypes.string,
450
+ disabled: PropTypes.bool,
451
+ id: PropTypes.string,
452
+ input: PropTypes.object,
453
+ intlKey: PropTypes.string,
454
+ intlNS: PropTypes.string,
455
+ label: PropTypes.oneOfType([
456
+ PropTypes.string,
457
+ PropTypes.func,
458
+ PropTypes.node
459
+ ]),
460
+ meta: PropTypes.object,
461
+ notSet: PropTypes.shape({
462
+ icon: PropTypes.string,
463
+ value: PropTypes.string.isRequired,
464
+ label: PropTypes.oneOfType([
465
+ PropTypes.string,
466
+ PropTypes.node
467
+ ])
577
468
  }),
578
- labelOverrides: PropTypes.object
469
+ onChange: PropTypes.func,
470
+ options: PropTypes.arrayOf(PropTypes.shape({
471
+ icon: PropTypes.string,
472
+ value: PropTypes.string.isRequired,
473
+ label: PropTypes.oneOfType([
474
+ PropTypes.string,
475
+ PropTypes.node
476
+ ])
477
+ })),
478
+ required: PropTypes.bool,
479
+ value: PropTypes.string,
579
480
  };
580
481
  &nbsp;
581
- export default CustomPropertiesView;
482
+ export default IconSelect;
582
483
  &nbsp;</pre></td></tr></table></pre>
583
484
 
584
485
  <div class='push'></div><!-- for sticky footer -->
@@ -586,16 +487,16 @@ export default CustomPropertiesView;
586
487
  <div class='footer quiet pad2 space-top1 center small'>
587
488
  Code coverage generated by
588
489
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
589
- at Fri Mar 11 2022 16:43:16 GMT+0000 (Greenwich Mean Time)
490
+ at 2022-09-16T13:23:25.290Z
590
491
  </div>
591
- <script src="../../prettify.js"></script>
492
+ <script src="../prettify.js"></script>
592
493
  <script>
593
494
  window.onload = function () {
594
495
  prettyPrint();
595
496
  };
596
497
  </script>
597
- <script src="../../sorter.js"></script>
598
- <script src="../../block-navigation.js"></script>
498
+ <script src="../sorter.js"></script>
499
+ <script src="../block-navigation.js"></script>
599
500
  </body>
600
501
  </html>
601
502