@k-int/stripes-kint-components 3.2.0 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/es/lib/ActionList/ActionList.js +3 -1
  3. package/es/lib/ActionList/ActionListFieldArray.js +4 -2
  4. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +5 -2
  5. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +6 -4
  6. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +1 -1
  7. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +1 -1
  8. package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +5 -3
  9. package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -1
  10. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +5 -2
  11. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +1 -1
  12. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +3 -1
  13. package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +5 -3
  14. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +5 -2
  15. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +1 -1
  16. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +5 -2
  17. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +1 -1
  18. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +4 -1
  19. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +5 -3
  20. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +4 -1
  21. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +1 -1
  22. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +1 -1
  23. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +1 -1
  24. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +4 -1
  25. package/es/lib/CycleButton/CycleButton.js +5 -2
  26. package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +6 -4
  27. package/es/lib/EditableRefdataList/EditableRefdataList.js +6 -4
  28. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +4 -1
  29. package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +1 -1
  30. package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +1 -1
  31. package/es/lib/EditableSettingsList/SettingField/SettingField.js +4 -2
  32. package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +1 -1
  33. package/es/lib/FormModal/FormModal.js +4 -1
  34. package/es/lib/FormattedKintMessage/FormattedKintMessage.js +4 -1
  35. package/es/lib/IconSelect/IconSelect.js +4 -2
  36. package/es/lib/QueryTypedown/QueryTypedown.js +4 -2
  37. package/es/lib/RefdataButtons/RefdataButtons.js +4 -1
  38. package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +4 -1
  39. package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +1 -1
  40. package/es/lib/RichSelect/RichSelect.js +5 -2
  41. package/es/lib/RichSelect/useSelectedOption.js +1 -1
  42. package/es/lib/SASQLookupComponent/SASQLookupComponent.js +5 -2
  43. package/es/lib/SASQLookupComponent/TableBody/TableBody.js +4 -1
  44. package/es/lib/SASQRoute/SASQRoute.js +4 -1
  45. package/es/lib/SASQViewComponent/SASQViewComponent.js +4 -1
  46. package/es/lib/SearchField/SearchField.js +4 -1
  47. package/es/lib/Typedown/Typedown.js +1 -1
  48. package/es/lib/hooks/settingsHooks/useSettings.js +4 -1
  49. package/es/lib/hooks/typedownHooks/useTypedownData.js +1 -1
  50. package/es/lib/hooks/typedownHooks/useTypedownToggle.js +1 -1
  51. package/es/lib/hooks/useActiveElement.js +1 -1
  52. package/es/lib/hooks/useCustomProperties.js +4 -1
  53. package/es/lib/hooks/useHelperApp.js +4 -2
  54. package/es/lib/hooks/useIntlKeyStore.js +4 -4
  55. package/es/lib/hooks/useKintIntl.js +4 -1
  56. package/es/lib/hooks/useKiwtFieldArray.js +5 -2
  57. package/es/lib/hooks/useKiwtSASQuery.js +4 -2
  58. package/es/lib/hooks/useLocalStorageState.js +1 -1
  59. package/es/lib/hooks/useMutateCustomProperties.js +1 -1
  60. package/es/lib/hooks/useMutateRefdataCategory.js +4 -2
  61. package/es/lib/hooks/useMutateRefdataValue.js +1 -1
  62. package/es/lib/hooks/useQIndex.js +4 -2
  63. package/es/lib/utils/generateKiwtQuery.js +4 -3
  64. package/es/lib/utils/generateKiwtQueryParams.js +13 -23
  65. package/es/lib/utils/groupCustomPropertiesByCtx.js +4 -1
  66. package/es/lib/utils/highlightString.js +1 -1
  67. package/es/lib/utils/parseErrorResponse.js +23 -19
  68. package/junit.xml +146 -146
  69. package/package.json +1 -1
  70. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
  71. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +296 -44
  72. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +8 -23
  73. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
  74. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
  75. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +1 -1
  76. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
  77. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +1 -1
  78. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +1 -1
  79. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
  80. package/src/artifacts/coverage-jest/lcov-report/{SettingsActionList/SettingsActionList.js.html → CustomProperties/Config/testResources.js.html} +313 -256
  81. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
  82. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
  83. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +6 -9
  84. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +1 -1
  85. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
  86. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +10 -10
  87. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
  88. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +1 -1
  89. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +1 -1
  90. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
  91. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
  92. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
  93. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
  94. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +1 -1
  95. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
  96. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +1 -1
  97. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +1 -1
  98. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
  99. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +1 -1
  100. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +1 -1
  101. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +1 -1
  102. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +1 -1
  103. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +1 -1
  104. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
  105. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
  106. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
  107. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
  108. package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +1 -1
  109. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +1 -1
  110. package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +1 -1
  111. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
  112. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +1 -1
  113. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
  114. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +8 -74
  115. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +9 -9
  116. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
  117. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +4 -31
  118. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +1 -1
  119. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
  120. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +2 -2
  121. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +1 -1
  122. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
  123. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
  124. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +7 -7
  125. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
  126. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +1 -1
  127. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +1 -1
  128. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
  129. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
  130. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +1 -1
  131. package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +1 -1
  132. package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +28 -22
  133. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +1 -1
  134. package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
  135. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +2 -2
  136. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
  137. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
  138. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
  139. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
  140. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
  141. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -18
  142. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
  143. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
  144. package/src/artifacts/coverage-jest/lcov-report/{SettingsActionList/EditSettingValue.js.html → ResponsiveButtonGroup/ResponsiveButtonGroup.js.html} +199 -142
  145. package/src/artifacts/coverage-jest/lcov-report/{SettingsActionList → ResponsiveButtonGroup}/index.html +26 -41
  146. package/src/artifacts/coverage-jest/lcov-report/{SettingsActionList → ResponsiveButtonGroup}/index.js.html +4 -4
  147. package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +253 -0
  148. package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +5 -2
  149. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +1 -1
  150. package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +1 -1
  151. package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +1 -1
  152. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +119 -26
  153. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
  154. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
  155. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
  156. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +9 -9
  157. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
  158. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
  159. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
  160. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
  161. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
  162. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
  163. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
  164. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
  165. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
  166. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
  167. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +5 -56
  168. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
  169. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +7 -7
  170. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
  171. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
  172. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
  173. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
  174. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
  175. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
  176. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
  177. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
  178. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
  179. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
  180. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +1 -1
  181. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
  182. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +3 -3
  183. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
  184. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +1 -1
  185. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +1 -1
  186. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +3 -9
  187. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
  188. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
  189. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
  190. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
  191. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  192. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +1 -1
  193. package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +205 -0
  194. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +1 -1
  195. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +1 -1
  196. package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +1 -1
  197. package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +2 -2
  198. package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +1 -1
  199. package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +1 -1
  200. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
  201. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
  202. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
  203. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +1 -1
  204. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +1 -1
  205. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +1 -1
  206. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
  207. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +1 -1
  208. package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +1 -1
  209. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
  210. package/src/artifacts/coverage-jest/lcov-report/index.html +61 -61
  211. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
  212. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +8 -8
  213. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +196 -46
  214. package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +1 -1
  215. package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +1 -1
  216. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +44 -29
  217. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +8 -2
  218. package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +1 -1
  219. package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +11 -8
  220. package/src/artifacts/coverage-jest/lcov-report/{SettingsActionList/RenderSettingValue.js.html → utils/parseKiwtQueryGroups.js.html} +67 -145
  221. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
  222. package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +1 -1
  223. package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +166 -0
  224. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +1 -1
  225. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +1 -1
  226. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +1 -1
  227. package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +1 -1
  228. package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +1 -1
  229. package/src/artifacts/coverage-jest/lcov.info +962 -920
  230. package/src/lib/utils/README.md +1 -3
  231. package/src/lib/utils/generateKiwtQuery.js +3 -3
  232. package/src/lib/utils/generateKiwtQueryParams.js +13 -27
  233. package/src/lib/utils/parseErrorResponse.js +3 -2
  234. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionTrigger.js.html +0 -418
