@k-int/stripes-kint-components 2.5.1 → 2.6.2

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 (329) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +1 -28
  3. package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -4
  4. package/es/artifacts/coverage-jest/lcov-report/sorter.js +1 -28
  5. package/es/index.js +7 -5
  6. package/es/lib/ActionList/ActionList.js +1 -31
  7. package/es/lib/ActionList/ActionListFieldArray.js +6 -40
  8. package/es/lib/ActionList/index.js +1 -5
  9. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +55 -46
  10. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +53 -0
  11. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +102 -62
  12. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +125 -0
  13. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +131 -138
  14. package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +200 -0
  15. package/es/lib/CustomProperties/Config/CustomPropertyView.js +22 -37
  16. package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +194 -0
  17. package/es/lib/CustomProperties/Config/index.js +1 -5
  18. package/es/lib/CustomProperties/Config/testResources.js +198 -0
  19. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -30
  20. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +48 -0
  21. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +1 -34
  22. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +48 -0
  23. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +1 -37
  24. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +113 -0
  25. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +63 -64
  26. package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +283 -0
  27. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -30
  28. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +65 -0
  29. package/es/lib/CustomProperties/Edit/index.js +1 -5
  30. package/es/lib/CustomProperties/Edit/testResources.js +923 -0
  31. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +10 -35
  32. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +102 -0
  33. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +1 -34
  34. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +41 -0
  35. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +1 -34
  36. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +91 -0
  37. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +1 -30
  38. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +86 -0
  39. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +1 -35
  40. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +321 -0
  41. package/es/lib/CustomProperties/Filter/index.js +1 -5
  42. package/es/lib/CustomProperties/Filter/testResources.js +262 -0
  43. package/es/lib/CustomProperties/Filter/useOperators.js +9 -39
  44. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +5 -36
  45. package/es/lib/CustomProperties/Filter/useValueProps.js +13 -35
  46. package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -30
  47. package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +48 -0
  48. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +1 -34
  49. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +55 -0
  50. package/es/lib/CustomProperties/View/CustomPropertyCard.js +13 -32
  51. package/es/lib/CustomProperties/View/index.js +1 -5
  52. package/es/lib/CustomProperties/View/testResources.js +144 -0
  53. package/es/lib/CustomProperties/index.js +1 -5
  54. package/es/lib/EditableRefdataList/EditableRefdataList.js +165 -66
  55. package/es/lib/EditableRefdataList/index.js +1 -5
  56. package/es/lib/EditableSettingsList/EditableSettingsList.js +1 -30
  57. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +1 -30
  58. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +10 -35
  59. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +1 -34
  60. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +1 -34
  61. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +1 -34
  62. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +28 -64
  63. package/es/lib/EditableSettingsList/SettingField/SettingField.js +1 -34
  64. package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +8 -33
  65. package/es/lib/EditableSettingsList/SettingField/index.js +1 -5
  66. package/es/lib/EditableSettingsList/index.js +1 -5
  67. package/es/lib/FormModal/FormModal.js +2 -31
  68. package/es/lib/FormModal/index.js +1 -5
  69. package/es/lib/NoResultsMessage/NoResultsMessage.js +1 -30
  70. package/es/lib/NoResultsMessage/index.js +1 -5
  71. package/es/lib/QueryTypedown/QueryTypedown.js +1 -34
  72. package/es/lib/QueryTypedown/index.js +1 -5
  73. package/es/lib/RefdataButtons/RefdataButtons.js +1 -34
  74. package/es/lib/RefdataButtons/index.js +1 -5
  75. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +2 -34
  76. package/es/lib/SASQLookupComponent/TableBody/TableBody.js +1 -34
  77. package/es/lib/SASQLookupComponent/TableBody/index.js +1 -5
  78. package/es/lib/SASQLookupComponent/index.js +1 -5
  79. package/es/lib/SASQRoute/SASQRoute.js +1 -30
  80. package/es/lib/SASQRoute/index.js +1 -5
  81. package/es/lib/SASQViewComponent/SASQViewComponent.js +1 -34
  82. package/es/lib/SASQViewComponent/index.js +1 -5
  83. package/es/lib/SearchField/SearchField.js +1 -31
  84. package/es/lib/SearchField/index.js +1 -5
  85. package/es/lib/SettingPage/SettingPage.js +1 -34
  86. package/es/lib/SettingPage/SettingPagePane.js +1 -32
  87. package/es/lib/SettingPage/index.js +1 -5
  88. package/es/lib/Typedown/Typedown.js +1 -34
  89. package/es/lib/Typedown/index.js +1 -5
  90. package/es/lib/constants/customProperties.js +4 -39
  91. package/es/lib/constants/eventCodes.js +1 -31
  92. package/es/lib/contexts/SettingsContext.js +1 -30
  93. package/es/lib/contexts/index.js +1 -5
  94. package/es/lib/hooks/index.js +7 -5
  95. package/es/lib/hooks/settingsHooks/index.js +8 -4
  96. package/es/lib/hooks/settingsHooks/useAppSettings.js +84 -0
  97. package/es/lib/hooks/settingsHooks/useSettingSection.js +1 -34
  98. package/es/lib/hooks/settingsHooks/useSettings.js +1 -36
  99. package/es/lib/hooks/typedownHooks/index.js +1 -5
  100. package/es/lib/hooks/typedownHooks/useTypedown.js +1 -34
  101. package/es/lib/hooks/typedownHooks/useTypedownData.js +1 -34
  102. package/es/lib/hooks/typedownHooks/useTypedownToggle.js +1 -34
  103. package/es/lib/hooks/useActiveElement.js +1 -32
  104. package/es/lib/hooks/useAvailableCustomProperties.js +1 -34
  105. package/es/lib/hooks/useCustomProperties.js +4 -34
  106. package/es/lib/hooks/useHelperApp.js +1 -34
  107. package/es/lib/hooks/useInvalidateRefdata.js +1 -34
  108. package/es/lib/hooks/useKiwtFieldArray.js +1 -34
  109. package/es/lib/hooks/useKiwtSASQuery.js +1 -35
  110. package/es/lib/hooks/useLocalStorageState.js +1 -34
  111. package/es/lib/hooks/useMutateCustomProperties.js +14 -42
  112. package/es/lib/hooks/useMutateRefdataValue.js +11 -39
  113. package/es/lib/hooks/useQIndex.js +1 -34
  114. package/es/lib/hooks/useRefdata.js +1 -34
  115. package/es/lib/hooks/useTemplates.js +1 -34
  116. package/es/lib/utils/buildUrl.js +2 -31
  117. package/es/lib/utils/generateKiwtQuery.js +1 -30
  118. package/es/lib/utils/generateKiwtQueryParams.js +1 -30
  119. package/es/lib/utils/groupCustomPropertiesByCtx.js +1 -30
  120. package/es/lib/utils/highlightString.js +1 -29
  121. package/es/lib/utils/index.js +1 -5
  122. package/es/lib/utils/matchString.js +1 -30
  123. package/es/lib/utils/refdataOptions.js +1 -30
  124. package/es/lib/utils/refdataQueryKey.js +1 -30
  125. package/es/lib/utils/renderHelpText.js +1 -30
  126. package/es/lib/utils/selectorSafe.js +1 -30
  127. package/es/lib/utils/sortByLabel.js +1 -30
  128. package/es/lib/utils/toCamelCase.js +1 -30
  129. package/es/lib/utils/typedownQueryKey.js +1 -30
  130. package/es/lib/utils/validators.js +1 -32
  131. package/junit.xml +731 -38
  132. package/package.json +4 -4
  133. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
  134. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +1 -1
  135. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +1 -1
  136. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
  137. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +142 -28
  138. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +93 -27
  139. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +308 -188
  140. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +92 -32
  141. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +65 -50
  142. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
  143. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +793 -0
  144. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +17 -17
  145. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +15 -15
  146. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
  147. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +161 -77
  148. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +29 -26
  149. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +61 -46
  150. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
  151. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +892 -0
  152. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +19 -19
  153. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +42 -42
  154. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +23 -23
  155. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +19 -19
  156. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +41 -41
  157. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +102 -87
  158. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
  159. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +976 -0
  160. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +58 -37
  161. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +7 -7
  162. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +47 -29
  163. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +17 -17
  164. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +38 -38
  165. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +30 -6
  166. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +48 -33
  167. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
  168. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +571 -0
  169. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
  170. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
  171. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +134 -17
  172. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +7 -7
  173. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
  174. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +27 -12
  175. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +3 -3
  176. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +3 -3
  177. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +2 -2
  178. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +3 -3
  179. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
  180. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
  181. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +13 -13
  182. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
  183. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +32 -32
  184. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +21 -21
  185. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
  186. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
  187. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
  188. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
  189. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
  190. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
  191. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
  192. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -3
  193. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
  194. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
  195. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +6 -3
  196. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
  197. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
  198. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
  199. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
  200. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
  201. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
  202. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
  203. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
  204. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
  205. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
  206. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
  207. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
  208. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
  209. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
  210. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +9 -9
  211. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +10 -10
  212. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +18 -18
  213. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
  214. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +3 -3
  215. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
  216. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
  217. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +32 -26
  218. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
  219. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +13 -13
  220. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +2 -2
  221. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
  222. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
  223. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +92 -92
  224. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
  225. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +17 -17
  226. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
  227. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +292 -0
  228. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +7 -7
  229. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +8 -8
  230. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
  231. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
  232. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
  233. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
  234. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  235. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +7 -7
  236. package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +7 -7
  237. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +32 -17
  238. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
  239. package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +7 -7
  240. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +7 -7
  241. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +29 -11
  242. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +7 -7
  243. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +7 -7
  244. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +7 -7
  245. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +7 -7
  246. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +9 -9
  247. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +7 -7
  248. package/src/artifacts/coverage-jest/lcov-report/index.html +109 -109
  249. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
  250. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +2 -2
  251. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +2 -2
  252. package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +22 -22
  253. package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
  254. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +31 -31
  255. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
  256. package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +3 -3
  257. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
  258. package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
  259. package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +2 -2
  260. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +2 -2
  261. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
  262. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -2
  263. package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
  264. package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +46 -46
  265. package/src/artifacts/coverage-jest/lcov.info +1124 -916
  266. package/src/index.js +2 -1
  267. package/src/lib/ActionList/ActionListFieldArray.js +3 -2
  268. package/src/lib/ActionList/README.md +12 -1
  269. package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +46 -8
  270. package/src/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +35 -0
  271. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +63 -20
  272. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +51 -0
  273. package/src/lib/CustomProperties/Config/CustomPropertyForm.js +172 -132
  274. package/src/lib/CustomProperties/Config/CustomPropertyForm.test.js +126 -0
  275. package/src/lib/CustomProperties/Config/CustomPropertyView.js +29 -9
  276. package/src/lib/CustomProperties/Config/CustomPropertyView.test.js +55 -0
  277. package/src/lib/CustomProperties/Config/testResources.js +236 -0
  278. package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +29 -0
  279. package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +29 -0
  280. package/src/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +51 -0
  281. package/src/lib/CustomProperties/Edit/CustomPropertyField.js +56 -24
  282. package/src/lib/CustomProperties/Edit/CustomPropertyField.test.js +185 -0
  283. package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.js +1 -0
  284. package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +57 -0
  285. package/src/lib/CustomProperties/Edit/testResources.js +1063 -0
  286. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +15 -3
  287. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +43 -0
  288. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +32 -0
  289. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +44 -0
  290. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +40 -0
  291. package/src/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +111 -0
  292. package/src/lib/CustomProperties/Filter/testResources.js +297 -0
  293. package/src/lib/CustomProperties/Filter/useOperators.js +7 -0
  294. package/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +5 -2
  295. package/src/lib/CustomProperties/Filter/useValueProps.js +6 -0
  296. package/src/lib/CustomProperties/View/CustomPropertiesView.test.js +32 -0
  297. package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +32 -0
  298. package/src/lib/CustomProperties/View/CustomPropertyCard.js +8 -0
  299. package/src/lib/CustomProperties/View/testResources.js +162 -0
  300. package/src/lib/EditableRefdataList/EditableRefdataList.js +108 -26
  301. package/src/lib/EditableRefdataList/README.md +3 -0
  302. package/src/lib/FormModal/FormModal.js +1 -1
  303. package/src/lib/SASQLookupComponent/SASQLookupComponent.js +1 -0
  304. package/src/lib/constants/customProperties.js +2 -0
  305. package/src/lib/hooks/README.md +28 -3
  306. package/src/lib/hooks/index.js +1 -1
  307. package/src/lib/hooks/settingsHooks/index.js +1 -0
  308. package/src/lib/hooks/settingsHooks/useAppSettings.js +69 -0
  309. package/src/lib/hooks/useCustomProperties.js +5 -0
  310. package/src/lib/hooks/useMutateCustomProperties.js +7 -3
  311. package/src/lib/hooks/useMutateRefdataValue.js +5 -2
  312. package/styles/ActionListFieldArray.css +2 -1
  313. package/styles/CustomProperties.css +17 -0
  314. package/translations/stripes-kint-components/ar.json +11 -2
  315. package/translations/stripes-kint-components/cs_CZ.json +10 -1
  316. package/translations/stripes-kint-components/de.json +11 -2
  317. package/translations/stripes-kint-components/en.json +14 -5
  318. package/translations/stripes-kint-components/es.json +11 -2
  319. package/translations/stripes-kint-components/fr.json +1 -105
  320. package/translations/stripes-kint-components/hi_IN.json +1 -105
  321. package/translations/stripes-kint-components/hu.json +11 -2
  322. package/translations/stripes-kint-components/it_IT.json +11 -2
  323. package/translations/stripes-kint-components/ja.json +10 -1
  324. package/translations/stripes-kint-components/ko.json +11 -2
  325. package/translations/stripes-kint-components/pl.json +11 -2
  326. package/translations/stripes-kint-components/pt_PT.json +11 -2
  327. package/translations/stripes-kint-components/ru.json +11 -2
  328. package/translations/stripes-kint-components/sv.json +11 -2
  329. package/translations/stripes-kint-components/zh_CN.json +10 -1
