@k-int/stripes-kint-components 4.3.0 → 4.4.0
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 +15 -0
- package/es/index.js +17 -4
- package/es/lib/ActionList/ActionList.js +5 -4
- package/es/lib/ActionList/ActionListFieldArray.js +7 -4
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +2 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +22 -24
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +26 -32
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +3 -3
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +39 -47
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +82 -100
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +2 -2
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +22 -28
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +69 -85
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +2 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +26 -32
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +3 -3
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +15 -19
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +17 -21
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +129 -161
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +2 -2
- package/es/lib/CustomProperties/Filter/useValueProps.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +2 -2
- package/es/lib/CycleButton/CycleButton.js +2 -2
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +45 -28
- package/es/lib/EditableRefdataList/EditableRefdataList.js +70 -50
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +44 -50
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +1 -1
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +139 -163
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +9 -9
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +117 -133
- package/es/lib/IconSelect/IconSelect.js +2 -2
- package/es/lib/QueryTypedown/QueryTypedown.js +2 -2
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +1 -1
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +15 -5
- package/es/lib/RichSelect/RichSelect.js +2 -2
- package/es/lib/RichSelect/useSelectedOption.js +2 -2
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +2 -2
- package/es/lib/SettingPage/SettingPage.js +4 -2
- package/es/lib/Typedown/Typedown.js +6 -3
- package/es/lib/hooks/index.js +0 -19
- package/es/lib/hooks/typedownHooks/useTypedownData.js +2 -2
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +2 -2
- package/es/lib/hooks/useActiveElement.js +2 -2
- package/es/lib/hooks/useHelperApp.js +2 -2
- package/es/lib/hooks/useKiwtFieldArray.js +2 -2
- package/es/lib/hooks/useKiwtSASQuery.js +2 -2
- package/es/lib/hooks/useLocalStorageState.js +2 -2
- package/es/lib/hooks/useMutateCustomProperties.js +23 -29
- package/es/lib/hooks/useMutateRefdataCategory.js +21 -25
- package/es/lib/hooks/useMutateRefdataValue.js +30 -34
- package/es/lib/hooks/useQIndex.js +2 -2
- package/es/lib/hooks/useSASQQueryMeta.js +1 -1
- package/es/lib/{hooks/settingsHooks → settingsHooks}/index.js +0 -0
- package/es/lib/{hooks/settingsHooks → settingsHooks}/useAppSettings.js +2 -2
- package/es/lib/{hooks/settingsHooks → settingsHooks}/useSettingSection.js +1 -3
- package/es/lib/{hooks/settingsHooks → settingsHooks}/useSettings.js +7 -8
- package/es/lib/utils/generateKiwtQueryParams.js +2 -2
- package/es/lib/utils/groupCustomPropertiesByCtx.js +1 -1
- package/es/lib/utils/highlightString.js +2 -2
- package/es/lib/utils/index.js +0 -43
- package/es/lib/utils/parseErrorResponse.js +42 -44
- package/es/lib/validators/index.js +16 -0
- package/es/lib/{utils → validators}/validators.js +0 -0
- package/junit.xml +133 -133
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +12 -3
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +53 -14
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +8 -8
- 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 +2 -2
- 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/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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +96 -9
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +152 -29
- 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 +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 +3 -3
- 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 +9 -9
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +43 -10
- 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 +6 -3
- 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/Typedown/Typedown.js.html +20 -8
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +3 -3
- 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 +2 -5
- 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/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/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 +60 -45
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.html +161 -0
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.js.html +94 -0
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useAppSettings.js.html +292 -0
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettingSection.js.html +211 -0
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettings.js.html +460 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.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 +9 -24
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +2 -35
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.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 +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/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/validators/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/validators/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/validators/validators.js.html +370 -0
- package/src/artifacts/coverage-jest/lcov.info +650 -588
- package/src/index.js +6 -2
- package/src/lib/ActionList/ActionList.js +3 -2
- package/src/lib/ActionList/ActionListFieldArray.js +9 -1
- package/src/lib/ActionList/README.md +1 -0
- package/src/lib/CustomProperties/Config/CustomPropertyForm.js +1 -1
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +1 -1
- package/src/lib/CustomProperties/Filter/CustomPropertiesRule.js +1 -1
- package/src/lib/CustomProperties/Filter/useValueProps.js +1 -1
- package/src/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +32 -3
- package/src/lib/EditableRefdataList/EditableRefdataList.js +50 -22
- package/src/lib/EditableRefdataList/README.md +2 -1
- package/src/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +15 -4
- package/src/lib/SettingPage/SettingPage.js +2 -1
- package/src/lib/Typedown/Typedown.js +9 -5
- package/src/lib/hooks/index.js +0 -1
- package/src/lib/{hooks/settingsHooks → settingsHooks}/index.js +0 -0
- package/src/lib/{hooks/settingsHooks → settingsHooks}/useAppSettings.js +1 -1
- package/src/lib/{hooks/settingsHooks → settingsHooks}/useSettingSection.js +1 -2
- package/src/lib/{hooks/settingsHooks → settingsHooks}/useSettings.js +4 -5
- package/src/lib/utils/index.js +0 -11
- package/src/lib/validators/index.js +1 -0
- package/src/lib/{utils → validators}/validators.js +0 -0
- package/styles/TypeDown.css +17 -17
package/src/index.js
CHANGED
|
@@ -12,17 +12,21 @@ export {
|
|
|
12
12
|
useQIndex,
|
|
13
13
|
useRefdata,
|
|
14
14
|
useTemplates,
|
|
15
|
-
useSettings,
|
|
16
|
-
useAppSettings,
|
|
17
15
|
useIntlKeyStore,
|
|
18
16
|
useKintIntl,
|
|
19
17
|
useIntlKey,
|
|
20
18
|
useSASQQueryMeta
|
|
21
19
|
} from './lib/hooks';
|
|
22
20
|
|
|
21
|
+
// Settings hooks
|
|
22
|
+
export { useAppSettings, useSettings } from './lib/settingsHooks';
|
|
23
|
+
|
|
23
24
|
// Useful utility stuff
|
|
24
25
|
export * from './lib/utils';
|
|
25
26
|
|
|
27
|
+
// Validators
|
|
28
|
+
export * from './lib/validators';
|
|
29
|
+
|
|
26
30
|
// Contexts
|
|
27
31
|
export {
|
|
28
32
|
SettingsContext,
|
|
@@ -16,7 +16,7 @@ const propTypes = {
|
|
|
16
16
|
defaultNewObject: PropTypes.object,
|
|
17
17
|
editableFields: PropTypes.object,
|
|
18
18
|
fieldComponents: PropTypes.object,
|
|
19
|
-
|
|
19
|
+
hideActionsColumn: PropTypes.bool,
|
|
20
20
|
hideCreateButton: PropTypes.bool,
|
|
21
21
|
intlKey: PropTypes.string,
|
|
22
22
|
intlNS: PropTypes.string,
|
|
@@ -38,7 +38,7 @@ const ActionList = forwardRef(({
|
|
|
38
38
|
defaultNewObject = {},
|
|
39
39
|
editableFields = {},
|
|
40
40
|
fieldComponents = {},
|
|
41
|
-
|
|
41
|
+
hideActionsColumn = false,
|
|
42
42
|
hideCreateButton,
|
|
43
43
|
intlKey: passedIntlKey,
|
|
44
44
|
intlNS: passedIntlNS,
|
|
@@ -72,6 +72,7 @@ const ActionList = forwardRef(({
|
|
|
72
72
|
defaultNewObject={defaultNewObject}
|
|
73
73
|
editableFields={editableFields}
|
|
74
74
|
fieldComponents={fieldComponents}
|
|
75
|
+
hideActionsColumn={hideActionsColumn}
|
|
75
76
|
hideCreateButton={hideCreateButton}
|
|
76
77
|
intlKey={passedIntlKey}
|
|
77
78
|
intlNS={passedIntlNS}
|
|
@@ -24,6 +24,7 @@ const propTypes = {
|
|
|
24
24
|
fields: PropTypes.object,
|
|
25
25
|
fieldComponents: PropTypes.object,
|
|
26
26
|
formatter: PropTypes.object,
|
|
27
|
+
hideActionsColumn: PropTypes.bool,
|
|
27
28
|
hideCreateButton: PropTypes.bool,
|
|
28
29
|
intlKey: PropTypes.string,
|
|
29
30
|
intlNS: PropTypes.string,
|
|
@@ -78,6 +79,7 @@ const ActionListFieldArray = forwardRef(({
|
|
|
78
79
|
editableFields,
|
|
79
80
|
fields,
|
|
80
81
|
fieldComponents,
|
|
82
|
+
hideActionsColumn = false,
|
|
81
83
|
hideCreateButton = false,
|
|
82
84
|
intlKey: passedIntlKey,
|
|
83
85
|
intlNS: passedIntlNS,
|
|
@@ -440,7 +442,13 @@ const ActionListFieldArray = forwardRef(({
|
|
|
440
442
|
onRowClick(e, rowWithoutActions);
|
|
441
443
|
}
|
|
442
444
|
} : null}
|
|
443
|
-
visibleColumns={
|
|
445
|
+
visibleColumns={(
|
|
446
|
+
!hideActionsColumn ||
|
|
447
|
+
!!editing
|
|
448
|
+
) ?
|
|
449
|
+
[...visibleFields, 'actionListActions'] :
|
|
450
|
+
visibleFields
|
|
451
|
+
}
|
|
444
452
|
{...restOfMclProps}
|
|
445
453
|
/>
|
|
446
454
|
</>
|
|
@@ -101,6 +101,7 @@ defaultNewObject | object | An object to use when pushing a new entry into the A
|
|
|
101
101
|
editableFields | object\<function> | An object with keys from the `visibleFields` array, and values of functions which take the entire row object and return a boolean indicating whether that field is editable or not. No key for a given field will be interpreted as () => true, so a field is editable by default. | | ✕ |
|
|
102
102
|
fieldComponents | object\<function> | An object with keys from the `visibleFields` array, and values of functions which take some `fieldProps` (`allValues`: The full form values, `index`: The current fieldIndex of the editing row, `key`: The object property in question, `name`: The field name for the Field component to glue properly into final-form, `rowFieldName`: The field name in final-form for the whole row object.), and returns a Field component to be used in "edit mode" for the visible field specified. | | ✕ |
|
|
103
103
|
formatter | object\<function> | A "formatter" object that takes the same shape as an MCL formatter, and is used in the same way whilst a row is NOT being edited. While editing a given row, this formatter entry is ignored. | | ✕ |
|
|
104
|
+
hideActionsColumn | boolean | A simple bool to hide the actions column. This will hide the actions column, unless the ActionList manages to get into a state of "editing/creating". In this case, the actions column will once again display to avoid soft locking the form. | false | ✕ |
|
|
104
105
|
hideCreateButton | boolean | A simple bool to hide the create button. Default behaviour without create action is disabled. | false | ✕ |
|
|
105
106
|
onRowClick | function | A function accepting an event and the row data, fired on row click. The presence of this prop will cause the MCL to take on the interactive styling | | ✕ |
|
|
106
107
|
validateFields | object\<function> | An object with keys from the `visibleFields` array, and values of functions which take the entire row object and either return a validate function for final-form, or null. The validate function will be passed the same properties as fieldComponents, above. THESE WILL NOT BE USED if fieldComponents are defined for the same key. | | ✕ |
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
TextArea,
|
|
12
12
|
TextField
|
|
13
13
|
} from '@folio/stripes/components';
|
|
14
|
-
import { required as requiredValidator, composeValidators } from '../../
|
|
14
|
+
import { required as requiredValidator, composeValidators } from '../../validators';
|
|
15
15
|
|
|
16
16
|
import {
|
|
17
17
|
DECIMAL_CLASS_NAME,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '@folio/stripes/components';
|
|
13
13
|
|
|
14
14
|
import { groupCustomPropertiesByCtx } from '../../utils';
|
|
15
|
-
import { required as requiredValidator } from '../../
|
|
15
|
+
import { required as requiredValidator } from '../../validators';
|
|
16
16
|
|
|
17
17
|
import CustomPropertiesRule from './CustomPropertiesRule';
|
|
18
18
|
import { useKintIntl } from '../../hooks';
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
Tooltip,
|
|
13
13
|
} from '@folio/stripes/components';
|
|
14
14
|
|
|
15
|
-
import { required as requiredValidator } from '../../
|
|
15
|
+
import { required as requiredValidator } from '../../validators';
|
|
16
16
|
|
|
17
17
|
import useValueProps from './useValueProps';
|
|
18
18
|
import useOperators from './useOperators';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Datepicker, Select, TextField } from '@folio/stripes/components';
|
|
2
2
|
import * as CUSTPROP_TYPES from '../../constants/customProperties';
|
|
3
|
-
import { invalidNumber, required as requiredValidator } from '../../
|
|
3
|
+
import { invalidNumber, required as requiredValidator } from '../../validators';
|
|
4
4
|
|
|
5
5
|
const {
|
|
6
6
|
REFDATA_CLASS_NAME: REFDATA,
|
|
@@ -7,12 +7,17 @@ import { CalloutContext } from '@folio/stripes/core';
|
|
|
7
7
|
import { useKintIntl, useMutateRefdataCategory, useRefdata } from '../hooks';
|
|
8
8
|
|
|
9
9
|
import ActionList from '../ActionList';
|
|
10
|
-
import { required } from '../
|
|
10
|
+
import { required } from '../validators';
|
|
11
11
|
import { parseErrorResponse } from '../utils';
|
|
12
12
|
|
|
13
13
|
const propTypes = {
|
|
14
14
|
afterQueryCalls: PropTypes.object,
|
|
15
15
|
catchQueryCalls: PropTypes.object,
|
|
16
|
+
displayConditions: PropTypes.shape({
|
|
17
|
+
create: PropTypes.bool,
|
|
18
|
+
delete: PropTypes.bool,
|
|
19
|
+
view: PropTypes.bool,
|
|
20
|
+
}),
|
|
16
21
|
intlKey: PropTypes.string,
|
|
17
22
|
intlNS: PropTypes.string,
|
|
18
23
|
label: PropTypes.oneOfType([
|
|
@@ -26,6 +31,17 @@ const propTypes = {
|
|
|
26
31
|
const EditableRefdataCategoryList = ({
|
|
27
32
|
afterQueryCalls,
|
|
28
33
|
catchQueryCalls,
|
|
34
|
+
/*
|
|
35
|
+
* Set of extra booleans for controlling access to actions
|
|
36
|
+
* create/delete (View should be handled externally)
|
|
37
|
+
* This will not overwrite "internal" behaviour, ie setting
|
|
38
|
+
* delete to 'true' here would still not render a delete button
|
|
39
|
+
* for a refdata category that has refdata values.
|
|
40
|
+
*/
|
|
41
|
+
displayConditions = {
|
|
42
|
+
create: true,
|
|
43
|
+
delete: true,
|
|
44
|
+
},
|
|
29
45
|
intlKey: passedIntlKey,
|
|
30
46
|
intlNS: passedIntlNS,
|
|
31
47
|
label,
|
|
@@ -36,6 +52,11 @@ const EditableRefdataCategoryList = ({
|
|
|
36
52
|
const callout = useContext(CalloutContext);
|
|
37
53
|
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
38
54
|
|
|
55
|
+
const {
|
|
56
|
+
create: createCondition = true,
|
|
57
|
+
delete: deleteCondition = true,
|
|
58
|
+
} = displayConditions;
|
|
59
|
+
|
|
39
60
|
// fetch refdata values
|
|
40
61
|
const { data: refdata = [], isLoading: isRefdataLoading } = useRefdata({
|
|
41
62
|
endpoint: refdataEndpoint,
|
|
@@ -109,7 +130,7 @@ const EditableRefdataCategoryList = ({
|
|
|
109
130
|
const actionAssigner = (rowData) => {
|
|
110
131
|
const actionArray = [];
|
|
111
132
|
|
|
112
|
-
if (!rowData?.values?.length) {
|
|
133
|
+
if (!rowData?.values?.length && deleteCondition) {
|
|
113
134
|
actionArray.push({
|
|
114
135
|
name: 'delete',
|
|
115
136
|
label: kintIntl.formatKintMessage({
|
|
@@ -148,10 +169,18 @@ const EditableRefdataCategoryList = ({
|
|
|
148
169
|
creatableFields={{
|
|
149
170
|
values: () => false
|
|
150
171
|
}}
|
|
151
|
-
createCallback={
|
|
172
|
+
createCallback={!createCondition ?
|
|
173
|
+
null :
|
|
174
|
+
(data) => createRefdataCategory(data)
|
|
175
|
+
}
|
|
152
176
|
formatter={{
|
|
153
177
|
values: (rowData) => rowData?.values?.length
|
|
154
178
|
}}
|
|
179
|
+
/* Hide actions column when no permissions, or no deletable refdata categories */
|
|
180
|
+
hideActionsColumn={
|
|
181
|
+
(!createCondition && !deleteCondition) ||
|
|
182
|
+
!contentData?.find(cd => cd?.values?.length === 0)
|
|
183
|
+
}
|
|
155
184
|
label={label}
|
|
156
185
|
validateFields={{
|
|
157
186
|
desc: () => required
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState, useContext } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import get from 'lodash/get';
|
|
4
3
|
|
|
5
4
|
import { ConfirmationModal } from '@folio/stripes/components';
|
|
6
5
|
import { CalloutContext } from '@folio/stripes/core';
|
|
@@ -8,7 +7,7 @@ import { CalloutContext } from '@folio/stripes/core';
|
|
|
8
7
|
import { useKintIntl, useMutateRefdataValue, useRefdata } from '../hooks';
|
|
9
8
|
|
|
10
9
|
import ActionList from '../ActionList';
|
|
11
|
-
import { required } from '../
|
|
10
|
+
import { required } from '../validators';
|
|
12
11
|
import { parseErrorResponse, selectorSafe } from '../utils';
|
|
13
12
|
|
|
14
13
|
const propTypes = {
|
|
@@ -16,6 +15,11 @@ const propTypes = {
|
|
|
16
15
|
allowSpecial: PropTypes.bool,
|
|
17
16
|
catchQueryCalls: PropTypes.object,
|
|
18
17
|
desc: PropTypes.string,
|
|
18
|
+
displayConditions: PropTypes.shape({
|
|
19
|
+
create: PropTypes.bool,
|
|
20
|
+
delete: PropTypes.bool,
|
|
21
|
+
view: PropTypes.bool,
|
|
22
|
+
}),
|
|
19
23
|
intlKey: PropTypes.string,
|
|
20
24
|
intlNS: PropTypes.string,
|
|
21
25
|
label: PropTypes.oneOfType([
|
|
@@ -31,12 +35,30 @@ const EditableRefdataList = ({
|
|
|
31
35
|
allowSpecial = false, // special characters will be directly stripped out of the value before it is sent to the backend
|
|
32
36
|
catchQueryCalls,
|
|
33
37
|
desc,
|
|
38
|
+
/*
|
|
39
|
+
* Set of extra booleans for controlling access to actions
|
|
40
|
+
* edit/create/delete (View should be handled externally)
|
|
41
|
+
* This will not overwrite "internal" behaviour, ie setting
|
|
42
|
+
* delete to 'true' here would still not render a delete button
|
|
43
|
+
* for an internal refdata value
|
|
44
|
+
*/
|
|
45
|
+
displayConditions = {
|
|
46
|
+
create: true,
|
|
47
|
+
edit: true,
|
|
48
|
+
delete: true,
|
|
49
|
+
},
|
|
34
50
|
intlKey: passedIntlKey,
|
|
35
51
|
intlNS: passedIntlNS,
|
|
36
52
|
label,
|
|
37
53
|
labelOverrides = {}, // An object containing translation alternatives
|
|
38
54
|
refdataEndpoint
|
|
39
55
|
}) => {
|
|
56
|
+
const {
|
|
57
|
+
create: createCondition = true,
|
|
58
|
+
delete: deleteCondition = true,
|
|
59
|
+
edit: editCondition = true
|
|
60
|
+
} = displayConditions;
|
|
61
|
+
|
|
40
62
|
/* A component that allows for editing of refdata values */
|
|
41
63
|
const callout = useContext(CalloutContext);
|
|
42
64
|
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
@@ -115,26 +137,30 @@ const EditableRefdataList = ({
|
|
|
115
137
|
|
|
116
138
|
// This is the function which will take a row in the table and assign the relevant actions to it
|
|
117
139
|
const actionAssigner = () => {
|
|
118
|
-
const actionArray = [
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
140
|
+
const actionArray = [];
|
|
141
|
+
|
|
142
|
+
if (editCondition) {
|
|
143
|
+
actionArray.push(
|
|
144
|
+
{
|
|
145
|
+
name: 'edit',
|
|
146
|
+
label: kintIntl.formatKintMessage({
|
|
147
|
+
id: 'edit',
|
|
148
|
+
overrideValue: labelOverrides?.edit
|
|
149
|
+
}),
|
|
150
|
+
icon: 'edit',
|
|
151
|
+
callback: (data) => editRefdataValue(data),
|
|
152
|
+
ariaLabel: (data) => kintIntl.formatKintMessage(
|
|
153
|
+
{
|
|
154
|
+
id: 'refdata.editAriaLabel',
|
|
155
|
+
overrideValue: labelOverrides?.editAriaLabel
|
|
156
|
+
},
|
|
157
|
+
{ label: data?.label }
|
|
158
|
+
),
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}
|
|
136
162
|
|
|
137
|
-
if (!refdata?.internal) {
|
|
163
|
+
if (!refdata?.internal && deleteCondition) {
|
|
138
164
|
actionArray.push({
|
|
139
165
|
name: 'delete',
|
|
140
166
|
label: kintIntl.formatKintMessage({
|
|
@@ -174,7 +200,7 @@ const EditableRefdataList = ({
|
|
|
174
200
|
value: () => false
|
|
175
201
|
}}
|
|
176
202
|
createCallback={
|
|
177
|
-
refdata?.internal ?
|
|
203
|
+
(!createCondition || refdata?.internal) ?
|
|
178
204
|
null :
|
|
179
205
|
(data) => {
|
|
180
206
|
if (allowSpecial) {
|
|
@@ -187,6 +213,8 @@ const EditableRefdataList = ({
|
|
|
187
213
|
editableFields={{
|
|
188
214
|
value: () => false
|
|
189
215
|
}}
|
|
216
|
+
hideActionsColumn={!deleteCondition && !editCondition}
|
|
217
|
+
hideCreateButton={!createCondition}
|
|
190
218
|
label={label}
|
|
191
219
|
validateFields={{
|
|
192
220
|
label: required
|
|
@@ -20,6 +20,7 @@ Name | Type | Description | default | required
|
|
|
20
20
|
afterQueryCalls | object | An object of the form `{delete: func1, put: func2}` where `func1`/`func2` are functions to be called after the `delete`/`put`. | | ✕ |
|
|
21
21
|
allowSpecial | boolean | A boolean to turn off/on the stripping out of special characters and replacing them with `_`. Generally turning this on will cause problems with queries to KIWT endpoints and internally with Stripes filters, where a refdata value includes `&&`, `||`, `\` or `"`. | false | ✕ |
|
|
22
22
|
catchQueryCalls | object | An object of the form `{delete: func1, put: func2}` where `func1`/`func2` are functions to be called with a HTTPError object when the `delete`/`put` calls fail. | `{delete: <Fires a callout of the format "<strong>Error: {label}</strong> was not deleted. {error}">}` | | ✕ |
|
|
23
|
-
labelOverrides | object | An object containing translation overrides. Currently accepts: `deleteError: (err, object) => { ... output a callout message }`. | | ✕ |
|
|
24
23
|
desc | String | A string corresponding to the refdataValue category, usually of the form `DomainClass.Field`. See `useRefdata` for more information. | | ✕ |
|
|
25
24
|
endpoint | String | A string containing the path to the endpoint for refdata | | ✓ |
|
|
25
|
+
displayConditions | object | An object of the form `{delete: false, edit: true, create: true}`, with keys `delete`, `edit` and `create`, and a boolean value. These will each default to true if not specified. These booleans will act as an additional check before rendering the actions for create/delete/edit, as well as whether or not to render the actions column at all. | `{delete: true, edit: true, create: true}` | ✕ |
|
|
26
|
+
labelOverrides | object | An object containing translation overrides. Currently accepts: `deleteError: (err, object) => { ... output a callout message }`. | | ✕ |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cloneElement, useEffect, useState } from 'react';
|
|
1
|
+
import { cloneElement, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import isEqual from 'lodash/isEqual';
|
|
3
3
|
|
|
4
4
|
import { useResizeDetector } from 'react-resize-detector';
|
|
@@ -7,6 +7,15 @@ import { debounce } from 'lodash';
|
|
|
7
7
|
const useResponsiveButtonGroupSizing = ({
|
|
8
8
|
buttons = [],
|
|
9
9
|
}) => {
|
|
10
|
+
const isMounted = useRef(false);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
isMounted.current = true;
|
|
13
|
+
|
|
14
|
+
return () => {
|
|
15
|
+
isMounted.current = false;
|
|
16
|
+
};
|
|
17
|
+
}, []);
|
|
18
|
+
|
|
10
19
|
// Set up size measuring to be able to do fullWidth if and only if the button is too small for the container.
|
|
11
20
|
// This way when the button is too _large_ for the container, we can measure it properly
|
|
12
21
|
const { ref: containerRef, width: containerWidth } = useResizeDetector();
|
|
@@ -33,9 +42,11 @@ const useResponsiveButtonGroupSizing = ({
|
|
|
33
42
|
|
|
34
43
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35
44
|
useEffect(debounce(() => {
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
if (isMounted.current) {
|
|
46
|
+
if (!cachedSizeArray?.length && sizeArray?.length) {
|
|
47
|
+
setCachedSizeArray(sizeArray);
|
|
48
|
+
setReady(true);
|
|
49
|
+
}
|
|
39
50
|
}
|
|
40
51
|
}, 150), [cachedSizeArray, sizeArray]);
|
|
41
52
|
|
|
@@ -3,7 +3,8 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
|
|
4
4
|
import { EditableSettingsList } from '../EditableSettingsList';
|
|
5
5
|
import { SettingsContext } from '../contexts';
|
|
6
|
-
|
|
6
|
+
// Importing directly here to avoid cyclic dependency
|
|
7
|
+
import useSettingSection from '../settingsHooks/useSettingSection';
|
|
7
8
|
|
|
8
9
|
const SettingPage = ({
|
|
9
10
|
intlKey: passedIntlKey,
|
|
@@ -15,6 +15,7 @@ import selectorSafe from '../utils/selectorSafe';
|
|
|
15
15
|
const Typedown = ({
|
|
16
16
|
className,
|
|
17
17
|
dataOptions,
|
|
18
|
+
displayClearItem = true,
|
|
18
19
|
endOfList,
|
|
19
20
|
id,
|
|
20
21
|
input,
|
|
@@ -233,11 +234,13 @@ const Typedown = ({
|
|
|
233
234
|
>
|
|
234
235
|
{renderItem(input.value)}
|
|
235
236
|
</div>
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
{displayClearItem &&
|
|
238
|
+
<IconButton
|
|
239
|
+
className={css.clearItem}
|
|
240
|
+
icon="times-circle-solid"
|
|
241
|
+
onClick={() => handleChange()}
|
|
242
|
+
/>
|
|
243
|
+
}
|
|
241
244
|
</div>
|
|
242
245
|
}
|
|
243
246
|
</div>
|
|
@@ -247,6 +250,7 @@ const Typedown = ({
|
|
|
247
250
|
Typedown.propTypes = {
|
|
248
251
|
className: PropTypes.string,
|
|
249
252
|
dataOptions: PropTypes.arrayOf(PropTypes.object),
|
|
253
|
+
displayClearItem: PropTypes.bool,
|
|
250
254
|
endOfList: PropTypes.oneOfType([
|
|
251
255
|
PropTypes.func,
|
|
252
256
|
PropTypes.node,
|
package/src/lib/hooks/index.js
CHANGED
|
@@ -6,7 +6,6 @@ export { default as useKiwtSASQuery } from './useKiwtSASQuery';
|
|
|
6
6
|
export { default as useHelperApp } from './useHelperApp';
|
|
7
7
|
export { default as useLocalStorageState } from './useLocalStorageState';
|
|
8
8
|
export { default as useQIndex } from './useQIndex';
|
|
9
|
-
export { useSettings, useSettingSection, useAppSettings } from './settingsHooks';
|
|
10
9
|
export { default as useKiwtFieldArray } from './useKiwtFieldArray';
|
|
11
10
|
export { default as useCustomProperties } from './useCustomProperties';
|
|
12
11
|
export { default as useMutateCustomProperties } from './useMutateCustomProperties';
|
|
File without changes
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { useMutation, useQuery } from 'react-query';
|
|
3
2
|
import { useOkapiKy } from '@folio/stripes/core';
|
|
4
|
-
import { generateKiwtQueryParams } from '
|
|
3
|
+
import { generateKiwtQueryParams } from '../utils';
|
|
5
4
|
|
|
6
5
|
const useSettingSection = ({
|
|
7
6
|
sectionName,
|
|
@@ -6,12 +6,11 @@ import { useOkapiKy } from '@folio/stripes/core';
|
|
|
6
6
|
|
|
7
7
|
import { Settings } from '@folio/stripes/smart-components';
|
|
8
8
|
|
|
9
|
-
import { SettingPage, SettingPagePane } from '
|
|
10
|
-
import { SettingsContext } from '
|
|
9
|
+
import { SettingPage, SettingPagePane } from '../SettingPage';
|
|
10
|
+
import { SettingsContext } from '../contexts';
|
|
11
11
|
|
|
12
|
-
import { generateKiwtQueryParams, sortByLabel, toCamelCase } from '
|
|
13
|
-
import useKintIntl from '../
|
|
14
|
-
import useIntlKey from '../useIntlKey';
|
|
12
|
+
import { generateKiwtQueryParams, sortByLabel, toCamelCase } from '../utils';
|
|
13
|
+
import { useKintIntl, useIntlKey } from '../hooks';
|
|
15
14
|
|
|
16
15
|
const useSettings = ({
|
|
17
16
|
dynamicPageExclusions,
|
package/src/lib/utils/index.js
CHANGED
|
@@ -23,14 +23,3 @@ export { default as parseKiwtQueryGroups } from './parseKiwtQueryGroups';
|
|
|
23
23
|
|
|
24
24
|
// HTTP Utils
|
|
25
25
|
export { default as parseErrorResponse } from './parseErrorResponse';
|
|
26
|
-
|
|
27
|
-
// Validators
|
|
28
|
-
export {
|
|
29
|
-
composeValidators,
|
|
30
|
-
composeValidatorsWithArgs,
|
|
31
|
-
invalidNumber,
|
|
32
|
-
rangeOverflow,
|
|
33
|
-
rangeUnderflow,
|
|
34
|
-
required,
|
|
35
|
-
requiredObject
|
|
36
|
-
} from './validators';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './validators';
|
|
File without changes
|
package/styles/TypeDown.css
CHANGED
|
@@ -26,6 +26,18 @@
|
|
|
26
26
|
z-index: 1000;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
.menuButton {
|
|
30
|
+
composes: interactionStyles from "@folio/stripes-components/lib/sharedStyles/interactionStyles.css";
|
|
31
|
+
margin-bottom: 0;
|
|
32
|
+
border: none;
|
|
33
|
+
text-align: left;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.menuButton[data-selected=true], .selected {
|
|
37
|
+
background-color: var(--primary);
|
|
38
|
+
color: #fff;
|
|
39
|
+
}
|
|
40
|
+
|
|
29
41
|
/* Ensure dropdown menu has correct border radius when rendered above/below/floating */
|
|
30
42
|
div[class^="overlay"][x-placement="top"]:not([x-out-of-boundaries=""]) > div[class^="dropdownMenu"] {
|
|
31
43
|
border-radius: var(--radius) var(--radius) 0 0;
|
|
@@ -40,40 +52,28 @@ div[class^="overlay"][x-out-of-boundaries=""] > div[class^="dropdownMenu"] {
|
|
|
40
52
|
}
|
|
41
53
|
|
|
42
54
|
/* Ensure buttons also follow the proper border radius */
|
|
43
|
-
div[class^="overlay"][x-placement="top"]:not([x-out-of-boundaries=""]) > div[class^="dropdownMenu"] > div[class^=listContainer] > button:first-child:before {
|
|
55
|
+
div[class^="overlay"][x-placement="top"]:not([x-out-of-boundaries=""]) > div[class^="dropdownMenu"] > div[class^=listContainer] > button:first-child, div[class^="overlay"][x-placement="top"]:not([x-out-of-boundaries=""]) > div[class^="dropdownMenu"] > div[class^=listContainer] button:first-child:before {
|
|
44
56
|
border-radius: var(--radius) var(--radius) 0 0;
|
|
45
57
|
}
|
|
46
58
|
|
|
47
|
-
div[class^="overlay"][x-placement="bottom"]:not([x-out-of-boundaries=""]) > div[class^="dropdownMenu"] > div[class^=listContainer] > button:last-child:before {
|
|
59
|
+
div[class^="overlay"][x-placement="bottom"]:not([x-out-of-boundaries=""]) > div[class^="dropdownMenu"] > div[class^=listContainer] > button:last-child, div[class^="overlay"][x-placement="bottom"]:not([x-out-of-boundaries=""]) > div[class^="dropdownMenu"] > div[class^=listContainer] > button:last-child:before {
|
|
48
60
|
border-radius: 0 0 var(--radius) var(--radius);
|
|
49
61
|
}
|
|
50
62
|
|
|
51
63
|
/* When floating, last and first buttons need rounding */
|
|
52
|
-
div[class^="overlay"][x-out-of-boundaries=""] > div[class^="dropdownMenu"] > div[class^=listContainer] > button:first-child:before {
|
|
64
|
+
div[class^="overlay"][x-out-of-boundaries=""] > div[class^="dropdownMenu"] > div[class^=listContainer] > button:first-child, div[class^="overlay"][x-out-of-boundaries=""] > div[class^="dropdownMenu"] > div[class^=listContainer] > button:first-child:before {
|
|
53
65
|
border-radius: var(--radius) var(--radius) 0 0;
|
|
54
66
|
}
|
|
55
67
|
|
|
56
|
-
div[class^="overlay"][x-out-of-boundaries=""] > div[class^="dropdownMenu"] > div[class^=listContainer] > button:last-child:before {
|
|
68
|
+
div[class^="overlay"][x-out-of-boundaries=""] > div[class^="dropdownMenu"] > div[class^=listContainer] > button:last-child, div[class^="overlay"][x-out-of-boundaries=""] > div[class^="dropdownMenu"] > div[class^=listContainer] > button:last-child:before {
|
|
57
69
|
border-radius: 0 0 var(--radius) var(--radius);
|
|
58
70
|
}
|
|
59
71
|
|
|
60
72
|
/* If there is only one element in a floating list, it needs both corners rounding */
|
|
61
|
-
div[class^="overlay"][x-out-of-boundaries=""] > div[class^="dropdownMenu"] > div[class^=listContainer] > button:only-child:before {
|
|
73
|
+
div[class^="overlay"][x-out-of-boundaries=""] > div[class^="dropdownMenu"] > div[class^=listContainer] > button:only-child, div[class^="overlay"][x-out-of-boundaries=""] > div[class^="dropdownMenu"] > div[class^=listContainer] > button:only-child:before {
|
|
62
74
|
border-radius: var(--radius);
|
|
63
75
|
}
|
|
64
76
|
|
|
65
|
-
.menuButton {
|
|
66
|
-
composes: interactionStyles from "@folio/stripes-components/lib/sharedStyles/interactionStyles.css";
|
|
67
|
-
margin-bottom: 0;
|
|
68
|
-
border: none;
|
|
69
|
-
text-align: left;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.menuButton[data-selected=true], .selected {
|
|
73
|
-
background-color: var(--primary);
|
|
74
|
-
color: #fff;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
77
|
.menuButton[data-selected=false]:nth-child(even) {
|
|
78
78
|
background-color: var(--color-fill-table-row-odd);
|
|
79
79
|
}
|