@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
- ## 2.4.1 2022-04-26
1
+ ## 2.6.0 2022-06-20
2
+ * UIOA-118 App does not function when code-splitting is enabled - no longer set history when url has not changed
3
+ * ERM-2137 Support multi-select refdata properties in Agreement/Licenses settings
4
+ * ERM-2173 UX tweaks to custom property configuration and views
5
+ * Added ConfirmationModal and error callout for deletion of refdata to EditableRefDataList
6
+ * useAppSettings hook for easy fetching of an AppSetting
7
+ * ActionList
8
+ * New ActionList fields are now added to the start of the list
9
+ * Buttons within the ActionList can now be passed specfic aria-labels
10
+ * Query handling.
11
+ * useMutateCustomProperties, useMutateRefdataValues, CustomPropertiesSettings and EditableRefdataList now all accept both `afterQueryCalls` and `catchQueryCalls` to allow implementors to trigger specific handling after queries/when queries throw.
12
+ * The default implementation in both components above is now a standard deletion failure message: `"<strong>Error: {label}</strong> was not deleted. {error}"`. This can alternatively be overriden with a `labelOverrides` prop: `{ deleteError: (error, object) => { ... output a callout message } }`
13
+ * Some peer deps changed to dev-deps
14
+ * ERM-2144 Support multi-select refdata properties in License term filter builder
15
+
16
+ ## 2.5.0 2022-05-19
2
17
  * Added FilterConfig support to generateKiwtQueryParams
18
+ * Added a way to trigger inline creation externally through refs and useImperativeHandle
19
+ * Fix for ActionList editing. When a formatter was in place and a field was not editable, the formatter was ignored.
20
+ * Added disabled prop to create button so it is no longer to create infinite new rows, or enter create while editing another row.
21
+ * "Show filters" button on SASQ main pane still displayed when filters are visible
22
+ * AppSettings now use generateKiwtQueryParams and are not limitied to 10.
23
+ * FormModal now disables default footer button when form is invalid/prisitn/submitting (Submit handler must be asyncronous for submitting to be parsed correctly)
24
+ * Typedown labels are now accessible
25
+
3
26
  ## 2.4.0 2022-04-21
4
27
  * Custom Property component fixes
5
28
  * Fix to actionAssigner callback pattern
package/README.md CHANGED
@@ -10,10 +10,23 @@ This repository is available as a public NPM and is pre-transpiled, so it should
10
10
 
11
11
  In the case where components from this repository require translations, it will need to be added to the `stripesDeps` array in the implementing module's `package.json`.
12
12
 