@@ -17,15 +17,12 @@ var _components = require("@folio/stripes/components");
17
17
 
18
18
  var _validators = require("../../utils/validators");
19
19
 
20
+ var _customProperties = require("../../constants/customProperties");
21
+
20
22
  var _jsxRuntime = require("react/jsx-runtime");
21
23
 
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
25
 
24
- (function () {
25
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
26
- enterModule && enterModule(module);
27
- })();
28
-
29
26
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
30
27
 
31
28
  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."); }
@@ -46,12 +43,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
46
43
 
47
44
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
48
45
 
49
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
50
- return a;
51
- };
52
-
53
46
  var CustomPropertyForm = function CustomPropertyForm(_ref) {
54
- var _labelOverrides$label, _labelOverrides$name, _labelOverrides$descr, _labelOverrides$ctx, _labelOverrides$weigh, _labelOverrides$prima2, _labelOverrides$retir, _labelOverrides$defau, _labelOverrides$type, _labelOverrides$categ;
47
+ var _labelOverrides$type, _labelOverrides$categ, _labelOverrides$label, _labelOverrides$name, _labelOverrides$descr, _labelOverrides$ctx, _labelOverrides$weigh, _labelOverrides$prima2, _labelOverrides$retir, _labelOverrides$defau;
55
48
 
56
49
  var contextFilterOptions = _ref.contextFilterOptions,
57
50
  helpPopovers = _ref.helpPopovers,
@@ -123,32 +116,108 @@ var CustomPropertyForm = function CustomPropertyForm(_ref) {
123
116
 
124
117
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
125
118
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Row, {
119
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
120
+ xs: 6,
121
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
122
+ component: _components.Select,
123
+ dataOptions: [{
124
+ label: '',
125
+ value: ''
126
+ }, {
127
+ label: intl.formatMessage({
128
+ id: "stripes-kint-components.customProperties.type.".concat(_customProperties.DECIMAL_CLASS_NAME)
129
+ }),
130
+ value: _customProperties.DECIMAL_CLASS_NAME
131
+ }, {
132
+ label: intl.formatMessage({
133
+ id: "stripes-kint-components.customProperties.type.".concat(_customProperties.INTEGER_CLASS_NAME)
134
+ }),
135
+ value: _customProperties.INTEGER_CLASS_NAME
136
+ }, {
137
+ label: intl.formatMessage({
138
+ id: "stripes-kint-components.customProperties.type.".concat(_customProperties.TEXT_CLASS_NAME)
139
+ }),
140
+ value: _customProperties.TEXT_CLASS_NAME
141
+ }, {
142
+ label: intl.formatMessage({
143
+ id: "stripes-kint-components.customProperties.type.".concat(_customProperties.REFDATA_CLASS_NAME)
144
+ }),
145
+ value: _customProperties.REFDATA_CLASS_NAME
146
+ }, {
147
+ label: intl.formatMessage({
148
+ id: "stripes-kint-components.customProperties.type.".concat(_customProperties.MULTI_REFDATA_CLASS_NAME)
149
+ }),
150
+ value: _customProperties.MULTI_REFDATA_CLASS_NAME
151
+ }, {
152
+ label: intl.formatMessage({
153
+ id: "stripes-kint-components.customProperties.type.".concat(_customProperties.DATE_CLASS_NAME)
154
+ }),
155
+ value: _customProperties.DATE_CLASS_NAME
156
+ }],
157
+ disabled: values === null || values === void 0 ? void 0 : values.id,
158
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
159
+ children: [(_labelOverrides$type = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.type) !== null && _labelOverrides$type !== void 0 ? _labelOverrides$type : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
160
+ id: "stripes-kint-components.customProperties.type"
161
+ }), helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.type ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
162
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.type
163
+ }) : null]
164
+ }),
165
+ name: "type",
166
+ required: true,
167
+ validate: _validators.required
168
+ })
169
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
170
+ xs: 6,
171
+ children: ((values === null || values === void 0 ? void 0 : values.type) === _customProperties.REFDATA_CLASS_NAME || (values === null || values === void 0 ? void 0 : values.type) === _customProperties.MULTI_REFDATA_CLASS_NAME) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
172
+ component: _components.Select,
173
+ dataOptions: [{
174
+ label: '',
175
+ value: ''
176
+ }].concat(_toConsumableArray(refdata)),
177
+ disabled: values === null || values === void 0 ? void 0 : values.id,
178
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
179
+ children: [(_labelOverrides$categ = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.category) !== null && _labelOverrides$categ !== void 0 ? _labelOverrides$categ : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
180
+ id: "stripes-kint-components.customProperties.category"
181
+ }), helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.category ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
182
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.category
183
+ }) : null]
184
+ }),
185
+ name: "category",
186
+ required: true,
187
+ validate: _validators.required
188
+ })
189
+ })]
190
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Row, {
126
191
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
127
192
  xs: 6,
128
193
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
129
194
  component: _components.TextField,
130
- label: (_labelOverrides$label = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.label) !== null && _labelOverrides$label !== void 0 ? _labelOverrides$label : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
131
- id: "stripes-kint-components.customProperties.label"
195
+ id: "custom-prop-label",
196
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
197
+ children: [(_labelOverrides$label = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.label) !== null && _labelOverrides$label !== void 0 ? _labelOverrides$label : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
198
+ id: "stripes-kint-components.customProperties.label"
199
+ }), helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.label ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
200
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.label
201
+ }) : null]
132
202
  }),
