@k-int/stripes-kint-components 2.4.1 → 2.6.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 +24 -1
- package/README.md +14 -1
- package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +1 -28
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -4
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +1 -28
- package/es/index.js +7 -5
- package/es/lib/ActionList/ActionList.js +20 -37
- package/es/lib/ActionList/ActionListFieldArray.js +85 -118
- package/es/lib/ActionList/index.js +1 -5
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +55 -46
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +53 -0
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +103 -65
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +125 -0
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +131 -138
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +200 -0
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +22 -37
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +194 -0
- package/es/lib/CustomProperties/Config/index.js +1 -5
- package/es/lib/CustomProperties/Config/testResources.js +198 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -30
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +48 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +1 -34
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +48 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +1 -37
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +113 -0
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +63 -64
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +283 -0
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -30
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +65 -0
- package/es/lib/CustomProperties/Edit/index.js +1 -5
- package/es/lib/CustomProperties/Edit/testResources.js +923 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +10 -35
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +102 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +1 -34
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +41 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +1 -34
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +91 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +1 -30
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +86 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +1 -35
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +321 -0
- package/es/lib/CustomProperties/Filter/index.js +1 -5
- package/es/lib/CustomProperties/Filter/testResources.js +262 -0
- package/es/lib/CustomProperties/Filter/useOperators.js +9 -39
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +5 -36
- package/es/lib/CustomProperties/Filter/useValueProps.js +13 -35
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -30
- package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +48 -0
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +1 -34
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +55 -0
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +15 -34
- package/es/lib/CustomProperties/View/index.js +1 -5
- package/es/lib/CustomProperties/View/testResources.js +144 -0
- package/es/lib/CustomProperties/index.js +1 -5
- package/es/lib/EditableRefdataList/EditableRefdataList.js +165 -63
- package/es/lib/EditableRefdataList/index.js +1 -5
- package/es/lib/EditableSettingsList/EditableSettingsList.js +5 -31
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +1 -30
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +10 -35
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +28 -64
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +8 -33
- package/es/lib/EditableSettingsList/SettingField/index.js +1 -5
- package/es/lib/EditableSettingsList/index.js +1 -5
- package/es/lib/FormModal/FormModal.js +12 -32
- package/es/lib/FormModal/index.js +1 -5
- package/es/lib/NoResultsMessage/NoResultsMessage.js +1 -30
- package/es/lib/NoResultsMessage/index.js +1 -5
- package/es/lib/QueryTypedown/QueryTypedown.js +1 -34
- package/es/lib/QueryTypedown/index.js +1 -5
- package/es/lib/RefdataButtons/RefdataButtons.js +1 -34
- package/es/lib/RefdataButtons/index.js +1 -5
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +5 -36
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +1 -34
- package/es/lib/SASQLookupComponent/TableBody/index.js +1 -5
- package/es/lib/SASQLookupComponent/index.js +1 -5
- package/es/lib/SASQRoute/SASQRoute.js +1 -30
- package/es/lib/SASQRoute/index.js +1 -5
- package/es/lib/SASQViewComponent/SASQViewComponent.js +1 -34
- package/es/lib/SASQViewComponent/index.js +1 -5
- package/es/lib/SearchField/SearchField.js +1 -31
- package/es/lib/SearchField/index.js +1 -5
- package/es/lib/SettingPage/SettingPage.js +1 -34
- package/es/lib/SettingPage/SettingPagePane.js +1 -32
- package/es/lib/SettingPage/index.js +1 -5
- package/es/lib/Typedown/Typedown.js +6 -41
- package/es/lib/Typedown/index.js +1 -5
- package/es/lib/constants/customProperties.js +4 -39
- package/es/lib/constants/eventCodes.js +1 -31
- package/es/lib/contexts/SettingsContext.js +1 -30
- package/es/lib/contexts/index.js +1 -5
- package/es/lib/hooks/index.js +7 -5
- package/es/lib/hooks/settingsHooks/index.js +8 -4
- package/es/lib/hooks/settingsHooks/useAppSettings.js +84 -0
- package/es/lib/hooks/settingsHooks/useSettingSection.js +17 -37
- package/es/lib/hooks/settingsHooks/useSettings.js +15 -43
- package/es/lib/hooks/typedownHooks/index.js +1 -5
- package/es/lib/hooks/typedownHooks/useTypedown.js +1 -34
- package/es/lib/hooks/typedownHooks/useTypedownData.js +1 -34
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +1 -34
- package/es/lib/hooks/useActiveElement.js +1 -32
- package/es/lib/hooks/useAvailableCustomProperties.js +1 -34
- package/es/lib/hooks/useCustomProperties.js +4 -34
- package/es/lib/hooks/useHelperApp.js +1 -34
- package/es/lib/hooks/useInvalidateRefdata.js +1 -34
- package/es/lib/hooks/useKiwtFieldArray.js +1 -34
- package/es/lib/hooks/useKiwtSASQuery.js +9 -37
- package/es/lib/hooks/useLocalStorageState.js +1 -34
- package/es/lib/hooks/useMutateCustomProperties.js +14 -42
- package/es/lib/hooks/useMutateRefdataValue.js +11 -39
- package/es/lib/hooks/useQIndex.js +1 -34
- package/es/lib/hooks/useRefdata.js +1 -34
- package/es/lib/hooks/useTemplates.js +1 -34
- package/es/lib/utils/buildUrl.js +2 -31
- package/es/lib/utils/generateKiwtQuery.js +1 -30
- package/es/lib/utils/generateKiwtQueryParams.js +1 -30
- package/es/lib/utils/groupCustomPropertiesByCtx.js +1 -30
- package/es/lib/utils/highlightString.js +1 -29
- package/es/lib/utils/index.js +1 -5
- package/es/lib/utils/matchString.js +1 -30
- package/es/lib/utils/refdataOptions.js +1 -30
- package/es/lib/utils/refdataQueryKey.js +1 -30
- package/es/lib/utils/renderHelpText.js +1 -30
- package/es/lib/utils/selectorSafe.js +1 -30
- package/es/lib/utils/sortByLabel.js +1 -30
- package/es/lib/utils/toCamelCase.js +1 -30
- package/es/lib/utils/typedownQueryKey.js +1 -30
- package/es/lib/utils/validators.js +1 -32
- package/junit.xml +728 -35
- package/package.json +4 -5
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +42 -12
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +222 -93
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +12 -12
- 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 +142 -28
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +109 -40
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +308 -188
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +661 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +65 -50
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +793 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +190 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +340 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +667 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +1066 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +481 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +206 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +100 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +892 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +460 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +529 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +424 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +307 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +451 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +251 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +103 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +976 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +271 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +190 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +238 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +193 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +436 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +640 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +176 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +94 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +571 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +116 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +175 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +158 -26
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +33 -12
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +3 -3
- 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 +13 -13
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +117 -39
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +21 -21
- package/src/artifacts/coverage-jest/lcov-report/FormModal/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 +14 -8
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -3
- 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/SASQLookupComponent/SASQLookupComponent.js.html +62 -152
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +373 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +6 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +2 -2
- 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 +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +18 -18
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +8 -26
- 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 +33 -24
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +13 -13
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +2 -2
- 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 +109 -79
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +8 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +292 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +61 -10
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +34 -13
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +7 -7
- 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 +26 -8
- 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 +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +205 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +32 -17
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +118 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +29 -11
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +25 -13
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +14 -17
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/index.html +171 -96
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +36 -9
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +124 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +211 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +100 -25
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +29 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +127 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +112 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +112 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +145 -25
- package/src/artifacts/coverage-jest/lcov.info +2421 -888
- package/src/index.js +2 -1
- package/src/lib/ActionList/ActionList.js +12 -5
- package/src/lib/ActionList/ActionListFieldArray.js +87 -65
- package/src/lib/ActionList/README.md +31 -1
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +46 -8
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +35 -0
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +64 -23
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +51 -0
- package/src/lib/CustomProperties/Config/CustomPropertyForm.js +172 -132
- package/src/lib/CustomProperties/Config/CustomPropertyForm.test.js +126 -0
- package/src/lib/CustomProperties/Config/CustomPropertyView.js +29 -9
- package/src/lib/CustomProperties/Config/CustomPropertyView.test.js +55 -0
- package/src/lib/CustomProperties/Config/testResources.js +236 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +29 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +29 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +51 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyField.js +56 -24
- package/src/lib/CustomProperties/Edit/CustomPropertyField.test.js +185 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.js +1 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +57 -0
- package/src/lib/CustomProperties/Edit/testResources.js +1063 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +15 -3
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +43 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +32 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +44 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +40 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +111 -0
- package/src/lib/CustomProperties/Filter/testResources.js +297 -0
- package/src/lib/CustomProperties/Filter/useOperators.js +7 -0
- package/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +5 -2
- package/src/lib/CustomProperties/Filter/useValueProps.js +6 -0
- package/src/lib/CustomProperties/View/CustomPropertiesView.test.js +32 -0
- package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +32 -0
- package/src/lib/CustomProperties/View/CustomPropertyCard.js +10 -2
- package/src/lib/CustomProperties/View/testResources.js +162 -0
- package/src/lib/EditableRefdataList/EditableRefdataList.js +98 -16
- package/src/lib/EditableRefdataList/README.md +3 -0
- package/src/lib/EditableSettingsList/EditableSettingsList.js +8 -1
- package/src/lib/FormModal/FormModal.js +7 -3
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +8 -0
- package/src/lib/Typedown/Typedown.js +4 -10
- package/src/lib/constants/customProperties.js +2 -0
- package/src/lib/hooks/README.md +28 -3
- package/src/lib/hooks/index.js +1 -1
- package/src/lib/hooks/settingsHooks/index.js +1 -0
- package/src/lib/hooks/settingsHooks/useAppSettings.js +69 -0
- package/src/lib/hooks/settingsHooks/useSettingSection.js +19 -2
- package/src/lib/hooks/settingsHooks/useSettings.js +12 -5
- package/src/lib/hooks/useCustomProperties.js +5 -0
- package/src/lib/hooks/useKiwtSASQuery.js +7 -1
- package/src/lib/hooks/useMutateCustomProperties.js +7 -3
- package/src/lib/hooks/useMutateRefdataValue.js +5 -2
- package/src/lib/utils/matchString.js +1 -1
- package/styles/ActionListFieldArray.css +11 -2
- package/styles/CustomProperties.css +17 -0
- package/translations/stripes-kint-components/ar.json +11 -2
- package/translations/stripes-kint-components/cs_CZ.json +10 -1
- package/translations/stripes-kint-components/de.json +11 -2
- package/translations/stripes-kint-components/en.json +12 -3
- package/translations/stripes-kint-components/es.json +11 -2
- package/translations/stripes-kint-components/fr.json +1 -105
- package/translations/stripes-kint-components/hi_IN.json +1 -105
- package/translations/stripes-kint-components/hu.json +11 -2
- package/translations/stripes-kint-components/it_IT.json +11 -2
- package/translations/stripes-kint-components/ja.json +10 -1
- package/translations/stripes-kint-components/ko.json +11 -2
- package/translations/stripes-kint-components/pl.json +11 -2
- package/translations/stripes-kint-components/pt_PT.json +11 -2
- package/translations/stripes-kint-components/ru.json +11 -2
- package/translations/stripes-kint-components/sv.json +11 -2
- package/translations/stripes-kint-components/zh_CN.json +10 -1
|
@@ -11,23 +11,20 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _reactIntl = require("react-intl");
|
|
13
13
|
|
|
14
|
-
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
15
|
-
|
|
16
14
|
var _components = require("@folio/stripes/components");
|
|
17
15
|
|
|
16
|
+
var _reactFinalForm = require("react-final-form");
|
|
17
|
+
|
|
18
18
|
var _SearchField = _interopRequireDefault(require("../../SearchField"));
|
|
19
19
|
|
|
20
20
|
var _hooks = require("../../hooks");
|
|
21
21
|
|
|
22
|
+
var _CustomProperties = _interopRequireDefault(require("../../../../styles/CustomProperties.css"));
|
|
23
|
+
|
|
22
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
|
-
(function () {
|
|
27
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
28
|
-
enterModule && enterModule(module);
|
|
29
|
-
})();
|
|
30
|
-
|
|
31
28
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32
29
|
|
|
33
30
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -46,12 +43,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
46
43
|
|
|
47
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
48
45
|
|
|
49
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
50
|
-
return a;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
var DEBOUNCE_TIME = 500;
|
|
54
|
-
|
|
55
46
|
var CustomPropertiesLookup = function CustomPropertiesLookup(_ref) {
|
|
56
47
|
var _labelOverrides$label, _labelOverrides$prima, _labelOverrides$ctx, _labelOverrides$weigh, _labelOverrides$type, _labelOverrides$categ;
|
|
57
48
|
|
|
@@ -79,27 +70,70 @@ var CustomPropertiesLookup = function CustomPropertiesLookup(_ref) {
|
|
|
79
70
|
nsValues: nsValues,
|
|
80
71
|
queryParams: queryParams,
|
|
81
72
|
returnQueryObject: true,
|
|
82
|
-
ctx: selectedContext
|
|
73
|
+
ctx: selectedContext,
|
|
74
|
+
options: {
|
|
75
|
+
sort: [{
|
|
76
|
+
path: 'ctx'
|
|
77
|
+
}, {
|
|
78
|
+
path: 'weight'
|
|
79
|
+
}]
|
|
80
|
+
}
|
|
83
81
|
}),
|
|
84
82
|
custprops = _useCustomProperties.data,
|
|
85
83
|
isLoading = _useCustomProperties.isLoading;
|
|
86
84
|
|
|
87
|
-
var handleSearch =
|
|
85
|
+
var handleSearch = function handleSearch(query) {
|
|
88
86
|
setNsValues(_objectSpread(_objectSpread({}, nsValues), {}, {
|
|
89
87
|
query: query
|
|
90
88
|
}));
|
|
91
|
-
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
var _useState5 = (0, _react.useState)(''),
|
|
92
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
93
|
+
searchTerm = _useState6[0],
|
|
94
|
+
setSearchTerm = _useState6[1];
|
|
95
|
+
|
|
92
96
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
93
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Form, {
|
|
98
|
+
enableReinitialize: true,
|
|
99
|
+
keepDirtyOnReinitialize: true,
|
|
100
|
+
onSubmit: function onSubmit() {
|
|
101
|
+
return handleSearch(searchTerm);
|
|
102
|
+
},
|
|
103
|
+
children: function children(_ref2) {
|
|
104
|
+
var _labelOverrides$searc;
|
|
105
|
+
|
|
106
|
+
var handleSubmit = _ref2.handleSubmit;
|
|
107
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("form", {
|
|
108
|
+
className: _CustomProperties.default.lookupSearchContainer,
|
|
109
|
+
onSubmit: handleSubmit,
|
|
110
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SearchField.default, {
|
|
111
|
+
ariaLabel: (_labelOverrides$searc = labelOverrides.searchAriaLabel) !== null && _labelOverrides$searc !== void 0 ? _labelOverrides$searc : 'custom-property-search-field',
|
|
112
|
+
className: _CustomProperties.default.lookupSearch,
|
|
113
|
+
marginBottom0: true,
|
|
114
|
+
onChange: function onChange(e) {
|
|
115
|
+
return setSearchTerm(e.target.value);
|
|
116
|
+
},
|
|
117
|
+
value: searchTerm
|
|
118
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
119
|
+
buttonClass: _CustomProperties.default.lookupSearchButton,
|
|
120
|
+
buttonStyle: "primary",
|
|
121
|
+
marginBottom0: true,
|
|
122
|
+
type: "submit",
|
|
123
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
124
|
+
id: "stripes-kint-components.search"
|
|
125
|
+
})
|
|
126
|
+
})]
|
|
127
|
+
});
|
|
97
128
|
}
|
|
98
129
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Row, {
|
|
99
130
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
|
|
100
131
|
xs: 6,
|
|
101
132
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Select, {
|
|
102
133
|
dataOptions: contextFilterOptions,
|
|
134
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
135
|
+
id: "stripes-kint-components.customProperties.ctx"
|
|
136
|
+
}),
|
|
103
137
|
onChange: function onChange(e) {
|
|
104
138
|
setSelectedContext(e.target.value);
|
|
105
139
|
},
|
|
@@ -157,10 +191,6 @@ var CustomPropertiesLookup = function CustomPropertiesLookup(_ref) {
|
|
|
157
191
|
});
|
|
158
192
|
};
|
|
159
193
|
|
|
160
|
-
__signature__(CustomPropertiesLookup, "useState{[nsValues, setNsValues]({\n sort: 'label'\n })}\nuseState{[selectedContext, setSelectedContext]}\nuseCustomProperties{{ data: custprops, isLoading }}", function () {
|
|
161
|
-
return [_hooks.useCustomProperties];
|
|
162
|
-
});
|
|
163
|
-
|
|
164
194
|
CustomPropertiesLookup.propTypes = {
|
|
165
195
|
contextFilterOptions: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
166
196
|
value: _propTypes.default.string,
|
|
@@ -174,25 +204,4 @@ CustomPropertiesLookup.propTypes = {
|
|
|
174
204
|
refdataEndpoint: _propTypes.default.string
|
|
175
205
|
};
|
|
176
206
|
var _default = CustomPropertiesLookup;
|
|
177
|
-
|
|
178
|
-
exports.default = _default2;
|
|
179
|
-
;
|
|
180
|
-
|
|
181
|
-
(function () {
|
|
182
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
183
|
-
|
|
184
|
-
if (!reactHotLoader) {
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
reactHotLoader.register(DEBOUNCE_TIME, "DEBOUNCE_TIME", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesLookup.js");
|
|
189
|
-
reactHotLoader.register(CustomPropertiesLookup, "CustomPropertiesLookup", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesLookup.js");
|
|
190
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesLookup.js");
|
|
191
|
-
})();
|
|
192
|
-
|
|
193
|
-
;
|
|
194
|
-
|
|
195
|
-
(function () {
|
|
196
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
197
|
-
leaveModule && leaveModule(module);
|
|
198
|
-
})();
|
|
207
|
+
exports.default = _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
require("@folio/stripes-erm-components/test/jest/__mock__");
|
|
6
|
+
|
|
7
|
+
var _reactRouterDom = require("react-router-dom");
|
|
8
|
+
|
|
9
|
+
var _helpers = require("../../../../test/jest/helpers");
|
|
10
|
+
|
|
11
|
+
var _testResources = require("./testResources");
|
|
12
|
+
|
|
13
|
+
var _CustomPropertiesLookup = _interopRequireDefault(require("./CustomPropertiesLookup"));
|
|
14
|
+
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
|
|
19
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
20
|
+
|
|
21
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
|
+
|
|
23
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24
|
+
|
|
25
|
+
jest.mock('../../SearchField', function () {
|
|
26
|
+
return function () {
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
28
|
+
children: "SearchField"
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
describe('CustomPropertiesLookup', function () {
|
|
33
|
+
var renderComponent;
|
|
34
|
+
beforeEach(function () {
|
|
35
|
+
renderComponent = (0, _helpers.renderWithKintHarness)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.MemoryRouter, {
|
|
36
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertiesLookup.default, _objectSpread(_objectSpread({}, _testResources.custPropLookup), {}, {
|
|
37
|
+
visibleColumns: ['label', 'primary', 'ctx', 'weight', 'type', 'category']
|
|
38
|
+
}))
|
|
39
|
+
}));
|
|
40
|
+
});
|
|
41
|
+
it('renders expected options', function () {
|
|
42
|
+
var _renderComponent = renderComponent,
|
|
43
|
+
getByText = _renderComponent.getByText;
|
|
44
|
+
expect(getByText('All')).toBeInTheDocument();
|
|
45
|
+
expect(getByText('OpenAccess')).toBeInTheDocument();
|
|
46
|
+
expect(getByText('None')).toBeInTheDocument();
|
|
47
|
+
});
|
|
48
|
+
it('renders SearchField component ', function () {
|
|
49
|
+
var _renderComponent2 = renderComponent,
|
|
50
|
+
getByText = _renderComponent2.getByText;
|
|
51
|
+
expect(getByText('SearchField')).toBeInTheDocument();
|
|
52
|
+
});
|
|
53
|
+
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -15,10 +17,10 @@ var _reactIntl = require("react-intl");
|
|
|
15
17
|
|
|
16
18
|
var _reactQuery = require("react-query");
|
|
17
19
|
|
|
18
|
-
var _reactIntlSafeHtml = _interopRequireDefault(require("@folio/react-intl-safe-html"));
|
|
19
|
-
|
|
20
20
|
var _components = require("@folio/stripes/components");
|
|
21
21
|
|
|
22
|
+
var _core = require("@folio/stripes/core");
|
|
23
|
+
|
|
22
24
|
var _FormModal = _interopRequireDefault(require("../../FormModal/FormModal"));
|
|
23
25
|
|
|
24
26
|
var _CustomPropertiesLookup = _interopRequireDefault(require("./CustomPropertiesLookup"));
|
|
@@ -33,10 +35,11 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
33
35
|
|
|
34
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
37
|
|
|
36
|
-
(function () {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
39
|
+
|
|
40
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
41
|
+
|
|
42
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
40
43
|
|
|
41
44
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
42
45
|
|
|
@@ -56,23 +59,21 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
56
59
|
|
|
57
60
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
58
61
|
|
|
59
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
60
|
-
return a;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
62
|
var EDITING = 'edit';
|
|
64
63
|
var CREATING = 'create';
|
|
65
64
|
var VIEWING = 'view'; // A default option for setting up panes manually
|
|
66
65
|
|
|
67
66
|
var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
68
|
-
var _labelOverrides$paneT, _ref3, _renderViewPaneTitle, _labelOverrides$confi, _labelOverrides$confi2, _labelOverrides$confi3;
|
|
67
|
+
var _labelOverrides$paneT, _ref3, _renderViewPaneTitle, _customProperty$categ, _labelOverrides$modal, _labelOverrides$modal2, _labelOverrides$confi, _labelOverrides$confi2, _labelOverrides$confi3;
|
|
69
68
|
|
|
70
69
|
var afterQueryCalls = _ref.afterQueryCalls,
|
|
70
|
+
catchQueryCalls = _ref.catchQueryCalls,
|
|
71
71
|
contextFilterOptions = _ref.contextFilterOptions,
|
|
72
72
|
customPropertiesEndpoint = _ref.customPropertiesEndpoint,
|
|
73
73
|
helpPopovers = _ref.helpPopovers,
|
|
74
74
|
labelOverrides = _ref.labelOverrides,
|
|
75
75
|
refdataEndpoint = _ref.refdataEndpoint;
|
|
76
|
+
var callout = (0, _react.useContext)(_core.CalloutContext);
|
|
76
77
|
var queryClient = (0, _reactQuery.useQueryClient)();
|
|
77
78
|
var intl = (0, _reactIntl.useIntl)();
|
|
78
79
|
|
|
@@ -117,20 +118,7 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
117
118
|
|
|
118
119
|
if (renderViewPaneTitle instanceof Function) {
|
|
119
120
|
renderViewPaneTitle = renderViewPaneTitle(customProperty);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
var afterQueryCallsSafe = _objectSpread({
|
|
124
|
-
put: function put() {
|
|
125
|
-
return null;
|
|
126
|
-
},
|
|
127
|
-
post: function post() {
|
|
128
|
-
return null;
|
|
129
|
-
},
|
|
130
|
-
delete: function _delete() {
|
|
131
|
-
return null;
|
|
132
|
-
}
|
|
133
|
-
}, afterQueryCalls);
|
|
121
|
+
}
|
|
134
122
|
|
|
135
123
|
var _useMutateCustomPrope = (0, _hooks.useMutateCustomProperties)({
|
|
136
124
|
afterQueryCalls: {
|
|
@@ -138,21 +126,71 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
138
126
|
setMode(VIEWING);
|
|
139
127
|
queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
|
|
140
128
|
setCustomProperty(res);
|
|
141
|
-
|
|
129
|
+
|
|
130
|
+
if (afterQueryCalls !== null && afterQueryCalls !== void 0 && afterQueryCalls.put) {
|
|
131
|
+
afterQueryCalls.put(res);
|
|
132
|
+
}
|
|
142
133
|
},
|
|
143
134
|
post: function post(res) {
|
|
144
135
|
setMode(VIEWING);
|
|
145
136
|
queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
|
|
146
137
|
setCustomProperty(res);
|
|
147
|
-
|
|
138
|
+
|
|
139
|
+
if (afterQueryCalls !== null && afterQueryCalls !== void 0 && afterQueryCalls.post) {
|
|
140
|
+
afterQueryCalls.post(res);
|
|
141
|
+
}
|
|
148
142
|
},
|
|
149
143
|
delete: function _delete(res) {
|
|
150
144
|
setMode(VIEWING);
|
|
151
145
|
queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
|
|
152
146
|
setCustomProperty();
|
|
153
|
-
|
|
147
|
+
|
|
148
|
+
if (afterQueryCalls !== null && afterQueryCalls !== void 0 && afterQueryCalls.delete) {
|
|
149
|
+
afterQueryCalls.delete(res);
|
|
150
|
+
}
|
|
154
151
|
}
|
|
155
152
|
},
|
|
153
|
+
catchQueryCalls: _objectSpread({
|
|
154
|
+
// Default delete behaviour is to fire a callout, either with kint-components default message
|
|
155
|
+
// or one provided in labelOverrides, which is passed the error message and customProperty in question
|
|
156
|
+
delete: function () {
|
|
157
|
+
var _delete2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(err) {
|
|
158
|
+
var errorResp;
|
|
159
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
160
|
+
while (1) {
|
|
161
|
+
switch (_context.prev = _context.next) {
|
|
162
|
+
case 0:
|
|
163
|
+
_context.next = 2;
|
|
164
|
+
return err.response.json();
|
|
165
|
+
|
|
166
|
+
case 2:
|
|
167
|
+
errorResp = _context.sent;
|
|
168
|
+
callout.sendCallout({
|
|
169
|
+
message: labelOverrides !== null && labelOverrides !== void 0 && labelOverrides.deleteError ? labelOverrides.deleteError(errorResp === null || errorResp === void 0 ? void 0 : errorResp.message, customProperty) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
170
|
+
id: "stripes-kint-components.customPropertiesSettings.deleteCustomProperty.errorMessage",
|
|
171
|
+
values: {
|
|
172
|
+
error: errorResp === null || errorResp === void 0 ? void 0 : errorResp.message,
|
|
173
|
+
label: customProperty === null || customProperty === void 0 ? void 0 : customProperty.label
|
|
174
|
+
}
|
|
175
|
+
}),
|
|
176
|
+
type: 'error'
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
case 4:
|
|
180
|
+
case "end":
|
|
181
|
+
return _context.stop();
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}, _callee);
|
|
185
|
+
}));
|
|
186
|
+
|
|
187
|
+
function _delete(_x) {
|
|
188
|
+
return _delete2.apply(this, arguments);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return _delete;
|
|
192
|
+
}()
|
|
193
|
+
}, catchQueryCalls),
|
|
156
194
|
endpoint: customPropertiesEndpoint,
|
|
157
195
|
id: customProperty === null || customProperty === void 0 ? void 0 : customProperty.id
|
|
158
196
|
}),
|
|
@@ -166,6 +204,18 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
166
204
|
return _objectSpread(_objectSpread({}, submitData), {}, {
|
|
167
205
|
ctx: submitData === null || submitData === void 0 ? void 0 : (_submitData$ctx = submitData.ctx) === null || _submitData$ctx === void 0 ? void 0 : (_submitData$ctx$ = _submitData$ctx[0]) === null || _submitData$ctx$ === void 0 ? void 0 : _submitData$ctx$.value
|
|
168
206
|
});
|
|
207
|
+
}; // When POSTing a custom property, the backend expects a shorthand "Integer" or "LocalDate"
|
|
208
|
+
// When PUTing a custom property, the backend needs the full class name
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
var handleType = function handleType(submitData) {
|
|
212
|
+
var _typeRegex$exec;
|
|
213
|
+
|
|
214
|
+
var typeRegex = /(com\.k_int\.web\.toolkit\.custprops\.types\.CustomProperty)(.*)/g;
|
|
215
|
+
var typeMatch = (_typeRegex$exec = typeRegex.exec(submitData === null || submitData === void 0 ? void 0 : submitData.type)) !== null && _typeRegex$exec !== void 0 ? _typeRegex$exec : [];
|
|
216
|
+
return _objectSpread(_objectSpread({}, submitData), {}, {
|
|
217
|
+
type: typeMatch[2]
|
|
218
|
+
});
|
|
169
219
|
};
|
|
170
220
|
|
|
171
221
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
@@ -173,13 +223,14 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
173
223
|
defaultWidth: "fill",
|
|
174
224
|
id: "settings-customProperties.lookupPane",
|
|
175
225
|
lastMenu: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
226
|
+
buttonStyle: "primary",
|
|
176
227
|
marginBottom0: true,
|
|
177
228
|
onClick: function onClick() {
|
|
178
229
|
return setMode(CREATING);
|
|
179
230
|
} // TODO do we need to clear form here too?
|
|
180
231
|
,
|
|
181
232
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
182
|
-
id: "stripes-kint-components.
|
|
233
|
+
id: "stripes-kint-components.new"
|
|
183
234
|
})
|
|
184
235
|
}),
|
|
185
236
|
paneTitle: (_labelOverrides$paneT = labelOverrides.paneTitle) !== null && _labelOverrides$paneT !== void 0 ? _labelOverrides$paneT : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
@@ -203,8 +254,11 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
203
254
|
onClick: function onClick() {
|
|
204
255
|
return setMode(EDITING);
|
|
205
256
|
},
|
|
206
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
207
|
-
|
|
257
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
258
|
+
icon: "edit",
|
|
259
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
260
|
+
id: "stripes-kint-components.edit"
|
|
261
|
+
})
|
|
208
262
|
})
|
|
209
263
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
210
264
|
buttonStyle: "dropdownItem",
|
|
@@ -213,8 +267,11 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
213
267
|
setDeleteModal(true);
|
|
214
268
|
onToggle();
|
|
215
269
|
},
|
|
216
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
217
|
-
|
|
270
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
271
|
+
icon: "trash",
|
|
272
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
273
|
+
id: "stripes-kint-components.delete"
|
|
274
|
+
})
|
|
218
275
|
})
|
|
219
276
|
})];
|
|
220
277
|
},
|
|
@@ -227,6 +284,7 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
227
284
|
paneTitle: (_ref3 = (_renderViewPaneTitle = renderViewPaneTitle) !== null && _renderViewPaneTitle !== void 0 ? _renderViewPaneTitle : customProperty === null || customProperty === void 0 ? void 0 : customProperty.label) !== null && _ref3 !== void 0 ? _ref3 : customProperty === null || customProperty === void 0 ? void 0 : customProperty.name,
|
|
228
285
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertyView.default, {
|
|
229
286
|
customProperty: customProperty,
|
|
287
|
+
helpPopovers: helpPopovers,
|
|
230
288
|
labelOverrides: labelOverrides
|
|
231
289
|
})
|
|
232
290
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormModal.default, {
|
|
@@ -239,16 +297,22 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
239
297
|
ctx: customProperty !== null && customProperty !== void 0 && customProperty.ctx ? [{
|
|
240
298
|
value: customProperty.ctx,
|
|
241
299
|
label: customProperty.ctx
|
|
242
|
-
}] : null
|
|
300
|
+
}] : null,
|
|
301
|
+
category: customProperty !== null && customProperty !== void 0 && customProperty.category ? customProperty === null || customProperty === void 0 ? void 0 : (_customProperty$categ = customProperty.category) === null || _customProperty$categ === void 0 ? void 0 : _customProperty$categ.id : null
|
|
243
302
|
}),
|
|
244
303
|
modalProps: {
|
|
245
304
|
dismissible: true,
|
|
305
|
+
label: mode === CREATING ? (_labelOverrides$modal = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.modalTitleNew) !== null && _labelOverrides$modal !== void 0 ? _labelOverrides$modal : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
306
|
+
id: "stripes-kint-components.customProperty.newModal"
|
|
307
|
+
}) : (_labelOverrides$modal2 = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.modalTitleEdit) !== null && _labelOverrides$modal2 !== void 0 ? _labelOverrides$modal2 : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
308
|
+
id: "stripes-kint-components.customProperty.editModal"
|
|
309
|
+
}),
|
|
246
310
|
onClose: function onClose() {
|
|
247
311
|
return setMode(VIEWING);
|
|
248
312
|
},
|
|
249
313
|
open: mode === CREATING || mode === EDITING
|
|
250
314
|
},
|
|
251
|
-
onSubmit: mode === CREATING ? (0, _composeFunction.default)(createCustprop, handeContextSubmit) : (0, _composeFunction.default)(editCustProp, handeContextSubmit),
|
|
315
|
+
onSubmit: mode === CREATING ? (0, _composeFunction.default)(createCustprop, handeContextSubmit, handleType) : (0, _composeFunction.default)(editCustProp, handeContextSubmit),
|
|
252
316
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertyForm.default, {
|
|
253
317
|
contextFilterOptions: renderContextFilterOptions,
|
|
254
318
|
helpPopovers: helpPopovers,
|
|
@@ -269,7 +333,7 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
269
333
|
id: "stripes-kint-components.customProperties.delete.confirmHeading"
|
|
270
334
|
}),
|
|
271
335
|
id: "delete-job-confirmation",
|
|
272
|
-
message: (_labelOverrides$confi3 = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.confirmMessage) !== null && _labelOverrides$confi3 !== void 0 ? _labelOverrides$confi3 : /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
336
|
+
message: (_labelOverrides$confi3 = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.confirmMessage) !== null && _labelOverrides$confi3 !== void 0 ? _labelOverrides$confi3 : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
273
337
|
id: "stripes-kint-components.customProperties.delete.confirmMessage",
|
|
274
338
|
values: {
|
|
275
339
|
name: customProperty === null || customProperty === void 0 ? void 0 : customProperty.name
|
|
@@ -279,7 +343,7 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
279
343
|
return setDeleteModal(false);
|
|
280
344
|
},
|
|
281
345
|
onConfirm: function onConfirm() {
|
|
282
|
-
deleteCustProp();
|
|
346
|
+
deleteCustProp(customProperty === null || customProperty === void 0 ? void 0 : customProperty.id);
|
|
283
347
|
setCustomProperty();
|
|
284
348
|
setDeleteModal(false);
|
|
285
349
|
},
|
|
@@ -288,12 +352,9 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
288
352
|
});
|
|
289
353
|
};
|
|
290
354
|
|
|
291
|
-
__signature__(CustomPropertiesSettings, "useQueryClient{queryClient}\nuseIntl{intl}\nuseState{[customProperty, setCustomProperty]}\nuseState{[deleteModal, setDeleteModal](false)}\nuseRefdata{refdata}\nuseState{[mode, setMode](VIEWING)}\nuseMutateCustomProperties{{\n post: createCustprop,\n put: editCustProp,\n delete: deleteCustProp\n }}", function () {
|
|
292
|
-
return [_reactQuery.useQueryClient, _reactIntl.useIntl, _hooks.useRefdata, _hooks.useMutateCustomProperties];
|
|
293
|
-
});
|
|
294
|
-
|
|
295
355
|
CustomPropertiesSettings.propTypes = {
|
|
296
356
|
afterQueryCalls: _propTypes.default.object,
|
|
357
|
+
catchQueryCalls: _propTypes.default.object,
|
|
297
358
|
contextFilterOptions: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
298
359
|
value: _propTypes.default.string,
|
|
299
360
|
label: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.string])
|
|
@@ -304,27 +365,4 @@ CustomPropertiesSettings.propTypes = {
|
|
|
304
365
|
refdataEndpoint: _propTypes.default.string
|
|
305
366
|
};
|
|
306
367
|
var _default = CustomPropertiesSettings;
|
|
307
|
-
|
|
308
|
-
exports.default = _default2;
|
|
309
|
-
;
|
|
310
|
-
|
|
311
|
-
(function () {
|
|
312
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
313
|
-
|
|
314
|
-
if (!reactHotLoader) {
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
reactHotLoader.register(EDITING, "EDITING", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesSettings.js");
|
|
319
|
-
reactHotLoader.register(CREATING, "CREATING", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesSettings.js");
|
|
320
|
-
reactHotLoader.register(VIEWING, "VIEWING", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesSettings.js");
|
|
321
|
-
reactHotLoader.register(CustomPropertiesSettings, "CustomPropertiesSettings", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesSettings.js");
|
|
322
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesSettings.js");
|
|
323
|
-
})();
|
|
324
|
-
|
|
325
|
-
;
|
|
326
|
-
|
|
327
|
-
(function () {
|
|
328
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
329
|
-
leaveModule && leaveModule(module);
|
|
330
|
-
})();
|
|
368
|
+
exports.default = _default;
|