@k-int/stripes-kint-components 5.1.1 → 5.1.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.
- package/CHANGELOG.md +7 -0
- package/es/index.js +2 -2
- package/es/lib/ActionList/ActionList.js +2 -2
- package/es/lib/ActionList/ActionListFieldArray.js +31 -34
- package/es/lib/ComboButton/ComboButton.js +5 -6
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +4 -7
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +29 -32
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +58 -58
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +2 -2
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +32 -33
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +3 -3
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +8 -10
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +22 -28
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +5 -5
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -2
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +3 -3
- package/es/lib/CustomProperties/Edit/testResources.js +11 -12
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +6 -11
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +20 -28
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +6 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +8 -8
- package/es/lib/CustomProperties/Filter/testResources.js +1 -2
- package/es/lib/CustomProperties/Filter/useOperators.js +2 -2
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +1 -2
- package/es/lib/CustomProperties/Filter/useValueProps.js +2 -2
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +18 -26
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +9 -13
- package/es/lib/CycleButton/CycleButton.js +1 -1
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +23 -34
- package/es/lib/EditableRefdataList/EditableRefdataList.js +28 -35
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +1 -1
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +5 -5
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +10 -12
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +6 -6
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +4 -7
- package/es/lib/IconSelect/IconSelect.js +7 -11
- package/es/lib/NoResultsMessage/NoResultsMessage.js +4 -4
- package/es/lib/QueryTypedown/QueryTypedown.js +2 -2
- package/es/lib/RefdataButtons/RefdataButtons.js +3 -3
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +21 -28
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +5 -6
- package/es/lib/RichSelect/RichSelect.js +14 -19
- package/es/lib/RichSelect/useSelectedOption.js +1 -2
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +14 -17
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +4 -6
- package/es/lib/SASQRoute/SASQRoute.js +2 -2
- package/es/lib/SASQViewComponent/SASQViewComponent.js +5 -9
- package/es/lib/SettingPage/SettingPage.js +2 -2
- package/es/lib/SettingPage/SettingPagePane.js +2 -2
- package/es/lib/SettingsFormContainer/SettingsFormContainer.js +2 -2
- package/es/lib/Typedown/Typedown.js +21 -28
- package/es/lib/hooks/typedownHooks/useTypedown.js +2 -2
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +2 -2
- package/es/lib/hooks/useActiveElement.js +1 -1
- package/es/lib/hooks/useCustomProperties.js +2 -2
- package/es/lib/hooks/useHelperApp.js +8 -8
- package/es/lib/hooks/useIntlKeyStore.js +4 -7
- package/es/lib/hooks/useKintIntl.js +5 -11
- package/es/lib/hooks/useKiwtSASQuery.js +1 -1
- package/es/lib/hooks/useLocalStorageState.js +2 -2
- package/es/lib/hooks/useModConfigEntries.js +2 -2
- package/es/lib/hooks/useMutateCustomProperties.js +8 -8
- package/es/lib/hooks/useMutateModConfigEntry.js +2 -2
- package/es/lib/hooks/useMutateRefdataCategory.js +4 -4
- package/es/lib/hooks/useMutateRefdataValue.js +6 -6
- package/es/lib/hooks/useQIndex.js +7 -7
- package/es/lib/hooks/useRefdata.js +3 -3
- package/es/lib/hooks/useTemplates.js +4 -4
- package/es/lib/settingsHooks/useAppSettings.js +7 -11
- package/es/lib/settingsHooks/useSettingSection.js +2 -2
- package/es/lib/settingsHooks/useSettings.js +3 -3
- package/es/lib/utils/buildUrl.js +2 -3
- package/es/lib/utils/filterParsers/deparseKiwtQueryFilters.js +6 -6
- package/es/lib/utils/filterParsers/index.js +2 -2
- package/es/lib/utils/filterParsers/parseKiwtQueryFilters.js +2 -2
- package/es/lib/utils/filterParsers/parseKiwtQueryGroups.js +4 -5
- package/es/lib/utils/filterParsers/parseKiwtQueryString.js +1 -1
- package/es/lib/utils/generateKiwtQueryParams.js +28 -37
- package/es/lib/utils/groupCustomPropertiesByCtx.js +2 -3
- package/es/lib/utils/matchString.js +1 -1
- package/es/lib/utils/parseErrorResponse.js +2 -3
- package/es/lib/utils/selectorSafe.js +2 -3
- package/es/lib/utils/sortByLabel.js +2 -3
- package/es/lib/validators/validators.js +3 -3
- package/junit.xml +162 -162
- package/package.json +2 -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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ComboButton/ComboButton.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ComboButton/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ComboButton/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 +15 -6
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +10 -7
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/SettingsFormContainer.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/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/comparators.js.html +5 -2
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/endpoints.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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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/useModConfigEntries.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/useMutateModConfigEntry.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 +10 -10
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useAppSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettingSection.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/deparseKiwtQueryFilters.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryFilters.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryGroups.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryString.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +1 -1
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/modConfigEntriesQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseModConfigEntry.js.html +1 -1
- 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-report/validators/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/validators/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/validators/validators.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov.info +231 -230
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +3 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyField.js +4 -3
- package/yarn-error.log +129 -0
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionTrigger.js.html +0 -418
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/EditSettingValue.js.html +0 -514
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/RenderSettingValue.js.html +0 -358
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/index.js.html +0 -88
|
@@ -20,23 +20,21 @@ const RenderSettingValue = props => {
|
|
|
20
20
|
const kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
|
|
21
21
|
const NoCurrentValue = kintIntl.formatKintMessage({
|
|
22
22
|
id: 'settings.noCurrentValue',
|
|
23
|
-
overrideValue: labelOverrides
|
|
23
|
+
overrideValue: labelOverrides?.noCurrentValue
|
|
24
24
|
});
|
|
25
|
-
const defaultText =
|
|
25
|
+
const defaultText = `[${kintIntl.formatKintMessage({
|
|
26
26
|
id: 'settings.default',
|
|
27
|
-
overrideValue: labelOverrides
|
|
28
|
-
})
|
|
27
|
+
overrideValue: labelOverrides?.default
|
|
28
|
+
})}]`;
|
|
29
29
|
switch (setting.settingType) {
|
|
30
30
|
case 'Refdata':
|
|
31
31
|
{
|
|
32
32
|
if (setting.value) {
|
|
33
|
-
|
|
34
|
-
return (_refdata$filter$0$lab = refdata === null || refdata === void 0 || (_refdata$filter$ = refdata.filter(obj => obj.value === setting.value)[0]) === null || _refdata$filter$ === void 0 ? void 0 : _refdata$filter$.label) !== null && _refdata$filter$0$lab !== void 0 ? _refdata$filter$0$lab : null;
|
|
33
|
+
return refdata?.filter(obj => obj.value === setting.value)[0]?.label ?? null;
|
|
35
34
|
}
|
|
36
35
|
if (setting.defValue) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return "".concat(defaultText, " ").concat(defValue);
|
|
36
|
+
const defValue = refdata?.filter(obj => obj.value === setting.defValue)[0]?.label;
|
|
37
|
+
return `${defaultText} ${defValue}`;
|
|
40
38
|
}
|
|
41
39
|
return NoCurrentValue;
|
|
42
40
|
}
|
|
@@ -46,7 +44,7 @@ const RenderSettingValue = props => {
|
|
|
46
44
|
return '********';
|
|
47
45
|
}
|
|
48
46
|
if (setting.defValue) {
|
|
49
|
-
return
|
|
47
|
+
return `${defaultText} ********`;
|
|
50
48
|
}
|
|
51
49
|
return NoCurrentValue;
|
|
52
50
|
}
|
|
@@ -56,7 +54,7 @@ const RenderSettingValue = props => {
|
|
|
56
54
|
const settingId = setting.value || setting.defValue;
|
|
57
55
|
return obj.id === settingId;
|
|
58
56
|
})[0];
|
|
59
|
-
return
|
|
57
|
+
return templateValue?.name || NoCurrentValue;
|
|
60
58
|
}
|
|
61
59
|
default:
|
|
62
60
|
{
|
|
@@ -64,7 +62,7 @@ const RenderSettingValue = props => {
|
|
|
64
62
|
return setting.value;
|
|
65
63
|
}
|
|
66
64
|
if (setting.defValue) {
|
|
67
|
-
return
|
|
65
|
+
return `${defaultText} ${setting.defValue}`;
|
|
68
66
|
}
|
|
69
67
|
return NoCurrentValue;
|
|
70
68
|
}
|
|
@@ -15,8 +15,8 @@ var _utils = require("../../utils");
|
|
|
15
15
|
var _renderHelpText = _interopRequireDefault(require("../../../../styles/renderHelpText.css"));
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
20
|
const SettingField = settingFieldProps => {
|
|
21
21
|
const {
|
|
22
22
|
allowEdit = true,
|
|
@@ -42,14 +42,14 @@ const SettingField = settingFieldProps => {
|
|
|
42
42
|
endpoint: refdataEndpoint,
|
|
43
43
|
desc: currentSetting.vocab,
|
|
44
44
|
queryParams: {
|
|
45
|
-
enabled: !!
|
|
45
|
+
enabled: !!currentSetting?.vocab && currentSetting.settingType === 'Refdata'
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
const templates = (0, _hooks.useTemplates)({
|
|
49
49
|
context: currentSetting.vocab,
|
|
50
50
|
endpoint: templateEndpoint,
|
|
51
51
|
queryParams: {
|
|
52
|
-
enabled: !!
|
|
52
|
+
enabled: !!currentSetting?.vocab && currentSetting.settingType === 'Template'
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
55
|
const renderHelpText = helpTextId => {
|
|
@@ -115,10 +115,10 @@ const SettingField = settingFieldProps => {
|
|
|
115
115
|
} else {
|
|
116
116
|
RenderFunction = _EditSettingValue.default;
|
|
117
117
|
}
|
|
118
|
-
const id =
|
|
118
|
+
const id = `settings.${(0, _utils.toCamelCase)(currentSetting.section)}.${(0, _utils.toCamelCase)(currentSetting.key)}.help`;
|
|
119
119
|
const renderHeaderStart = () => {
|
|
120
120
|
const settingName = Object.keys(currentSetting).length > 0 ? kintIntl.formatKintMessage({
|
|
121
|
-
id:
|
|
121
|
+
id: `settings.${(0, _utils.toCamelCase)(currentSetting.section)}.${(0, _utils.toCamelCase)(currentSetting.key)}`
|
|
122
122
|
}) : kintIntl.formatKintMessage({
|
|
123
123
|
id: 'loading'
|
|
124
124
|
});
|
|
@@ -11,7 +11,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
// This works analogously to useKintIntl's "formatKintMessage"
|
|
13
13
|
const FormattedKintMessage = _ref => {
|
|
14
|
-
var _intlObj$messages2;
|
|
15
14
|
let {
|
|
16
15
|
fallbackMessage,
|
|
17
16
|
id,
|
|
@@ -23,12 +22,11 @@ const FormattedKintMessage = _ref => {
|
|
|
23
22
|
const intlKey = (0, _hooks.useIntlKey)(passedIntlKey, passedIntlNS);
|
|
24
23
|
const intlObj = (0, _reactIntl.useIntl)();
|
|
25
24
|
if (overrideValue) {
|
|
26
|
-
var _intlObj$messages;
|
|
27
25
|
// Version 3 is a breaking change, where labelOverrides must be strings.
|
|
28
26
|
if (typeof overrideValue !== 'string') {
|
|
29
27
|
throw new Error('Override values must be strings as of stripes-kint-components ^3.0.0');
|
|
30
28
|
}
|
|
31
|
-
if (
|
|
29
|
+
if (intlObj.messages?.[overrideValue]) {
|
|
32
30
|
// We've been passed a key as an override, return formattedMessage with it
|
|
33
31
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
34
32
|
id: overrideValue,
|
|
@@ -42,10 +40,9 @@ const FormattedKintMessage = _ref => {
|
|
|
42
40
|
// If key does not exist in intl, and we have a specified "fallbackMessage", use that
|
|
43
41
|
|
|
44
42
|
// (FallbackMessage works like defaultMessage but with no warning)
|
|
45
|
-
if (!
|
|
46
|
-
var _intlObj$messages3;
|
|
43
|
+
if (!intlObj.messages?.[`${intlKey}.${id}`] && fallbackMessage) {
|
|
47
44
|
// Allow fallback message to be an intl key
|
|
48
|
-
if (
|
|
45
|
+
if (intlObj.messages?.[fallbackMessage]) {
|
|
49
46
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
50
47
|
id: fallbackMessage,
|
|
51
48
|
...formattedMessageProps
|
|
@@ -54,7 +51,7 @@ const FormattedKintMessage = _ref => {
|
|
|
54
51
|
return fallbackMessage;
|
|
55
52
|
}
|
|
56
53
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
57
|
-
id:
|
|
54
|
+
id: `${intlKey}.${id}`,
|
|
58
55
|
...formattedMessageProps
|
|
59
56
|
});
|
|
60
57
|
};
|
|
@@ -12,12 +12,11 @@ var _IconSelect = _interopRequireDefault(require("../../../styles/IconSelect.css
|
|
|
12
12
|
var _RichSelect = _interopRequireWildcard(require("../RichSelect"));
|
|
13
13
|
var _FormattedKintMessage = _interopRequireDefault(require("../FormattedKintMessage"));
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
18
|
// A form component which acts as a "Select for states with corresponding icons"
|
|
19
19
|
const IconSelect = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
20
|
-
var _selectedOption$butto;
|
|
21
20
|
let {
|
|
22
21
|
ariaLabel,
|
|
23
22
|
disabled = false,
|
|
@@ -44,7 +43,7 @@ const IconSelect = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
44
43
|
};
|
|
45
44
|
|
|
46
45
|
// Options with notSet
|
|
47
|
-
const options = [notSet
|
|
46
|
+
const options = [notSet ?? defaultNotSet, ...userOptions];
|
|
48
47
|
const [richSelectRef, selectedOption] = (0, _RichSelect.useSelectedOption)();
|
|
49
48
|
(0, _react.useImperativeHandle)(ref, () => ({
|
|
50
49
|
selectedOption
|
|
@@ -52,7 +51,7 @@ const IconSelect = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
52
51
|
const {
|
|
53
52
|
className: iconButtonClassName,
|
|
54
53
|
...buttonProps
|
|
55
|
-
} =
|
|
54
|
+
} = selectedOption?.buttonProps ?? {};
|
|
56
55
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RichSelect.default, {
|
|
57
56
|
ref: richSelectRef,
|
|
58
57
|
ariaLabel: ariaLabel,
|
|
@@ -64,19 +63,16 @@ const IconSelect = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
64
63
|
onChange: onChange,
|
|
65
64
|
options: options,
|
|
66
65
|
renderOption: opt => {
|
|
67
|
-
var _opt$label2;
|
|
68
66
|
if (opt.icon) {
|
|
69
|
-
var _opt$label;
|
|
70
67
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
71
68
|
icon: opt.icon,
|
|
72
69
|
...opt.iconProps,
|
|
73
|
-
children:
|
|
70
|
+
children: opt.label ?? opt.value
|
|
74
71
|
});
|
|
75
72
|
}
|
|
76
|
-
return
|
|
73
|
+
return opt.label ?? opt.value;
|
|
77
74
|
},
|
|
78
75
|
renderTrigger: _ref2 => {
|
|
79
|
-
var _selectedOption$icon;
|
|
80
76
|
let {
|
|
81
77
|
onToggle,
|
|
82
78
|
triggerRef,
|
|
@@ -87,7 +83,7 @@ const IconSelect = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
87
83
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.IconButton, {
|
|
88
84
|
ref: triggerRef,
|
|
89
85
|
disabled: disabled,
|
|
90
|
-
icon:
|
|
86
|
+
icon: selectedOption?.icon ?? 'ellipsis',
|
|
91
87
|
marginBottom0: true,
|
|
92
88
|
onClick: onToggle,
|
|
93
89
|
onKeyDown: keyHandler,
|
|
@@ -54,18 +54,18 @@ const NoResultsMessage = _ref => {
|
|
|
54
54
|
// Request failure
|
|
55
55
|
if (isError) {
|
|
56
56
|
icon = 'exclamation-circle';
|
|
57
|
-
label = error
|
|
57
|
+
label = error?.message;
|
|
58
58
|
}
|
|
59
59
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
60
60
|
className: _NoResultsMessage.default.noResultsMessage,
|
|
61
61
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
62
62
|
className: _NoResultsMessage.default.noResultsMessageLabelWrap,
|
|
63
63
|
children: [(icon || userIcon) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
64
|
-
icon: userIcon
|
|
64
|
+
icon: userIcon ?? icon,
|
|
65
65
|
iconRootClass: _NoResultsMessage.default.noResultsMessageIcon
|
|
66
66
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
67
67
|
className: _NoResultsMessage.default.noResultsMessageLabel,
|
|
68
|
-
children: userLabel
|
|
68
|
+
children: userLabel ?? label
|
|
69
69
|
})]
|
|
70
70
|
}), !filterPaneIsVisible && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
71
71
|
buttonClass: _NoResultsMessage.default.noResultsMessageButton,
|
|
@@ -73,7 +73,7 @@ const NoResultsMessage = _ref => {
|
|
|
73
73
|
onClick: toggleFilterPane,
|
|
74
74
|
children: kintIntl.formatKintMessage({
|
|
75
75
|
id: 'showFilters',
|
|
76
|
-
overrideValue: labelOverrides
|
|
76
|
+
overrideValue: labelOverrides?.showFilters
|
|
77
77
|
})
|
|
78
78
|
})]
|
|
79
79
|
});
|
|
@@ -10,8 +10,8 @@ var _Typedown = _interopRequireDefault(require("../Typedown"));
|
|
|
10
10
|
var _typedownHooks = require("../hooks/typedownHooks");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _getRequireWildcardCache(
|
|
14
|
-
function _interopRequireWildcard(
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
15
|
const QueryTypedown = _ref => {
|
|
16
16
|
let {
|
|
17
17
|
dataFormatter = d => d,
|
|
@@ -32,7 +32,7 @@ const RefdataButtons = props => {
|
|
|
32
32
|
'checked': input.value === option.value,
|
|
33
33
|
'fullWidth': true,
|
|
34
34
|
'label': labelTranslations ? intl.formatMessage({
|
|
35
|
-
id:
|
|
35
|
+
id: `${labelTranslations.key}.${option.value}`,
|
|
36
36
|
defaultMessage: option.label
|
|
37
37
|
}) : option.label,
|
|
38
38
|
'marginBottom0': true,
|
|
@@ -44,7 +44,7 @@ const RefdataButtons = props => {
|
|
|
44
44
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.RadioButton, {
|
|
45
45
|
...buttonProps
|
|
46
46
|
})
|
|
47
|
-
},
|
|
47
|
+
}, `${input.name}:${option.id}`);
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
50
|
const returnRows = dataOptions => {
|
|
@@ -71,7 +71,7 @@ const RefdataButtons = props => {
|
|
|
71
71
|
return chunkedDataOptions.map((cdo, index) => {
|
|
72
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Row, {
|
|
73
73
|
children: buttonRender(cdo, false)
|
|
74
|
-
},
|
|
74
|
+
}, `${props.input.name}:row${index}`);
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
77
|
return returnRows(props.dataOptions);
|
|
@@ -28,12 +28,12 @@ const calculateCumulativeThreshold = function (arrayOfNumbers, maximum) {
|
|
|
28
28
|
let value = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
29
29
|
// If all the numbers fit, return the last index
|
|
30
30
|
if (arrayOfNumbers.reduce((partialSum, a) => partialSum + a, 0) <= maximum) {
|
|
31
|
-
return
|
|
31
|
+
return arrayOfNumbers?.length - 1;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
// Else we'll need a down arrow button, so include that in calculations
|
|
35
35
|
const nextValue = value + arrayOfNumbers[index];
|
|
36
|
-
if (nextValue + SIZE_OF_DOWN_ARROW_BUTTON <= maximum && index + 1 <
|
|
36
|
+
if (nextValue + SIZE_OF_DOWN_ARROW_BUTTON <= maximum && index + 1 < arrayOfNumbers?.length) {
|
|
37
37
|
return calculateCumulativeThreshold(arrayOfNumbers, maximum, index + 1, nextValue);
|
|
38
38
|
}
|
|
39
39
|
return index - 1;
|
|
@@ -65,7 +65,6 @@ const ResponsiveButtonGroup = props => {
|
|
|
65
65
|
});
|
|
66
66
|
const buttonThreshold = calculateCumulativeThreshold(cachedSizeArray, containerWidth);
|
|
67
67
|
const renderActionMenuToggle = (0, _react.useCallback)(_ref => {
|
|
68
|
-
var _displayButtons$lengt;
|
|
69
68
|
let {
|
|
70
69
|
displayButtons,
|
|
71
70
|
onToggle,
|
|
@@ -79,11 +78,11 @@ const ResponsiveButtonGroup = props => {
|
|
|
79
78
|
ref: triggerRef,
|
|
80
79
|
"aria-label": "menu",
|
|
81
80
|
buttonClass: (0, _classnames.default)(_ResponsiveButtonGroup.default.width100, {
|
|
82
|
-
[
|
|
81
|
+
[`${_ResponsiveButtonGroup.default.dropdownButtonClass}`]: (displayButtons?.length ?? 0) > 0
|
|
83
82
|
}, {
|
|
84
|
-
[
|
|
83
|
+
[`${_ResponsiveButtonGroup.default.marginBottom}`]: !marginBottom0
|
|
85
84
|
}, {
|
|
86
|
-
[
|
|
85
|
+
[`${_ResponsiveButtonGroup.default.marginBottom0}`]: marginBottom0
|
|
87
86
|
}),
|
|
88
87
|
buttonStyle: selectedIndex > buttonThreshold ? 'primary' : 'default',
|
|
89
88
|
onClick: onToggle,
|
|
@@ -98,25 +97,19 @@ const ResponsiveButtonGroup = props => {
|
|
|
98
97
|
})
|
|
99
98
|
});
|
|
100
99
|
}, [buttonThreshold, dropdownTriggerProps, marginBottom0, selectedIndex]);
|
|
101
|
-
const displayButtons = (0, _react.useMemo)(() => {
|
|
102
|
-
|
|
103
|
-
return buttons === null || buttons === void 0 || (_buttons$slice = buttons.slice(0, buttonThreshold + 1)) === null || _buttons$slice === void 0 ? void 0 : _buttons$slice.map((button, index) => {
|
|
104
|
-
if (index === selectedIndex && !(button !== null && button !== void 0 && button.buttonStyle)) {
|
|
105
|
-
return /*#__PURE__*/(0, _react.cloneElement)(button, {
|
|
106
|
-
buttonStyle: 'primary'
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
return button;
|
|
110
|
-
});
|
|
111
|
-
}, [buttonThreshold, buttons, selectedIndex]);
|
|
112
|
-
const dropdownButtons = (0, _react.useMemo)(() => {
|
|
113
|
-
var _buttons$slice2;
|
|
114
|
-
return [...((_buttons$slice2 = buttons.slice(buttonThreshold + 1, buttons === null || buttons === void 0 ? void 0 : buttons.length)) === null || _buttons$slice2 === void 0 ? void 0 : _buttons$slice2.map(button => {
|
|
100
|
+
const displayButtons = (0, _react.useMemo)(() => buttons?.slice(0, buttonThreshold + 1)?.map((button, index) => {
|
|
101
|
+
if (index === selectedIndex && !button?.buttonStyle) {
|
|
115
102
|
return /*#__PURE__*/(0, _react.cloneElement)(button, {
|
|
116
|
-
buttonStyle: '
|
|
103
|
+
buttonStyle: 'primary'
|
|
117
104
|
});
|
|
118
|
-
}
|
|
119
|
-
|
|
105
|
+
}
|
|
106
|
+
return button;
|
|
107
|
+
}), [buttonThreshold, buttons, selectedIndex]);
|
|
108
|
+
const dropdownButtons = (0, _react.useMemo)(() => [...buttons.slice(buttonThreshold + 1, buttons?.length)?.map(button => {
|
|
109
|
+
return /*#__PURE__*/(0, _react.cloneElement)(button, {
|
|
110
|
+
buttonStyle: 'dropdownItem'
|
|
111
|
+
});
|
|
112
|
+
})], [buttonThreshold, buttons]);
|
|
120
113
|
|
|
121
114
|
// eslint-disable-next-line react/prop-types
|
|
122
115
|
const renderActionMenuContent = (0, _react.useCallback)(() => /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.DropdownMenu, {
|
|
@@ -136,16 +129,16 @@ const ResponsiveButtonGroup = props => {
|
|
|
136
129
|
className: "width: 100%;"
|
|
137
130
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Tag, {
|
|
138
131
|
className: (0, _classnames.default)({
|
|
139
|
-
[
|
|
132
|
+
[`${_ResponsiveButtonGroup.default.hidden}`]: !ready
|
|
140
133
|
}, _ResponsiveButtonGroup.default.buttonGroup, {
|
|
141
|
-
[
|
|
134
|
+
[`${_ResponsiveButtonGroup.default.fullWidth}`]: ready && fullWidth
|
|
142
135
|
}, className),
|
|
143
136
|
style: fullWidth ? {
|
|
144
|
-
width:
|
|
137
|
+
width: `${containerWidth}px`
|
|
145
138
|
} : {},
|
|
146
139
|
...rest,
|
|
147
|
-
children: !ready || buttonThreshold ===
|
|
148
|
-
if (index === selectedIndex && !
|
|
140
|
+
children: !ready || buttonThreshold === cachedSizeArray?.length - 1 ? buttons?.map((button, index) => {
|
|
141
|
+
if (index === selectedIndex && !button?.buttonStyle) {
|
|
149
142
|
return /*#__PURE__*/(0, _react.cloneElement)(button, {
|
|
150
143
|
buttonStyle: 'primary'
|
|
151
144
|
});
|
|
@@ -14,7 +14,7 @@ const useResponsiveButtonGroupSizing = _ref => {
|
|
|
14
14
|
id,
|
|
15
15
|
buttons = []
|
|
16
16
|
} = _ref;
|
|
17
|
-
const eventString = 'responsive-button-group-loaded' + (id ?
|
|
17
|
+
const eventString = 'responsive-button-group-loaded' + (id ? `-${id}` : '');
|
|
18
18
|
const loadedEvent = new Event(eventString);
|
|
19
19
|
const isMounted = (0, _react.useRef)(false);
|
|
20
20
|
(0, _react.useEffect)(() => {
|
|
@@ -37,8 +37,7 @@ const useResponsiveButtonGroupSizing = _ref => {
|
|
|
37
37
|
const refArray = buttons.map((_button, index) => {
|
|
38
38
|
return node => {
|
|
39
39
|
if (node !== null) {
|
|
40
|
-
|
|
41
|
-
const newSizeArray = sizeArray.slice(0, index).concat([(_node$clientWidth = node === null || node === void 0 ? void 0 : node.clientWidth) !== null && _node$clientWidth !== void 0 ? _node$clientWidth : 0]).concat(sizeArray.slice(index + 1));
|
|
40
|
+
const newSizeArray = sizeArray.slice(0, index).concat([node?.clientWidth ?? 0]).concat(sizeArray.slice(index + 1));
|
|
42
41
|
if (!(0, _isEqual.default)(sizeArray, newSizeArray)) {
|
|
43
42
|
setSizeArray(newSizeArray);
|
|
44
43
|
}
|
|
@@ -50,16 +49,16 @@ const useResponsiveButtonGroupSizing = _ref => {
|
|
|
50
49
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
51
50
|
(0, _react.useEffect)((0, _lodash.debounce)(() => {
|
|
52
51
|
if (isMounted.current) {
|
|
53
|
-
if (!
|
|
52
|
+
if (!cachedSizeArray?.length && sizeArray?.length) {
|
|
54
53
|
setCachedSizeArray(sizeArray);
|
|
55
54
|
setReady(true);
|
|
56
55
|
document.dispatchEvent(loadedEvent);
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
}, 150), [cachedSizeArray, sizeArray]);
|
|
60
|
-
const returnButtons = buttons
|
|
59
|
+
const returnButtons = buttons?.map((button, index) => {
|
|
61
60
|
return /*#__PURE__*/(0, _react.cloneElement)(button, {
|
|
62
|
-
ref: refArray
|
|
61
|
+
ref: refArray?.[index]
|
|
63
62
|
});
|
|
64
63
|
});
|
|
65
64
|
return {
|
|
@@ -12,7 +12,6 @@ var _FormattedKintMessage = _interopRequireDefault(require("../FormattedKintMess
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
14
|
const RichSelect = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
15
|
-
var _ref2, _meta$initial, _findSelectedOptionBy, _meta$initial2;
|
|
16
15
|
let {
|
|
17
16
|
ariaLabel,
|
|
18
17
|
disabled = false,
|
|
@@ -33,17 +32,17 @@ const RichSelect = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
33
32
|
value
|
|
34
33
|
} = _ref;
|
|
35
34
|
const hiddenInput = (0, _react.useRef)(null);
|
|
36
|
-
const [internalValue, setInternalValue] = (0, _react.useState)(
|
|
35
|
+
const [internalValue, setInternalValue] = (0, _react.useState)(meta?.initial ?? value ?? '');
|
|
37
36
|
const findSelectedOptionByValue = (0, _react.useCallback)(val => {
|
|
38
37
|
return userOptions.find(opt => opt.value === val);
|
|
39
38
|
}, [userOptions]);
|
|
40
|
-
const [selectedOption, setSelectedOption] = (0, _react.useState)(
|
|
39
|
+
const [selectedOption, setSelectedOption] = (0, _react.useState)(findSelectedOptionByValue(meta?.initial ?? '') ?? {});
|
|
41
40
|
(0, _react.useEffect)(() => {
|
|
42
41
|
// We treat non-undefined value/formInput values as valid values, whereas undefined is only relevant when prop has not been provided
|
|
43
|
-
if (value !== undefined && !(value ===
|
|
42
|
+
if (value !== undefined && !(value === selectedOption?.value && value === internalValue)) {
|
|
44
43
|
setSelectedOption(findSelectedOptionByValue(value));
|
|
45
44
|
setInternalValue(value);
|
|
46
|
-
} else if (
|
|
45
|
+
} else if (formInput?.value !== undefined && !(value === selectedOption?.value && value === internalValue)) {
|
|
47
46
|
setSelectedOption(findSelectedOptionByValue(formInput.value));
|
|
48
47
|
setInternalValue(formInput.value);
|
|
49
48
|
}
|
|
@@ -53,15 +52,14 @@ const RichSelect = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
53
52
|
(0, _react.useImperativeHandle)(ref, () => ({
|
|
54
53
|
selectedOption
|
|
55
54
|
}));
|
|
56
|
-
const defaultRenderTrigger =
|
|
57
|
-
var _ref4, _ref5, _ref6, _selectedOption$label;
|
|
55
|
+
const defaultRenderTrigger = _ref2 => {
|
|
58
56
|
let {
|
|
59
57
|
onToggle,
|
|
60
58
|
triggerRef,
|
|
61
59
|
keyHandler,
|
|
62
60
|
ariaProps,
|
|
63
61
|
getTriggerProps
|
|
64
|
-
} =
|
|
62
|
+
} = _ref2;
|
|
65
63
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.DropdownButton, {
|
|
66
64
|
ref: triggerRef,
|
|
67
65
|
buttonClass: _RichSelect.default.triggerButton,
|
|
@@ -74,7 +72,7 @@ const RichSelect = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
74
72
|
type: "button",
|
|
75
73
|
...getTriggerProps(),
|
|
76
74
|
...ariaProps,
|
|
77
|
-
children:
|
|
75
|
+
children: selectedOption?.label ?? selectedOption?.value ?? (internalValue || null) ?? placeholder ?? /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormattedKintMessage.default, {
|
|
78
76
|
id: "pleaseSelectOption",
|
|
79
77
|
intlKey: passedIntlKey,
|
|
80
78
|
intlNS: passedIntlNS
|
|
@@ -83,7 +81,7 @@ const RichSelect = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
83
81
|
};
|
|
84
82
|
const handleChange = e => {
|
|
85
83
|
// Actually set the value in the form (If formInput exists)
|
|
86
|
-
if (formInput
|
|
84
|
+
if (formInput?.onChange) {
|
|
87
85
|
formInput.onChange(e);
|
|
88
86
|
}
|
|
89
87
|
|
|
@@ -95,20 +93,17 @@ const RichSelect = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
95
93
|
const changeField = val => {
|
|
96
94
|
(0, _components.nativeChangeFieldValue)(hiddenInput, false, val);
|
|
97
95
|
};
|
|
98
|
-
const defaultRenderOption = opt =>
|
|
99
|
-
|
|
100
|
-
return (_opt$label = opt.label) !== null && _opt$label !== void 0 ? _opt$label : opt.value;
|
|
101
|
-
};
|
|
102
|
-
const defaultRenderMenu = _ref7 => {
|
|
96
|
+
const defaultRenderOption = opt => opt.label ?? opt.value;
|
|
97
|
+
const defaultRenderMenu = _ref3 => {
|
|
103
98
|
let {
|
|
104
99
|
onToggle
|
|
105
|
-
} =
|
|
100
|
+
} = _ref3;
|
|
106
101
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.DropdownMenu, {
|
|
107
102
|
children: userOptions.map(opt => {
|
|
108
103
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
109
|
-
autoFocus:
|
|
104
|
+
autoFocus: selectedOption?.value === opt.value,
|
|
110
105
|
buttonStyle: "dropdownItem",
|
|
111
|
-
id:
|
|
106
|
+
id: `${id}-${formInput.name}-option-${opt.value}`,
|
|
112
107
|
marginBottom0: true,
|
|
113
108
|
onClick: () => {
|
|
114
109
|
// Trigger change event
|
|
@@ -126,7 +121,7 @@ const RichSelect = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
126
121
|
children: [label || ariaLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Label, {
|
|
127
122
|
className: ariaLabel && 'sr-only',
|
|
128
123
|
htmlFor: id,
|
|
129
|
-
id:
|
|
124
|
+
id: `${id}-label`,
|
|
130
125
|
required: required,
|
|
131
126
|
children: ariaLabel || label
|
|
132
127
|
}) : '', /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Dropdown, {
|
|
@@ -8,8 +8,7 @@ var _react = require("react");
|
|
|
8
8
|
const useSelectedOption = () => {
|
|
9
9
|
const [selectedOption, setSelectedOption] = (0, _react.useState)();
|
|
10
10
|
const ref = (0, _react.useCallback)(node => {
|
|
11
|
-
|
|
12
|
-
if (node !== null && (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) !== ((_node$selectedOption = node.selectedOption) === null || _node$selectedOption === void 0 ? void 0 : _node$selectedOption.value)) {
|
|
11
|
+
if (node !== null && selectedOption?.value !== node.selectedOption?.value) {
|
|
13
12
|
setSelectedOption(node.selectedOption);
|
|
14
13
|
}
|
|
15
14
|
}, [selectedOption]);
|