133
203
  name: "label",
134
204
  required: true,
135
- startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.label ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
136
- content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.label
137
- }) : null,
138
205
  validate: _validators.required
139
206
  })
140
207
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
141
208
  xs: 6,
142
209
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
143
210
  component: _components.TextField,
144
- label: (_labelOverrides$name = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.name) !== null && _labelOverrides$name !== void 0 ? _labelOverrides$name : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
145
- id: "stripes-kint-components.customProperties.name"
211
+ id: "custom-prop-name",
212
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
213
+ children: [(_labelOverrides$name = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.name) !== null && _labelOverrides$name !== void 0 ? _labelOverrides$name : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
214
+ id: "stripes-kint-components.customProperties.name"
215
+ }), helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.name ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
216
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.name
217
+ }) : null]
146
218
  }),
147
219
  name: "name",
148
220
  required: true,
149
- startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.name ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
150
- content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.name
151
- }) : null,
152
221
  validate: function validate(v) {
153
222
  if (v && v.length) {
154
223
  return /^[a-z][a-z0-9]*$/i.test(v) ? undefined : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
@@ -162,21 +231,23 @@ var CustomPropertyForm = function CustomPropertyForm(_ref) {
162
231
  })]
163
232
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Row, {
164
233
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
165
- xs: 9,
234
+ xs: 6,
166
235
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
167
236
  component: _components.TextArea,
168
- label: (_labelOverrides$descr = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.description) !== null && _labelOverrides$descr !== void 0 ? _labelOverrides$descr : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
169
- id: "stripes-kint-components.customProperties.description"
237
+ id: "custom-prop-description",
238
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
239
+ children: [(_labelOverrides$descr = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.description) !== null && _labelOverrides$descr !== void 0 ? _labelOverrides$descr : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
240
+ id: "stripes-kint-components.customProperties.description"
241
+ }), helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
242
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.description
243
+ }) : null]
170
244
  }),
171
245
  name: "description",
172
246
  required: true,
173
- startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
174
- content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.description
175
- }) : null,
176
247
  validate: _validators.required
177
248
  })
178
249
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
179
- xs: 3,
250
+ xs: 6,
180
251
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
181
252
  actions: [{
182
253
  onSelect: addCtx,
@@ -187,8 +258,12 @@ var CustomPropertyForm = function CustomPropertyForm(_ref) {
187
258
  emptyMessage: intl.formatMessage({
188
259
  id: 'stripes-kint-components.customProperties.noCtxFound'
189
260
  }),
190
- label: (_labelOverrides$ctx = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.ctx) !== null && _labelOverrides$ctx !== void 0 ? _labelOverrides$ctx : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
191
- id: "stripes-kint-components.customProperties.ctx"
261
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
262
+ children: [(_labelOverrides$ctx = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.ctx) !== null && _labelOverrides$ctx !== void 0 ? _labelOverrides$ctx : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
263
+ id: "stripes-kint-components.customProperties.ctx"
264
+ }), helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.ctx ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
265
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.ctx
266
+ }) : null]
192
267
  }),
193
268
  name: "ctx",
194
269
  onChange: function onChange(selectedItems) {
@@ -210,14 +285,16 @@ var CustomPropertyForm = function CustomPropertyForm(_ref) {
210
285
  xs: 3,
211
286
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
212
287
  component: _components.TextField,
213
- label: (_labelOverrides$weigh = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.weight) !== null && _labelOverrides$weigh !== void 0 ? _labelOverrides$weigh : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
214
- id: "stripes-kint-components.customProperties.weight"
288
+ id: "custom-prop-weight",
289
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
290
+ children: [(_labelOverrides$weigh = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.weight) !== null && _labelOverrides$weigh !== void 0 ? _labelOverrides$weigh : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
291
+ id: "stripes-kint-components.customProperties.weight"
292
+ }), helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.weight ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
293
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.weight
294
+ }) : null]
215
295
  }),
216
296
  name: "weight",
217
297
  required: true,
218
- startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.weight ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
219
- content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.weight
220
- }) : null,
221
298
  type: "number",
222
299
  validate: _validators.required
223
300
  })
@@ -237,15 +314,16 @@ var CustomPropertyForm = function CustomPropertyForm(_ref) {
237
314
  value: 'false'
238
315
  }],
239
316
  format: booleanToString,
240
- label: (_labelOverrides$prima2 = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.primary) !== null && _labelOverrides$prima2 !== void 0 ? _labelOverrides$prima2 : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
241
- id: "stripes-kint-components.customProperties.primary"
317
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
318
+ children: [(_labelOverrides$prima2 = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.primary) !== null && _labelOverrides$prima2 !== void 0 ? _labelOverrides$prima2 : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
319
+ id: "stripes-kint-components.customProperties.primary"
320
+ }), helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.primary ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
321
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.primary
322
+ }) : null]
242
323
  }),
243
324
  name: "primary",
244
325
  parse: stringToBoolean,
245
326
  required: true,
246
- startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.primary ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
247
- content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.primary
248
- }) : null,
249
327
  validate: (0, _validators.composeValidators)(_validators.required, primaryRetiredValidator)
250
328
  })
251
329
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
@@ -264,15 +342,16 @@ var CustomPropertyForm = function CustomPropertyForm(_ref) {
264
342
  value: 'false'
265
343
  }],
266
344
  format: booleanToString,
267
- label: (_labelOverrides$retir = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.retired) !== null && _labelOverrides$retir !== void 0 ? _labelOverrides$retir : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
268
- id: "stripes-kint-components.customProperties.retired"
345
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
346
+ children: [(_labelOverrides$retir = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.retired) !== null && _labelOverrides$retir !== void 0 ? _labelOverrides$retir : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
347
+ id: "stripes-kint-components.customProperties.retired"
348
+ }), helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.retired ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
349
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.retired
350
+ }) : null]
269
351
  }),
270
352
  name: "retired",
271
353
  parse: stringToBoolean,
272
354
  required: true,
273
- startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.primary ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
274
- content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.primary
275
- }) : null,
276
355
  validate: (0, _validators.composeValidators)(_validators.required, primaryRetiredValidator)
277
356
  })
278
357
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
@@ -291,78 +370,16 @@ var CustomPropertyForm = function CustomPropertyForm(_ref) {
291
370
  value: 'false'
292
371
  }],
293
372
  format: booleanToString,
294
- label: (_labelOverrides$defau = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.defaultVisibility) !== null && _labelOverrides$defau !== void 0 ? _labelOverrides$defau : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
295
- id: "stripes-kint-components.customProperties.defaultVisibility"
373
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
374
+ children: [(_labelOverrides$defau = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.defaultVisibility) !== null && _labelOverrides$defau !== void 0 ? _labelOverrides$defau : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
375
+ id: "stripes-kint-components.customProperties.defaultVisibility"
376
+ }), helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.defaultVisibility ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
377
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.defaultVisibility
378
+ }) : null]
296
379
  }),
297
380
  name: "defaultInternal",
298
381
  parse: stringToBoolean,
299
382
  required: true,
300
- startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.defaultVisibility ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
301
- content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.defaultVisibility
302
- }) : null,
303
- validate: _validators.required
304
- })
305
- })]
306
- }), !(values !== null && values !== void 0 && values.id) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Row, {
307
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
308
- xs: 6,
309
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
310
- component: _components.Select,
311
- dataOptions: [{
312
- label: '',
313
- value: ''
314
- }, {
315
- label: intl.formatMessage({
316
- id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyDecimal'
317
- }),
318
- value: 'Decimal'
319
- }, {
320
- label: intl.formatMessage({
321
- id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyInteger'
322
- }),
323
- value: 'Integer'
324
- }, {
325
- label: intl.formatMessage({
326
- id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyText'
327
- }),
328
- value: 'Text'
329
- }, {
330
- label: intl.formatMessage({
331
- id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata'
332
- }),
333
- value: 'Refdata'
334
- }, {
335
- label: intl.formatMessage({
336
- id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyLocalDate'
337
- }),
338
- value: 'LocalDate'
339
- }],
340
- label: (_labelOverrides$type = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.type) !== null && _labelOverrides$type !== void 0 ? _labelOverrides$type : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
341
- id: "stripes-kint-components.customProperties.type"
342
- }),
343
- name: "type",
344
- required: true,
345
- startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.type ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
346
- content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.type
347
- }) : null,
348
- validate: _validators.required
349
- })
350
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
351
- xs: 6,
352
- children: (values === null || values === void 0 ? void 0 : values.type) === 'Refdata' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
353
- component: _components.Select,
354
- dataOptions: [{
355
- label: '',
356
- value: ''
357
- }].concat(_toConsumableArray(refdata)),
358
- label: (_labelOverrides$categ = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.category) !== null && _labelOverrides$categ !== void 0 ? _labelOverrides$categ : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
359
- id: "stripes-kint-components.customProperties.category"
360
- }),
361
- name: "category",
362
- required: true,
363
- startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.category ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
364
- content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.category
365
- }) : null,
366
383
  validate: _validators.required
367
384
  })
368
385
  })]
@@ -370,35 +387,11 @@ var CustomPropertyForm = function CustomPropertyForm(_ref) {
370
387
  });
371
388
  };
372
389
 
373
- __signature__(CustomPropertyForm, "useFormState{{ values }}\nuseForm{{ change }}\nuseIntl{intl}\nuseState{[contextOptions, setContextOptions](contextFilterOptions?.filter(ctx => ctx.value !== '' && ctx?.value !== 'isNull'))}", function () {
374
- return [_reactFinalForm.useFormState, _reactFinalForm.useForm, _reactIntl.useIntl];
375
- });
376
-
377
390
  CustomPropertyForm.propTypes = {
378
- contextFilterOptions: _propTypes.default.arrayOf(_propTypes.default.string),
391
+ contextFilterOptions: _propTypes.default.arrayOf(_propTypes.default.object),
379
392
  helpPopovers: _propTypes.default.object,
380
393
  labelOverrides: _propTypes.default.object,
381
394
  refdata: _propTypes.default.arrayOf(_propTypes.default.object)
382
395
  };
383
396
  var _default = CustomPropertyForm;
384
- var _default2 = _default;
385
- exports.default = _default2;
386
- ;
387
-
388
- (function () {
389
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
390
-
391
- if (!reactHotLoader) {
392
- return;
393
- }
394
-
395
- reactHotLoader.register(CustomPropertyForm, "CustomPropertyForm", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertyForm.js");
396
- reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertyForm.js");
397
- })();
398
-
399
- ;
400
-
401
- (function () {
402
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
403
- leaveModule && leaveModule(module);
404
- })();
397
+ exports.default = _default;
@@ -0,0 +1,200 @@
1
+ "use strict";
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
+
5
+ var _react = _interopRequireDefault(require("react"));
6
+
7
+ require("@folio/stripes-erm-components/test/jest/__mock__");
8
+
9
+ var _stripesTesting = require("@folio/stripes-testing");
10
+
11
+ var _helpers = require("@folio/stripes-erm-components/test/jest/helpers");
12
+
13
+ var _helpers2 = require("../../../../test/jest/helpers");
14
+
15
+ var _testResources = require("./testResources");
16
+
17
+ var _CustomPropertyForm = _interopRequireDefault(require("./CustomPropertyForm"));
18
+
19
+ var _jsxRuntime = require("react/jsx-runtime");
20
+
21
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
+
23
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
24
+
25
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
26
+
27
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
28
+
29
+ var onSubmit = jest.fn();
30
+ describe('CustomPropertyForm', function () {
31
+ var renderComponent;
32
+ beforeEach(function () {
33
+ renderComponent = (0, _helpers2.renderWithKintHarness)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_helpers.TestForm, {
34
+ initialValues: _testResources.initialValues,
35
+ onSubmit: onSubmit,
36
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertyForm.default, {
37
+ contextFilterOptions: _testResources.contextFilterOptions,
38
+ helpPopovers: _testResources.helpPopovers,
39
+ labelOverrides: _testResources.labelOverrides,
40
+ refdata: _testResources.refdata
41
+ })
42
+ }));
43
+ });
44
+ it('Displays expected lable ', function () {
45
+ var _renderComponent = renderComponent,
46
+ getByText = _renderComponent.getByText;
47
+ expect(getByText('Label')).toBeInTheDocument();
48
+ });
49
+ it('Displays expected name label', function () {
50
+ var _renderComponent2 = renderComponent,
51
+ getByText = _renderComponent2.getByText;
52
+ expect(getByText('Name')).toBeInTheDocument();
53
+ });
54
+ it('Displays expected description label', function () {
55
+ var _renderComponent3 = renderComponent,
56
+ getByText = _renderComponent3.getByText;
57
+ expect(getByText('Description')).toBeInTheDocument();
58
+ });
59
+ it('Displays expected context label ', function () {
60
+ var _renderComponent4 = renderComponent,
61
+ getByText = _renderComponent4.getByText;
62
+ expect(getByText('Context')).toBeInTheDocument();
63
+ });
64
+ it('Displays expected order weight label ', function () {
65
+ var _renderComponent5 = renderComponent,
66
+ getByText = _renderComponent5.getByText;
67
+ expect(getByText('Order weight')).toBeInTheDocument();
68
+ });
69
+ it('Displays expectred primary label ', function () {
70
+ var _renderComponent6 = renderComponent,
71
+ getByText = _renderComponent6.getByText;
72
+ expect(getByText('Primary')).toBeInTheDocument();
73
+ });
74
+ it('Displays expected default visibility label', function () {
75
+ var _renderComponent7 = renderComponent,
76
+ getByText = _renderComponent7.getByText;
77
+ expect(getByText('Default visibility')).toBeInTheDocument();
78
+ });
79
+ it('Displays expected type label ', function () {
80
+ var _renderComponent8 = renderComponent,
81
+ getByText = _renderComponent8.getByText;
82
+ expect(getByText('Type')).toBeInTheDocument();
83
+ });
84
+ test('Displays expected description value', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
85
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
86
+ while (1) {
87
+ switch (_context.prev = _context.next) {
88
+ case 0:
89
+ _context.next = 2;
90
+ return (0, _stripesTesting.TextArea)({
91
+ id: 'custom-prop-description'
92
+ }).has({
93
+ value: 'Test description'
94
+ });
95
+
96
+ case 2:
97
+ case "end":
98
+ return _context.stop();
99
+ }
100
+ }
101
+ }, _callee);
102
+ })));
103
+ test('renders the Name TextField', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
104
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
105
+ while (1) {
106
+ switch (_context2.prev = _context2.next) {
107
+ case 0:
108
+ _context2.next = 2;
109
+ return (0, _stripesTesting.TextField)({
110
+ id: 'custom-prop-name'
111
+ }).exists();
112
+
113
+ case 2:
114
+ case "end":
115
+ return _context2.stop();
116
+ }
117
+ }
118
+ }, _callee2);
119
+ })));
120
+ test('renders the Lable TextField', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
121
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
122
+ while (1) {
123
+ switch (_context3.prev = _context3.next) {
124
+ case 0:
125
+ _context3.next = 2;
126
+ return (0, _stripesTesting.TextField)({
127
+ id: 'custom-prop-label'
128
+ }).exists();
129
+
130
+ case 2:
131
+ case "end":
132
+ return _context3.stop();
133
+ }
134
+ }
135
+ }, _callee3);
136
+ })));
137
+ test('renders the order weight TextField', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
138
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
139
+ while (1) {
140
+ switch (_context4.prev = _context4.next) {
141
+ case 0:
142
+ _context4.next = 2;
143
+ return (0, _stripesTesting.TextField)({
144
+ id: 'custom-prop-weight'
145
+ }).exists();
146
+
147
+ case 2:
148
+ case "end":
149
+ return _context4.stop();
150
+ }
151
+ }
152
+ }, _callee4);
153
+ })));
154
+ test('renders the expected value in the Deprecated dropdown', function () {
155
+ var _renderComponent9 = renderComponent,
156
+ getByRole = _renderComponent9.getByRole;
157
+ expect(getByRole('combobox', {
158
+ name: 'Deprecated'
159
+ })).toHaveDisplayValue('No');
160
+ });
161
+ test('renders the expected value in the Default visibility dropdown', function () {
162
+ var _renderComponent10 = renderComponent,
163
+ getByRole = _renderComponent10.getByRole;
164
+ expect(getByRole('combobox', {
165
+ name: 'Default visibility'
166
+ })).toHaveDisplayValue('Internal');
167
+ });
168
+ test('renders the expected value in the Primary dropdown', function () {
169
+ var _renderComponent11 = renderComponent,
170
+ getByRole = _renderComponent11.getByRole;
171
+ expect(getByRole('combobox', {
172
+ name: 'Primary'
173
+ })).toHaveDisplayValue('Yes');
174
+ });
175
+ it('Displays expected Decimal option ', function () {
176
+ var _renderComponent12 = renderComponent,
177
+ getByText = _renderComponent12.getByText;
178
+ expect(getByText('Decimal')).toBeInTheDocument();
179
+ });
180
+ it('Displays expected Refdata (multi-select) option ', function () {
181
+ var _renderComponent13 = renderComponent,
182
+ getByText = _renderComponent13.getByText;
183
+ expect(getByText('Refdata (multi-select)')).toBeInTheDocument();
184
+ });
185
+ it('Displays expected Refdata option ', function () {
186
+ var _renderComponent14 = renderComponent,
187
+ getByText = _renderComponent14.getByText;
188
+ expect(getByText('Refdata')).toBeInTheDocument();
189
+ });
190
+ it('Displays expected Text option ', function () {
191
+ var _renderComponent15 = renderComponent,
192
+ getByText = _renderComponent15.getByText;
193
+ expect(getByText('Text')).toBeInTheDocument();
194
+ });
195
+ it('Displays expected Integer option ', function () {
196
+ var _renderComponent16 = renderComponent,
197
+ getByText = _renderComponent16.getByText;
198
+ expect(getByText('Integer')).toBeInTheDocument();
199
+ });
200
+ });