@k-int/stripes-kint-components 2.3.2 → 2.3.3

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 (211) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +109 -0
  3. package/es/artifacts/coverage-jest/lcov-report/prettify.js +998 -0
  4. package/es/artifacts/coverage-jest/lcov-report/sorter.js +238 -0
  5. package/es/index.js +5 -1
  6. package/es/lib/ActionList/ActionList.js +31 -1
  7. package/es/lib/ActionList/ActionListFieldArray.js +38 -1
  8. package/es/lib/ActionList/index.js +5 -1
  9. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +35 -1
  10. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +46 -7
  11. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +34 -1
  12. package/es/lib/CustomProperties/Config/CustomPropertyView.js +30 -1
  13. package/es/lib/CustomProperties/Config/index.js +5 -1
  14. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +30 -1
  15. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +34 -1
  16. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +37 -1
  17. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +34 -1
  18. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +30 -1
  19. package/es/lib/CustomProperties/Edit/index.js +5 -1
  20. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +34 -1
  21. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +34 -1
  22. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +34 -1
  23. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +30 -1
  24. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +35 -1
  25. package/es/lib/CustomProperties/Filter/index.js +5 -1
  26. package/es/lib/CustomProperties/Filter/useOperators.js +39 -1
  27. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +34 -1
  28. package/es/lib/CustomProperties/Filter/useValueProps.js +35 -1
  29. package/es/lib/CustomProperties/View/CustomPropertiesView.js +30 -1
  30. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +56 -16
  31. package/es/lib/CustomProperties/View/CustomPropertyCard.js +33 -3
  32. package/es/lib/CustomProperties/View/index.js +5 -1
  33. package/es/lib/CustomProperties/index.js +5 -1
  34. package/es/lib/EditableRefdataList/EditableRefdataList.js +35 -1
  35. package/es/lib/EditableRefdataList/index.js +5 -1
  36. package/es/lib/EditableSettingsList/EditableSettingsList.js +30 -1
  37. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +30 -1
  38. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +30 -1
  39. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +34 -1
  40. package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +34 -1
  41. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +34 -1
  42. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +41 -1
  43. package/es/lib/EditableSettingsList/SettingField/SettingField.js +34 -1
  44. package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +30 -1
  45. package/es/lib/EditableSettingsList/SettingField/index.js +5 -1
  46. package/es/lib/EditableSettingsList/index.js +5 -1
  47. package/es/lib/FormModal/FormModal.js +30 -1
  48. package/es/lib/FormModal/index.js +5 -1
  49. package/es/lib/NoResultsMessage/NoResultsMessage.js +30 -1
  50. package/es/lib/NoResultsMessage/index.js +5 -1
  51. package/es/lib/QueryTypedown/QueryTypedown.js +34 -1
  52. package/es/lib/QueryTypedown/index.js +5 -1
  53. package/es/lib/RefdataButtons/RefdataButtons.js +34 -1
  54. package/es/lib/RefdataButtons/index.js +5 -1
  55. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +34 -1
  56. package/es/lib/SASQLookupComponent/index.js +5 -1
  57. package/es/lib/SASQRoute/SASQRoute.js +30 -1
  58. package/es/lib/SASQRoute/index.js +5 -1
  59. package/es/lib/SASQViewComponent/SASQViewComponent.js +34 -1
  60. package/es/lib/SASQViewComponent/index.js +5 -1
  61. package/es/lib/SearchField/SearchField.js +31 -1
  62. package/es/lib/SearchField/index.js +5 -1
  63. package/es/lib/SettingPage/SettingPage.js +34 -1
  64. package/es/lib/SettingPage/SettingPagePane.js +32 -1
  65. package/es/lib/SettingPage/index.js +5 -1
  66. package/es/lib/Typedown/Typedown.js +34 -1
  67. package/es/lib/Typedown/index.js +5 -1
  68. package/es/lib/constants/customProperties.js +38 -1
  69. package/es/lib/constants/eventCodes.js +31 -1
  70. package/es/lib/contexts/SettingsContext.js +30 -1
  71. package/es/lib/contexts/index.js +5 -1
  72. package/es/lib/hooks/index.js +5 -1
  73. package/es/lib/hooks/settingsHooks/index.js +5 -1
  74. package/es/lib/hooks/settingsHooks/useSettingSection.js +34 -1
  75. package/es/lib/hooks/settingsHooks/useSettings.js +36 -1
  76. package/es/lib/hooks/typedownHooks/index.js +5 -1
  77. package/es/lib/hooks/typedownHooks/useTypedown.js +34 -1
  78. package/es/lib/hooks/typedownHooks/useTypedownData.js +34 -1
  79. package/es/lib/hooks/typedownHooks/useTypedownToggle.js +34 -1
  80. package/es/lib/hooks/useActiveElement.js +32 -1
  81. package/es/lib/hooks/useAvailableCustomProperties.js +34 -1
  82. package/es/lib/hooks/useCustomProperties.js +34 -1
  83. package/es/lib/hooks/useHelperApp.js +34 -1
  84. package/es/lib/hooks/useInvalidateRefdata.js +34 -1
  85. package/es/lib/hooks/useKiwtFieldArray.js +34 -1
  86. package/es/lib/hooks/useKiwtSASQuery.js +35 -1
  87. package/es/lib/hooks/useLocalStorageState.js +34 -1
  88. package/es/lib/hooks/useMutateCustomProperties.js +34 -1
  89. package/es/lib/hooks/useMutateRefdataValue.js +34 -1
  90. package/es/lib/hooks/useQIndex.js +34 -1
  91. package/es/lib/hooks/useRefdata.js +34 -1
  92. package/es/lib/hooks/useTemplates.js +34 -1
  93. package/es/lib/utils/buildUrl.js +31 -2
  94. package/es/lib/utils/generateKiwtQuery.js +30 -1
  95. package/es/lib/utils/generateKiwtQueryParams.js +30 -1
  96. package/es/lib/utils/groupCustomPropertiesByCtx.js +30 -1
  97. package/es/lib/utils/index.js +5 -1
  98. package/es/lib/utils/refdataOptions.js +30 -1
  99. package/es/lib/utils/refdataQueryKey.js +30 -1
  100. package/es/lib/utils/renderHelpText.js +30 -1
  101. package/es/lib/utils/selectorSafe.js +30 -1
  102. package/es/lib/utils/sortByLabel.js +30 -1
  103. package/es/lib/utils/toCamelCase.js +30 -1
  104. package/es/lib/utils/typedownQueryKey.js +30 -1
  105. package/es/lib/utils/validators.js +32 -1
  106. package/junit.xml +79 -0
  107. package/package.json +1 -1
  108. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +286 -0
  109. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +925 -0
  110. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +146 -0
  111. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +88 -0
  112. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +418 -0
  113. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +808 -0
  114. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesView.js.html +601 -0
  115. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +1135 -0
  116. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +176 -0
  117. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +97 -0
  118. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +373 -0
  119. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +131 -0
  120. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +88 -0
  121. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +223 -0
  122. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +211 -0
  123. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +376 -0
  124. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +262 -0
  125. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +436 -0
  126. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +161 -0
  127. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +94 -0
  128. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +146 -0
  129. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +94 -0
  130. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +283 -0
  131. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +131 -0
  132. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +88 -0
  133. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +319 -0
  134. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +131 -0
  135. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +88 -0
  136. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +184 -0
  137. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +131 -0
  138. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +88 -0
  139. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +370 -0
  140. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +131 -0
  141. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +88 -0
  142. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +949 -0
  143. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +131 -0
  144. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +88 -0
  145. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +301 -0
  146. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +131 -0
  147. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +88 -0
  148. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +253 -0
  149. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +131 -0
  150. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +88 -0
  151. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +214 -0
  152. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +131 -0
  153. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +88 -0
  154. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +211 -0
  155. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +178 -0
  156. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +146 -0
  157. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +91 -0
  158. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +919 -0
  159. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +131 -0
  160. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +88 -0
  161. package/src/artifacts/coverage-jest/lcov-report/base.css +224 -0
  162. package/src/artifacts/coverage-jest/lcov-report/block-navigation.js +87 -0
  163. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +112 -0
  164. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +94 -0
  165. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +131 -0
  166. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +97 -0
  167. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +131 -0
  168. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +91 -0
  169. package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
  170. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +281 -0
  171. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +121 -0
  172. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +146 -0
  173. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +91 -0
  174. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +163 -0
  175. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +403 -0
  176. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +161 -0
  177. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +94 -0
  178. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +520 -0
  179. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +163 -0
  180. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +163 -0
  181. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +157 -0
  182. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +313 -0
  183. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +283 -0
  184. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +274 -0
  185. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +178 -0
  186. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +136 -0
  187. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +271 -0
  188. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +301 -0
  189. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +208 -0
  190. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +268 -0
  191. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +166 -0
  192. package/src/artifacts/coverage-jest/lcov-report/index.html +416 -0
  193. package/src/artifacts/coverage-jest/lcov-report/prettify.css +1 -0
  194. package/src/artifacts/coverage-jest/lcov-report/prettify.js +2 -0
  195. package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
  196. package/src/artifacts/coverage-jest/lcov-report/sorter.js +196 -0
  197. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +193 -0
  198. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +109 -0
  199. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +454 -0
  200. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +251 -0
  201. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +121 -0
  202. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +106 -0
  203. package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +166 -0
  204. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +103 -0
  205. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +130 -0
  206. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +127 -0
  207. package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +202 -0
  208. package/src/artifacts/coverage-jest/lcov.info +2562 -0
  209. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +9 -6
  210. package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.js +13 -8
  211. package/src/lib/CustomProperties/View/CustomPropertyCard.js +2 -2
