@k-int/stripes-kint-components 5.29.1 → 5.31.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 +21 -0
- package/es/__mocks__/@folio/stripes/components.js +3 -7
- package/es/__mocks__/@folio/stripes/core.js +4 -6
- package/es/__mocks__/@folio/stripes/smart-components.js +4 -6
- package/es/__mocks__/react-query.js +4 -6
- package/es/__mocks__/react-router-dom.js +6 -6
- package/es/index.js +8 -0
- package/es/lib/ActionList/ActionList.js +26 -33
- package/es/lib/ActionList/ActionListFieldArray.js +103 -119
- package/es/lib/ButtonTypedown/ButtonTypedown.js +58 -0
- package/es/lib/ButtonTypedown/index.js +13 -0
- package/es/lib/ComboButton/ComboButton.js +42 -47
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +11 -17
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +42 -46
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +58 -58
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +4 -8
- 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 +29 -35
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +61 -59
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +20 -20
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -2
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +1 -1
- package/es/lib/CustomProperties/Edit/testResources.js +11 -12
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +22 -33
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +23 -35
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +6 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +3 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +4 -8
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +14 -17
- package/es/lib/CustomProperties/Filter/testResources.js +1 -2
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +1 -2
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +18 -26
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +3 -6
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +7 -11
- package/es/lib/CycleButton/CycleButton.js +9 -17
- package/es/lib/FormModal/FormModal.js +24 -32
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +23 -30
- package/es/lib/IconSelect/IconSelect.js +22 -32
- package/es/lib/NoResultsMessage/NoResultsMessage.js +4 -5
- package/es/lib/NumberField/NumberField.js +17 -25
- package/es/lib/NumberField/NumberField.test.js +6 -7
- package/es/lib/QueryTypedown/QueryTypedown.js +8 -15
- package/es/lib/RefdataButtons/RefdataButtons.js +6 -9
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +48 -60
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +5 -6
- package/es/lib/RichSelect/RichSelect.js +31 -36
- package/es/lib/RichSelect/useSelectedOption.js +1 -2
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +91 -94
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +42 -52
- package/es/lib/SASQRoute/SASQRoute.js +25 -29
- package/es/lib/SASQViewComponent/SASQViewComponent.js +68 -76
- package/es/lib/SearchField/SearchField.js +7 -13
- package/es/lib/SearchKeyControl/SearchKeyControl.js +8 -13
- package/es/lib/SearchKeyControl/SearchKeyControl.test.js +2 -6
- package/es/lib/Settings/EditableRefdataCategoryList/EditableRefdataCategoryList.js +30 -46
- package/es/lib/Settings/EditableRefdataList/EditableRefdataList.js +33 -43
- package/es/lib/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js +7 -11
- package/es/lib/Settings/EditableSettingsList/SettingField/EditSettingValue/EditSettingValue.js +13 -20
- package/es/lib/Settings/EditableSettingsList/SettingField/RenderSettingValue/RenderSettingValue.js +10 -12
- package/es/lib/Settings/EditableSettingsList/SettingField/SettingField.js +10 -15
- package/es/lib/Settings/EditableSettingsList/SettingField/SettingField.test.js +3 -3
- package/es/lib/Settings/RefdataCategoriesSettings/RefdataCategoriesSettings.js +19 -26
- package/es/lib/Settings/SettingPage/SettingPagePane/SettingPagePane.js +2 -2
- package/es/lib/Settings/SettingsFormContainer/SettingsFormContainer.js +30 -35
- package/es/lib/Settings/StaticSettingsField/StaticSettingsField.js +5 -8
- package/es/lib/Settings/StaticSettingsField/StaticSettingsFieldComponent/StaticSettingsFieldComponent.js +18 -22
- package/es/lib/Settings/hooks/staticSettingsPages/useSettingCallout/useSettingCallout.js +2 -2
- package/es/lib/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/useSettingsSectionInitalValues.js +1 -1
- package/es/lib/Settings/hooks/staticSettingsPages/useStaticSettingsSection.js +3 -7
- package/es/lib/Settings/hooks/useAppSettings/useAppSettings.js +7 -11
- package/es/lib/Settings/hooks/useSettingSection/useSettingSection.js +16 -22
- package/es/lib/Settings/hooks/useSettings/useSettings.js +60 -60
- package/es/lib/Tags/Tags.js +5 -8
- package/es/lib/Tags/hooks/useTags.js +1 -1
- package/es/lib/Tags/hooks/useTagsEnabled.js +34 -4
- package/es/lib/Tags/tagsConfig.js +1 -1
- package/es/lib/Typedown/Typedown.js +103 -69
- package/es/lib/constants/endpoints.js +7 -2
- package/es/lib/hooks/__mocks__/index.js +3 -7
- package/es/lib/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js +20 -26
- package/es/lib/hooks/intlHooks/useKintIntl/useKintIntl.js +24 -34
- package/es/lib/hooks/typedownHooks/useTypedown.js +104 -81
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +2 -2
- package/es/lib/hooks/useActionListRef.js +1 -1
- package/es/lib/hooks/useActiveElement.js +1 -1
- package/es/lib/hooks/useCustomProperties.js +6 -10
- package/es/lib/hooks/useHelperApp.js +13 -16
- package/es/lib/hooks/useKiwtFieldArray.js +7 -8
- package/es/lib/hooks/useKiwtSASQuery.js +15 -19
- package/es/lib/hooks/useLocalPageStore.js +7 -10
- package/es/lib/hooks/useModConfigEntries.js +2 -2
- package/es/lib/hooks/useMutateCustomProperties/useMutateCustomProperties.js +10 -17
- package/es/lib/hooks/useMutateGeneric/useMutateGeneric.js +2 -2
- package/es/lib/hooks/useMutateModConfigEntry.js +2 -2
- package/es/lib/hooks/useMutateRefdataCategory/useMutateRefdataCategory.js +15 -21
- package/es/lib/hooks/useMutateRefdataValue/useMutateRefdataValue.js +16 -23
- package/es/lib/hooks/usePrevNextPagination.js +17 -19
- package/es/lib/hooks/useQIndex.js +11 -14
- package/es/lib/hooks/useRefdata.js +3 -3
- package/es/lib/hooks/useStandaloneSASQQueryParameter/useStandaloneSASQQueryParameter.js +9 -13
- package/es/lib/hooks/useTemplates.js +4 -4
- package/es/lib/utils/buildUrl.js +2 -3
- package/es/lib/utils/filterParsers/deparseKiwtQueryFilters.js +5 -5
- 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/generateKiwtQueryParams.js +94 -107
- package/es/lib/utils/groupCustomPropertiesByCtx.js +5 -9
- package/es/lib/utils/matchString.js +5 -7
- package/es/lib/utils/parseErrorResponse.js +3 -7
- package/es/lib/utils/selectorSafe.js +2 -3
- package/es/lib/utils/sortByLabel.js +2 -3
- package/es/lib/validators/validators.js +6 -9
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/ActionList/ActionList.js.html +1 -1
- package/src/artifacts/coverage-jest/ActionList/ActionListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/ActionList/index.html +1 -1
- package/src/artifacts/coverage-jest/ActionList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/ButtonTypedown/ButtonTypedown.js.html +241 -0
- package/src/artifacts/coverage-jest/ButtonTypedown/index.html +131 -0
- package/src/artifacts/coverage-jest/ButtonTypedown/index.js.html +88 -0
- package/src/artifacts/coverage-jest/ComboButton/ComboButton.js.html +1 -1
- package/src/artifacts/coverage-jest/ComboButton/index.html +1 -1
- package/src/artifacts/coverage-jest/ComboButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyView.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Config/index.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyField.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/index.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/index.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilter.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/index.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/useOperators.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/useValueProps.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesView.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesViewCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertyCard.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/View/index.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/View/index.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/View/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/CycleButton/CycleButton.js.html +1 -1
- package/src/artifacts/coverage-jest/CycleButton/index.html +1 -1
- package/src/artifacts/coverage-jest/CycleButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/FieldLabel/FieldLabel.js.html +1 -1
- package/src/artifacts/coverage-jest/FieldLabel/index.html +1 -1
- package/src/artifacts/coverage-jest/FieldLabel/index.js.html +1 -1
- package/src/artifacts/coverage-jest/FormModal/FormModal.js.html +1 -1
- package/src/artifacts/coverage-jest/FormModal/index.html +1 -1
- package/src/artifacts/coverage-jest/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/FormattedKintMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/FormattedKintMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/IconSelect/IconSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/IconSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/IconSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/NoResultsMessage/NoResultsMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/NumberField/NumberField.js.html +1 -1
- package/src/artifacts/coverage-jest/NumberField/index.html +1 -1
- package/src/artifacts/coverage-jest/NumberField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/RefdataButtons/RefdataButtons.js.html +1 -1
- package/src/artifacts/coverage-jest/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +1 -1
- package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.html +1 -1
- package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.js.html +1 -1
- package/src/artifacts/coverage-jest/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +1 -1
- package/src/artifacts/coverage-jest/RichSelect/RichSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/RichSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/RichSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/RichSelect/useSelectedOption.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQLookupComponent/SASQLookupComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.html +1 -1
- package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQLookupComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQRoute/SASQRoute.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQRoute/index.html +1 -1
- package/src/artifacts/coverage-jest/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQViewComponent/SASQViewComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQViewComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SearchKeyControl/SearchKeyControl.js.html +1 -1
- package/src/artifacts/coverage-jest/SearchKeyControl/index.html +1 -1
- package/src/artifacts/coverage-jest/SearchKeyControl/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableRefdataList/EditableRefdataList.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsList.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/EditSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/RenderSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/SettingField.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/RefdataCategoriesSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPage.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingPage/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/SettingsFormContainer.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsField.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/StaticSettingsFieldComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/constants/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/constants/queryKeys.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/contexts/SettingsContext.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/contexts/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/contexts/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/useSettingCallout.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/useSettingsSectionInitalValues.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useStaticSettingsSection.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/useAppSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/useSettingSection.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useSettings/useSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Tags/Tags.js.html +1 -1
- package/src/artifacts/coverage-jest/Tags/hooks/index.html +15 -15
- package/src/artifacts/coverage-jest/Tags/hooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Tags/hooks/useTags.js.html +1 -1
- package/src/artifacts/coverage-jest/Tags/hooks/useTagsEnabled.js.html +150 -12
- package/src/artifacts/coverage-jest/Tags/index.html +1 -1
- package/src/artifacts/coverage-jest/Tags/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Tags/tagsConfig.js.html +1 -1
- package/src/artifacts/coverage-jest/Typedown/Typedown.js.html +219 -60
- package/src/artifacts/coverage-jest/Typedown/index.html +15 -15
- package/src/artifacts/coverage-jest/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/cobertura-coverage.xml +220 -110
- package/src/artifacts/coverage-jest/constants/comparators.js.html +1 -1
- package/src/artifacts/coverage-jest/constants/customProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/constants/endpoints.js.html +23 -5
- package/src/artifacts/coverage-jest/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/constants/index.html +5 -5
- package/src/artifacts/coverage-jest/constants/pagination.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/useIntlKey.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/useKintIntl.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/typedownHooks/index.html +14 -14
- package/src/artifacts/coverage-jest/hooks/typedownHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedown.js.html +170 -116
- package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownData.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useActionListRef.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useActiveElement.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useHelperApp.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/useInvalidateRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useKiwtFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useKiwtSASQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useLocalPageStore.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useLocalStorageState.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useModConfigEntries.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/useMutateCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateGeneric/useMutateGeneric.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateModConfigEntry.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/useMutateRefdataCategory.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/useMutateRefdataValue.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/usePrevNextPagination.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useQIndex.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useSASQQueryMeta.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/useStandaloneSASQQueryParameter.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useTemplates.js.html +1 -1
- package/src/artifacts/coverage-jest/index.html +50 -35
- package/src/artifacts/coverage-jest/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/filterParsers/deparseKiwtQueryFilters.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/filterParsers/index.html +1 -1
- package/src/artifacts/coverage-jest/utils/filterParsers/index.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryFilters.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryGroups.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryString.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/generateKiwtQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/generateKiwtQueryParams.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.html +1 -1
- package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/groupCustomPropertiesByCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/highlightString.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/index.html +1 -1
- package/src/artifacts/coverage-jest/utils/index.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/matchString.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/modConfigEntriesQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/parseErrorResponse.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/parseModConfigEntry.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.html +1 -1
- package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/refdataQueryKey/refdataQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/selectorSafe.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/sortByLabel.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/toCamelCase.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/typedownQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/validators/index.html +1 -1
- package/src/artifacts/coverage-jest/validators/index.js.html +1 -1
- package/src/artifacts/coverage-jest/validators/validators.js.html +1 -1
- package/src/index.js +4 -0
- package/src/lib/ButtonTypedown/ButtonTypedown.js +52 -0
- package/src/lib/ButtonTypedown/README.md +53 -0
- package/src/lib/ButtonTypedown/index.js +1 -0
- package/src/lib/Tags/hooks/useTagsEnabled.js +51 -5
- package/src/lib/Typedown/README.md +24 -21
- package/src/lib/Typedown/Typedown.js +101 -48
- package/src/lib/constants/endpoints.js +7 -1
- package/src/lib/hooks/typedownHooks/useTypedown.js +105 -87
- package/styles/TypeDown.css +4 -0
|
@@ -13,11 +13,6 @@ var _hooks = require("../../hooks");
|
|
|
13
13
|
var _CustomProperties = _interopRequireDefault(require("../../../../styles/CustomProperties.css"));
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
19
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
20
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
16
|
const CustomPropertiesLookup = _ref => {
|
|
22
17
|
let {
|
|
23
18
|
contextFilterOptions,
|
|
@@ -52,9 +47,10 @@ const CustomPropertiesLookup = _ref => {
|
|
|
52
47
|
}
|
|
53
48
|
});
|
|
54
49
|
const handleSearch = query => {
|
|
55
|
-
setNsValues(
|
|
50
|
+
setNsValues({
|
|
51
|
+
...nsValues,
|
|
56
52
|
query
|
|
57
|
-
})
|
|
53
|
+
});
|
|
58
54
|
};
|
|
59
55
|
const [searchTerm, setSearchTerm] = (0, _react.useState)('');
|
|
60
56
|
const kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
|
|
@@ -107,7 +103,7 @@ const CustomPropertiesLookup = _ref => {
|
|
|
107
103
|
value: selectedContext
|
|
108
104
|
})
|
|
109
105
|
})
|
|
110
|
-
}), isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Spinner, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList,
|
|
106
|
+
}), isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Spinner, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList, {
|
|
111
107
|
columnMapping: {
|
|
112
108
|
'label': kintIntl.formatKintMessage({
|
|
113
109
|
id: 'customProperties.label',
|
|
@@ -137,7 +133,7 @@ const CustomPropertiesLookup = _ref => {
|
|
|
137
133
|
contentData: custprops,
|
|
138
134
|
formatter: {
|
|
139
135
|
primary: data => {
|
|
140
|
-
if (data
|
|
136
|
+
if (data?.primary) {
|
|
141
137
|
return kintIntl.formatKintMessage({
|
|
142
138
|
id: 'yes',
|
|
143
139
|
overrideValue: labelOverrides.yes
|
|
@@ -150,17 +146,15 @@ const CustomPropertiesLookup = _ref => {
|
|
|
150
146
|
}
|
|
151
147
|
},
|
|
152
148
|
type: data => kintIntl.formatKintMessage({
|
|
153
|
-
id:
|
|
154
|
-
overrideValue: labelOverrides
|
|
149
|
+
id: `customProperties.type.${data?.type}`,
|
|
150
|
+
overrideValue: labelOverrides?.[data?.type]
|
|
155
151
|
}),
|
|
156
|
-
category: data =>
|
|
157
|
-
var _data$category;
|
|
158
|
-
return data === null || data === void 0 || (_data$category = data.category) === null || _data$category === void 0 ? void 0 : _data$category.desc;
|
|
159
|
-
}
|
|
152
|
+
category: data => data?.category?.desc
|
|
160
153
|
},
|
|
161
154
|
onRowClick: onSelectCustomProperty,
|
|
162
|
-
visibleColumns: ['label', 'primary', 'ctx', 'weight', 'type', 'category']
|
|
163
|
-
|
|
155
|
+
visibleColumns: ['label', 'primary', 'ctx', 'weight', 'type', 'category'],
|
|
156
|
+
...mclProps
|
|
157
|
+
})]
|
|
164
158
|
});
|
|
165
159
|
};
|
|
166
160
|
CustomPropertiesLookup.propTypes = {
|
|
@@ -18,18 +18,12 @@ var _hooks = require("../../hooks");
|
|
|
18
18
|
var _utils = require("../../utils");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
20
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
24
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
25
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
26
21
|
const EDITING = 'edit';
|
|
27
22
|
const CREATING = 'create';
|
|
28
23
|
const VIEWING = 'view';
|
|
29
24
|
|
|
30
25
|
// A default option for setting up panes manually
|
|
31
26
|
const CustomPropertiesSettings = _ref => {
|
|
32
|
-
var _customProperty$label, _customProperty$label2, _customProperty$categ, _customProperty$label3, _customProperty$label4;
|
|
33
27
|
let {
|
|
34
28
|
afterQueryCalls,
|
|
35
29
|
catchQueryCalls,
|
|
@@ -74,7 +68,7 @@ const CustomPropertiesSettings = _ref => {
|
|
|
74
68
|
// empty string is all custoprop contexts
|
|
75
69
|
label: kintIntl.formatKintMessage({
|
|
76
70
|
id: 'customProperties.config.all',
|
|
77
|
-
overrideValue: labelOverrides
|
|
71
|
+
overrideValue: labelOverrides?.all
|
|
78
72
|
})
|
|
79
73
|
}];
|
|
80
74
|
}
|
|
@@ -91,7 +85,7 @@ const CustomPropertiesSettings = _ref => {
|
|
|
91
85
|
setMode(VIEWING);
|
|
92
86
|
queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
|
|
93
87
|
setCustomProperty(res);
|
|
94
|
-
if (afterQueryCalls
|
|
88
|
+
if (afterQueryCalls?.put) {
|
|
95
89
|
afterQueryCalls.put(res);
|
|
96
90
|
}
|
|
97
91
|
},
|
|
@@ -99,7 +93,7 @@ const CustomPropertiesSettings = _ref => {
|
|
|
99
93
|
setMode(VIEWING);
|
|
100
94
|
queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
|
|
101
95
|
setCustomProperty(res);
|
|
102
|
-
if (afterQueryCalls
|
|
96
|
+
if (afterQueryCalls?.post) {
|
|
103
97
|
afterQueryCalls.post(res);
|
|
104
98
|
}
|
|
105
99
|
},
|
|
@@ -107,12 +101,12 @@ const CustomPropertiesSettings = _ref => {
|
|
|
107
101
|
setMode(VIEWING);
|
|
108
102
|
queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
|
|
109
103
|
setCustomProperty();
|
|
110
|
-
if (afterQueryCalls
|
|
104
|
+
if (afterQueryCalls?.delete) {
|
|
111
105
|
afterQueryCalls.delete(res);
|
|
112
106
|
}
|
|
113
107
|
}
|
|
114
108
|
},
|
|
115
|
-
catchQueryCalls:
|
|
109
|
+
catchQueryCalls: {
|
|
116
110
|
// Default delete behaviour is to fire a callout, either with kint-components default message
|
|
117
111
|
// or one provided in labelOverrides, which is passed the error message and customProperty in question
|
|
118
112
|
delete: async err => {
|
|
@@ -120,34 +114,35 @@ const CustomPropertiesSettings = _ref => {
|
|
|
120
114
|
callout.sendCallout({
|
|
121
115
|
message: kintIntl.formatKintMessage({
|
|
122
116
|
id: 'customProperties.config.delete.errorMessage',
|
|
123
|
-
overrideValue: labelOverrides
|
|
117
|
+
overrideValue: labelOverrides?.deleteError
|
|
124
118
|
}, {
|
|
125
|
-
error: errorResp
|
|
126
|
-
label: customProperty
|
|
119
|
+
error: errorResp?.message,
|
|
120
|
+
label: customProperty?.label
|
|
127
121
|
}),
|
|
128
122
|
type: 'error'
|
|
129
123
|
});
|
|
130
|
-
}
|
|
131
|
-
|
|
124
|
+
},
|
|
125
|
+
...catchQueryCalls // Override defaults here
|
|
126
|
+
},
|
|
132
127
|
endpoint: customPropertiesEndpoint,
|
|
133
|
-
id: customProperty
|
|
128
|
+
id: customProperty?.id
|
|
134
129
|
});
|
|
135
130
|
const handeContextSubmit = submitData => {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
ctx:
|
|
139
|
-
}
|
|
131
|
+
return {
|
|
132
|
+
...submitData,
|
|
133
|
+
ctx: submitData?.ctx?.[0]?.value ?? ''
|
|
134
|
+
};
|
|
140
135
|
};
|
|
141
136
|
|
|
142
137
|
// When POSTing a custom property, the backend expects a shorthand "Integer" or "LocalDate"
|
|
143
138
|
// When PUTing a custom property, the backend needs the full class name
|
|
144
139
|
const handleType = submitData => {
|
|
145
|
-
var _typeRegex$exec;
|
|
146
140
|
const typeRegex = /(com\.k_int\.web\.toolkit\.custprops\.types\.CustomProperty)(.*)/g;
|
|
147
|
-
const typeMatch =
|
|
148
|
-
return
|
|
141
|
+
const typeMatch = typeRegex.exec(submitData?.type) ?? [];
|
|
142
|
+
return {
|
|
143
|
+
...submitData,
|
|
149
144
|
type: typeMatch[2]
|
|
150
|
-
}
|
|
145
|
+
};
|
|
151
146
|
};
|
|
152
147
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
153
148
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Pane, {
|
|
@@ -160,7 +155,7 @@ const CustomPropertiesSettings = _ref => {
|
|
|
160
155
|
,
|
|
161
156
|
children: kintIntl.formatKintMessage({
|
|
162
157
|
id: 'new',
|
|
163
|
-
overrideValue: labelOverrides
|
|
158
|
+
overrideValue: labelOverrides?.new
|
|
164
159
|
})
|
|
165
160
|
}),
|
|
166
161
|
paneTitle: kintIntl.formatKintMessage({
|
|
@@ -190,10 +185,10 @@ const CustomPropertiesSettings = _ref => {
|
|
|
190
185
|
icon: "edit",
|
|
191
186
|
children: kintIntl.formatKintMessage({
|
|
192
187
|
id: 'edit',
|
|
193
|
-
overrideValue: labelOverrides
|
|
188
|
+
overrideValue: labelOverrides?.edit
|
|
194
189
|
})
|
|
195
190
|
})
|
|
196
|
-
},
|
|
191
|
+
}, `${customProperty.name}-action-edit`));
|
|
197
192
|
}
|
|
198
193
|
if (deleteCondition) {
|
|
199
194
|
actionsArray.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
@@ -207,12 +202,12 @@ const CustomPropertiesSettings = _ref => {
|
|
|
207
202
|
icon: "trash",
|
|
208
203
|
children: kintIntl.formatKintMessage({
|
|
209
204
|
id: 'delete',
|
|
210
|
-
overrideValue: labelOverrides
|
|
205
|
+
overrideValue: labelOverrides?.delete
|
|
211
206
|
})
|
|
212
207
|
})
|
|
213
|
-
},
|
|
208
|
+
}, `${customProperty.name}-action-delete`));
|
|
214
209
|
}
|
|
215
|
-
return actionsArray
|
|
210
|
+
return actionsArray?.length ? actionsArray : null;
|
|
216
211
|
},
|
|
217
212
|
defaultWidth: "fill",
|
|
218
213
|
dismissible: true,
|
|
@@ -220,10 +215,10 @@ const CustomPropertiesSettings = _ref => {
|
|
|
220
215
|
onClose: () => setCustomProperty(),
|
|
221
216
|
paneTitle: kintIntl.formatKintMessage({
|
|
222
217
|
id: 'customProperties.config.viewPaneTitle',
|
|
223
|
-
overrideValue: labelOverrides
|
|
224
|
-
fallbackMessage:
|
|
218
|
+
overrideValue: labelOverrides?.viewPaneTitle,
|
|
219
|
+
fallbackMessage: customProperty?.label ?? customProperty?.name
|
|
225
220
|
}, {
|
|
226
|
-
name:
|
|
221
|
+
name: customProperty?.label ?? customProperty?.name
|
|
227
222
|
}),
|
|
228
223
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertyView.default, {
|
|
229
224
|
customProperty: customProperty,
|
|
@@ -238,23 +233,24 @@ const CustomPropertiesSettings = _ref => {
|
|
|
238
233
|
primary: true,
|
|
239
234
|
retired: false,
|
|
240
235
|
defaultInternal: true
|
|
241
|
-
} :
|
|
242
|
-
|
|
236
|
+
} : {
|
|
237
|
+
...customProperty,
|
|
238
|
+
ctx: customProperty?.ctx ? [{
|
|
243
239
|
value: customProperty.ctx,
|
|
244
240
|
label: customProperty.ctx
|
|
245
241
|
}] : null,
|
|
246
|
-
category: customProperty
|
|
247
|
-
}
|
|
242
|
+
category: customProperty?.category ? customProperty?.category?.id : null
|
|
243
|
+
},
|
|
248
244
|
modalProps: {
|
|
249
245
|
dismissible: true,
|
|
250
246
|
label: mode === CREATING ? kintIntl.formatKintMessage({
|
|
251
247
|
id: 'customProperties.config.newModal',
|
|
252
|
-
overrideValue: labelOverrides
|
|
248
|
+
overrideValue: labelOverrides?.newModalTitle
|
|
253
249
|
}) : kintIntl.formatKintMessage({
|
|
254
250
|
id: 'customProperties.config.editModal',
|
|
255
|
-
overrideValue: labelOverrides
|
|
251
|
+
overrideValue: labelOverrides?.editModalTitle
|
|
256
252
|
}, {
|
|
257
|
-
name:
|
|
253
|
+
name: customProperty?.label ?? customProperty?.name
|
|
258
254
|
}),
|
|
259
255
|
onClose: () => setMode(VIEWING),
|
|
260
256
|
open: mode === CREATING || mode === EDITING
|
|
@@ -275,22 +271,22 @@ const CustomPropertiesSettings = _ref => {
|
|
|
275
271
|
buttonStyle: "danger",
|
|
276
272
|
confirmLabel: kintIntl.formatKintMessage({
|
|
277
273
|
id: 'delete',
|
|
278
|
-
overrideValue: labelOverrides
|
|
274
|
+
overrideValue: labelOverrides?.delete
|
|
279
275
|
}),
|
|
280
276
|
heading: kintIntl.formatKintMessage({
|
|
281
277
|
id: 'customProperties.config.delete.confirmHeading',
|
|
282
|
-
overrideValue: labelOverrides
|
|
278
|
+
overrideValue: labelOverrides?.confirmHeading
|
|
283
279
|
}),
|
|
284
280
|
id: "delete-custprop-confirmation",
|
|
285
281
|
message: kintIntl.formatKintMessage({
|
|
286
282
|
id: 'customProperties.config.delete.confirmMessage',
|
|
287
|
-
overrideValue: labelOverrides
|
|
283
|
+
overrideValue: labelOverrides?.confirmMessage
|
|
288
284
|
}, {
|
|
289
|
-
name:
|
|
285
|
+
name: customProperty?.label ?? customProperty?.name
|
|
290
286
|
}),
|
|
291
287
|
onCancel: () => setDeleteModal(false),
|
|
292
288
|
onConfirm: () => {
|
|
293
|
-
deleteCustProp(customProperty
|
|
289
|
+
deleteCustProp(customProperty?.id);
|
|
294
290
|
setCustomProperty();
|
|
295
291
|
setDeleteModal(false);
|
|
296
292
|
},
|
|
@@ -30,9 +30,9 @@ const CustomPropertyForm = _ref => {
|
|
|
30
30
|
change
|
|
31
31
|
} = (0, _reactFinalForm.useForm)();
|
|
32
32
|
const kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
|
|
33
|
-
const booleanToString = booleanValue => booleanValue
|
|
33
|
+
const booleanToString = booleanValue => booleanValue?.toString();
|
|
34
34
|
const stringToBoolean = stringValue => stringValue === 'true';
|
|
35
|
-
const [contextOptions, setContextOptions] = (0, _react.useState)(contextFilterOptions
|
|
35
|
+
const [contextOptions, setContextOptions] = (0, _react.useState)(contextFilterOptions?.filter(ctx => ctx.value !== '' && ctx?.value !== 'isNull'));
|
|
36
36
|
const addCtx = _ref2 => {
|
|
37
37
|
let {
|
|
38
38
|
_r,
|
|
@@ -56,7 +56,7 @@ const CustomPropertyForm = _ref => {
|
|
|
56
56
|
} else {
|
|
57
57
|
return kintIntl.formatKintMessage({
|
|
58
58
|
id: 'customProperties.ctx.addContext',
|
|
59
|
-
overrideValue: labelOverrides
|
|
59
|
+
overrideValue: labelOverrides?.addCtx
|
|
60
60
|
}, {
|
|
61
61
|
value: filterValue
|
|
62
62
|
});
|
|
@@ -66,7 +66,7 @@ const CustomPropertyForm = _ref => {
|
|
|
66
66
|
if (allValues.primary && allValues.retired) {
|
|
67
67
|
return kintIntl.formatKintMessage({
|
|
68
68
|
id: 'customProperties.errors.primaryRetired',
|
|
69
|
-
overrideValue: labelOverrides
|
|
69
|
+
overrideValue: labelOverrides?.primaryRetired
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
return null;
|
|
@@ -82,48 +82,48 @@ const CustomPropertyForm = _ref => {
|
|
|
82
82
|
value: ''
|
|
83
83
|
}, {
|
|
84
84
|
label: kintIntl.formatKintMessage({
|
|
85
|
-
id:
|
|
86
|
-
overrideValue: labelOverrides
|
|
85
|
+
id: `customProperties.type.${_customProperties.DECIMAL_CLASS_NAME}`,
|
|
86
|
+
overrideValue: labelOverrides?.[_customProperties.DECIMAL_CLASS_NAME]
|
|
87
87
|
}),
|
|
88
88
|
value: _customProperties.DECIMAL_CLASS_NAME
|
|
89
89
|
}, {
|
|
90
90
|
label: kintIntl.formatKintMessage({
|
|
91
|
-
id:
|
|
92
|
-
overrideValue: labelOverrides
|
|
91
|
+
id: `customProperties.type.${_customProperties.INTEGER_CLASS_NAME}`,
|
|
92
|
+
overrideValue: labelOverrides?.[_customProperties.INTEGER_CLASS_NAME]
|
|
93
93
|
}),
|
|
94
94
|
value: _customProperties.INTEGER_CLASS_NAME
|
|
95
95
|
}, {
|
|
96
96
|
label: kintIntl.formatKintMessage({
|
|
97
|
-
id:
|
|
98
|
-
overrideValue: labelOverrides
|
|
97
|
+
id: `customProperties.type.${_customProperties.TEXT_CLASS_NAME}`,
|
|
98
|
+
overrideValue: labelOverrides?.[_customProperties.TEXT_CLASS_NAME]
|
|
99
99
|
}),
|
|
100
100
|
value: _customProperties.TEXT_CLASS_NAME
|
|
101
101
|
}, {
|
|
102
102
|
label: kintIntl.formatKintMessage({
|
|
103
|
-
id:
|
|
104
|
-
overrideValue: labelOverrides
|
|
103
|
+
id: `customProperties.type.${_customProperties.REFDATA_CLASS_NAME}`,
|
|
104
|
+
overrideValue: labelOverrides?.[_customProperties.REFDATA_CLASS_NAME]
|
|
105
105
|
}),
|
|
106
106
|
value: _customProperties.REFDATA_CLASS_NAME
|
|
107
107
|
}, {
|
|
108
108
|
label: kintIntl.formatKintMessage({
|
|
109
|
-
id:
|
|
110
|
-
overrideValue: labelOverrides
|
|
109
|
+
id: `customProperties.type.${_customProperties.MULTI_REFDATA_CLASS_NAME}`,
|
|
110
|
+
overrideValue: labelOverrides?.[_customProperties.MULTI_REFDATA_CLASS_NAME]
|
|
111
111
|
}),
|
|
112
112
|
value: _customProperties.MULTI_REFDATA_CLASS_NAME
|
|
113
113
|
}, {
|
|
114
114
|
label: kintIntl.formatKintMessage({
|
|
115
|
-
id:
|
|
116
|
-
overrideValue: labelOverrides
|
|
115
|
+
id: `customProperties.type.${_customProperties.DATE_CLASS_NAME}`,
|
|
116
|
+
overrideValue: labelOverrides?.[_customProperties.DATE_CLASS_NAME]
|
|
117
117
|
}),
|
|
118
118
|
value: _customProperties.DATE_CLASS_NAME
|
|
119
119
|
}],
|
|
120
|
-
disabled: !!
|
|
120
|
+
disabled: !!values?.id,
|
|
121
121
|
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
122
122
|
children: [kintIntl.formatKintMessage({
|
|
123
123
|
id: 'customProperties.type',
|
|
124
|
-
overrideValue: labelOverrides
|
|
125
|
-
}), helpPopovers
|
|
126
|
-
content: helpPopovers
|
|
124
|
+
overrideValue: labelOverrides?.type
|
|
125
|
+
}), helpPopovers?.type ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
|
|
126
|
+
content: helpPopovers?.type
|
|
127
127
|
}) : null]
|
|
128
128
|
}),
|
|
129
129
|
name: "type",
|
|
@@ -132,19 +132,19 @@ const CustomPropertyForm = _ref => {
|
|
|
132
132
|
})
|
|
133
133
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
|
|
134
134
|
xs: 6,
|
|
135
|
-
children: (
|
|
135
|
+
children: (values?.type === _customProperties.REFDATA_CLASS_NAME || values?.type === _customProperties.MULTI_REFDATA_CLASS_NAME) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
|
|
136
136
|
component: _components.Select,
|
|
137
137
|
dataOptions: [{
|
|
138
138
|
label: '',
|
|
139
139
|
value: ''
|
|
140
140
|
}, ...refdata],
|
|
141
|
-
disabled: !!
|
|
141
|
+
disabled: !!values?.id,
|
|
142
142
|
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
143
143
|
children: [kintIntl.formatKintMessage({
|
|
144
144
|
id: 'customProperties.category',
|
|
145
|
-
overrideValue: labelOverrides
|
|
146
|
-
}), helpPopovers
|
|
147
|
-
content: helpPopovers
|
|
145
|
+
overrideValue: labelOverrides?.category
|
|
146
|
+
}), helpPopovers?.category ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
|
|
147
|
+
content: helpPopovers?.category
|
|
148
148
|
}) : null]
|
|
149
149
|
}),
|
|
150
150
|
name: "category",
|
|
@@ -161,9 +161,9 @@ const CustomPropertyForm = _ref => {
|
|
|
161
161
|
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
162
162
|
children: [kintIntl.formatKintMessage({
|
|
163
163
|
id: 'customProperties.label',
|
|
164
|
-
overrideValue: labelOverrides
|
|
165
|
-
}), helpPopovers
|
|
166
|
-
content: helpPopovers
|
|
164
|
+
overrideValue: labelOverrides?.label
|
|
165
|
+
}), helpPopovers?.label ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
|
|
166
|
+
content: helpPopovers?.label
|
|
167
167
|
}) : null]
|
|
168
168
|
}),
|
|
169
169
|
name: "label",
|
|
@@ -178,9 +178,9 @@ const CustomPropertyForm = _ref => {
|
|
|
178
178
|
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
179
179
|
children: [kintIntl.formatKintMessage({
|
|
180
180
|
id: 'customProperties.name',
|
|
181
|
-
overrideValue: labelOverrides
|
|
182
|
-
}), helpPopovers
|
|
183
|
-
content: helpPopovers
|
|
181
|
+
overrideValue: labelOverrides?.name
|
|
182
|
+
}), helpPopovers?.name ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
|
|
183
|
+
content: helpPopovers?.name
|
|
184
184
|
}) : null]
|
|
185
185
|
}),
|
|
186
186
|
name: "name",
|
|
@@ -189,7 +189,7 @@ const CustomPropertyForm = _ref => {
|
|
|
189
189
|
if (v && v.length) {
|
|
190
190
|
return /^[a-z][a-z0-9]*$/i.test(v) ? undefined : kintIntl.formatKintMessage({
|
|
191
191
|
id: 'errors.hasNonAlphaName',
|
|
192
|
-
overrideValue: labelOverrides
|
|
192
|
+
overrideValue: labelOverrides?.hasNonAlphaName
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
195
|
return (0, _validators.required)(v);
|
|
@@ -205,9 +205,9 @@ const CustomPropertyForm = _ref => {
|
|
|
205
205
|
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
206
206
|
children: [kintIntl.formatKintMessage({
|
|
207
207
|
id: 'customProperties.description',
|
|
208
|
-
overrideValue: labelOverrides
|
|
209
|
-
}), helpPopovers
|
|
210
|
-
content: helpPopovers
|
|
208
|
+
overrideValue: labelOverrides?.description
|
|
209
|
+
}), helpPopovers?.description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
|
|
210
|
+
content: helpPopovers?.description
|
|
211
211
|
}) : null]
|
|
212
212
|
}),
|
|
213
213
|
name: "description",
|
|
@@ -227,20 +227,20 @@ const CustomPropertyForm = _ref => {
|
|
|
227
227
|
dataOptions: contextOptions,
|
|
228
228
|
emptyMessage: kintIntl.formatKintMessage({
|
|
229
229
|
id: 'customProperties.noCtxFound',
|
|
230
|
-
overrideValue: labelOverrides
|
|
230
|
+
overrideValue: labelOverrides?.noCtxFound
|
|
231
231
|
}),
|
|
232
232
|
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
233
233
|
children: [kintIntl.formatKintMessage({
|
|
234
234
|
id: 'customProperties.ctx',
|
|
235
|
-
overrideValue: labelOverrides
|
|
236
|
-
}), helpPopovers
|
|
237
|
-
content: helpPopovers
|
|
235
|
+
overrideValue: labelOverrides?.ctx
|
|
236
|
+
}), helpPopovers?.ctx ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
|
|
237
|
+
content: helpPopovers?.ctx
|
|
238
238
|
}) : null]
|
|
239
239
|
}),
|
|
240
240
|
name: "ctx",
|
|
241
241
|
onChange: selectedItems => {
|
|
242
242
|
if (selectedItems.length) {
|
|
243
|
-
change('ctx', [selectedItems
|
|
243
|
+
change('ctx', [selectedItems?.[selectedItems?.length - 1]]);
|
|
244
244
|
} else {
|
|
245
245
|
change('ctx', undefined);
|
|
246
246
|
}
|
|
@@ -256,9 +256,9 @@ const CustomPropertyForm = _ref => {
|
|
|
256
256
|
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
257
257
|
children: [kintIntl.formatKintMessage({
|
|
258
258
|
id: 'customProperties.weight',
|
|
259
|
-
overrideValue: labelOverrides
|
|
260
|
-
}), helpPopovers
|
|
261
|
-
content: helpPopovers
|
|
259
|
+
overrideValue: labelOverrides?.weight
|
|
260
|
+
}), helpPopovers?.weight ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
|
|
261
|
+
content: helpPopovers?.weight
|
|
262
262
|
}) : null]
|
|
263
263
|
}),
|
|
264
264
|
name: "weight",
|
|
@@ -272,13 +272,13 @@ const CustomPropertyForm = _ref => {
|
|
|
272
272
|
dataOptions: [{
|
|
273
273
|
label: kintIntl.formatKintMessage({
|
|
274
274
|
id: 'yes',
|
|
275
|
-
overrideValue: labelOverrides
|
|
275
|
+
overrideValue: labelOverrides?.yes
|
|
276
276
|
}),
|
|
277
277
|
value: 'true'
|
|
278
278
|
}, {
|
|
279
279
|
label: kintIntl.formatKintMessage({
|
|
280
280
|
id: 'no',
|
|
281
|
-
overrideValue: labelOverrides
|
|
281
|
+
overrideValue: labelOverrides?.no
|
|
282
282
|
}),
|
|
283
283
|
value: 'false'
|
|
284
284
|
}],
|
|
@@ -286,9 +286,9 @@ const CustomPropertyForm = _ref => {
|
|
|
286
286
|
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
287
287
|
children: [kintIntl.formatKintMessage({
|
|
288
288
|
id: 'customProperties.primary',
|
|
289
|
-
overrideValue: labelOverrides
|
|
290
|
-
}), helpPopovers
|
|
291
|
-
content: helpPopovers
|
|
289
|
+
overrideValue: labelOverrides?.primary
|
|
290
|
+
}), helpPopovers?.primary ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
|
|
291
|
+
content: helpPopovers?.primary
|
|
292
292
|
}) : null]
|
|
293
293
|
}),
|
|
294
294
|
name: "primary",
|
|
@@ -303,13 +303,13 @@ const CustomPropertyForm = _ref => {
|
|
|
303
303
|
dataOptions: [{
|
|
304
304
|
label: kintIntl.formatKintMessage({
|
|
305
305
|
id: 'yes',
|
|
306
|
-
overrideValue: labelOverrides
|
|
306
|
+
overrideValue: labelOverrides?.yes
|
|
307
307
|
}),
|
|
308
308
|
value: 'true'
|
|
309
309
|
}, {
|
|
310
310
|
label: kintIntl.formatKintMessage({
|
|
311
311
|
id: 'no',
|
|
312
|
-
overrideValue: labelOverrides
|
|
312
|
+
overrideValue: labelOverrides?.no
|
|
313
313
|
}),
|
|
314
314
|
value: 'false'
|
|
315
315
|
}],
|
|
@@ -317,9 +317,9 @@ const CustomPropertyForm = _ref => {
|
|
|
317
317
|
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
318
318
|
children: [kintIntl.formatKintMessage({
|
|
319
319
|
id: 'customProperties.retired',
|
|
320
|
-
overrideValue: labelOverrides
|
|
321
|
-
}), helpPopovers
|
|
322
|
-
content: helpPopovers
|
|
320
|
+
overrideValue: labelOverrides?.retired
|
|
321
|
+
}), helpPopovers?.retired ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
|
|
322
|
+
content: helpPopovers?.retired
|
|
323
323
|
}) : null]
|
|
324
324
|
}),
|
|
325
325
|
name: "retired",
|
|
@@ -334,13 +334,13 @@ const CustomPropertyForm = _ref => {
|
|
|
334
334
|
dataOptions: [{
|
|
335
335
|
label: kintIntl.formatKintMessage({
|
|
336
336
|
id: 'customProperties.internalTrue',
|
|
337
|
-
overrideValue: labelOverrides
|
|
337
|
+
overrideValue: labelOverrides?.internalTrue
|
|
338
338
|
}),
|
|
339
339
|
value: 'true'
|
|
340
340
|
}, {
|
|
341
341
|
label: kintIntl.formatKintMessage({
|
|
342
342
|
id: 'customProperties.internalFalse',
|
|
343
|
-
overrideValue: labelOverrides
|
|
343
|
+
overrideValue: labelOverrides?.internalFalse
|
|
344
344
|
}),
|
|
345
345
|
value: 'false'
|
|
346
346
|
}],
|
|
@@ -348,9 +348,9 @@ const CustomPropertyForm = _ref => {
|
|
|
348
348
|
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
349
349
|
children: [kintIntl.formatKintMessage({
|
|
350
350
|
id: 'customProperties.defaultVisibility',
|
|
351
|
-
overrideValue: labelOverrides
|
|
352
|
-
}), helpPopovers
|
|
353
|
-
content: helpPopovers
|
|
351
|
+
overrideValue: labelOverrides?.defaultVisibility
|
|
352
|
+
}), helpPopovers?.defaultVisibility ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
|
|
353
|
+
content: helpPopovers?.defaultVisibility
|
|
354
354
|
}) : null]
|
|
355
355
|
}),
|
|
356
356
|
name: "defaultInternal",
|
|
@@ -8,19 +8,15 @@ var _customProperties = _interopRequireDefault(require("../../../../test/jest/cu
|
|
|
8
8
|
var _jest = require("../../../../test/jest");
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
15
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
|
-
const initialValues = _objectSpread(_objectSpread({}, _customProperties.default === null || _customProperties.default === void 0 ? void 0 : _customProperties.default.find(cp => cp.name === 'test')), {}, {
|
|
11
|
+
const initialValues = {
|
|
12
|
+
..._customProperties.default?.find(cp => cp.name === 'test'),
|
|
17
13
|
// Just massage the type/ctx value to be of the shape the form expects
|
|
18
14
|
type: 'Decimal',
|
|
19
15
|
ctx: [{
|
|
20
16
|
value: 'OpenAccess',
|
|
21
17
|
label: 'OpenAccess'
|
|
22
18
|
}]
|
|
23
|
-
}
|
|
19
|
+
};
|
|
24
20
|
const onSubmit = jest.fn();
|
|
25
21
|
jest.mock('../../hooks');
|
|
26
22
|
describe('CustomPropertyForm', () => {
|
|
@@ -144,7 +140,7 @@ describe('CustomPropertyForm', () => {
|
|
|
144
140
|
name: 'Primary'
|
|
145
141
|
})).toHaveDisplayValue('Yes');
|
|
146
142
|
});
|
|
147
|
-
['Decimal', 'Refdata (multi-select)', 'Refdata', 'Text', 'Integer'].forEach(type => it(
|
|
143
|
+
['Decimal', 'Refdata (multi-select)', 'Refdata', 'Text', 'Integer'].forEach(type => it(`Displays expected ${type} option`, () => {
|
|
148
144
|
const {
|
|
149
145
|
getByText
|
|
150
146
|
} = renderComponent;
|