13
+ ## Development
14
+ In order to develop this module within a stripes workspace, a couple of steps are needed
15
+ - An environment variable must be set up (See https://chlee.co/how-to-setup-environment-variables-for-windows-mac-and-linux/), `STRIPES_TRANSPILE_TOKENS="@k-int"`
16
+ - Clone this repository `git clone git@gitlab.com:knowledge-integration/folio/stripes-kint-components.git`
17
+ - Delete all the `devDependencies` in your local package.json. (DO NOT MERGE THESE CHANGES BACK TO MASTER)
18
+ - Nuke your workspace node_modules and rebuild
19
+
20
+ ### What went wrong
21
+ - If you aren't seeing changes take effect double check
22
+ - Your environment variable is definitely set `printenv STRIPES_TRANSPILE_TOKENS` on Linux, Windows may differ
23
+ - The `es` directory does not exist inside your local copy of kint-components. When built, this directory is constructed, and will take precedence if present, so if present, always delete for development work
24
+ - If you aren't seeing translations properly, ensure stripes-kint-components is present in the stripesDeps of your implementing module
25
+
13
26
  ## Documentation
14
27
  The gitlab repository for this project can be found [here](https://gitlab.com/knowledge-integration/folio/stripes-kint-components).
15
28
 
16
29
  ### Quick links
17
30
  - [Components](https://gitlab.com/knowledge-integration/folio/stripes-kint-components/-/tree/main/src/lib)
18
31
  - [Hooks](https://gitlab.com/knowledge-integration/folio/stripes-kint-components/-/tree/main/src/lib/hooks)
19
- - [Utility functions](https://gitlab.com/knowledge-integration/folio/stripes-kint-components/-/tree/main/src/lib/utils)
32
+ - [Utility functions](https://gitlab.com/knowledge-integration/folio/stripes-kint-components/-/tree/main/src/lib/utils)
@@ -1,14 +1,5 @@
1
1
  "use strict";
2
2
 
3
- (function () {
4
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
5
- enterModule && enterModule(module);
6
- })();
7
-
8
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
9
- return a;
10
- };
11
-
12
3
  /* eslint-disable */
13
4
  var jumpToCode = function init() {
14
5
  // Classes of code we would like to highlight in the file view
@@ -88,22 +79,4 @@ var jumpToCode = function init() {
88
79
  };
89
80
  }();
90
81
 
91
- window.addEventListener('keydown', jumpToCode);
92
- ;
93
-
94
- (function () {
95
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
96
-
97
- if (!reactHotLoader) {
98
- return;
99
- }
100
-
101
- reactHotLoader.register(jumpToCode, "jumpToCode", "/home/ethan/FolioModules/stripes-kint-components/src/artifacts/coverage-jest/lcov-report/block-navigation.js");
102
- })();
103
-
104
- ;
105
-
106
- (function () {
107
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
108
- leaveModule && leaveModule(module);
109
- })();
82
+ window.addEventListener('keydown', jumpToCode);
@@ -1,9 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
4
- return a;
5
- };
6
-
7
3
  /* eslint-disable */
8
4
  window.PR_SHOULD_USE_CONTINUATION = true;
9
5
 
@@ -1,14 +1,5 @@
1
1
  "use strict";
2
2
 
3
- (function () {
4
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
5
- enterModule && enterModule(module);
6
- })();
7
-
8
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
9
- return a;
10
- };
11
-
12
3
  /* eslint-disable */
13
4
  var addSorting = function () {
14
5
  'use strict';
@@ -217,22 +208,4 @@ var addSorting = function () {
217
208
  };
218
209
  }();
219
210
 
220
- window.addEventListener('load', addSorting);
221
- ;
222
-
223
- (function () {
224
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
225
-
226
- if (!reactHotLoader) {
227
- return;
228
- }
229
-
230
- reactHotLoader.register(addSorting, "addSorting", "/home/ethan/FolioModules/stripes-kint-components/src/artifacts/coverage-jest/lcov-report/sorter.js");
231
- })();
232
-
233
- ;
234
-
235
- (function () {
236
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
237
- leaveModule && leaveModule(module);
238
- })();
211
+ window.addEventListener('load', addSorting);
package/es/index.js CHANGED
@@ -282,6 +282,12 @@ Object.defineProperty(exports, "useActiveElement", {
282
282
  return _hooks.useActiveElement;
283
283
  }
284
284
  });
285
+ Object.defineProperty(exports, "useAppSettings", {
286
+ enumerable: true,
287
+ get: function get() {
288
+ return _hooks.useAppSettings;
289
+ }
290
+ });
285
291
  Object.defineProperty(exports, "useAvailableCustomProperties", {
286
292
  enumerable: true,
287
293
  get: function get() {
@@ -415,8 +421,4 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
415
421
 
416
422
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
417
423
 
418
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
419
-
420
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
421
- return a;
422
- };
424
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports.default = void 0;
7
9
 
8
- var _react = _interopRequireDefault(require("react"));
10
+ var _react = _interopRequireWildcard(require("react"));
9
11
 
10
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
13
 
@@ -19,14 +21,13 @@ var _ActionListFieldArray = _interopRequireDefault(require("./ActionListFieldArr
19
21
 
20
22
  var _jsxRuntime = require("react/jsx-runtime");
21
23
 
22
- var _excluded = ["actionAssigner", "actionCalls", "columnMapping", "contentData", "creatableFields", "createCallback", "editableFields", "fieldComponents", "hideCreateButton", "visibleFields"];
24
+ var _excluded = ["actionAssigner", "actionCalls", "columnMapping", "contentData", "creatableFields", "createCallback", "editableFields", "fieldComponents", "hideCreateButton", "label", "visibleFields"];
23
25
 
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
27
 
26
- (function () {
27
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
28
- enterModule && enterModule(module);
29
- })();
28
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
+
30
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
30
31
 
31
32
  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
 
@@ -38,10 +39,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
38
39
 
39
40
  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; }
40
41
 
41
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
42
- return a;
43
- };
44
-
45
42
  var propTypes = {
46
43
  actionAssigner: _propTypes.default.func,
47
44
  actionCalls: _propTypes.default.object,
@@ -52,10 +49,10 @@ var propTypes = {
52
49
  editableFields: _propTypes.default.object,
53
50
  fieldComponents: _propTypes.default.object,
54
51
  hideCreateButton: _propTypes.default.bool,
52
+ label: _propTypes.default.string,
55
53
  visibleFields: _propTypes.default.arrayOf(_propTypes.default.string)
56
54
  };
57
-
58
- var ActionList = function ActionList(_ref) {
55
+ var ActionList = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
59
56
  var actionAssigner = _ref.actionAssigner,
60
57
  _ref$actionCalls = _ref.actionCalls,
61
58
  actionCalls = _ref$actionCalls === void 0 ? {} : _ref$actionCalls,
@@ -69,9 +66,16 @@ var ActionList = function ActionList(_ref) {
69
66
  _ref$fieldComponents = _ref.fieldComponents,
70
67
  fieldComponents = _ref$fieldComponents === void 0 ? {} : _ref$fieldComponents,
71
68
  hideCreateButton = _ref.hideCreateButton,
69
+ label = _ref.label,
72
70
  visibleFields = _ref.visibleFields,
73
71
  mclProps = _objectWithoutProperties(_ref, _excluded);
74
72
 
73
+ var ActionListFieldArrayWithRef = function ActionListFieldArrayWithRef(alfaProps) {
74
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionListFieldArray.default, _objectSpread({
75
+ ref: ref
76
+ }, alfaProps));
77
+ };
78
+
75
79
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
76
80
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Form, {
77
81
  enableReinitialize: true,
@@ -94,12 +98,13 @@ var ActionList = function ActionList(_ref) {
94
98
  actionAssigner: actionAssigner,
95
99
  actionCalls: actionCalls,
96
100
  columnMapping: columnMapping,
97
- component: _ActionListFieldArray.default,
101
+ component: ActionListFieldArrayWithRef,
98
102
  creatableFields: creatableFields,
99
103
  createCallback: createCallback,
100
104
  editableFields: editableFields,
101
105
  fieldComponents: fieldComponents,
102
106
  hideCreateButton: hideCreateButton,
107
+ label: label,
103
108
  name: "contentData",
104
109
  visibleFields: visibleFields
105
110
  }, mclProps))
@@ -107,29 +112,7 @@ var ActionList = function ActionList(_ref) {
107
112
  }
108
113
  })
109
114
  });
110
- };
111
-
115
+ });
112
116
  ActionList.propTypes = propTypes;