@@ -3,7 +3,7 @@
3
3
  <html lang="en">
4
4
 
5
5
  <head>
6
- <title>Code coverage report for SettingsActionList/EditSettingValue.js</title>
6
+ <title>Code coverage report for ResponsiveButtonGroup/ResponsiveButtonGroup.js</title>
7
7
  <meta charset="utf-8" />
8
8
  <link rel="stylesheet" href="../prettify.css" />
9
9
  <link rel="stylesheet" href="../base.css" />
@@ -19,34 +19,34 @@
19
19
  <body>
20
20
  <div class='wrapper'>
21
21
  <div class='pad1'>
22
- <h1><a href="../index.html">All files</a> / <a href="index.html">SettingsActionList</a> EditSettingValue.js</h1>
22
+ <h1><a href="../index.html">All files</a> / <a href="index.html">ResponsiveButtonGroup</a> ResponsiveButtonGroup.js</h1>
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
26
26
  <span class="strong">0% </span>
27
27
  <span class="quiet">Statements</span>
28
- <span class='fraction'>0/21</span>
28
+ <span class='fraction'>0/34</span>
29
29
  </div>
30
30
 
31
31
 
32
32
  <div class='fl pad1y space-right2'>
33
33
  <span class="strong">0% </span>
34
34
  <span class="quiet">Branches</span>
35
- <span class='fraction'>0/15</span>
35
+ <span class='fraction'>0/33</span>
36
36
  </div>
37
37
 
38
38
 
39
39
  <div class='fl pad1y space-right2'>
40
40
  <span class="strong">0% </span>
41
41
  <span class="quiet">Functions</span>
42
- <span class='fraction'>0/5</span>
42
+ <span class='fraction'>0/12</span>
43
43
  </div>
44
44
 
45
45
 
46
46
  <div class='fl pad1y space-right2'>
47
47
  <span class="strong">0% </span>
48
48
  <span class="quiet">Lines</span>
49
- <span class='fraction'>0/21</span>
49
+ <span class='fraction'>0/33</span>
50
50
  </div>
51
51
 
52
52
 
@@ -206,8 +206,26 @@
206
206
  <a name='L141'></a><a href='#L141'>141</a>
207
207
  <a name='L142'></a><a href='#L142'>142</a>
208
208
  <a name='L143'></a><a href='#L143'>143</a>
209
- <a name='L144'></a><a href='#L144'>144</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
210
- <span class="cline-any cline-neutral">&nbsp;</span>
209
+ <a name='L144'></a><a href='#L144'>144</a>
210
+ <a name='L145'></a><a href='#L145'>145</a>
211
+ <a name='L146'></a><a href='#L146'>146</a>
212
+ <a name='L147'></a><a href='#L147'>147</a>
213
+ <a name='L148'></a><a href='#L148'>148</a>
214
+ <a name='L149'></a><a href='#L149'>149</a>
215
+ <a name='L150'></a><a href='#L150'>150</a>
216
+ <a name='L151'></a><a href='#L151'>151</a>
217
+ <a name='L152'></a><a href='#L152'>152</a>
218
+ <a name='L153'></a><a href='#L153'>153</a>
219
+ <a name='L154'></a><a href='#L154'>154</a>
220
+ <a name='L155'></a><a href='#L155'>155</a>
221
+ <a name='L156'></a><a href='#L156'>156</a>
222
+ <a name='L157'></a><a href='#L157'>157</a>
223
+ <a name='L158'></a><a href='#L158'>158</a>
224
+ <a name='L159'></a><a href='#L159'>159</a>
225
+ <a name='L160'></a><a href='#L160'>160</a>
226
+ <a name='L161'></a><a href='#L161'>161</a>
227
+ <a name='L162'></a><a href='#L162'>162</a>
228
+ <a name='L163'></a><a href='#L163'>163</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
211
229
  <span class="cline-any cline-neutral">&nbsp;</span>
212
230
  <span class="cline-any cline-neutral">&nbsp;</span>
213
231
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -232,19 +250,21 @@
232
250
  <span class="cline-any cline-neutral">&nbsp;</span>
233
251
  <span class="cline-any cline-neutral">&nbsp;</span>
234
252
  <span class="cline-any cline-neutral">&nbsp;</span>
235
- <span class="cline-any cline-no">&nbsp;</span>
253
+ <span class="cline-any cline-neutral">&nbsp;</span>
236
254
  <span class="cline-any cline-no">&nbsp;</span>
237
255
  <span class="cline-any cline-no">&nbsp;</span>
238
256
  <span class="cline-any cline-neutral">&nbsp;</span>
239
- <span class="cline-any cline-neutral">&nbsp;</span>
257
+ <span class="cline-any cline-no">&nbsp;</span>
258
+ <span class="cline-any cline-no">&nbsp;</span>
240
259
  <span class="cline-any cline-neutral">&nbsp;</span>
241
260
  <span class="cline-any cline-neutral">&nbsp;</span>
242
261
  <span class="cline-any cline-neutral">&nbsp;</span>
243
262
  <span class="cline-any cline-no">&nbsp;</span>
263
+ <span class="cline-any cline-no">&nbsp;</span>
264
+ <span class="cline-any cline-no">&nbsp;</span>
244
265
  <span class="cline-any cline-neutral">&nbsp;</span>
245
266
  <span class="cline-any cline-neutral">&nbsp;</span>
246
- <span class="cline-any cline-neutral">&nbsp;</span>
247
- <span class="cline-any cline-neutral">&nbsp;</span>
267
+ <span class="cline-any cline-no">&nbsp;</span>
248
268
  <span class="cline-any cline-neutral">&nbsp;</span>
249
269
  <span class="cline-any cline-neutral">&nbsp;</span>
250
270
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -256,9 +276,9 @@
256
276
  <span class="cline-any cline-neutral">&nbsp;</span>
257
277
  <span class="cline-any cline-neutral">&nbsp;</span>
258
278
  <span class="cline-any cline-neutral">&nbsp;</span>
259
- <span class="cline-any cline-no">&nbsp;</span>
260
279
  <span class="cline-any cline-neutral">&nbsp;</span>
261
280
  <span class="cline-any cline-neutral">&nbsp;</span>
281
+ <span class="cline-any cline-no">&nbsp;</span>
262
282
  <span class="cline-any cline-neutral">&nbsp;</span>
263
283
  <span class="cline-any cline-neutral">&nbsp;</span>
264
284
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -271,12 +291,11 @@
271
291
  <span class="cline-any cline-neutral">&nbsp;</span>
272
292
  <span class="cline-any cline-neutral">&nbsp;</span>
273
293
  <span class="cline-any cline-no">&nbsp;</span>
294
+ <span class="cline-any cline-neutral">&nbsp;</span>
274
295
  <span class="cline-any cline-no">&nbsp;</span>
275
296
  <span class="cline-any cline-no">&nbsp;</span>
276
297
  <span class="cline-any cline-neutral">&nbsp;</span>
277
298
  <span class="cline-any cline-neutral">&nbsp;</span>
278
- <span class="cline-any cline-no">&nbsp;</span>
279
- <span class="cline-any cline-neutral">&nbsp;</span>
280
299
  <span class="cline-any cline-neutral">&nbsp;</span>
281
300
  <span class="cline-any cline-neutral">&nbsp;</span>
282
301
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -287,22 +306,27 @@
287
306
  <span class="cline-any cline-neutral">&nbsp;</span>
288
307
  <span class="cline-any cline-neutral">&nbsp;</span>
289
308
  <span class="cline-any cline-neutral">&nbsp;</span>
290
- <span class="cline-any cline-no">&nbsp;</span>
291
309
  <span class="cline-any cline-neutral">&nbsp;</span>
292
310
  <span class="cline-any cline-neutral">&nbsp;</span>
293
311
  <span class="cline-any cline-neutral">&nbsp;</span>
294
312
  <span class="cline-any cline-neutral">&nbsp;</span>
295
313
  <span class="cline-any cline-neutral">&nbsp;</span>
296
314
  <span class="cline-any cline-neutral">&nbsp;</span>
297
- <span class="cline-any cline-no">&nbsp;</span>
298
315
  <span class="cline-any cline-neutral">&nbsp;</span>
299
316
  <span class="cline-any cline-neutral">&nbsp;</span>
300
317
  <span class="cline-any cline-neutral">&nbsp;</span>
301
318
  <span class="cline-any cline-neutral">&nbsp;</span>
319
+ <span class="cline-any cline-no">&nbsp;</span>
320
+ <span class="cline-any cline-no">&nbsp;</span>
321
+ <span class="cline-any cline-no">&nbsp;</span>
322
+ <span class="cline-any cline-no">&nbsp;</span>
302
323
  <span class="cline-any cline-neutral">&nbsp;</span>
303
324
  <span class="cline-any cline-neutral">&nbsp;</span>
304
325
  <span class="cline-any cline-no">&nbsp;</span>
305
326
  <span class="cline-any cline-neutral">&nbsp;</span>
327
+ <span class="cline-any cline-neutral">&nbsp;</span>
328
+ <span class="cline-any cline-neutral">&nbsp;</span>
329
+ <span class="cline-any cline-no">&nbsp;</span>
306
330
  <span class="cline-any cline-no">&nbsp;</span>
307
331
  <span class="cline-any cline-neutral">&nbsp;</span>
308
332
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -312,8 +336,13 @@
312
336
  <span class="cline-any cline-neutral">&nbsp;</span>
313
337
  <span class="cline-any cline-neutral">&nbsp;</span>
314
338
  <span class="cline-any cline-neutral">&nbsp;</span>
339
+ <span class="cline-any cline-no">&nbsp;</span>
340
+ <span class="cline-any cline-no">&nbsp;</span>
341
+ <span class="cline-any cline-neutral">&nbsp;</span>
315
342
  <span class="cline-any cline-neutral">&nbsp;</span>
316
343
  <span class="cline-any cline-neutral">&nbsp;</span>
344
+ <span class="cline-any cline-neutral">&nbsp;</span>
345
+ <span class="cline-any cline-no">&nbsp;</span>
317
346
  <span class="cline-any cline-no">&nbsp;</span>
318
347
  <span class="cline-any cline-neutral">&nbsp;</span>
319
348
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -325,15 +354,15 @@
325
354
  <span class="cline-any cline-neutral">&nbsp;</span>
326
355
  <span class="cline-any cline-neutral">&nbsp;</span>
327
356
  <span class="cline-any cline-neutral">&nbsp;</span>
357
+ <span class="cline-any cline-no">&nbsp;</span>
358
+ <span class="cline-any cline-neutral">&nbsp;</span>
328
359
  <span class="cline-any cline-neutral">&nbsp;</span>
329
360
  <span class="cline-any cline-neutral">&nbsp;</span>
330
- <span class="cline-any cline-no">&nbsp;</span>
331
361
  <span class="cline-any cline-neutral">&nbsp;</span>
332
362
  <span class="cline-any cline-neutral">&nbsp;</span>
333
363
  <span class="cline-any cline-neutral">&nbsp;</span>
334
364
  <span class="cline-any cline-neutral">&nbsp;</span>
335
365
  <span class="cline-any cline-neutral">&nbsp;</span>
336
- <span class="cline-any cline-no">&nbsp;</span>
337
366
  <span class="cline-any cline-neutral">&nbsp;</span>
338
367
  <span class="cline-any cline-neutral">&nbsp;</span>
339
368
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -342,156 +371,184 @@
342
371
  <span class="cline-any cline-neutral">&nbsp;</span>
343
372
  <span class="cline-any cline-neutral">&nbsp;</span>
344
373
  <span class="cline-any cline-neutral">&nbsp;</span>
374
+ <span class="cline-any cline-no">&nbsp;</span>
375
+ <span class="cline-any cline-no">&nbsp;</span>
345
376
  <span class="cline-any cline-neutral">&nbsp;</span>
346
377
  <span class="cline-any cline-neutral">&nbsp;</span>
378
+ <span class="cline-any cline-no">&nbsp;</span>
347
379
  <span class="cline-any cline-neutral">&nbsp;</span>
348
380
  <span class="cline-any cline-neutral">&nbsp;</span>
349
381
  <span class="cline-any cline-neutral">&nbsp;</span>
350
382
  <span class="cline-any cline-neutral">&nbsp;</span>
351
383
  <span class="cline-any cline-neutral">&nbsp;</span>
352
- <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import React, { useContext } from 'react';
353
- import PropTypes from 'prop-types';
354
- &nbsp;
355
- import { Field } from 'react-final-form';
384
+ <span class="cline-any cline-neutral">&nbsp;</span>
385
+ <span class="cline-any cline-neutral">&nbsp;</span>
386
+ <span class="cline-any cline-neutral">&nbsp;</span>
387
+ <span class="cline-any cline-no">&nbsp;</span>
388
+ <span class="cline-any cline-neutral">&nbsp;</span>
389
+ <span class="cline-any cline-neutral">&nbsp;</span>
390
+ <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import { cloneElement, useCallback, useMemo } from 'react';
356
391
  &nbsp;
357
- import orderBy from 'lodash/orderBy';
392
+ import PropTypes from 'prop-types';
393
+ import classnames from 'classnames';
358
394
  &nbsp;
359
395
  import {
360
- Select,
361
- TextField,
396
+ Button,
397
+ Dropdown,
398
+ DropdownMenu,
399
+ Icon
362
400
  } from '@folio/stripes/components';
363
- import RefdataButtons from '../RefdataButtons';
364
- import { useKintIntl, useRefdata, useTemplates } from '../hooks';
365
- import { SettingsContext } from '../contexts';
366
401
  &nbsp;
367
- import { toCamelCase } from '../utils';
402
+ import css from '../../../styles/ResponsiveButtonGroup.css';
403
+ &nbsp;
404
+ import useResponsiveButtonGroupSizing from './useResponsiveButtonGroupSizing';
405
+ &nbsp;
406
+ const propTypes = <span class="cstat-no" title="statement not covered" >{</span>
407
+ children: PropTypes.node,
408
+ className: PropTypes.string,
409
+ dropdownTriggerProps: PropTypes.object,
410
+ fullWidth: PropTypes.bool,
411
+ marginBottom0: PropTypes.bool,
412
+ selectedIndex: PropTypes.number,
413
+ tagName: PropTypes.string,
414
+ };
415
+ &nbsp;
416
+ const SIZE_OF_DOWN_ARROW_BUTTON = <span class="cstat-no" title="statement not covered" >46;</span>
417
+ const calculateCumulativeThreshold = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(a</span>rrayOfNumbers, maximum, index = <span class="branch-0 cbranch-no" title="branch not covered" >0,</span> value = <span class="branch-0 cbranch-no" title="branch not covered" >0)</span> =&gt; {</span>
418
+ // If all the numbers fit, return the last index
419
+ <span class="cstat-no" title="statement not covered" > if (arrayOfNumbers.reduce(<span class="fstat-no" title="function not covered" >(p</span>artialSum, a) =&gt; <span class="cstat-no" title="statement not covered" >partialSum + a,</span> 0) &lt;= maximum) {</span>
420
+ <span class="cstat-no" title="statement not covered" > return arrayOfNumbers?.length - 1;</span>
421
+ }
422
+ &nbsp;
423
+ // Else we'll need a down arrow button, so include that in calculations
424
+ const nextValue = <span class="cstat-no" title="statement not covered" >value + arrayOfNumbers[index];</span>
425
+ <span class="cstat-no" title="statement not covered" > if (nextValue + SIZE_OF_DOWN_ARROW_BUTTON &lt;= maximum &amp;&amp; (index + 1 &lt; arrayOfNumbers?.length)) {</span>
426
+ <span class="cstat-no" title="statement not covered" > return calculateCumulativeThreshold(arrayOfNumbers, maximum, index + 1, nextValue);</span>
427
+ }
428
+ &nbsp;
429
+ <span class="cstat-no" title="statement not covered" > return index - 1;</span>
430
+ };
431
+ &nbsp;
368
432
  &nbsp;
369
- const EditSettingValue = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(p</span>rops) =&gt; {</span>
433
+ const ResponsiveButtonGroup = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(p</span>rops) =&gt; {</span>
370
434
  const {
371
- fieldProps: {
372
- name: fieldName,
373
- data: setting
374
- },
375
- intlKey: passedIntlKey,
376
- intlNS: passedIntlNS,
377
- labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
435
+ children: childButtons, // These MUST consist only of Button components
436
+ className,
437
+ dropdownTriggerProps = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
438
+ fullWidth = <span class="branch-0 cbranch-no" title="branch not covered" >false,</span> // Only bother with this when buttonGroupWidth &lt; ContainerWidth
439
+ marginBottom0, // Will ONLL control the margin of the dropdown button
440
+ selectedIndex,
441
+ tagName: Tag = <span class="branch-0 cbranch-no" title="branch not covered" >'div',</span>
442
+ ...rest
378
443
  } = <span class="cstat-no" title="statement not covered" >props;</span>
379
- const kintIntl = <span class="cstat-no" title="statement not covered" >useKintIntl(passedIntlKey, passedIntlNS);</span>
380
- const { refdataEndpoint, templateEndpoint } = <span class="cstat-no" title="statement not covered" >useContext(SettingsContext);</span>
381
444
  &nbsp;
382
445
  const {
383
- 0: {
384
- values: refdata = <span class="branch-0 cbranch-no" title="branch not covered" >[]</span>
385
- } = <span class="branch-0 cbranch-no" title="branch not covered" >{}</span>
386
- } = <span class="cstat-no" title="statement not covered" >useRefdata({</span>
387
- endpoint: refdataEndpoint,
388
- desc: setting.vocab,
389
- queryParams: {
390
- enabled: !!setting?.vocab &amp;&amp; setting.settingType === 'Refdata'
391
- }
446
+ buttons,
447
+ cachedSizeArray,
448
+ containerRef,
449
+ containerWidth,
450
+ ready,
451
+ } = <span class="cstat-no" title="statement not covered" >useResponsiveButtonGroupSizing({</span>
452
+ buttons: childButtons,
392
453
  });
393
454
  &nbsp;
394
- const templates = <span class="cstat-no" title="statement not covered" >useTemplates({</span>
395
- context: setting.vocab,
396
- endpoint: templateEndpoint,
397
- queryParams: {
398
- enabled: !!setting?.vocab &amp;&amp; setting.settingType === 'Template'
399
- }
400
- });
455
+ const buttonThreshold = <span class="cstat-no" title="statement not covered" >calculateCumulativeThreshold(cachedSizeArray, containerWidth);</span>
401
456
  &nbsp;
402
- const fieldLabel = <span class="cstat-no" title="statement not covered" >kintIntl.formatKintMessage({</span>
403
- id: 'settings.valueFor',
404
- overrideValue: labelOverrides?.valueFor
405
- }, {
406
- name: kintIntl.formatKintMessage({
407
- id: `settings.${toCamelCase(setting.section)}.${toCamelCase(setting.key)}`,
408
- fallbackValue: setting?.key
409
- })
410
- });
457
+ const renderActionMenuToggle = <span class="cstat-no" title="statement not covered" >useCallback(<span class="fstat-no" title="function not covered" >({</span> displayButtons, onToggle, triggerRef, keyHandler, open, ariaProps, getTriggerProps }) =&gt; (</span>
458
+ <span class="cstat-no" title="statement not covered" > &lt;Button</span>
459
+ ref={triggerRef}
460
+ aria-label="menu"
461
+ buttonClass={
462
+ classnames(
463
+ css.width100,
464
+ { [`${css.dropdownButtonClass}`]: (displayButtons?.length ?? 0) &gt; 0 },
465
+ { [`${css.marginBottom}`]: !marginBottom0 },
466
+ { [`${css.marginBottom0}`]: marginBottom0 }
467
+ )
468
+ }
469
+ buttonStyle={selectedIndex &gt; buttonThreshold ? 'primary' : 'default'}
470
+ onClick={onToggle}
471
+ onKeyDown={keyHandler}
472
+ type="button"
473
+ {...getTriggerProps()}
474
+ {...ariaProps}
475
+ {...dropdownTriggerProps}
476
+ &gt;
477
+ &lt;Icon icon={open ? 'triangle-up' : 'triangle-down'} iconPosition="end" /&gt;
478
+ &lt;/Button&gt;
479
+ ), [buttonThreshold, dropdownTriggerProps, marginBottom0, selectedIndex]);
411
480
  &nbsp;
412
- <span class="cstat-no" title="statement not covered" > switch (setting.settingType) {</span>
413
- case 'Refdata':
414
- // Grab refdata values corresponding to setting
415
- // eslint-disable-next-line no-case-declarations
416
- let RefdataComponent = <span class="cstat-no" title="statement not covered" >Select;</span>
417
- <span class="cstat-no" title="statement not covered" > if (refdata.length &gt; 0 &amp;&amp; refdata.length &lt;= 4) {</span>
418
- <span class="cstat-no" title="statement not covered" > RefdataComponent = RefdataButtons;</span>
481
+ const displayButtons = <span class="cstat-no" title="statement not covered" >useMemo(<span class="fstat-no" title="function not covered" >()</span> =&gt; (</span>
482
+ <span class="cstat-no" title="statement not covered" > buttons?.slice(0, buttonThreshold + 1)?.map(<span class="fstat-no" title="function not covered" >(b</span>utton, index) =&gt; {</span>
483
+ <span class="cstat-no" title="statement not covered" > if (index === selectedIndex &amp;&amp; !button?.buttonStyle) {</span>
484
+ <span class="cstat-no" title="statement not covered" > return cloneElement(button, { buttonStyle: 'primary' });</span>
419
485
  }
420
486
  &nbsp;
421
- <span class="cstat-no" title="statement not covered" > return (</span>
422
- &lt;Field
423
- aria-label={fieldLabel}
424
- component={RefdataComponent}
425
- dataOptions={orderBy(refdata, 'label', 'asc')}
426
- fullWidth
427
- marginBottom0
428
- name={fieldName}
429
- /&gt;
430
- );
487
+ <span class="cstat-no" title="statement not covered" > return button;</span>
488
+ })
489
+ ), [buttonThreshold, buttons, selectedIndex]);
431
490
  &nbsp;
432
- case 'Password':
433
- <span class="cstat-no" title="statement not covered" > return (</span>
434
- &lt;Field
435
- aria-label={fieldLabel}
436
- autoFocus
437
- component={TextField}
438
- marginBottom0
439
- name={fieldName}
440
- parse={<span class="fstat-no" title="function not covered" >v </span>=&gt; <span class="cstat-no" title="statement not covered" >v}</span> // Lets us send an empty string instead of 'undefined'
441
- type="password"
442
- /&gt;
443
- );
444
- case 'Template': {
445
- // Grab refdata values corresponding to setting
446
- // eslint-disable-next-line no-case-declarations
447
- const selectTemplateValues = <span class="cstat-no" title="statement not covered" >[</span>
448
- { value: '', label: '' },
449
- ...templates.map(<span class="fstat-no" title="function not covered" >t </span>=&gt; (<span class="cstat-no" title="statement not covered" >{ value: t.id, label: t.name })</span>)
450
- ];
491
+ const dropdownButtons = <span class="cstat-no" title="statement not covered" >useMemo(<span class="fstat-no" title="function not covered" >()</span> =&gt; (</span>
492
+ <span class="cstat-no" title="statement not covered" > [...buttons</span>
493
+ .slice(buttonThreshold + 1, buttons?.length)
494
+ ?.map(<span class="fstat-no" title="function not covered" >bu</span>tton =&gt; {
495
+ <span class="cstat-no" title="statement not covered" > return cloneElement(button, { buttonStyle: 'dropdownItem' });</span>
496
+ })
497
+ ]
498
+ ), [buttonThreshold, buttons]);
451
499
  &nbsp;
452
- <span class="cstat-no" title="statement not covered" > return (</span>
453
- &lt;Field
454
- aria-label={fieldLabel}
455
- component={Select}
456
- dataOptions={selectTemplateValues}
457
- fullWidth
458
- marginBottom0
459
- name={fieldName}
460
- parse={<span class="fstat-no" title="function not covered" >v </span>=&gt; <span class="cstat-no" title="statement not covered" >v}</span>
461
- /&gt;
462
- );
463
- }
464
- default:
465
- // If in doubt, go with String
466
- <span class="cstat-no" title="statement not covered" > return (</span>
467
- &lt;Field
468
- aria-label={fieldLabel}
469
- autoFocus
470
- component={TextField}
471
- marginBottom0
472
- name={fieldName}
473
- parse={<span class="fstat-no" title="function not covered" >v </span>=&gt; <span class="cstat-no" title="statement not covered" >v}</span> // Lets us send an empty string instead of 'undefined'
474
- /&gt;
475
- );
476
- }
477
- };
500
+ // eslint-disable-next-line react/prop-types
501
+ const renderActionMenuContent = <span class="cstat-no" title="statement not covered" >useCallback(<span class="fstat-no" title="function not covered" >()</span> =&gt; (</span>
502
+ <span class="cstat-no" title="statement not covered" > &lt;DropdownMenu&gt;</span>
503
+ {[...dropdownButtons]}
504
+ &lt;/DropdownMenu&gt;
505
+ ), [dropdownButtons]);
506
+ &nbsp;
507
+ const buttonsSlice = <span class="cstat-no" title="statement not covered" >useMemo(<span class="fstat-no" title="function not covered" >()</span> =&gt; (</span>
508
+ <span class="cstat-no" title="statement not covered" > [</span>
509
+ ...displayButtons,
510
+ &lt;Dropdown
511
+ key="responsiveButtonGroup-dropdown-toggle"
512
+ className={css.dropdownClass}
513
+ renderMenu={renderActionMenuContent}
514
+ renderTrigger={<span class="fstat-no" title="function not covered" >(t</span>riggerProps) =&gt; <span class="cstat-no" title="statement not covered" >renderActionMenuToggle({ displayButtons, ...triggerProps })}</span>
515
+ /&gt;
516
+ ]
517
+ ), [displayButtons, renderActionMenuContent, renderActionMenuToggle]);
478
518
  &nbsp;
479
- <span class="cstat-no" title="statement not covered" >EditSettingValue.propTypes = {</span>
480
- fieldProps: PropTypes.shape({
481
- name: PropTypes.string,
482
- data: PropTypes.shape({
483
- section: PropTypes.string,
484
- settingType: PropTypes.string,
485
- key: PropTypes.string,
486
- vocab: PropTypes.string,
487
- }),
488
- }),
489
- intlKey: PropTypes.string,
490
- intlNS: PropTypes.string,
491
- labelOverrides: PropTypes.object,
519
+ <span class="cstat-no" title="statement not covered" > return (</span>
520
+ &lt;&gt;
521
+ &lt;div ref={containerRef} className="width: 100%;" /&gt;
522
+ &lt;Tag
523
+ className={
524
+ classnames(
525
+ { [`${css.hidden}`]: !ready },
526
+ css.buttonGroup,
527
+ { [`${css.fullWidth}`]: ready &amp;&amp; fullWidth },
528
+ className
529
+ )
530
+ }
531
+ style={fullWidth ? { width: `${containerWidth}px` } : {}}
532
+ {...rest}
533
+ &gt;
534
+ {!ready || buttonThreshold === cachedSizeArray?.length - 1 ?
535
+ buttons?.map(<span class="fstat-no" title="function not covered" >(b</span>utton, index) =&gt; {
536
+ <span class="cstat-no" title="statement not covered" > if (index === selectedIndex &amp;&amp; !button?.buttonStyle) {</span>
537
+ <span class="cstat-no" title="statement not covered" > return cloneElement(button, { buttonStyle: 'primary' });</span>
538
+ }
539
+ &nbsp;
540
+ <span class="cstat-no" title="statement not covered" > return button;</span>
541
+ }) :
542
+ buttonsSlice
543
+ }
544
+ &lt;/Tag&gt;
545
+ &lt;/&gt;
546
+ );
492
547
  };
493
548
  &nbsp;
494
- export default EditSettingValue;
549
+ <span class="cstat-no" title="statement not covered" >ResponsiveButtonGroup.propTypes = propTypes;</span>
550
+ &nbsp;
551
+ export default ResponsiveButtonGroup;
495
552
  &nbsp;</pre></td></tr></table></pre>
496
553
 
497
554
  <div class='push'></div><!-- for sticky footer -->
@@ -499,7 +556,7 @@ export default EditSettingValue;
499
556
  <div class='footer quiet pad2 space-top1 center small'>
500
557
  Code coverage generated by
501
558
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
502
- at 2022-10-18T08:59:08.296Z
559
+ at 2023-01-18T10:53:27.335Z
503
560
  </div>
504
561
  <script src="../prettify.js"></script>
505
562
  <script>