@@ -78,20 +78,23 @@ const CustomPropertiesSettings = ({
78
78
  delete: deleteCustProp
79
79
  } = useMutateCustomProperties({
80
80
  afterQueryCalls: {
81
- put: () => {
81
+ put: res => {
82
82
  setMode(VIEWING);
83
83
  queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
84
- afterQueryCallsSafe.put();
84
+ setCustomProperty(res);
85
+ afterQueryCallsSafe.put(res);
85
86
  },
86
- post: () => {
87
+ post: res => {
87
88
  setMode(VIEWING);
88
89
  queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
89
- afterQueryCallsSafe.post();
90
+ setCustomProperty(res);
91
+ afterQueryCallsSafe.post(res);
90
92
  },
91
- delete: () => {
93
+ delete: res => {
92
94
  setMode(VIEWING);
93
95
  queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
94
- afterQueryCallsSafe.delete();
96
+ setCustomProperty();
97
+ afterQueryCallsSafe.delete(res);
95
98
  }
96
99
  },
97
100
  endpoint: customPropertiesEndpoint,
@@ -69,21 +69,26 @@ const CustomPropertiesViewCtx = ({
69
69
  );
70
70
  }
71
71
 
72
+ const countSetProperties = (primary) => (
73
+ Object.entries(customProperties)?.filter(
74
+ ([_key, cp]) => (
75
+ (cp[0]?.type?.ctx === ctx || (ctx === 'isNull' && !cp[0]?.type?.ctx)) && // Either the ctx string matches, or isNull matches blank
76
+ cp[0]?.type?.primary === primary // Only count non-primary set custprops
77
+ )
78
+ )?.length ?? 0
79
+ );
80
+
72
81
  // We need to display any set properties, along with any non-set primary properties
73
82
  const primaryCount = custprops?.filter(cp => cp.primary === true)?.length ?? 0;
74
- const optionalCount = Object.entries(customProperties)?.filter(
75
- ([_key, cp]) => (
76
- (cp[0]?.type?.ctx === ctx || (ctx === 'isNull' && !cp[0]?.type?.ctx)) && // Either the ctx string matches, or isNull matches blank
77
- cp[0]?.type?.primary === false // Only count non-primary set custprops
78
- )
79
- )?.length ?? 0;
83
+ const optionalCount = countSetProperties(false);
84
+ const setPrimaryCount = countSetProperties(true);
80
85
 
81
86
  return (
82
87
  (primaryCount + optionalCount) > 0 &&
83
88
  <Accordion
84
89
  closedByDefault
85
- displayWhenClosed={<Badge>{primaryCount + optionalCount}</Badge>}
86
- displayWhenOpen={<Badge>{primaryCount + optionalCount}</Badge>}
90
+ displayWhenClosed={<Badge>{setPrimaryCount + optionalCount}</Badge>}
91
+ displayWhenOpen={<Badge>{setPrimaryCount + optionalCount}</Badge>}
87
92
  id={`${id}-accordion-${ctx}`}
88
93
  label={getAccordionLabel()}
89
94
  >
@@ -16,7 +16,7 @@ import * as CUSTPROP_TYPES from '../../constants/customProperties';
16
16
  const CustomPropertyCard = ({
17
17
  ctx,
18
18
  customProperty,
19
- customPropertyDefinition,
19
+ customPropertyDefinition = {},
20
20
  index,
21
21
  labelOverrides
22
22
  }) => {
@@ -35,7 +35,7 @@ const CustomPropertyCard = ({
35
35
  // Label override for default card title,
36
36
  if (labelOverrides.retiredName && typeof labelOverrides.retiredName === 'function') {
37
37
  return (
38
- labelOverrides.retiredName(customPropertyDefinition)
38
+ labelOverrides.retiredName(customPropertyDefinition.name)
39
39
  );
40
40
  }
41
41