113
117
  var _default = ActionList;
114
- var _default2 = _default;
115
- exports.default = _default2;
116
- ;
117
-
118
- (function () {
119
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
120
-
121
- if (!reactHotLoader) {
122
- return;
123
- }
124
-
125
- reactHotLoader.register(propTypes, "propTypes", "/home/ethan/FolioModules/stripes-kint-components/src/lib/ActionList/ActionList.js");
126
- reactHotLoader.register(ActionList, "ActionList", "/home/ethan/FolioModules/stripes-kint-components/src/lib/ActionList/ActionList.js");
127
- reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/ActionList/ActionList.js");
128
- })();
129
-
130
- ;
131
-
132
- (function () {
133
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
134
- leaveModule && leaveModule(module);
135
- })();
118
+ exports.default = _default;
@@ -23,9 +23,9 @@ var _ActionListFieldArray = _interopRequireDefault(require("../../../styles/Acti
23
23
 
24
24
  var _jsxRuntime = require("react/jsx-runtime");
25
25
 
26
- var _excluded = ["actionAssigner", "actionCalls", "columnMapping", "creatableFields", "createCallback", "editableFields", "fields", "fieldComponents", "hideCreateButton", "visibleFields"],
27
- _excluded2 = ["actionListActions"],
28
- _excluded3 = ["actionListActions"],
26
+ var _excluded = ["actionAssigner", "actionCalls", "columnMapping", "creatableFields", "createCallback", "editableFields", "fields", "fieldComponents", "hideCreateButton", "label", "visibleFields"],
27
+ _excluded2 = ["actionListActions", "fieldName", "fieldIndex"],
28
+ _excluded3 = ["actionListActions", "fieldName", "fieldIndex"],
29
29
  _excluded4 = ["actionListActions"],
30
30
  _excluded5 = ["formatter"];
31
31
 
@@ -35,11 +35,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
35
35
 
36
36
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
37
37
 
38
- (function () {
39
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
40
- enterModule && enterModule(module);
41
- })();
42
-
43
38
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
44
39
 
45
40
  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."); }
@@ -48,8 +43,6 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
48
43
 
49
44
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
50
45
 
51
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
52
-
53
46
  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; }
54
47
 
55
48
  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; }
