@k-int/stripes-kint-components 2.5.0 → 2.6.1

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 (330) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +1 -28
  3. package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -4
  4. package/es/artifacts/coverage-jest/lcov-report/sorter.js +1 -28
  5. package/es/index.js +7 -5
  6. package/es/lib/ActionList/ActionList.js +1 -31
  7. package/es/lib/ActionList/ActionListFieldArray.js +6 -40
  8. package/es/lib/ActionList/index.js +1 -5
  9. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +55 -46
  10. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +53 -0
  11. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +102 -62
  12. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +125 -0
  13. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +131 -138
  14. package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +200 -0
  15. package/es/lib/CustomProperties/Config/CustomPropertyView.js +22 -37
  16. package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +194 -0
  17. package/es/lib/CustomProperties/Config/index.js +1 -5
  18. package/es/lib/CustomProperties/Config/testResources.js +198 -0
  19. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -30
  20. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +48 -0
  21. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +1 -34
  22. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +48 -0
  23. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +1 -37
  24. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +113 -0
  25. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +63 -64
  26. package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +283 -0
  27. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -30
  28. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +65 -0
  29. package/es/lib/CustomProperties/Edit/index.js +1 -5
  30. package/es/lib/CustomProperties/Edit/testResources.js +923 -0
  31. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +10 -35
  32. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +102 -0
  33. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +1 -34
  34. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +41 -0
  35. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +1 -34
  36. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +91 -0
  37. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +1 -30
  38. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +86 -0
  39. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +1 -35
  40. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +321 -0
  41. package/es/lib/CustomProperties/Filter/index.js +1 -5
  42. package/es/lib/CustomProperties/Filter/testResources.js +262 -0
  43. package/es/lib/CustomProperties/Filter/useOperators.js +9 -39
  44. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +5 -36
  45. package/es/lib/CustomProperties/Filter/useValueProps.js +13 -35
  46. package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -30
  47. package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +48 -0
  48. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +1 -34
  49. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +55 -0
  50. package/es/lib/CustomProperties/View/CustomPropertyCard.js +13 -32
  51. package/es/lib/CustomProperties/View/index.js +1 -5
  52. package/es/lib/CustomProperties/View/testResources.js +144 -0
  53. package/es/lib/CustomProperties/index.js +1 -5
  54. package/es/lib/EditableRefdataList/EditableRefdataList.js +163 -64
  55. package/es/lib/EditableRefdataList/index.js +1 -5
  56. package/es/lib/EditableSettingsList/EditableSettingsList.js +1 -30
  57. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +1 -30
  58. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +10 -35
  59. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +1 -34
  60. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +1 -34
  61. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +1 -34
  62. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +28 -64
  63. package/es/lib/EditableSettingsList/SettingField/SettingField.js +1 -34
  64. package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +8 -33
  65. package/es/lib/EditableSettingsList/SettingField/index.js +1 -5
  66. package/es/lib/EditableSettingsList/index.js +1 -5
  67. package/es/lib/FormModal/FormModal.js +2 -31
  68. package/es/lib/FormModal/index.js +1 -5
  69. package/es/lib/NoResultsMessage/NoResultsMessage.js +1 -30
  70. package/es/lib/NoResultsMessage/index.js +1 -5
  71. package/es/lib/QueryTypedown/QueryTypedown.js +1 -34
  72. package/es/lib/QueryTypedown/index.js +1 -5
  73. package/es/lib/RefdataButtons/RefdataButtons.js +1 -34
  74. package/es/lib/RefdataButtons/index.js +1 -5
  75. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +2 -34
  76. package/es/lib/SASQLookupComponent/TableBody/TableBody.js +1 -34
  77. package/es/lib/SASQLookupComponent/TableBody/index.js +1 -5
  78. package/es/lib/SASQLookupComponent/index.js +1 -5
  79. package/es/lib/SASQRoute/SASQRoute.js +1 -30
  80. package/es/lib/SASQRoute/index.js +1 -5
  81. package/es/lib/SASQViewComponent/SASQViewComponent.js +1 -34
  82. package/es/lib/SASQViewComponent/index.js +1 -5
  83. package/es/lib/SearchField/SearchField.js +1 -31
  84. package/es/lib/SearchField/index.js +1 -5
  85. package/es/lib/SettingPage/SettingPage.js +1 -34
  86. package/es/lib/SettingPage/SettingPagePane.js +1 -32
  87. package/es/lib/SettingPage/index.js +1 -5
  88. package/es/lib/Typedown/Typedown.js +1 -34
  89. package/es/lib/Typedown/index.js +1 -5
  90. package/es/lib/constants/customProperties.js +4 -39
  91. package/es/lib/constants/eventCodes.js +1 -31
  92. package/es/lib/contexts/SettingsContext.js +1 -30
  93. package/es/lib/contexts/index.js +1 -5
  94. package/es/lib/hooks/index.js +7 -5
  95. package/es/lib/hooks/settingsHooks/index.js +8 -4
  96. package/es/lib/hooks/settingsHooks/useAppSettings.js +84 -0
  97. package/es/lib/hooks/settingsHooks/useSettingSection.js +1 -34
  98. package/es/lib/hooks/settingsHooks/useSettings.js +1 -36
  99. package/es/lib/hooks/typedownHooks/index.js +1 -5
  100. package/es/lib/hooks/typedownHooks/useTypedown.js +1 -34
  101. package/es/lib/hooks/typedownHooks/useTypedownData.js +1 -34
  102. package/es/lib/hooks/typedownHooks/useTypedownToggle.js +1 -34
  103. package/es/lib/hooks/useActiveElement.js +1 -32
  104. package/es/lib/hooks/useAvailableCustomProperties.js +1 -34
  105. package/es/lib/hooks/useCustomProperties.js +4 -34
  106. package/es/lib/hooks/useHelperApp.js +1 -34
  107. package/es/lib/hooks/useInvalidateRefdata.js +1 -34
  108. package/es/lib/hooks/useKiwtFieldArray.js +1 -34
  109. package/es/lib/hooks/useKiwtSASQuery.js +9 -37
  110. package/es/lib/hooks/useLocalStorageState.js +1 -34
  111. package/es/lib/hooks/useMutateCustomProperties.js +14 -42
  112. package/es/lib/hooks/useMutateRefdataValue.js +11 -39
  113. package/es/lib/hooks/useQIndex.js +1 -34
  114. package/es/lib/hooks/useRefdata.js +1 -34
  115. package/es/lib/hooks/useTemplates.js +1 -34
  116. package/es/lib/utils/buildUrl.js +2 -31
  117. package/es/lib/utils/generateKiwtQuery.js +1 -30
  118. package/es/lib/utils/generateKiwtQueryParams.js +1 -30
  119. package/es/lib/utils/groupCustomPropertiesByCtx.js +1 -30
  120. package/es/lib/utils/highlightString.js +1 -29
  121. package/es/lib/utils/index.js +1 -5
  122. package/es/lib/utils/matchString.js +1 -30
  123. package/es/lib/utils/refdataOptions.js +1 -30
  124. package/es/lib/utils/refdataQueryKey.js +1 -30
  125. package/es/lib/utils/renderHelpText.js +1 -30
  126. package/es/lib/utils/selectorSafe.js +1 -30
  127. package/es/lib/utils/sortByLabel.js +1 -30
  128. package/es/lib/utils/toCamelCase.js +1 -30
  129. package/es/lib/utils/typedownQueryKey.js +1 -30
  130. package/es/lib/utils/validators.js +1 -32
  131. package/junit.xml +731 -38
  132. package/package.json +4 -4
  133. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
  134. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +1 -1
  135. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +1 -1
  136. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
  137. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +142 -28
  138. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +93 -27
  139. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +308 -188
  140. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +92 -32
  141. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +65 -50
  142. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
  143. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +793 -0
  144. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +17 -17
  145. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +15 -15
  146. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
  147. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +161 -77
  148. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +29 -26
  149. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +61 -46
  150. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
  151. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +892 -0
  152. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +19 -19
  153. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +42 -42
  154. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +23 -23
  155. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +19 -19
  156. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +41 -41
  157. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +102 -87
  158. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
  159. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +976 -0
  160. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +58 -37
  161. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +7 -7
  162. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +47 -29
  163. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +17 -17
  164. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +38 -38
  165. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +30 -6
  166. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +48 -33
  167. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
  168. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +571 -0
  169. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
  170. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
  171. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +134 -17
  172. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +7 -7
  173. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
  174. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +27 -12
  175. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +3 -3
  176. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +3 -3
  177. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +2 -2
  178. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +3 -3
  179. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
  180. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
  181. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +13 -13
  182. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
  183. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +32 -32
  184. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +21 -21
  185. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
  186. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
  187. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
  188. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
  189. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
  190. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
  191. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
  192. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -3
  193. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
  194. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
  195. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +6 -3
  196. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
  197. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
  198. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
  199. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
  200. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
  201. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
  202. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
  203. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
  204. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
  205. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
  206. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
  207. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
  208. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
  209. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
  210. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +9 -9
  211. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +10 -10
  212. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +18 -18
  213. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
  214. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +3 -3
  215. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
  216. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
  217. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +32 -26
  218. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
  219. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +13 -13
  220. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +2 -2
  221. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
  222. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
  223. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +92 -92
  224. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
  225. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +17 -17
  226. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
  227. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +292 -0
  228. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +7 -7
  229. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +8 -8
  230. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
  231. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
  232. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
  233. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
  234. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  235. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +7 -7
  236. package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +7 -7
  237. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +32 -17
  238. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
  239. package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +7 -7
  240. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +7 -7
  241. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +29 -11
  242. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +7 -7
  243. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +7 -7
  244. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +7 -7
  245. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +7 -7
  246. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +9 -9
  247. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +7 -7
  248. package/src/artifacts/coverage-jest/lcov-report/index.html +109 -109
  249. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
  250. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +2 -2
  251. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +2 -2
  252. package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +22 -22
  253. package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
  254. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +31 -31
  255. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
  256. package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +3 -3
  257. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
  258. package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
  259. package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +2 -2
  260. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +2 -2
  261. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
  262. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -2
  263. package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
  264. package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +46 -46
  265. package/src/artifacts/coverage-jest/lcov.info +1124 -916
  266. package/src/index.js +2 -1
  267. package/src/lib/ActionList/ActionListFieldArray.js +3 -2
  268. package/src/lib/ActionList/README.md +12 -1
  269. package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +46 -8
  270. package/src/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +35 -0
  271. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +63 -20
  272. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +51 -0
  273. package/src/lib/CustomProperties/Config/CustomPropertyForm.js +172 -132
  274. package/src/lib/CustomProperties/Config/CustomPropertyForm.test.js +126 -0
  275. package/src/lib/CustomProperties/Config/CustomPropertyView.js +29 -9
  276. package/src/lib/CustomProperties/Config/CustomPropertyView.test.js +55 -0
  277. package/src/lib/CustomProperties/Config/testResources.js +236 -0
  278. package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +29 -0
  279. package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +29 -0
  280. package/src/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +51 -0
  281. package/src/lib/CustomProperties/Edit/CustomPropertyField.js +56 -24
  282. package/src/lib/CustomProperties/Edit/CustomPropertyField.test.js +185 -0
  283. package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.js +1 -0
  284. package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +57 -0
  285. package/src/lib/CustomProperties/Edit/testResources.js +1063 -0
  286. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +15 -3
  287. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +43 -0
  288. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +32 -0
  289. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +44 -0
  290. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +40 -0
  291. package/src/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +111 -0
  292. package/src/lib/CustomProperties/Filter/testResources.js +297 -0
  293. package/src/lib/CustomProperties/Filter/useOperators.js +7 -0
  294. package/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +5 -2
  295. package/src/lib/CustomProperties/Filter/useValueProps.js +6 -0
  296. package/src/lib/CustomProperties/View/CustomPropertiesView.test.js +32 -0
  297. package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +32 -0
  298. package/src/lib/CustomProperties/View/CustomPropertyCard.js +8 -0
  299. package/src/lib/CustomProperties/View/testResources.js +162 -0
  300. package/src/lib/EditableRefdataList/EditableRefdataList.js +97 -17
  301. package/src/lib/EditableRefdataList/README.md +3 -0
  302. package/src/lib/FormModal/FormModal.js +1 -1
  303. package/src/lib/SASQLookupComponent/SASQLookupComponent.js +1 -0
  304. package/src/lib/constants/customProperties.js +2 -0
  305. package/src/lib/hooks/README.md +28 -3
  306. package/src/lib/hooks/index.js +1 -1
  307. package/src/lib/hooks/settingsHooks/index.js +1 -0
  308. package/src/lib/hooks/settingsHooks/useAppSettings.js +69 -0
  309. package/src/lib/hooks/useCustomProperties.js +5 -0
  310. package/src/lib/hooks/useKiwtSASQuery.js +7 -1
  311. package/src/lib/hooks/useMutateCustomProperties.js +7 -3
  312. package/src/lib/hooks/useMutateRefdataValue.js +5 -2
  313. package/styles/ActionListFieldArray.css +2 -1
  314. package/styles/CustomProperties.css +17 -0
  315. package/translations/stripes-kint-components/ar.json +11 -2
  316. package/translations/stripes-kint-components/cs_CZ.json +10 -1
  317. package/translations/stripes-kint-components/de.json +11 -2
  318. package/translations/stripes-kint-components/en.json +12 -3
  319. package/translations/stripes-kint-components/es.json +11 -2
  320. package/translations/stripes-kint-components/fr.json +1 -105
  321. package/translations/stripes-kint-components/hi_IN.json +1 -105
  322. package/translations/stripes-kint-components/hu.json +11 -2
  323. package/translations/stripes-kint-components/it_IT.json +11 -2
  324. package/translations/stripes-kint-components/ja.json +10 -1
  325. package/translations/stripes-kint-components/ko.json +11 -2
  326. package/translations/stripes-kint-components/pl.json +11 -2
  327. package/translations/stripes-kint-components/pt_PT.json +11 -2
  328. package/translations/stripes-kint-components/ru.json +11 -2
  329. package/translations/stripes-kint-components/sv.json +11 -2
  330. package/translations/stripes-kint-components/zh_CN.json +10 -1
