@k-int/stripes-kint-components 2.4.1 → 2.6.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 (337) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/README.md +14 -1
  3. package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +1 -28
  4. package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -4
  5. package/es/artifacts/coverage-jest/lcov-report/sorter.js +1 -28
  6. package/es/index.js +7 -5
  7. package/es/lib/ActionList/ActionList.js +20 -37
  8. package/es/lib/ActionList/ActionListFieldArray.js +85 -118
  9. package/es/lib/ActionList/index.js +1 -5
  10. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +55 -46
  11. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +53 -0
  12. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +103 -65
  13. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +125 -0
  14. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +131 -138
  15. package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +200 -0
  16. package/es/lib/CustomProperties/Config/CustomPropertyView.js +22 -37
  17. package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +194 -0
  18. package/es/lib/CustomProperties/Config/index.js +1 -5
  19. package/es/lib/CustomProperties/Config/testResources.js +198 -0
  20. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -30
  21. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +48 -0
  22. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +1 -34
  23. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +48 -0
  24. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +1 -37
  25. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +113 -0
  26. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +63 -64
  27. package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +283 -0
  28. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -30
  29. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +65 -0
  30. package/es/lib/CustomProperties/Edit/index.js +1 -5
  31. package/es/lib/CustomProperties/Edit/testResources.js +923 -0
  32. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +10 -35
  33. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +102 -0
  34. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +1 -34
  35. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +41 -0
  36. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +1 -34
  37. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +91 -0
  38. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +1 -30
  39. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +86 -0
  40. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +1 -35
  41. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +321 -0
  42. package/es/lib/CustomProperties/Filter/index.js +1 -5
  43. package/es/lib/CustomProperties/Filter/testResources.js +262 -0
  44. package/es/lib/CustomProperties/Filter/useOperators.js +9 -39
  45. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +5 -36
  46. package/es/lib/CustomProperties/Filter/useValueProps.js +13 -35
  47. package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -30
  48. package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +48 -0
  49. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +1 -34
  50. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +55 -0
  51. package/es/lib/CustomProperties/View/CustomPropertyCard.js +15 -34
  52. package/es/lib/CustomProperties/View/index.js +1 -5
  53. package/es/lib/CustomProperties/View/testResources.js +144 -0
  54. package/es/lib/CustomProperties/index.js +1 -5
  55. package/es/lib/EditableRefdataList/EditableRefdataList.js +165 -63
  56. package/es/lib/EditableRefdataList/index.js +1 -5
  57. package/es/lib/EditableSettingsList/EditableSettingsList.js +5 -31
  58. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +1 -30
  59. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +10 -35
  60. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +1 -34
  61. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +1 -34
  62. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +1 -34
  63. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +28 -64
  64. package/es/lib/EditableSettingsList/SettingField/SettingField.js +1 -34
  65. package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +8 -33
  66. package/es/lib/EditableSettingsList/SettingField/index.js +1 -5
  67. package/es/lib/EditableSettingsList/index.js +1 -5
  68. package/es/lib/FormModal/FormModal.js +12 -32
  69. package/es/lib/FormModal/index.js +1 -5
  70. package/es/lib/NoResultsMessage/NoResultsMessage.js +1 -30
  71. package/es/lib/NoResultsMessage/index.js +1 -5
  72. package/es/lib/QueryTypedown/QueryTypedown.js +1 -34
  73. package/es/lib/QueryTypedown/index.js +1 -5
  74. package/es/lib/RefdataButtons/RefdataButtons.js +1 -34
  75. package/es/lib/RefdataButtons/index.js +1 -5
  76. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +5 -36
  77. package/es/lib/SASQLookupComponent/TableBody/TableBody.js +1 -34
  78. package/es/lib/SASQLookupComponent/TableBody/index.js +1 -5
  79. package/es/lib/SASQLookupComponent/index.js +1 -5
  80. package/es/lib/SASQRoute/SASQRoute.js +1 -30
  81. package/es/lib/SASQRoute/index.js +1 -5
  82. package/es/lib/SASQViewComponent/SASQViewComponent.js +1 -34
  83. package/es/lib/SASQViewComponent/index.js +1 -5
  84. package/es/lib/SearchField/SearchField.js +1 -31
  85. package/es/lib/SearchField/index.js +1 -5
  86. package/es/lib/SettingPage/SettingPage.js +1 -34
  87. package/es/lib/SettingPage/SettingPagePane.js +1 -32
  88. package/es/lib/SettingPage/index.js +1 -5
  89. package/es/lib/Typedown/Typedown.js +6 -41
  90. package/es/lib/Typedown/index.js +1 -5
  91. package/es/lib/constants/customProperties.js +4 -39
  92. package/es/lib/constants/eventCodes.js +1 -31
  93. package/es/lib/contexts/SettingsContext.js +1 -30
  94. package/es/lib/contexts/index.js +1 -5
  95. package/es/lib/hooks/index.js +7 -5
  96. package/es/lib/hooks/settingsHooks/index.js +8 -4
  97. package/es/lib/hooks/settingsHooks/useAppSettings.js +84 -0
  98. package/es/lib/hooks/settingsHooks/useSettingSection.js +17 -37
  99. package/es/lib/hooks/settingsHooks/useSettings.js +15 -43
  100. package/es/lib/hooks/typedownHooks/index.js +1 -5
  101. package/es/lib/hooks/typedownHooks/useTypedown.js +1 -34
  102. package/es/lib/hooks/typedownHooks/useTypedownData.js +1 -34
  103. package/es/lib/hooks/typedownHooks/useTypedownToggle.js +1 -34
  104. package/es/lib/hooks/useActiveElement.js +1 -32
  105. package/es/lib/hooks/useAvailableCustomProperties.js +1 -34
  106. package/es/lib/hooks/useCustomProperties.js +4 -34
  107. package/es/lib/hooks/useHelperApp.js +1 -34
  108. package/es/lib/hooks/useInvalidateRefdata.js +1 -34
  109. package/es/lib/hooks/useKiwtFieldArray.js +1 -34
  110. package/es/lib/hooks/useKiwtSASQuery.js +9 -37
  111. package/es/lib/hooks/useLocalStorageState.js +1 -34
  112. package/es/lib/hooks/useMutateCustomProperties.js +14 -42
  113. package/es/lib/hooks/useMutateRefdataValue.js +11 -39
  114. package/es/lib/hooks/useQIndex.js +1 -34
  115. package/es/lib/hooks/useRefdata.js +1 -34
  116. package/es/lib/hooks/useTemplates.js +1 -34
  117. package/es/lib/utils/buildUrl.js +2 -31
  118. package/es/lib/utils/generateKiwtQuery.js +1 -30
  119. package/es/lib/utils/generateKiwtQueryParams.js +1 -30
  120. package/es/lib/utils/groupCustomPropertiesByCtx.js +1 -30
  121. package/es/lib/utils/highlightString.js +1 -29
  122. package/es/lib/utils/index.js +1 -5
  123. package/es/lib/utils/matchString.js +1 -30
  124. package/es/lib/utils/refdataOptions.js +1 -30
  125. package/es/lib/utils/refdataQueryKey.js +1 -30
  126. package/es/lib/utils/renderHelpText.js +1 -30
  127. package/es/lib/utils/selectorSafe.js +1 -30
  128. package/es/lib/utils/sortByLabel.js +1 -30
  129. package/es/lib/utils/toCamelCase.js +1 -30
  130. package/es/lib/utils/typedownQueryKey.js +1 -30
  131. package/es/lib/utils/validators.js +1 -32
  132. package/junit.xml +728 -35
  133. package/package.json +4 -5
  134. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +42 -12
  135. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +222 -93
  136. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +12 -12
  137. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
  138. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +142 -28
  139. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +109 -40
  140. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +308 -188
  141. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +661 -0
  142. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +65 -50
  143. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +2 -2
  144. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +793 -0
  145. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +190 -0
  146. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +340 -0
  147. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +667 -0
  148. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +1066 -0
  149. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +481 -0
  150. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +206 -0
  151. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +100 -0
  152. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +892 -0
  153. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +460 -0
  154. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +529 -0
  155. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +424 -0
  156. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +307 -0
  157. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +451 -0
  158. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +251 -0
  159. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +103 -0
  160. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +976 -0
  161. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +271 -0
  162. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +190 -0
  163. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +238 -0
  164. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +193 -0
  165. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +436 -0
  166. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +640 -0
  167. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +176 -0
  168. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +94 -0
  169. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +571 -0
  170. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +116 -0
  171. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +175 -0
  172. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +158 -26
  173. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +7 -7
  174. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
  175. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +33 -12
  176. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +3 -3
  177. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +3 -3
  178. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +2 -2
  179. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +3 -3
  180. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
  181. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
  182. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +13 -13
  183. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
  184. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +117 -39
  185. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +21 -21
  186. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
  187. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
  188. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
  189. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
  190. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +14 -8
  191. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +11 -11
  192. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
  193. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -3
  194. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
  195. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
  196. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +62 -152
  197. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +373 -0
  198. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +131 -0
  199. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +88 -0
  200. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +9 -9
  201. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +6 -3
  202. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +2 -2
  203. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
  204. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
  205. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
  206. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
  207. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
  208. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
  209. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
  210. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
  211. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +9 -9
  212. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +10 -10
  213. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +18 -18
  214. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
  215. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +8 -26
  216. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +3 -3
  217. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
  218. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +33 -24
  219. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
  220. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +13 -13
  221. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +2 -2
  222. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
  223. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
  224. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +109 -79
  225. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +8 -2
  226. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +17 -17
  227. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
  228. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +292 -0
  229. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +61 -10
  230. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +34 -13
  231. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +7 -7
  232. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
  233. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
  234. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +26 -8
  235. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  236. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +7 -7
  237. package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +205 -0
  238. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +32 -17
  239. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
  240. package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +118 -0
  241. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +7 -7
  242. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +29 -11
  243. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +7 -7
  244. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +7 -7
  245. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +25 -13
  246. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +7 -7
  247. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +14 -17
  248. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +7 -7
  249. package/src/artifacts/coverage-jest/lcov-report/index.html +171 -96
  250. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
  251. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +2 -2
  252. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +36 -9
  253. package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +124 -0
  254. package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +211 -0
  255. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +100 -25
  256. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +29 -2
  257. package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +127 -0
  258. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
  259. package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +112 -0
  260. package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +2 -2
  261. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +2 -2
  262. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
  263. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -2
  264. package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +112 -0
  265. package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +145 -25
  266. package/src/artifacts/coverage-jest/lcov.info +2421 -888
  267. package/src/index.js +2 -1
  268. package/src/lib/ActionList/ActionList.js +12 -5
  269. package/src/lib/ActionList/ActionListFieldArray.js +87 -65
  270. package/src/lib/ActionList/README.md +31 -1
  271. package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +46 -8
  272. package/src/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +35 -0
  273. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +64 -23
  274. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +51 -0
  275. package/src/lib/CustomProperties/Config/CustomPropertyForm.js +172 -132
  276. package/src/lib/CustomProperties/Config/CustomPropertyForm.test.js +126 -0
  277. package/src/lib/CustomProperties/Config/CustomPropertyView.js +29 -9
  278. package/src/lib/CustomProperties/Config/CustomPropertyView.test.js +55 -0
  279. package/src/lib/CustomProperties/Config/testResources.js +236 -0
  280. package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +29 -0
  281. package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +29 -0
  282. package/src/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +51 -0
  283. package/src/lib/CustomProperties/Edit/CustomPropertyField.js +56 -24
  284. package/src/lib/CustomProperties/Edit/CustomPropertyField.test.js +185 -0
  285. package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.js +1 -0
  286. package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +57 -0
  287. package/src/lib/CustomProperties/Edit/testResources.js +1063 -0
  288. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +15 -3
  289. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +43 -0
  290. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +32 -0
  291. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +44 -0
  292. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +40 -0
  293. package/src/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +111 -0
  294. package/src/lib/CustomProperties/Filter/testResources.js +297 -0
  295. package/src/lib/CustomProperties/Filter/useOperators.js +7 -0
  296. package/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +5 -2
  297. package/src/lib/CustomProperties/Filter/useValueProps.js +6 -0
  298. package/src/lib/CustomProperties/View/CustomPropertiesView.test.js +32 -0
  299. package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +32 -0
  300. package/src/lib/CustomProperties/View/CustomPropertyCard.js +10 -2
  301. package/src/lib/CustomProperties/View/testResources.js +162 -0
  302. package/src/lib/EditableRefdataList/EditableRefdataList.js +98 -16
  303. package/src/lib/EditableRefdataList/README.md +3 -0
  304. package/src/lib/EditableSettingsList/EditableSettingsList.js +8 -1
  305. package/src/lib/FormModal/FormModal.js +7 -3
  306. package/src/lib/SASQLookupComponent/SASQLookupComponent.js +8 -0
  307. package/src/lib/Typedown/Typedown.js +4 -10
  308. package/src/lib/constants/customProperties.js +2 -0
  309. package/src/lib/hooks/README.md +28 -3
  310. package/src/lib/hooks/index.js +1 -1
  311. package/src/lib/hooks/settingsHooks/index.js +1 -0
  312. package/src/lib/hooks/settingsHooks/useAppSettings.js +69 -0
  313. package/src/lib/hooks/settingsHooks/useSettingSection.js +19 -2
  314. package/src/lib/hooks/settingsHooks/useSettings.js +12 -5
  315. package/src/lib/hooks/useCustomProperties.js +5 -0
  316. package/src/lib/hooks/useKiwtSASQuery.js +7 -1
  317. package/src/lib/hooks/useMutateCustomProperties.js +7 -3
  318. package/src/lib/hooks/useMutateRefdataValue.js +5 -2
  319. package/src/lib/utils/matchString.js +1 -1
  320. package/styles/ActionListFieldArray.css +11 -2
  321. package/styles/CustomProperties.css +17 -0
  322. package/translations/stripes-kint-components/ar.json +11 -2
  323. package/translations/stripes-kint-components/cs_CZ.json +10 -1
  324. package/translations/stripes-kint-components/de.json +11 -2
  325. package/translations/stripes-kint-components/en.json +12 -3
  326. package/translations/stripes-kint-components/es.json +11 -2
  327. package/translations/stripes-kint-components/fr.json +1 -105
  328. package/translations/stripes-kint-components/hi_IN.json +1 -105
  329. package/translations/stripes-kint-components/hu.json +11 -2
  330. package/translations/stripes-kint-components/it_IT.json +11 -2
  331. package/translations/stripes-kint-components/ja.json +10 -1
  332. package/translations/stripes-kint-components/ko.json +11 -2
  333. package/translations/stripes-kint-components/pl.json +11 -2
  334. package/translations/stripes-kint-components/pt_PT.json +11 -2
  335. package/translations/stripes-kint-components/ru.json +11 -2
  336. package/translations/stripes-kint-components/sv.json +11 -2
  337. package/translations/stripes-kint-components/zh_CN.json +10 -1
@@ -0,0 +1,198 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.refdata = exports.labelOverrides = exports.initialValues = exports.helpPopovers = exports.custPropsSettings = exports.custPropView = exports.custPropLookup = exports.contextFilterOptions = void 0;
7
+ var custPropLookup = {
8
+ 'contextFilterOptions': [{
9
+ 'value': '',
10
+ 'label': 'All'
11
+ }, {
12
+ 'value': 'OpenAccess',
13
+ 'label': 'OpenAccess'
14
+ }, {
15
+ 'value': 'isNull',
16
+ 'label': 'None'
17
+ }],
18
+ 'customPropertiesEndpoint': 'erm/custprops',
19
+ 'labelOverrides': {
20
+ 'paneTitle': '<Memo />',
21
+ 'retired': '<Memo />',
22
+ 'primaryRetired': '<Memo />'
23
+ },
24
+ 'onSelectCustomProperty': function onSelectCustomProperty() {}
25
+ };
26
+ exports.custPropLookup = custPropLookup;
27
+ var custPropsSettings = {
28
+ 'afterQueryCalls': {
29
+ 'put': function put() {},
30
+ 'post': function post() {},
31
+ 'delete': function _delete() {}
32
+ },
33
+ 'contextFilterOptions': [{
34
+ 'value': '',
35
+ 'label': 'All'
36
+ }, {
37
+ 'value': 'OpenAccess',
38
+ 'label': 'OpenAccess'
39
+ }, {
40
+ 'value': 'isNull',
41
+ 'label': 'None'
42
+ }],
43
+ 'customPropertiesEndpoint': 'erm/custprops',
44
+ 'helpPopovers': {
45
+ 'name': '<Memo />',
46
+ 'label': '<Memo />',
47
+ 'ctx': '<Memo />'
48
+ },
49
+ 'labelOverrides': {
50
+ 'modalTitleEdit': '<Memo />',
51
+ 'modalTitleNew': '<Memo />',
52
+ 'paneTitle': 'Supplementary properties',
53
+ 'retired': '<Memo />',
54
+ 'primaryRetired': '<Memo />',
55
+ 'ctx': '<Memo />',
56
+ 'category': '<Memo />'
57
+ },
58
+ 'refdataEndpoint': 'erm/refdata'
59
+ };
60
+ exports.custPropsSettings = custPropsSettings;
61
+ var contextFilterOptions = [{
62
+ 'value': '',
63
+ 'label': 'All'
64
+ }, {
65
+ 'value': 'OpenAccess',
66
+ 'label': 'OpenAccess'
67
+ }, {
68
+ 'value': 'test',
69
+ 'label': 'test'
70
+ }, {
71
+ 'value': 'isNull',
72
+ 'label': 'None'
73
+ }];
74
+ exports.contextFilterOptions = contextFilterOptions;
75
+ var helpPopovers = {
76
+ 'name': '<Memo />',
77
+ 'label': '<Memo />'
78
+ };
79
+ exports.helpPopovers = helpPopovers;
80
+ var labelOverrides = {
81
+ 'paneTitle': '<Memo />',
82
+ 'retired': 'Deprecated',
83
+ 'primaryRetired': '<Memo />'
84
+ };
85
+ exports.labelOverrides = labelOverrides;
86
+ var refdata = [{
87
+ 'label': 'SubscriptionAgreement.ReasonForClosure',
88
+ 'value': '0a7411b65f2260a4ef81b93a5e4e7f78'
89
+ }, {
90
+ 'label': 'SubscriptionAgreement.AgreementStatus',
91
+ 'value': '19b4550b39b65106b04c0c09f8a56d43'
92
+ }, {
93
+ 'label': 'TitleInstance.SubType',
94
+ 'value': '2c91809c80f3bc7e0180f3c349720000'
95
+ }, {
96
+ 'label': 'TitleInstance.Type',
97
+ 'value': '2c91809c80f3bc7e0180f3c349d40003'
98
+ }, {
99
+ 'label': 'SubscriptionAgreementOrg.Role',
100
+ 'value': '2c91809c80f3bc7e0180f3c349e30006'
101
+ }, {
102
+ 'label': 'ContentType.ContentType',
103
+ 'value': '2c91809c80f3bc7e0180f3c349ea0008'
104
+ }, {
105
+ 'label': 'LicenseAmendmentStatus.Status',
106
+ 'value': '2c91809c80f3bc7e0180f3c349fe000c'
107
+ }, {
108
+ 'label': 'StringTemplate.Context',
109
+ 'value': '2c91809c80f3bc7e0180f3c34a170011'
110
+ }, {
111
+ 'label': 'Global.Yes_No',
112
+ 'value': '2c91809c80f3bc7e0180f3c34a270014'
113
+ }, {
114
+ 'label': 'SubscriptionAgreement.AgreementType',
115
+ 'value': '2c91809c80f3bc7e0180f3c34a3e0017'
116
+ }, {
117
+ 'label': 'SubscriptionAgreement.RenewalPriority',
118
+ 'value': '2c91809c80f3bc7e0180f3c34a4f001b'
119
+ }, {
120
+ 'label': 'AgreementRelationship.Type',
121
+ 'value': '2c91809c80f3bc7e0180f3c34aa20026'
122
+ }, {
123
+ 'label': 'InternalContact.Role',
124
+ 'value': '2c91809c80f3bc7e0180f3c34abd002c'
125
+ }, {
126
+ 'label': 'Pkg.AvailabilityScope',
127
+ 'value': '2c91809c80f3bc7e0180f3c34ad20031'
128
+ }, {
129
+ 'label': 'Pkg.LifecycleStatus',
130
+ 'value': '2c91809c80f3bc7e0180f3c34ae90036'
131
+ }, {
132
+ 'label': 'Pkg.Type',
133
+ 'value': '2c91809c80f3bc7e0180f3c34aff003b'
134
+ }, {
135
+ 'label': 'RemoteLicenseLink.Status',
136
+ 'value': '2c91809c80f3bc7e0180f3c34b11003f'
137
+ }, {
138
+ 'label': 'PersistentJob.Result',
139
+ 'value': '2c91809c80f3bc7e0180f3c34b220043'
140
+ }, {
141
+ 'label': 'PersistentJob.Status',
142
+ 'value': '2c91809c80f3bc7e0180f3c34b360048'
143
+ }, {
144
+ 'label': 'DocumentAttachment.AtType',
145
+ 'value': '2c91809c80f3bc7e0180f3c34b46004c'
146
+ }, {
147
+ 'label': 'FileStorageEngines',
148
+ 'value': '2c91809c80f3bc7e0180f3c34b920050'
149
+ }, {
150
+ 'label': 'Yes/No/Other',
151
+ 'value': '2c91809c80f3bc7e0180f3c34c45005a'
152
+ }, {
153
+ 'label': 'AuthIdent',
154
+ 'value': '2c91809c80f3bc7e0180f3c34c52005e'
155
+ }, {
156
+ 'label': 'TitleInstance.PublicationType',
157
+ 'value': '2c91809c80f3bc7e0180f3c353de0068'
158
+ }, {
159
+ 'label': 'IdentifierOccurrence.Status',
160
+ 'value': '2c91809c80f3bc7e0180f3c3543b006a'
161
+ }];
162
+ exports.refdata = refdata;
163
+ var initialValues = {
164
+ 'weight': 0,
165
+ 'primary': true,
166
+ 'retired': false,
167
+ 'defaultInternal': true,
168
+ 'type': 'Decimal',
169
+ 'category': '2c91809c80f3bc7e0180f3c349720000',
170
+ 'label': 'Test',
171
+ 'name': 'test',
172
+ 'description': 'Test description',
173
+ 'ctx': [{
174
+ 'value': 'OpenAccess',
175
+ 'label': 'OpenAccess'
176
+ }]
177
+ };
178
+ exports.initialValues = initialValues;
179
+ var custPropView = {
180
+ 'customProperty': {
181
+ 'id': '2c91809c813418b80181341fcd620067',
182
+ 'retired': false,
183
+ 'ctx': 'OpenAccess',
184
+ 'name': 'Eligible authors',
185
+ 'primary': true,
186
+ 'defaultInternal': true,
187
+ 'label': 'Does this agreement support publishing',
188
+ 'description': 'Does this agreement support publishing',
189
+ 'weight': 0,
190
+ 'type': 'com.k_int.web.toolkit.custprops.types.CustomPropertyText'
191
+ },
192
+ 'labelOverrides': {
193
+ 'paneTitle': '<Memo />',
194
+ 'retired': 'Deprecated',
195
+ 'primaryRetired': '<Memo />'
196
+ }
197
+ };
198
+ exports.custPropView = custPropView;
@@ -13,15 +13,6 @@ var _jsxRuntime = require("react/jsx-runtime");
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- (function () {
17
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
18
- enterModule && enterModule(module);
19
- })();
20
-
21
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
22
- return a;
23
- };
24
-
25
16
  var CustomPropertiesEdit = function CustomPropertiesEdit(_ref) {
26
17
  var _ref$contexts = _ref.contexts,
27
18
  contexts = _ref$contexts === void 0 ? [] : _ref$contexts,
@@ -49,24 +40,4 @@ CustomPropertiesEdit.propTypes = {
49
40
  nameOverride: _propTypes.default.string
50
41
  };
51
42
  var _default = CustomPropertiesEdit;
52
- var _default2 = _default;
53
- exports.default = _default2;
54
- ;
55
-
56
- (function () {
57
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
58
-
59
- if (!reactHotLoader) {
60
- return;
61
- }
62
-
63
- reactHotLoader.register(CustomPropertiesEdit, "CustomPropertiesEdit", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Edit/CustomPropertiesEdit.js");
64
- reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Edit/CustomPropertiesEdit.js");
65
- })();
66
-
67
- ;
68
-
69
- (function () {
70
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
71
- leaveModule && leaveModule(module);
72
- })();
43
+ exports.default = _default;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ var _react = _interopRequireDefault(require("react"));
4
+
5
+ require("@folio/stripes-erm-components/test/jest/__mock__");
6
+
7
+ var _react2 = require("@testing-library/react");
8
+
9
+ var _reactRouterDom = require("react-router-dom");
10
+
11
+ var _helpers = require("../../../../test/jest/helpers");
12
+
13
+ var _testResources = require("./testResources");
14
+
15
+ var _CustomPropertiesEdit = _interopRequireDefault(require("./CustomPropertiesEdit"));
16
+
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+
19
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
+
21
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22
+
23
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
24
+
25
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
26
+
27
+ jest.mock('./CustomPropertiesEditCtx', function () {
28
+ return function () {
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
30
+ children: "CustomPropertiesEditCtx"
31
+ });
32
+ };
33
+ });
34
+ describe('CustomPropertiesEdit', function () {
35
+ var renderComponent;
36
+ beforeEach(function () {
37
+ renderComponent = (0, _helpers.renderWithKintHarness)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.MemoryRouter, {
38
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertiesEdit.default, _objectSpread({}, _testResources.custPropEdit))
39
+ }));
40
+ });
41
+ it('renders CustomPropertiesEditCtx component ', function () {
42
+ var _renderComponent = renderComponent,
43
+ getAllByText = _renderComponent.getAllByText;
44
+ (0, _react2.waitFor)(function () {
45
+ return expect(getAllByText('CustomPropertiesEditCtx')).toBeInTheDocument();
46
+ });
47
+ });
48
+ });
@@ -19,15 +19,6 @@ var _jsxRuntime = require("react/jsx-runtime");
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
- (function () {
23
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
24
- enterModule && enterModule(module);
25
- })();
26
-
27
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28
- return a;
29
- };
30
-
31
22
  var CustomPropertiesEditCtx = function CustomPropertiesEditCtx(_ref) {
32
23
  var ctx = _ref.ctx,
33
24
  customPropertiesEndpoint = _ref.customPropertiesEndpoint,
@@ -98,10 +89,6 @@ var CustomPropertiesEditCtx = function CustomPropertiesEditCtx(_ref) {
98
89
  });