@@ -72,10 +65,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
72
65
 
73
66
  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; }
74
67
 
75
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
76
- return a;
77
- };
78
-
79
68
  var EDITING_ACTIONS_WIDTH = 25;
80
69
  var NON_EDITING_ACTIONS_WIDTH = 20;
81
70
  var TOTAL_WIDTH = 100;
@@ -90,10 +79,10 @@ var propTypes = {
90
79
  fieldComponents: _propTypes.default.object,
91
80
  formatter: _propTypes.default.object,
92
81
  hideCreateButton: _propTypes.default.bool,
82
+ label: _propTypes.default.string,
93
83
  visibleFields: _propTypes.default.arrayOf(_propTypes.default.string)
94
84
  };
95
-
96
- var ActionListFieldArray = function ActionListFieldArray(_ref) {
85
+ var ActionListFieldArray = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
97
86
  var actionAssigner = _ref.actionAssigner,
98
87
  actionCalls = _ref.actionCalls,
99
88
  columnMapping = _ref.columnMapping,
@@ -104,6 +93,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
104
93
  fieldComponents = _ref.fieldComponents,
105
94
  _ref$hideCreateButton = _ref.hideCreateButton,
106
95
  hideCreateButton = _ref$hideCreateButton === void 0 ? false : _ref$hideCreateButton,
96
+ label = _ref.label,
107
97
  visibleFields = _ref.visibleFields,
108
98
  mclProps = _objectWithoutProperties(_ref, _excluded);
109
99
 
@@ -141,6 +131,8 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
141
131
 
142
132
  var _fields$value$index = fields.value[index],
143
133
  _a = _fields$value$index.actionListActions,
134
+ _fn = _fields$value$index.fieldName,
135
+ _fi = _fields$value$index.fieldIndex,
144
136
  rowData = _objectWithoutProperties(_fields$value$index, _excluded2); // Find "edit" entry in actionAssigner
145
137
 
146
138
 
@@ -158,6 +150,8 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
158
150
  var handleCreate = function handleCreate(index) {
159
151
  var _fields$value$index2 = fields.value[index],
160
152
  _a = _fields$value$index2.actionListActions,
153
+ _fn = _fields$value$index2.fieldName,
154
+ _fi = _fields$value$index2.fieldIndex,
161
155
  rowData = _objectWithoutProperties(_fields$value$index2, _excluded3);
162
156
 
163
157
  if (createCallback) {
@@ -167,6 +161,19 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
167
161
  }
168
162
  };
169
163
 
164
+ var handleClickCreate = function handleClickCreate() {
165
+ toggleEditing('NEW_ROW');
166
+ fields.unshift({});
167
+ }; // Way to go into create mode from external component, and way to tell internal editing state
168
+
169
+
170
+ (0, _react.useImperativeHandle)(ref, function () {
171
+ return {
172
+ create: handleClickCreate,
173
+ editing: editing
174
+ };
175
+ });
176
+
170
177
  var getColumnWidths = function getColumnWidths() {
171
178
  var widthNotInUseByActions = editing ? TOTAL_WIDTH - EDITING_ACTIONS_WIDTH : TOTAL_WIDTH - NON_EDITING_ACTIONS_WIDTH;
172
179
  var staticWidth = widthNotInUseByActions / visibleFields.length;
@@ -253,6 +260,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
253
260
 
254
261
  if (action.icon) {
255
262
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.IconButton, {
263
+ ariaLabel: action === null || action === void 0 ? void 0 : action.ariaLabel(data),
256
264
  disabled: editing,
257
265
  icon: action.icon,
258
266
  onClick: function onClick() {
@@ -280,66 +288,15 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
280
288
  });
281
289
  };
282
290
 
283
- var formatContent = function formatContent() {
291
+ var assignActions = function assignActions() {
284
292
  return fields.map(function (fieldName, fieldIndex) {
285
293
  // Fetch the content from the field Values
286
294
  var cd = (0, _get.default)(values, fieldName);
287
- cd.actionListActions = actionAssigner(cd); // Row is being edited if it has no id, or its id is in the editing string
288
-
289
- var editingRow = cd.id === editing || !cd.id;
290
-
291
- var returnObj = _objectSpread({}, cd); // If editing, replace values with fields
292
-
293
-
294
- if (editingRow) {
295
- /*
296
- Check if the property is a visible field.
297
- If it is not then we don't allow editing in this component.
298
- */
299
- var _iterator = _createForOfIteratorHelper(visibleFields),
300
- _step;
301
-
302
- try {
303
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
304
- var _editableFields$key, _creatableFields$key;
305
-
306
- var key = _step.value;
307
- var editFunction = (_editableFields$key = editableFields[key]) !== null && _editableFields$key !== void 0 ? _editableFields$key : function () {
308
- return true;
309
- };
310
- var createFunction = (_creatableFields$key = creatableFields[key]) !== null && _creatableFields$key !== void 0 ? _creatableFields$key : function () {
311
- return true;
312
- };
313
- /*
314
- Next check if this is a new row, if so we should run the createableField function with the data.
315
- If it is not a new row, then we run the editableField function with the data,
316
- and it should return true/false
317
- For both checks
318
- true => Field, false => display value
319
- */
320
-
321
- if (!cd.id && createFunction(cd) || editFunction(cd)) {
322
- returnObj[key] = fieldComponents[key] ? fieldComponents[key]({
323
- name: "".concat(fieldName, ".").concat(key)
324
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
325
- autoFocus: fieldIndex === 0,
326
- component: _components.TextField,
327
- marginBottom0: true,
328
- name: "".concat(fieldName, ".").concat(key),
329
- parse: function parse(v) {
330
- return v;
331
- }
332
- });
333
- }
334
- }
335
- } catch (err) {
336
- _iterator.e(err);
337
- } finally {
338
- _iterator.f();
339
- }
340
- }
341
-
342
- return returnObj;
295
+ cd.actionListActions = actionAssigner(cd);
296
+ return _objectSpread(_objectSpread({}, cd), {}, {
297
+ fieldName: fieldName,
298
+ fieldIndex: fieldIndex
299
+ });
343
300
  });
344
301
  };
345
302
 
@@ -353,11 +310,47 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
353
310
  visibleFields.forEach(function (key) {
354
311
  returnObj[key] = function (cd) {
355
312
  // Row is being edited if it has no id, or its id is in the editing string
356
- var editingRow = cd.id === editing || !cd.id; // If not editing, use the passed formatter values
313
+ var editingRow = cd.id === editing || !cd.id; // Default to the passed formatter values
314
+
315
+ var returnValue = formatter !== null && formatter !== void 0 && formatter[key] ? formatter[key](cd) : cd[key]; // If editing, replace values with fields
357
316
 
358
- var returnValue = cd[key];
317
+ if (editingRow) {
318
+ var _editableFields$key, _creatableFields$key;
359
319
 
360
- if (!editingRow && formatter !== null && formatter !== void 0 && formatter[key]) {
320
+ /*
321
+ Check if the property is a visible field.
322
+ If it is not then we don't allow editing in this component.
323
+ */
324
+ var editFunction = (_editableFields$key = editableFields[key]) !== null && _editableFields$key !== void 0 ? _editableFields$key : function () {
325
+ return true;
326
+ };
327
+ var createFunction = (_creatableFields$key = creatableFields[key]) !== null && _creatableFields$key !== void 0 ? _creatableFields$key : function () {
328
+ return true;
329
+ };
330
+ /*
331
+ Next check if this is a new row, if so we should run the createableField function with the data.
332
+ If it is not a new row, then we run the editableField function with the data,
333
+ and it should return true/false
334
+ For both checks
335
+ true => Field, false => display value
336
+ */
337
+
338
+ if (!cd.id && createFunction(cd) || editFunction(cd)) {
339
+ returnValue = fieldComponents[key] ? fieldComponents[key]({
340
+ name: "".concat(cd.fieldName, ".").concat(key)
341
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
342
+ autoFocus: cd.fieldIndex === 0,
343
+ component: _components.TextField,
344
+ marginBottom0: true,
345
+ name: "".concat(cd.fieldName, ".").concat(key),
346
+ parse: function parse(v) {
347
+ return v;
348
+ }
349
+ });
350
+ }
351
+ }
352
+
353
+ if (formatter !== null && formatter !== void 0 && formatter[key]) {
361
354
  returnValue = formatter[key](cd);
362
355
  }
363
356
 
@@ -368,17 +361,20 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
368
361
  };
369
362
 
370
363
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
371
- children: [!hideCreateButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
372
- buttonClass: _ActionListFieldArray.default.buttonRight,
373
- disabled: !actionCalls.create && !createCallback // DEPRECATED actionCalls
374
- ,
375
- onClick: function onClick() {
376
- toggleEditing('NEW_ROW');
377
- fields.push({});
378
- },
379
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
380
- id: "stripes-kint-components.actionList.create"
381
- })
364
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
365
+ className: _ActionListFieldArray.default.header,
366
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Headline, {
367
+ className: _ActionListFieldArray.default.headerText,
368
+ children: label
369
+ }), !hideCreateButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
370
+ disabled: editing || !actionCalls.create && !createCallback // DEPRECATED actionCalls
371
+ ,
372
+ marginBottom0: true,
373
+ onClick: handleClickCreate,
374
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
375
+ id: "stripes-kint-components.actionList.new"
376
+ })
377
+ })]
382
378
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList, _objectSpread({
383
379
  columnMapping: _objectSpread(_objectSpread({}, columnMapping), {}, {
384
380
  actionListActions: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
@@ -386,7 +382,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
386
382
  })
387
383
  }),