@@ -11,6 +11,7 @@ import {
11
11
  import { useCustomProperties } from '../../hooks';
12
12
  import useParseActiveFilterStrings from './useParseActiveFilterStrings';
13
13
  import CustomPropertiesFilterForm from './CustomPropertiesFilterForm';
14
+ import { MULTI_REFDATA_CLASS_NAME, REFDATA_CLASS_NAME } from '../../constants/customProperties';
14
15
 
15
16
  const CustomPropertiesFilter = ({
16
17
  activeFilters: {
@@ -74,9 +75,20 @@ const CustomPropertiesFilter = ({
74
75
 
75
76
  const filterStrings = filters
76
77
  .filter(filter => filter.rules)
77
- .map(filter => filter.rules
78
- .map(rule => `customProperties.${filter.customProperty}.value${rule.operator}${rule.value ?? ''}`)
79
- .join('||'));
78
+ .map(filter => {
79
+ const relevantCustomProperty = custprops?.filter(cp => cp.name === filter.customProperty)?.[0] ?? {};
80
+
81
+ const filterByValueId = (
82
+ relevantCustomProperty?.type === MULTI_REFDATA_CLASS_NAME ||
83
+ relevantCustomProperty?.type === REFDATA_CLASS_NAME
84
+ );
85
+
86
+ return (
87
+ filter.rules
88
+ .map(rule => `customProperties.${filter.customProperty}.value${filterByValueId ? '.id' : ''}${rule.operator}${rule.value ?? ''}`)
89
+ .join('||')
90
+ );
91
+ });
80
92
 
81
93
  filterHandlers.state({ ...restOfFilters, customProperties: filterStrings });
82
94
  setEditingFilters(false);
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import '@folio/stripes-erm-components/test/jest/__mock__';
3
+ import { MemoryRouter } from 'react-router-dom';
4
+ import { Accordion, Button } from '@folio/stripes-testing';
5
+ import { renderWithKintHarness } from '../../../../test/jest/helpers';
6
+
7
+ import { activeFilters, filterHandlers, labelOverrides } from './testResources';
8
+ import CustomPropertiesFilter from './CustomPropertiesFilter';
9
+
10
+ jest.mock('./CustomPropertiesFilterForm', () => () => <div>CustomPropertiesFilterForm</div>);
11
+
12
+ describe('CustomPropertiesFilter', () => {
13
+ let renderComponent;
14
+ beforeEach(() => {
15
+ renderComponent = renderWithKintHarness(
16
+ <MemoryRouter>
17
+ <CustomPropertiesFilter
18
+ activeFilters={activeFilters}
19
+ customPropertiesEndpoint="erm/custprops"
20
+ filterHandlers={filterHandlers}
21
+ labelOverrides={labelOverrides}
22
+ />
23
+ </MemoryRouter>
24
+ );
25
+ });
26
+
27
+ test('renders the Supplementrary properties Accordion by id', async () => {
28
+ await Accordion({ id: 'clickable-custprop-filter' }).exists();
29
+ });
30
+
31
+ test('renders the Supplementrary properties Accordion', async () => {
32
+ await Accordion('Supplementrary properties').exists();
33
+ });
34
+
35
+ test('renders the edit supplementary property filters button', async () => {
36
+ await Button({ id: 'accordion-toggle-button-clickable-custprop-filter' }).exists();
37
+ });
38
+
39
+ it('renders CustomPropertiesFilterForm component ', () => {
40
+ const { getByText } = renderComponent;
41
+ expect(getByText('CustomPropertiesFilterForm')).toBeInTheDocument();
42
+ });
43
+ });
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import '@folio/stripes-erm-components/test/jest/__mock__';
3
+ import { TestForm } from '@folio/stripes-erm-components/test/jest/helpers';
4
+ import { MemoryRouter } from 'react-router-dom';
5
+ import { renderWithKintHarness } from '../../../../test/jest/helpers';
6
+
7
+ import { customProperties, fields, labelOverrides } from './testResources';
8
+ import CustomPropertiesFilterField from './CustomPropertiesFilterField';
9
+
10
+ const onSubmit = jest.fn();
11
+
12
+ let renderComponent;
13
+ describe('CustomPropertiesFilterField', () => {
14
+ renderComponent = renderWithKintHarness(
15
+ <MemoryRouter>
16
+ <TestForm onSubmit={onSubmit}>
17
+ <CustomPropertiesFilterField
18
+ customProperties={customProperties}
19
+ fields={fields}
20
+ index={0}
21
+ labelOverrides={labelOverrides}
22
+ name="filters[0]"
23
+ />
24
+ </TestForm>
25
+ </MemoryRouter>
26
+ );
27
+
28
+ test('displays the Supplementary property label', () => {
29
+ const { getByText } = renderComponent;
30
+ expect(getByText('Supplementary property')).toBeInTheDocument();
31
+ });
32
+ });
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import '@folio/stripes-erm-components/test/jest/__mock__';
3
+ import { TestForm } from '@folio/stripes-erm-components/test/jest/helpers';
4
+ import { waitFor } from '@testing-library/react';
5
+ import { Button } from '@folio/stripes-testing';
6
+ import { FieldArray } from 'react-final-form-arrays';
7
+ import { renderWithKintHarness } from '../../../../test/jest/helpers';
8
+
9
+ import { customProperties, labelOverrides } from '../Edit/testResources';
10
+ import CustomPropertiesFilterFieldArray from './CustomPropertiesFilterFieldArray';
11
+
12
+ jest.mock('./CustomPropertiesFilterField', () => () => <div>CustomPropertiesFilterField</div>);
13
+ const onSubmit = jest.fn();
14
+
15
+ let renderComponent;
16
+ describe('CustomPropertiesFilterFieldArray', () => {
17
+ beforeEach(() => {
18
+ renderComponent = renderWithKintHarness(
19
+ <TestForm
20
+ onSubmit={onSubmit}
21
+ >
22
+ <FieldArray
23
+ component={CustomPropertiesFilterFieldArray}
24
+ customProperties={customProperties}
25
+ labelOverrides={labelOverrides}
26
+ name="customProperties"
27
+ />
28
+ </TestForm>
29
+ );
30
+ });
31
+
32
+ test('renders CustomPropertiesFilterField component', () => {
33
+ const { getByText } = renderComponent;
34
+ waitFor(() => expect(getByText('CustomPropertiesFilterField')).toBeInTheDocument());
35
+ });
36
+
37
+ test('renders the Add custom property filter button', async () => {
38
+ await Button('Add custom property filter').exists();
39
+ });
40
+
41
+ test('renders the submit button', async () => {
42
+ await Button('Submit').exists();
43
+ });
44
+ });
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import '@folio/stripes-erm-components/test/jest/__mock__';
3
+ import { Button } from '@folio/stripes-testing';
4
+ import { TestForm } from '@folio/stripes-erm-components/test/jest/helpers';
5
+ import CustomPropertyFiltersForm from './CustomPropertiesFilterForm';
6
+
7
+ import { renderWithKintHarness } from '../../../../test/jest/helpers';
8
+ import { data } from './testResources';
9
+
10
+ jest.mock('./CustomPropertiesFilterFieldArray', () => () => <div>CustomPropertiesFilterFieldArray</div>);
11
+
12
+ const onSubmit = jest.fn();
13
+
14
+ describe('CustomPropertyFiltersForm', () => {
15
+ let renderComponent;
16
+ beforeEach(() => {
17
+ renderComponent = renderWithKintHarness(
18
+ <TestForm
19
+ onSubmit={onSubmit}
20
+ >
21
+ <CustomPropertyFiltersForm
22
+ {...data}
23
+ />
24
+ </TestForm>
25
+ );
26
+ });
27
+
28
+ it('renders CustomPropertiesFilterFieldArray component ', () => {
29
+ const { getByText } = renderComponent;
30
+ expect(getByText('CustomPropertiesFilterFieldArray')).toBeInTheDocument();
31
+ });
32
+
33
+ test('renders the submit button', async () => {
34
+ await Button('Submit').exists();
35
+ });
36
+
37
+ test('renders the Edit supplementary property filters button', async () => {
38
+ await Button('Edit supplementary property filters').exists();
39
+ });
40
+ });
@@ -0,0 +1,111 @@
1
+ import React from 'react';
2
+ import '@folio/stripes-erm-components/test/jest/__mock__';
3
+ import { MemoryRouter } from 'react-router-dom';
4
+ import { Select } from '@folio/stripes-testing';
5
+ import { TestForm } from '@folio/stripes-erm-components/test/jest/helpers';
6
+ import { renderWithKintHarness } from '../../../../test/jest/helpers';
7
+
8
+ import CustomPropertiesRule from './CustomPropertiesRule';
9
+
10
+ const onSubmit = jest.fn();
11
+ const onDelete = jest.fn();
12
+
13
+ const clearRuleValue = () => {};
14
+
15
+ describe('CustomPropertiesRule', () => {
16
+ beforeEach(() => {
17
+ renderWithKintHarness(
18
+ <MemoryRouter>
19
+ <TestForm onSubmit={onSubmit}>
20
+ <CustomPropertiesRule
21
+ ariaLabelledby="selected-custprop-name-0"
22
+ clearRuleValue={clearRuleValue}
23
+ index={0}
24
+ name="filters[0].rules[0]"
25
+ onDelete={onDelete}
26
+ />
27
+ </TestForm>
28
+ </MemoryRouter>
29
+ );
30
+ });
31
+
32
+ describe('select Is set operator from comparator dropdown', () => {
33
+ beforeEach(async () => {
34
+ await Select().choose('Is set');
35
+ });
36
+
37
+ it('renders expected Is set operator', async () => {
38
+ await Select().has({ value: ' isSet' });
39
+ });
40
+ });
41
+
42
+ describe('select Is not set operator from comparator dropdown', () => {
43
+ beforeEach(async () => {
44
+ await Select().choose('Is not set');
45
+ });
46
+
47
+ it('renders expected is not set operator in comparator dropdown', async () => {
48
+ await Select().has({ value: ' isNotSet' });
49
+ });
50
+ });
51
+
52
+ describe('select Equals from comparator dropdown', () => {
53
+ beforeEach(async () => {
54
+ await Select().choose('Equals');
55
+ });
56
+
57
+ it('renders expected Equals operator', async () => {
58
+ await Select().has({ value: '==' });
59
+ });
60
+ });
61
+
62
+ describe('select not equal operator from comparator dropdown', () => {
63
+ beforeEach(async () => {
64
+ await Select().choose('Does not equal');
65
+ });
66
+
67
+ it('renders expected Does not equal operator in comparator dropdown', async () => {
68
+ await Select().has({ value: '!=' });
69
+ });
70
+ });
71
+
72
+ describe('select Is greater than or equal to operator from comparator dropdown', () => {
73
+ beforeEach(async () => {
74
+ await Select().choose('Is greater than or equal to');
75
+ });
76
+
77
+ it('renders expected Is greater than or equal to operator in comparator dropdown', async () => {
78
+ await Select().has({ value: '>=' });
79
+ });
80
+ });
81
+
82
+ describe('select Is less than or equal to operator from comparator dropdown', () => {
83
+ beforeEach(async () => {
84
+ await Select().choose('Is less than or equal to');
85
+ });
86
+
87
+ it('renders expected Is less than or equal to operator in comparator dropdown', async () => {
88
+ await Select().has({ value: '<=' });
89
+ });
90
+ });
91
+
92
+ describe('select Is operator from comparator dropdown', () => {
93
+ beforeEach(async () => {
94
+ await Select().choose('Is');
95
+ });
96
+
97
+ it('renders expected is operator', async () => {
98
+ await Select().has({ value: '==' });
99
+ });
100
+ });
101
+
102
+ describe('select Is not operator form comparator dropdown', () => {
103
+ beforeEach(async () => {
104
+ await Select().choose('Is not');
105
+ });
106
+
107
+ it('renders expected is not operator ', async () => {
108
+ await Select().has({ value: '!=' });
109
+ });
110
+ });
111
+ });
@@ -0,0 +1,297 @@
1
+ const activeFilters = {
2
+ 'agreementStatus': [
3
+ 'active',
4
+ 'draft',
5
+ 'in_negotiation',
6
+ 'requested'
7
+ ],
8
+ 'customProperties': [
9
+ 'customProperties.AuthorIdentification.value==2c91809c813e654501813e6c3bc50061'
10
+ ]
11
+ };
12
+
13
+ const filterHandlers = {
14
+ 'state': () => {},
15
+ 'checkbox': () => {},
16
+ 'clear': () => {},
17
+ 'clearGroup': () => {},
18
+ 'reset': () => {},
19
+ };
20
+
21
+ const labelOverrides = {
22
+ 'customProperty': 'Supplementary property',
23
+ 'customProperties': 'Supplementrary properties',
24
+ 'filtersApplied': () => {},
25
+ 'editCustomPropertyFilters': '<Memo />',
26
+ 'filterBuilder': '<Memo />',
27
+ 'customPropertyFilter': () => {},
28
+ 'removeFilter': () => {},
29
+ 'retiredName': () => {},
30
+ };
31
+
32
+ const customProperties = [{
33
+ 'id': '2c91809c813e654501813e6c3c6a0066',
34
+ 'retired': false,
35
+ 'ctx': 'OpenAccess',
36
+ 'name': 'AuthorIdentification',
37
+ 'primary': true,
38
+ 'category': {
39
+ 'id': '2c91809c813e654501813e6c3bbb005e',
40
+ 'desc': 'AuthIdent',
41
+ 'internal': false,
42
+ 'values': [{
43
+ 'id': '2c91809c813e654501813e6c3bcf0064',
44
+ 'value': 'ringgold_id',
45
+ 'label': 'Ringgold ID'
46
+ },
47
+ {
48
+ 'id': '2c91809c813e654501813e6c3bbd005f',
49
+ 'value': 'other',
50
+ 'label': 'Other'
51
+ },
52
+ {
53
+ 'id': '2c91809c813e654501813e6c3bcc0063',
54
+ 'value': 'over_ip_range',
55
+ 'label': 'Over IP Range'
56
+ },
57
+ {
58
+ 'id': '2c91809c813e654501813e6c3bc20060',
59
+ 'value': 'email_domain',
60
+ 'label': 'Email Domain'
61
+ },
62
+ {
63
+ 'id': '2c91809c813e654501813e6c3bc50061',
64
+ 'value': 'orcid',
65
+ 'label': 'ORCID'
66
+ },
67
+ {
68
+ 'id': '2c91809c813e654501813e6c3bc90062',
69
+ 'value': 'over_institute',
70
+ 'label': 'Over Institute'
71
+ },
72
+ {
73
+ 'id': '2c91809c813e654501813e6c3bd20065',
74
+ 'value': 'ror_id',
75
+ 'label': 'ROR ID'
76
+ }
77
+ ]
78
+ },
79
+ 'defaultInternal': true,
80
+ 'label': 'Author Identification',
81
+ 'description': 'Author Identification',
82
+ 'weight': 0,
83
+ 'type': 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata'
84
+ },
85
+ {
86
+ 'id': '2c91809c813e654501813e6c3c7d0067',
87
+ 'retired': false,
88
+ 'ctx': 'OpenAccess',
89
+ 'name': 'Eligible authors',
90
+ 'primary': true,
91
+ 'defaultInternal': true,
92
+ 'label': 'Does this agreement support publishing',
93
+ 'description': 'Does this agreement support publishing',
94
+ 'weight': 0,
95
+ 'type': 'com.k_int.web.toolkit.custprops.types.CustomPropertyText'
96
+ },
97
+ {
98
+ 'id': '2c91809c813e654501814287324e0070',
99
+ 'retired': false,
100
+ 'ctx': 'OpenAccess',
101
+ 'name': 'Test',
102
+ 'primary': true,
103
+ 'category': {
104
+ 'id': '2096ecb6794fae7aa29074cf31970b17',
105
+ 'desc': 'SubscriptionAgreement.AgreementStatus',
106
+ 'internal': true,
107
+ 'values': '[{…}, {…}, {…}, {…}, {…}]'
108
+ },
109
+ 'defaultInternal': true,
110
+ 'label': 'test',
111
+ 'description': 'test description',
112
+ 'weight': 1,
113
+ 'type': 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata'
114
+ },
115
+ {
116
+ 'id': '2c91809c813e6545018143f201040073',
117
+ 'retired': false,
118
+ 'name': 'TestTextSuppProp',
119
+ 'primary': true,
120
+ 'defaultInternal': false,
121
+ 'label': 'TestTextSuppProp',
122
+ 'description': 'TestTextSuppProp',
123
+ 'weight': 0,
124
+ 'type': 'com.k_int.web.toolkit.custprops.types.CustomPropertyText'
125
+ }
126
+ ];
127
+
128
+ const fields = {
129
+ 'name': 'filters',
130
+ 'forEach': () => {},
131
+ 'length': 2,
132
+ 'map': () => {},
133
+ 'insert': () => {},
134
+ 'concat': () => {},
135
+ 'move': () => {},
136
+ 'pop': () => {},
137
+ 'push': () => {},
138
+ 'remove': () => {},
139
+ 'removeBatch': () => {},
140
+ 'shift': () => {},
141
+ 'swap': () => {},
142
+ 'unshift': () => {},
143
+ 'update': () => {},
144
+ 'value': [{
145
+ 'customProperty': 'AuthorIdentification',
146
+ 'rules': [{
147
+ 'operator': '==',
148
+ 'value': '2c91809c813e654501813e6c3bc50061'
149
+ }]
150
+ },
151
+ {
152
+ 'customProperty': 'AuthorIdentification',
153
+ 'rules': [{
154
+ 'operator': '==',
155
+ 'value': '2c91809c813e654501813e6c3bd20065'
156
+ }]
157
+ }
158
+ ]
159
+ };
160
+
161
+ const data = {
162
+ 'customProperties': [{
163
+ 'id': '2c91809c813e654501813e6c3c6a0066',
164
+ 'retired': false,
165
+ 'ctx': 'OpenAccess',
166
+ 'name': 'AuthorIdentification',
167
+ 'primary': true,
168
+ 'category': {
169
+ 'id': '2c91809c813e654501813e6c3bbb005e',
170
+ 'desc': 'AuthIdent',
171
+ 'internal': false,
172
+ 'values': [{
173
+ 'id': '2c91809c813e654501813e6c3bd20065',
174
+ 'value': 'ror_id',
175
+ 'label': 'ROR ID'
176
+ },
177
+ {
178
+ 'id': '2c91809c813e654501813e6c3bc20060',
179
+ 'value': 'email_domain',
180
+ 'label': 'Email Domain'
181
+ },
182
+ {
183
+ 'id': '2c91809c813e654501813e6c3bc50061',
184
+ 'value': 'orcid',
185
+ 'label': 'ORCID'
186
+ },
187
+ {
188
+ 'id': '2c91809c813e654501813e6c3bcf0064',
189
+ 'value': 'ringgold_id',
190
+ 'label': 'Ringgold ID'
191
+ },
192
+ {
193
+ 'id': '2c91809c813e654501813e6c3bbd005f',
194
+ 'value': 'other',
195
+ 'label': 'Other'
196
+ },
197
+ {
198
+ 'id': '2c91809c813e654501813e6c3bc90062',
199
+ 'value': 'over_institute',
200
+ 'label': 'Over Institute'
201
+ },
202
+ {
203
+ 'id': '2c91809c813e654501813e6c3bcc0063',
204
+ 'value': 'over_ip_range',
205
+ 'label': 'Over IP Range'
206
+ }
207
+ ]
208
+ },
209
+ 'defaultInternal': true,
210
+ 'label': 'Author Identification',
211
+ 'description': 'Author Identification',
212
+ 'weight': 0,
213
+ 'type': 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata'
214
+ },
215
+ {
216
+ 'id': '2c91809c813e654501813e6c3c7d0067',
217
+ 'retired': false,
218
+ 'ctx': 'OpenAccess',
219
+ 'name': 'Eligible authors',
220
+ 'primary': true,
221
+ 'defaultInternal': true,
222
+ 'label': 'Does this agreement support publishing',
223
+ 'description': 'Does this agreement support publishing',
224
+ 'weight': 0,
225
+ 'type': 'com.k_int.web.toolkit.custprops.types.CustomPropertyText'
226
+ },
227
+ {
228
+ 'id': '2c91809c813e654501814287324e0070',
229
+ 'retired': false,
230
+ 'ctx': 'OpenAccess',
231
+ 'name': 'Test',
232
+ 'primary': true,
233
+ 'category': {
234
+ 'id': '2096ecb6794fae7aa29074cf31970b17',
235
+ 'desc': 'SubscriptionAgreement.AgreementStatus',
236
+ 'internal': true,
237
+ 'values': '[{…}, {…}, {…}, {…}, {…}]'
238
+ },
239
+ 'defaultInternal': true,
240
+ 'label': 'test',
241
+ 'description': 'test description',
242
+ 'weight': 1,
243
+ 'type': 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata'
244
+ },
245
+ {
246
+ 'id': '2c91809c813e6545018143f201040073',
247
+ 'retired': false,
248
+ 'name': 'TestTextSuppProp',
249
+ 'primary': true,
250
+ 'defaultInternal': false,
251
+ 'label': 'TestTextSuppProp',
252
+ 'description': 'TestTextSuppProp',
253
+ 'weight': 0,
254
+ 'type': 'com.k_int.web.toolkit.custprops.types.CustomPropertyText'
255
+ }
256
+ ],
257
+ 'editingFilters': true,
258
+ 'filters': [{
259
+ 'customProperty': 'AuthorIdentification',
260
+ 'rules': [{
261
+ 'operator': '==',
262
+ 'value': '2c91809c813e654501813e6c3bd20065'
263
+ }]
264
+ },
265
+ {
266
+ 'customProperty': 'Eligible authors',
267
+ 'rules': [{
268
+ 'operator': '=~',
269
+ 'value': 'i'
270
+ }]
271
+ }
272
+ ],
273
+ 'handlers': {
274
+ 'closeEditModal': () => {},
275
+ 'openEditModal': () => {}
276
+ },
277
+ 'labelOverrides': {
278
+ 'customProperty': '<Memo />',
279
+ 'customProperties': '<Memo />',
280
+ 'filtersApplied': () => {},
281
+ 'editCustomPropertyFilters': 'Edit supplementary property filters',
282
+ 'filterBuilder': '<Memo />',
283
+ 'customPropertyFilter': () => {},
284
+ 'removeFilter': () => {},
285
+ 'retiredName': () => {}
286
+ },
287
+ 'onSubmit': () => {}
288
+ };
289
+
290
+ export {
291
+ activeFilters,
292
+ filterHandlers,
293
+ labelOverrides,
294
+ customProperties,
295
+ fields,
296
+ data
297
+ };
@@ -3,6 +3,7 @@ import * as CUSTPROP_TYPES from '../../constants/customProperties';
3
3
 
4
4
  const {
5
5
  REFDATA_CLASS_NAME: REFDATA,
6
+ MULTI_REFDATA_CLASS_NAME: MULTIREFDATA,
6
7
  DECIMAL_CLASS_NAME: DECIMAL,
7
8
  INTEGER_CLASS_NAME: INTEGER,
8
9
  DATE_CLASS_NAME: DATE,
@@ -42,6 +43,12 @@ const useOperators = (type) => {
42
43
  );
43
44
  }
44
45
 
46
+ if (!type || type === MULTIREFDATA) {
47
+ operators.push(
48
+ { value: '==', label: getLabel('stripes-kint-components.operator.contains') },
49
+ );
50
+ }
51
+
45
52
  if (!type || type === TEXT) {
46
53
  operators.push(
47
54
  { value: '=~', label: getLabel('stripes-kint-components.operator.contains') },
@@ -9,11 +9,14 @@ const useParseActiveFilterStrings = (filterStrings) => {
9
9
  const rules = filter.split('||').map(ruleString => {
10
10
  // ruleString is constructed in this.handleSubmit passed to CustomPropertyFiltersForm
11
11
  // and has shape "customProperties.foo.value!=42"
12
+ // OR customProperties.foo.value.id==1234, so make sure to disregard the .id
12
13
  const [customPropertyPath, rule] = ruleString.split('.value');
14
+ const idSafeRule = rule.replace('.id', '');
15
+
13
16
  customProperty = customPropertyPath.replace('customProperties.', '');
14
17
 
15
- const operator = operators.find(o => rule.startsWith(o)) ?? '';
16
- const value = rule.substring(operator.length);
18
+ const operator = operators.find(o => idSafeRule.startsWith(o)) ?? '';
19
+ const value = idSafeRule.substring(operator.length);
17
20
 
18
21
  numberOfFilters += 1;
19
22
 
@@ -4,6 +4,7 @@ import { invalidNumber as invalidNumberValidator, required as requiredValidator
4
4
 
5
5
  const {
6
6
  REFDATA_CLASS_NAME: REFDATA,
7
+ MULTI_REFDATA_CLASS_NAME: MULTIREFDATA,
7
8
  DECIMAL_CLASS_NAME: DECIMAL,
8
9
  INTEGER_CLASS_NAME: INTEGER,
9
10
  DATE_CLASS_NAME: DATE,
@@ -27,6 +28,11 @@ const useValueProps = (custPropDefinition) => {
27
28
  props.dataOptions = custPropDefinition.category.values.map(rdv => ({ label: rdv.label, value: rdv.id }));
28
29
  props.placeholder = ' ';
29
30
  break;
31
+ case MULTIREFDATA:
32
+ props.component = Select;
33
+ props.dataOptions = custPropDefinition.category.values.map(mrdv => ({ label: mrdv.label, value: mrdv.id }));
34
+ props.placeholder = ' ';
35
+ break;
30
36
  case DATE:
31
37
  props.component = Datepicker;
32
38
  props.backendDateStandard = 'YYYY-MM-DD';