99
90
  };
100
91
 
101
- __signature__(CustomPropertiesEditCtx, "useCustomProperties{{ data: custprops, isLoading }}", function () {
102
- return [_hooks.useCustomProperties];
103
- });
104
-
105
92
  CustomPropertiesEditCtx.propTypes = {
106
93
  ctx: _propTypes.default.string,
107
94
  customPropertiesEndpoint: _propTypes.default.string,
@@ -110,24 +97,4 @@ CustomPropertiesEditCtx.propTypes = {
110
97
  nameOverride: _propTypes.default.string
111
98
  };
112
99
  var _default = CustomPropertiesEditCtx;
113
- var _default2 = _default;
114
- exports.default = _default2;
115
- ;
116
-
117
- (function () {
118
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
119
-
120
- if (!reactHotLoader) {
121
- return;
122
- }
123
-
124
- reactHotLoader.register(CustomPropertiesEditCtx, "CustomPropertiesEditCtx", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js");
125
- reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js");
126
- })();
127
-
128
- ;
129
-
130
- (function () {
131
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
132
- leaveModule && leaveModule(module);
133
- })();
100
+ exports.default = _default;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ var _react = _interopRequireDefault(require("react"));
4
+
5
+ require("@folio/stripes-erm-components/test/jest/__mock__");
6
+
7
+ var _react2 = require("@testing-library/react");
8
+
9
+ var _reactRouterDom = require("react-router-dom");
10
+
11
+ var _helpers = require("../../../../test/jest/helpers");
12
+
13
+ var _testResources = require("./testResources");
14
+
15
+ var _CustomPropertiesEditCtx = _interopRequireDefault(require("./CustomPropertiesEditCtx"));
16
+
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+
19
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
+
21
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22
+
23
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
24
+
25
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
26
+
27
+ jest.mock('./CustomPropertiesListField', function () {
28
+ return function () {
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
30
+ children: "CustomPropertiesListField"
31
+ });
32
+ };
33
+ });
34
+ describe('CustomPropertiesEditCtx', function () {
35
+ var renderComponent;
36
+ beforeEach(function () {
37
+ renderComponent = (0, _helpers.renderWithKintHarness)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.MemoryRouter, {
38
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertiesEditCtx.default, _objectSpread({}, _testResources.custPropEditCtx))
39
+ }));
40
+ });
41
+ it('renders CustomPropertiesListField component ', function () {
42
+ var _renderComponent = renderComponent,
43
+ getAllByText = _renderComponent.getAllByText;
44
+ (0, _react2.waitFor)(function () {
45
+ return expect(getAllByText('CustomPropertiesListField')).toBeInTheDocument();
46
+ });
47
+ });
48
+ });
@@ -25,11 +25,6 @@ var _excluded = ["ctx", "customProperties", "labelOverrides"];
25
25
 
26
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
27
 
28
- (function () {
29
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
30
- enterModule && enterModule(module);
31
- })();
32
-
33
28
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
34
29
 
35
30
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -60,10 +55,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
60
55
 
61
56
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
62
57
 
63
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
64
- return a;
65
- };
66
-
67
58
  var CustomPropertiesList = function CustomPropertiesList(_ref) {
68
59
  var _labelOverrides$prima, _labelOverrides$optio, _labelOverrides$addPr;
69
60
 
@@ -181,8 +172,6 @@ var CustomPropertiesList = function CustomPropertiesList(_ref) {
181
172
  });
182
173
  };
183
174
 
184
- __signature__(CustomPropertiesList, "useState{[customProperties, setCustomProperties]([])}\nuseState{[dirtying, setDirtying](false)}\nuseEffect{}");
185
-
186
175
  var CustomPropertiesListField = function CustomPropertiesListField(_ref2) {
187
176
  var ctx = _ref2.ctx,
188
177
  customProperties = _ref2.customProperties,
@@ -234,10 +223,6 @@ var CustomPropertiesListField = function CustomPropertiesListField(_ref2) {
234
223
  }));
235
224
  };
236
225
 
237
- __signature__(CustomPropertiesListField, "useRef{fieldRef}\nuseAvailableCustomProperties{availableCustomProperties}\nuseFormState{{ initialValues }}", function () {
238
- return [_hooks.useAvailableCustomProperties, _reactFinalForm.useFormState];
239
- });
240
-
241
226
  CustomPropertiesListField.propTypes = {
242
227
  ctx: _propTypes.default.string,
243
228
  customProperties: _propTypes.default.arrayOf(_propTypes.default.object),
@@ -255,25 +240,4 @@ CustomPropertiesList.propTypes = {
255
240
  meta: _propTypes.default.object
256
241
  };
257
242
  var _default = CustomPropertiesListField;
258
- var _default2 = _default;
259
- exports.default = _default2;
260
- ;
261
-
262
- (function () {
263
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
264
-
265
- if (!reactHotLoader) {
266
- return;
267
- }
268
-
269
- reactHotLoader.register(CustomPropertiesList, "CustomPropertiesList", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Edit/CustomPropertiesListField.js");
270
- reactHotLoader.register(CustomPropertiesListField, "CustomPropertiesListField", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Edit/CustomPropertiesListField.js");
271
- reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Edit/CustomPropertiesListField.js");
272
- })();
273
-
274
- ;
275
-
276
- (function () {
277
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
278
- leaveModule && leaveModule(module);
279
- })();
243
+ exports.default = _default;
@@ -0,0 +1,113 @@
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 _react2 = require("@testing-library/react");
14
+
15
+ var _testResources = require("./testResources");
16
+
17
+ var _CustomPropertiesListField = _interopRequireDefault(require("./CustomPropertiesListField"));
18
+
19
+ var _helpers2 = require("../../../../test/jest/helpers");
20
+
21
+ var _jsxRuntime = require("react/jsx-runtime");
22
+
23
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
+
25
+ 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; }
26
+
27
+ 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); } }
28
+
29
+ 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); }); }; }
30
+
31
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
32
+
33
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
34
+
35
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
36
+
37
+ var onSubmit = jest.fn();
38
+ jest.mock('./CustomPropertyFormCard', function () {
39
+ return function () {
40
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
41
+ children: "CustomPropertyFormCard"
42
+ });
43
+ };
44
+ });
45
+ describe('CustomPropertiesListField', function () {
46
+ var renderComponent;
47
+ beforeEach(function () {
48
+ renderComponent = (0, _helpers2.renderWithKintHarness)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_helpers.TestForm, {
49
+ initialValues: _testResources.initialValues,
50
+ onSubmit: onSubmit,
51
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertiesListField.default, _objectSpread({}, _testResources.data))
52
+ }));
53
+ });
54
+ test('displays expected Primary terms key value', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
55
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
56
+ while (1) {
57
+ switch (_context.prev = _context.next) {
58
+ case 0:
59
+ _context.next = 2;
60
+ return (0, _stripesTesting.KeyValue)('Primary terms').exists();
61
+
62
+ case 2:
63
+ case "end":
64
+ return _context.stop();
65
+ }
66
+ }
67
+ }, _callee);
68
+ })));
69
+ test('displays expected Optional terms key value', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
70
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
71
+ while (1) {
72
+ switch (_context2.prev = _context2.next) {
73
+ case 0:
74
+ _context2.next = 2;
75
+ return (0, _stripesTesting.KeyValue)('Optional terms').exists();
76
+
77
+ case 2:
78
+ case "end":
79
+ return _context2.stop();
80
+ }
81
+ }
82
+ }, _callee2);
83
+ })));
84
+ it('renders CustomPropertyFormCard component ', function () {
85
+ var _renderComponent = renderComponent,
86
+ getAllByText = _renderComponent.getAllByText;
87
+ (0, _react2.waitFor)(function () {
88
+ return expect(getAllByText('CustomPropertyFormCard')).toBeInTheDocument();
89
+ });
90
+ });
91
+ it('renders CustomPropertiesList component ', function () {
92
+ var _renderComponent2 = renderComponent,
93
+ getAllByText = _renderComponent2.getAllByText;
94
+ (0, _react2.waitFor)(function () {
95
+ return expect(getAllByText('CustomPropertiesList')).toBeInTheDocument();
96
+ });
97
+ });
98
+ test('renders the Add property button', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
99
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
100
+ while (1) {
101
+ switch (_context3.prev = _context3.next) {
102
+ case 0:
103
+ _context3.next = 2;
104
+ return (0, _stripesTesting.Button)('Add property').exists();
105
+
106
+ case 2:
107
+ case "end":
108
+ return _context3.stop();
109
+ }
110
+ }
111
+ }, _callee3);
112
+ })));
113
+ });