388
384
  columnWidths: getColumnWidths(),
389
- contentData: formatContent(),
385
+ contentData: assignActions(),
390
386
  formatter: _objectSpread({
391
387
  actionListActions: renderActionButtons
392
388
  }, fieldAwareFormatter()),
@@ -394,36 +390,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
394
390
  visibleColumns: [].concat(_toConsumableArray(visibleFields), ['actionListActions'])
395
391
  }, restOfMclProps))]
396
392
  });
397
- };
398
-
399
- __signature__(ActionListFieldArray, "useForm{{ change }}\nuseFormState{{ initialValues, pristine, submitting, values }}\nuseState{[editing, setEditing](null)}", function () {
400
- return [_reactFinalForm.useForm, _reactFinalForm.useFormState];
401
393
  });
402
-
403
394
  ActionListFieldArray.propTypes = propTypes;
404
395
  var _default = ActionListFieldArray;
405
- var _default2 = _default;
406
- exports.default = _default2;
407
- ;
408
-
409
- (function () {
410
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
411
-
412
- if (!reactHotLoader) {
413
- return;
414
- }
415
-
416
- reactHotLoader.register(EDITING_ACTIONS_WIDTH, "EDITING_ACTIONS_WIDTH", "/home/ethan/FolioModules/stripes-kint-components/src/lib/ActionList/ActionListFieldArray.js");
417
- reactHotLoader.register(NON_EDITING_ACTIONS_WIDTH, "NON_EDITING_ACTIONS_WIDTH", "/home/ethan/FolioModules/stripes-kint-components/src/lib/ActionList/ActionListFieldArray.js");
418
- reactHotLoader.register(TOTAL_WIDTH, "TOTAL_WIDTH", "/home/ethan/FolioModules/stripes-kint-components/src/lib/ActionList/ActionListFieldArray.js");
419
- reactHotLoader.register(propTypes, "propTypes", "/home/ethan/FolioModules/stripes-kint-components/src/lib/ActionList/ActionListFieldArray.js");
420
- reactHotLoader.register(ActionListFieldArray, "ActionListFieldArray", "/home/ethan/FolioModules/stripes-kint-components/src/lib/ActionList/ActionListFieldArray.js");
421
- reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/ActionList/ActionListFieldArray.js");
422
- })();
423
-
424
- ;
425
-
426
- (function () {
427
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
428
- leaveModule && leaveModule(module);
429
- })();
396
+ exports.default = _default;
@@ -12,8 +12,4 @@ Object.defineProperty(exports, "default", {
12
12
 
13
13
  var _ActionList = _interopRequireDefault(require("./ActionList"));
14
14
 
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
-
17
- var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18
- return a;
19
- };
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }