@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.
- package/CHANGELOG.md +6 -0
- package/es/lib/ActionList/ActionList.js +3 -1
- package/es/lib/ActionList/ActionListFieldArray.js +4 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +5 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +6 -4
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +1 -1
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +1 -1
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +5 -3
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +5 -2
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +3 -1
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +5 -3
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +5 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +5 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +4 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +5 -3
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +4 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +1 -1
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +4 -1
- package/es/lib/CycleButton/CycleButton.js +5 -2
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +6 -4
- package/es/lib/EditableRefdataList/EditableRefdataList.js +6 -4
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +4 -1
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +1 -1
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +1 -1
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +4 -2
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +1 -1
- package/es/lib/FormModal/FormModal.js +4 -1
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +4 -1
- package/es/lib/IconSelect/IconSelect.js +4 -2
- package/es/lib/QueryTypedown/QueryTypedown.js +4 -2
- package/es/lib/RefdataButtons/RefdataButtons.js +4 -1
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +4 -1
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +1 -1
- package/es/lib/RichSelect/RichSelect.js +5 -2
- package/es/lib/RichSelect/useSelectedOption.js +1 -1
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +5 -2
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +4 -1
- package/es/lib/SASQRoute/SASQRoute.js +4 -1
- package/es/lib/SASQViewComponent/SASQViewComponent.js +4 -1
- package/es/lib/SearchField/SearchField.js +4 -1
- package/es/lib/Typedown/Typedown.js +1 -1
- package/es/lib/hooks/settingsHooks/useSettings.js +4 -1
- package/es/lib/hooks/typedownHooks/useTypedownData.js +1 -1
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +1 -1
- package/es/lib/hooks/useActiveElement.js +1 -1
- package/es/lib/hooks/useCustomProperties.js +4 -1
- package/es/lib/hooks/useHelperApp.js +4 -2
- package/es/lib/hooks/useIntlKeyStore.js +4 -4
- package/es/lib/hooks/useKintIntl.js +4 -1
- package/es/lib/hooks/useKiwtFieldArray.js +5 -2
- package/es/lib/hooks/useKiwtSASQuery.js +4 -2
- package/es/lib/hooks/useLocalStorageState.js +1 -1
- package/es/lib/hooks/useMutateCustomProperties.js +1 -1
- package/es/lib/hooks/useMutateRefdataCategory.js +4 -2
- package/es/lib/hooks/useMutateRefdataValue.js +1 -1
- package/es/lib/hooks/useQIndex.js +4 -2
- package/es/lib/utils/generateKiwtQuery.js +4 -3
- package/es/lib/utils/generateKiwtQueryParams.js +13 -23
- package/es/lib/utils/groupCustomPropertiesByCtx.js +4 -1
- package/es/lib/utils/highlightString.js +1 -1
- package/es/lib/utils/parseErrorResponse.js +23 -19
- package/junit.xml +146 -146
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +296 -44
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +8 -23
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/{SettingsActionList/SettingsActionList.js.html → CustomProperties/Config/testResources.js.html} +313 -256
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +6 -9
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +8 -74
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +4 -31
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +28 -22
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -18
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/{SettingsActionList/EditSettingValue.js.html → ResponsiveButtonGroup/ResponsiveButtonGroup.js.html} +199 -142
- package/src/artifacts/coverage-jest/lcov-report/{SettingsActionList → ResponsiveButtonGroup}/index.html +26 -41
- package/src/artifacts/coverage-jest/lcov-report/{SettingsActionList → ResponsiveButtonGroup}/index.js.html +4 -4
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +253 -0
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +5 -2
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +119 -26
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +5 -56
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +3 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +205 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/index.html +61 -61
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +8 -8
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +196 -46
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +44 -29
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +8 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +11 -8
- package/src/artifacts/coverage-jest/lcov-report/{SettingsActionList/RenderSettingValue.js.html → utils/parseKiwtQueryGroups.js.html} +67 -145
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +166 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov.info +962 -920
- package/src/lib/utils/README.md +1 -3
- package/src/lib/utils/generateKiwtQuery.js +3 -3
- package/src/lib/utils/generateKiwtQueryParams.js +13 -27
- package/src/lib/utils/parseErrorResponse.js +3 -2
- 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
|
|
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">
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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
|
|
210
|
-
<
|
|
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"> </span>
|
|
211
229
|
<span class="cline-any cline-neutral"> </span>
|
|
212
230
|
<span class="cline-any cline-neutral"> </span>
|
|
213
231
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -232,19 +250,21 @@
|
|
|
232
250
|
<span class="cline-any cline-neutral"> </span>
|
|
233
251
|
<span class="cline-any cline-neutral"> </span>
|
|
234
252
|
<span class="cline-any cline-neutral"> </span>
|
|
235
|
-
<span class="cline-any cline-
|
|
253
|
+
<span class="cline-any cline-neutral"> </span>
|
|
236
254
|
<span class="cline-any cline-no"> </span>
|
|
237
255
|
<span class="cline-any cline-no"> </span>
|
|
238
256
|
<span class="cline-any cline-neutral"> </span>
|
|
239
|
-
<span class="cline-any cline-
|
|
257
|
+
<span class="cline-any cline-no"> </span>
|
|
258
|
+
<span class="cline-any cline-no"> </span>
|
|
240
259
|
<span class="cline-any cline-neutral"> </span>
|
|
241
260
|
<span class="cline-any cline-neutral"> </span>
|
|
242
261
|
<span class="cline-any cline-neutral"> </span>
|
|
243
262
|
<span class="cline-any cline-no"> </span>
|
|
263
|
+
<span class="cline-any cline-no"> </span>
|
|
264
|
+
<span class="cline-any cline-no"> </span>
|
|
244
265
|
<span class="cline-any cline-neutral"> </span>
|
|
245
266
|
<span class="cline-any cline-neutral"> </span>
|
|
246
|
-
<span class="cline-any cline-
|
|
247
|
-
<span class="cline-any cline-neutral"> </span>
|
|
267
|
+
<span class="cline-any cline-no"> </span>
|
|
248
268
|
<span class="cline-any cline-neutral"> </span>
|
|
249
269
|
<span class="cline-any cline-neutral"> </span>
|
|
250
270
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -256,9 +276,9 @@
|
|
|
256
276
|
<span class="cline-any cline-neutral"> </span>
|
|
257
277
|
<span class="cline-any cline-neutral"> </span>
|
|
258
278
|
<span class="cline-any cline-neutral"> </span>
|
|
259
|
-
<span class="cline-any cline-no"> </span>
|
|
260
279
|
<span class="cline-any cline-neutral"> </span>
|
|
261
280
|
<span class="cline-any cline-neutral"> </span>
|
|
281
|
+
<span class="cline-any cline-no"> </span>
|
|
262
282
|
<span class="cline-any cline-neutral"> </span>
|
|
263
283
|
<span class="cline-any cline-neutral"> </span>
|
|
264
284
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -271,12 +291,11 @@
|
|
|
271
291
|
<span class="cline-any cline-neutral"> </span>
|
|
272
292
|
<span class="cline-any cline-neutral"> </span>
|
|
273
293
|
<span class="cline-any cline-no"> </span>
|
|
294
|
+
<span class="cline-any cline-neutral"> </span>
|
|
274
295
|
<span class="cline-any cline-no"> </span>
|
|
275
296
|
<span class="cline-any cline-no"> </span>
|
|
276
297
|
<span class="cline-any cline-neutral"> </span>
|
|
277
298
|
<span class="cline-any cline-neutral"> </span>
|
|
278
|
-
<span class="cline-any cline-no"> </span>
|
|
279
|
-
<span class="cline-any cline-neutral"> </span>
|
|
280
299
|
<span class="cline-any cline-neutral"> </span>
|
|
281
300
|
<span class="cline-any cline-neutral"> </span>
|
|
282
301
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -287,22 +306,27 @@
|
|
|
287
306
|
<span class="cline-any cline-neutral"> </span>
|
|
288
307
|
<span class="cline-any cline-neutral"> </span>
|
|
289
308
|
<span class="cline-any cline-neutral"> </span>
|
|
290
|
-
<span class="cline-any cline-no"> </span>
|
|
291
309
|
<span class="cline-any cline-neutral"> </span>
|
|
292
310
|
<span class="cline-any cline-neutral"> </span>
|
|
293
311
|
<span class="cline-any cline-neutral"> </span>
|
|
294
312
|
<span class="cline-any cline-neutral"> </span>
|
|
295
313
|
<span class="cline-any cline-neutral"> </span>
|
|
296
314
|
<span class="cline-any cline-neutral"> </span>
|
|
297
|
-
<span class="cline-any cline-no"> </span>
|
|
298
315
|
<span class="cline-any cline-neutral"> </span>
|
|
299
316
|
<span class="cline-any cline-neutral"> </span>
|
|
300
317
|
<span class="cline-any cline-neutral"> </span>
|
|
301
318
|
<span class="cline-any cline-neutral"> </span>
|
|
319
|
+
<span class="cline-any cline-no"> </span>
|
|
320
|
+
<span class="cline-any cline-no"> </span>
|
|
321
|
+
<span class="cline-any cline-no"> </span>
|
|
322
|
+
<span class="cline-any cline-no"> </span>
|
|
302
323
|
<span class="cline-any cline-neutral"> </span>
|
|
303
324
|
<span class="cline-any cline-neutral"> </span>
|
|
304
325
|
<span class="cline-any cline-no"> </span>
|
|
305
326
|
<span class="cline-any cline-neutral"> </span>
|
|
327
|
+
<span class="cline-any cline-neutral"> </span>
|
|
328
|
+
<span class="cline-any cline-neutral"> </span>
|
|
329
|
+
<span class="cline-any cline-no"> </span>
|
|
306
330
|
<span class="cline-any cline-no"> </span>
|
|
307
331
|
<span class="cline-any cline-neutral"> </span>
|
|
308
332
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -312,8 +336,13 @@
|
|
|
312
336
|
<span class="cline-any cline-neutral"> </span>
|
|
313
337
|
<span class="cline-any cline-neutral"> </span>
|
|
314
338
|
<span class="cline-any cline-neutral"> </span>
|
|
339
|
+
<span class="cline-any cline-no"> </span>
|
|
340
|
+
<span class="cline-any cline-no"> </span>
|
|
341
|
+
<span class="cline-any cline-neutral"> </span>
|
|
315
342
|
<span class="cline-any cline-neutral"> </span>
|
|
316
343
|
<span class="cline-any cline-neutral"> </span>
|
|
344
|
+
<span class="cline-any cline-neutral"> </span>
|
|
345
|
+
<span class="cline-any cline-no"> </span>
|
|
317
346
|
<span class="cline-any cline-no"> </span>
|
|
318
347
|
<span class="cline-any cline-neutral"> </span>
|
|
319
348
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -325,15 +354,15 @@
|
|
|
325
354
|
<span class="cline-any cline-neutral"> </span>
|
|
326
355
|
<span class="cline-any cline-neutral"> </span>
|
|
327
356
|
<span class="cline-any cline-neutral"> </span>
|
|
357
|
+
<span class="cline-any cline-no"> </span>
|
|
358
|
+
<span class="cline-any cline-neutral"> </span>
|
|
328
359
|
<span class="cline-any cline-neutral"> </span>
|
|
329
360
|
<span class="cline-any cline-neutral"> </span>
|
|
330
|
-
<span class="cline-any cline-no"> </span>
|
|
331
361
|
<span class="cline-any cline-neutral"> </span>
|
|
332
362
|
<span class="cline-any cline-neutral"> </span>
|
|
333
363
|
<span class="cline-any cline-neutral"> </span>
|
|
334
364
|
<span class="cline-any cline-neutral"> </span>
|
|
335
365
|
<span class="cline-any cline-neutral"> </span>
|
|
336
|
-
<span class="cline-any cline-no"> </span>
|
|
337
366
|
<span class="cline-any cline-neutral"> </span>
|
|
338
367
|
<span class="cline-any cline-neutral"> </span>
|
|
339
368
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -342,156 +371,184 @@
|
|
|
342
371
|
<span class="cline-any cline-neutral"> </span>
|
|
343
372
|
<span class="cline-any cline-neutral"> </span>
|
|
344
373
|
<span class="cline-any cline-neutral"> </span>
|
|
374
|
+
<span class="cline-any cline-no"> </span>
|
|
375
|
+
<span class="cline-any cline-no"> </span>
|
|
345
376
|
<span class="cline-any cline-neutral"> </span>
|
|
346
377
|
<span class="cline-any cline-neutral"> </span>
|
|
378
|
+
<span class="cline-any cline-no"> </span>
|
|
347
379
|
<span class="cline-any cline-neutral"> </span>
|
|
348
380
|
<span class="cline-any cline-neutral"> </span>
|
|
349
381
|
<span class="cline-any cline-neutral"> </span>
|
|
350
382
|
<span class="cline-any cline-neutral"> </span>
|
|
351
383
|
<span class="cline-any cline-neutral"> </span>
|
|
352
|
-
<span class="cline-any cline-neutral"> </span
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
384
|
+
<span class="cline-any cline-neutral"> </span>
|
|
385
|
+
<span class="cline-any cline-neutral"> </span>
|
|
386
|
+
<span class="cline-any cline-neutral"> </span>
|
|
387
|
+
<span class="cline-any cline-no"> </span>
|
|
388
|
+
<span class="cline-any cline-neutral"> </span>
|
|
389
|
+
<span class="cline-any cline-neutral"> </span>
|
|
390
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { cloneElement, useCallback, useMemo } from 'react';
|
|
356
391
|
|
|
357
|
-
import
|
|
392
|
+
import PropTypes from 'prop-types';
|
|
393
|
+
import classnames from 'classnames';
|
|
358
394
|
|
|
359
395
|
import {
|
|
360
|
-
|
|
361
|
-
|
|
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
|
|
|
367
|
-
import
|
|
402
|
+
import css from '../../../styles/ResponsiveButtonGroup.css';
|
|
403
|
+
|
|
404
|
+
import useResponsiveButtonGroupSizing from './useResponsiveButtonGroupSizing';
|
|
405
|
+
|
|
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
|
+
|
|
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> => {</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) => <span class="cstat-no" title="statement not covered" >partialSum + a,</span> 0) <= maximum) {</span>
|
|
420
|
+
<span class="cstat-no" title="statement not covered" > return arrayOfNumbers?.length - 1;</span>
|
|
421
|
+
}
|
|
422
|
+
|
|
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 <= maximum && (index + 1 < arrayOfNumbers?.length)) {</span>
|
|
426
|
+
<span class="cstat-no" title="statement not covered" > return calculateCumulativeThreshold(arrayOfNumbers, maximum, index + 1, nextValue);</span>
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
<span class="cstat-no" title="statement not covered" > return index - 1;</span>
|
|
430
|
+
};
|
|
431
|
+
|
|
368
432
|
|
|
369
|
-
const
|
|
433
|
+
const ResponsiveButtonGroup = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(p</span>rops) => {</span>
|
|
370
434
|
const {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
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 < 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
|
|
|
382
445
|
const {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
enabled: !!setting?.vocab && 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
|
|
|
394
|
-
const
|
|
395
|
-
context: setting.vocab,
|
|
396
|
-
endpoint: templateEndpoint,
|
|
397
|
-
queryParams: {
|
|
398
|
-
enabled: !!setting?.vocab && setting.settingType === 'Template'
|
|
399
|
-
}
|
|
400
|
-
});
|
|
455
|
+
const buttonThreshold = <span class="cstat-no" title="statement not covered" >calculateCumulativeThreshold(cachedSizeArray, containerWidth);</span>
|
|
401
456
|
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
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 }) => (</span>
|
|
458
|
+
<span class="cstat-no" title="statement not covered" > <Button</span>
|
|
459
|
+
ref={triggerRef}
|
|
460
|
+
aria-label="menu"
|
|
461
|
+
buttonClass={
|
|
462
|
+
classnames(
|
|
463
|
+
css.width100,
|
|
464
|
+
{ [`${css.dropdownButtonClass}`]: (displayButtons?.length ?? 0) > 0 },
|
|
465
|
+
{ [`${css.marginBottom}`]: !marginBottom0 },
|
|
466
|
+
{ [`${css.marginBottom0}`]: marginBottom0 }
|
|
467
|
+
)
|
|
468
|
+
}
|
|
469
|
+
buttonStyle={selectedIndex > buttonThreshold ? 'primary' : 'default'}
|
|
470
|
+
onClick={onToggle}
|
|
471
|
+
onKeyDown={keyHandler}
|
|
472
|
+
type="button"
|
|
473
|
+
{...getTriggerProps()}
|
|
474
|
+
{...ariaProps}
|
|
475
|
+
{...dropdownTriggerProps}
|
|
476
|
+
>
|
|
477
|
+
<Icon icon={open ? 'triangle-up' : 'triangle-down'} iconPosition="end" />
|
|
478
|
+
</Button>
|
|
479
|
+
), [buttonThreshold, dropdownTriggerProps, marginBottom0, selectedIndex]);
|
|
411
480
|
|
|
412
|
-
<span class="cstat-no" title="statement not covered" >
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
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 > 0 && refdata.length <= 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> => (</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) => {</span>
|
|
483
|
+
<span class="cstat-no" title="statement not covered" > if (index === selectedIndex && !button?.buttonStyle) {</span>
|
|
484
|
+
<span class="cstat-no" title="statement not covered" > return cloneElement(button, { buttonStyle: 'primary' });</span>
|
|
419
485
|
}
|
|
420
486
|
|
|
421
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
component={RefdataComponent}
|
|
425
|
-
dataOptions={orderBy(refdata, 'label', 'asc')}
|
|
426
|
-
fullWidth
|
|
427
|
-
marginBottom0
|
|
428
|
-
name={fieldName}
|
|
429
|
-
/>
|
|
430
|
-
);
|
|
487
|
+
<span class="cstat-no" title="statement not covered" > return button;</span>
|
|
488
|
+
})
|
|
489
|
+
), [buttonThreshold, buttons, selectedIndex]);
|
|
431
490
|
|
|
432
|
-
|
|
433
|
-
<span class="cstat-no" title="statement not covered" >
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
parse={<span class="fstat-no" title="function not covered" >v </span>=> <span class="cstat-no" title="statement not covered" >v}</span> // Lets us send an empty string instead of 'undefined'
|
|
441
|
-
type="password"
|
|
442
|
-
/>
|
|
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>=> (<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> => (</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 => {
|
|
495
|
+
<span class="cstat-no" title="statement not covered" > return cloneElement(button, { buttonStyle: 'dropdownItem' });</span>
|
|
496
|
+
})
|
|
497
|
+
]
|
|
498
|
+
), [buttonThreshold, buttons]);
|
|
451
499
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
<span class="cstat-no" title="statement not covered" >
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
component={TextField}
|
|
471
|
-
marginBottom0
|
|
472
|
-
name={fieldName}
|
|
473
|
-
parse={<span class="fstat-no" title="function not covered" >v </span>=> <span class="cstat-no" title="statement not covered" >v}</span> // Lets us send an empty string instead of 'undefined'
|
|
474
|
-
/>
|
|
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> => (</span>
|
|
502
|
+
<span class="cstat-no" title="statement not covered" > <DropdownMenu></span>
|
|
503
|
+
{[...dropdownButtons]}
|
|
504
|
+
</DropdownMenu>
|
|
505
|
+
), [dropdownButtons]);
|
|
506
|
+
|
|
507
|
+
const buttonsSlice = <span class="cstat-no" title="statement not covered" >useMemo(<span class="fstat-no" title="function not covered" >()</span> => (</span>
|
|
508
|
+
<span class="cstat-no" title="statement not covered" > [</span>
|
|
509
|
+
...displayButtons,
|
|
510
|
+
<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) => <span class="cstat-no" title="statement not covered" >renderActionMenuToggle({ displayButtons, ...triggerProps })}</span>
|
|
515
|
+
/>
|
|
516
|
+
]
|
|
517
|
+
), [displayButtons, renderActionMenuContent, renderActionMenuToggle]);
|
|
478
518
|
|
|
479
|
-
<span class="cstat-no" title="statement not covered" >
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
519
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
520
|
+
<>
|
|
521
|
+
<div ref={containerRef} className="width: 100%;" />
|
|
522
|
+
<Tag
|
|
523
|
+
className={
|
|
524
|
+
classnames(
|
|
525
|
+
{ [`${css.hidden}`]: !ready },
|
|
526
|
+
css.buttonGroup,
|
|
527
|
+
{ [`${css.fullWidth}`]: ready && fullWidth },
|
|
528
|
+
className
|
|
529
|
+
)
|
|
530
|
+
}
|
|
531
|
+
style={fullWidth ? { width: `${containerWidth}px` } : {}}
|
|
532
|
+
{...rest}
|
|
533
|
+
>
|
|
534
|
+
{!ready || buttonThreshold === cachedSizeArray?.length - 1 ?
|
|
535
|
+
buttons?.map(<span class="fstat-no" title="function not covered" >(b</span>utton, index) => {
|
|
536
|
+
<span class="cstat-no" title="statement not covered" > if (index === selectedIndex && !button?.buttonStyle) {</span>
|
|
537
|
+
<span class="cstat-no" title="statement not covered" > return cloneElement(button, { buttonStyle: 'primary' });</span>
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
<span class="cstat-no" title="statement not covered" > return button;</span>
|
|
541
|
+
}) :
|
|
542
|
+
buttonsSlice
|
|
543
|
+
}
|
|
544
|
+
</Tag>
|
|
545
|
+
</>
|
|
546
|
+
);
|
|
492
547
|
};
|
|
493
548
|
|
|
494
|
-
|
|
549
|
+
<span class="cstat-no" title="statement not covered" >ResponsiveButtonGroup.propTypes = propTypes;</span>
|
|
550
|
+
|
|
551
|
+
export default ResponsiveButtonGroup;
|
|
495
552
|
</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
|
|
559
|
+
at 2023-01-18T10:53:27.335Z
|
|
503
560
|
</div>
|
|
504
561
|
<script src="../prettify.js"></script>
|
|
505
562
|
<script>
|