@k-int/stripes-kint-components 2.5.0 → 2.6.1
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 +19 -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 +1 -31
- package/es/lib/ActionList/ActionListFieldArray.js +6 -40
- 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 +102 -62
- 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 +13 -32
- 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 +163 -64
- package/es/lib/EditableRefdataList/index.js +1 -5
- package/es/lib/EditableSettingsList/EditableSettingsList.js +1 -30
- 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 +2 -31
- 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 +2 -34
- 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 +1 -34
- 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 +1 -34
- package/es/lib/hooks/settingsHooks/useSettings.js +1 -36
- 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 +731 -38
- package/package.json +4 -4
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +142 -28
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +93 -27
- 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 +92 -32
- 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 +1 -1
- 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 +17 -17
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +15 -15
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +161 -77
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +29 -26
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +61 -46
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +892 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +19 -19
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +42 -42
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +23 -23
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +19 -19
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +41 -41
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +102 -87
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +976 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +58 -37
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +47 -29
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +38 -38
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +30 -6
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +48 -33
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +571 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +134 -17
- 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 +27 -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 +32 -32
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -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 +6 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +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 +3 -3
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +32 -26
- 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 +92 -92
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
- 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 +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +8 -8
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +7 -7
- 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 +7 -7
- 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 +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/index.html +109 -109
- 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 +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +22 -22
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +31 -31
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
- 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 +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +46 -46
- package/src/artifacts/coverage-jest/lcov.info +1124 -916
- package/src/index.js +2 -1
- package/src/lib/ActionList/ActionListFieldArray.js +3 -2
- package/src/lib/ActionList/README.md +12 -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 +63 -20
- 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 +8 -0
- package/src/lib/CustomProperties/View/testResources.js +162 -0
- package/src/lib/EditableRefdataList/EditableRefdataList.js +97 -17
- package/src/lib/EditableRefdataList/README.md +3 -0
- package/src/lib/FormModal/FormModal.js +1 -1
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +1 -0
- 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/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/styles/ActionListFieldArray.css +2 -1
- 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
|
@@ -13,6 +13,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _reactIntl = require("react-intl");
|
|
15
15
|
|
|
16
|
+
var _components = require("@folio/stripes/components");
|
|
17
|
+
|
|
18
|
+
var _core = require("@folio/stripes/core");
|
|
19
|
+
|
|
16
20
|
var _hooks = require("../hooks");
|
|
17
21
|
|
|
18
22
|
var _ActionList = _interopRequireDefault(require("../ActionList"));
|
|
@@ -25,10 +29,17 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
29
|
|
|
26
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
31
|
|
|
28
|
-
(function () {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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); } }
|
|
35
|
+
|
|
36
|
+
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); }); }; }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
32
43
|
|
|
33
44
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
34
45
|
|
|
@@ -42,23 +53,29 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
42
53
|
|
|
43
54
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
44
55
|
|
|
45
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
46
|
-
return a;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
56
|
var propTypes = {
|
|
57
|
+
afterQueryCalls: _propTypes.default.object,
|
|
58
|
+
catchQueryCalls: _propTypes.default.object,
|
|
50
59
|
desc: _propTypes.default.string,
|
|
51
60
|
label: _propTypes.default.string,
|
|
61
|
+
labelOverrides: _propTypes.default.object,
|
|
52
62
|
refdataEndpoint: _propTypes.default.string
|
|
53
63
|
};
|
|
54
64
|
|
|
55
65
|
var EditableRefdataList = function EditableRefdataList(_ref) {
|
|
56
|
-
var
|
|
66
|
+
var _deleteModal$refdata2;
|
|
67
|
+
|
|
68
|
+
var afterQueryCalls = _ref.afterQueryCalls,
|
|
69
|
+
catchQueryCalls = _ref.catchQueryCalls,
|
|
70
|
+
desc = _ref.desc,
|
|
57
71
|
label = _ref.label,
|
|
72
|
+
labelOverrides = _ref.labelOverrides,
|
|
58
73
|
refdataEndpoint = _ref.refdataEndpoint;
|
|
59
74
|
|
|
60
75
|
/* A component that allows for editing of refdata values */
|
|
61
|
-
|
|
76
|
+
var callout = (0, _react.useContext)(_core.CalloutContext);
|
|
77
|
+
var intl = (0, _reactIntl.useIntl)(); // fetch refdata values
|
|
78
|
+
|
|
62
79
|
var _useRefdata = (0, _hooks.useRefdata)({
|
|
63
80
|
desc: desc,
|
|
64
81
|
endpoint: refdataEndpoint,
|
|
@@ -75,6 +92,14 @@ var EditableRefdataList = function EditableRefdataList(_ref) {
|
|
|
75
92
|
contentData = _useState2[0],
|
|
76
93
|
setContentData = _useState2[1];
|
|
77
94
|
|
|
95
|
+
var _useState3 = (0, _react.useState)({
|
|
96
|
+
visible: false,
|
|
97
|
+
refdata: null
|
|
98
|
+
}),
|
|
99
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
100
|
+
deleteModal = _useState4[0],
|
|
101
|
+
setDeleteModal = _useState4[1];
|
|
102
|
+
|
|
78
103
|
var sortByLabel = function sortByLabel(a, b) {
|
|
79
104
|
return a.label.localeCompare(b.label);
|
|
80
105
|
};
|
|
@@ -92,14 +117,65 @@ var EditableRefdataList = function EditableRefdataList(_ref) {
|
|
|
92
117
|
delete: function _delete(json) {
|
|
93
118
|
var _json$values$sort, _json$values;
|
|
94
119
|
|
|
95
|
-
|
|
120
|
+
setContentData((_json$values$sort = json === null || json === void 0 ? void 0 : (_json$values = json.values) === null || _json$values === void 0 ? void 0 : _json$values.sort(sortByLabel)) !== null && _json$values$sort !== void 0 ? _json$values$sort : []);
|
|
121
|
+
|
|
122
|
+
if (afterQueryCalls !== null && afterQueryCalls !== void 0 && afterQueryCalls.delete) {
|
|
123
|
+
afterQueryCalls.delete(json);
|
|
124
|
+
}
|
|
96
125
|
},
|
|
97
126
|
put: function put(json) {
|
|
98
127
|
var _json$values$sort2, _json$values2;
|
|
99
128
|
|
|
100
|
-
|
|
129
|
+
setContentData((_json$values$sort2 = json === null || json === void 0 ? void 0 : (_json$values2 = json.values) === null || _json$values2 === void 0 ? void 0 : _json$values2.sort(sortByLabel)) !== null && _json$values$sort2 !== void 0 ? _json$values$sort2 : []);
|
|
130
|
+
|
|
131
|
+
if (afterQueryCalls !== null && afterQueryCalls !== void 0 && afterQueryCalls.put) {
|
|
132
|
+
afterQueryCalls.put(json);
|
|
133
|
+
}
|
|
101
134
|
}
|
|
102
135
|
},
|
|
136
|
+
catchQueryCalls: _objectSpread({
|
|
137
|
+
// Default delete behaviour is to fire a callout, either with kint-components default message
|
|
138
|
+
// or one provided in labelOverrides, which is passed the error message and refdata in question
|
|
139
|
+
delete: function () {
|
|
140
|
+
var _delete2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(err) {
|
|
141
|
+
var _deleteModal$refdata;
|
|
142
|
+
|
|
143
|
+
var errorResp;
|
|
144
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
145
|
+
while (1) {
|
|
146
|
+
switch (_context.prev = _context.next) {
|
|
147
|
+
case 0:
|
|
148
|
+
_context.next = 2;
|
|
149
|
+
return err.response.json();
|
|
150
|
+
|
|
151
|
+
case 2:
|
|
152
|
+
errorResp = _context.sent;
|
|
153
|
+
callout.sendCallout({
|
|
154
|
+
message: labelOverrides !== null && labelOverrides !== void 0 && labelOverrides.deleteError ? labelOverrides.deleteError(errorResp === null || errorResp === void 0 ? void 0 : errorResp.message, deleteModal === null || deleteModal === void 0 ? void 0 : deleteModal.refdata) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
155
|
+
id: "stripes-kint-components.editableRefdataList.deleteLabel.errorMessage",
|
|
156
|
+
values: {
|
|
157
|
+
label: deleteModal === null || deleteModal === void 0 ? void 0 : (_deleteModal$refdata = deleteModal.refdata) === null || _deleteModal$refdata === void 0 ? void 0 : _deleteModal$refdata.label,
|
|
158
|
+
error: errorResp === null || errorResp === void 0 ? void 0 : errorResp.message
|
|
159
|
+
}
|
|
160
|
+
}),
|
|
161
|
+
type: 'error'
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
case 4:
|
|
165
|
+
case "end":
|
|
166
|
+
return _context.stop();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}, _callee);
|
|
170
|
+
}));
|
|
171
|
+
|
|
172
|
+
function _delete(_x) {
|
|
173
|
+
return _delete2.apply(this, arguments);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return _delete;
|
|
177
|
+
}()
|
|
178
|
+
}, catchQueryCalls),
|
|
103
179
|
endpoint: refdataEndpoint,
|
|
104
180
|
id: refdata === null || refdata === void 0 ? void 0 : refdata.id,
|
|
105
181
|
queryParams: {
|
|
@@ -128,6 +204,13 @@ var EditableRefdataList = function EditableRefdataList(_ref) {
|
|
|
128
204
|
icon: 'edit',
|
|
129
205
|
callback: function callback(data) {
|
|
130
206
|
return editRefdataValue(data);
|
|
207
|
+
},
|
|
208
|
+
ariaLabel: function ariaLabel(data) {
|
|
209
|
+
return intl.formatMessage({
|
|
210
|
+
id: 'stripes-kint-components.editableRefdataList.editAriaLabel'
|
|
211
|
+
}, {
|
|
212
|
+
label: data === null || data === void 0 ? void 0 : data.label
|
|
213
|
+
});
|
|
131
214
|
}
|
|
132
215
|
}];
|
|
133
216
|
|
|
@@ -139,7 +222,17 @@ var EditableRefdataList = function EditableRefdataList(_ref) {
|
|
|
139
222
|
}),
|
|
140
223
|
icon: 'trash',
|
|
141
224
|
callback: function callback(data) {
|
|
142
|
-
return
|
|
225
|
+
return setDeleteModal({
|
|
226
|
+
visible: true,
|
|
227
|
+
refdata: data
|
|
228
|
+
});
|
|
229
|
+
},
|
|
230
|
+
ariaLabel: function ariaLabel(data) {
|
|
231
|
+
return intl.formatMessage({
|
|
232
|
+
id: 'stripes-kint-components.editableRefdataList.deleteAriaLabel'
|
|
233
|
+
}, {
|
|
234
|
+
label: data === null || data === void 0 ? void 0 : data.label
|
|
235
|
+
});
|
|
143
236
|
}
|
|
144
237
|
});
|
|
145
238
|
}
|
|
@@ -147,60 +240,66 @@ var EditableRefdataList = function EditableRefdataList(_ref) {
|
|
|
147
240
|
return actionArray;
|
|
148
241
|
};
|
|
149
242
|
|
|
150
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
243
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
244
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionList.default, {
|
|
245
|
+
actionAssigner: actionAssigner,
|
|
246
|
+
columnMapping: {
|
|
247
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
248
|
+
id: "stripes-kint-components.editableRefdataList.label"
|
|
249
|
+
}),
|
|
250
|
+
value: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
251
|
+
id: "stripes-kint-components.editableRefdataList.value"
|
|
252
|
+
})
|
|
253
|
+
},
|
|
254
|
+
contentData: contentData,
|
|
255
|
+
creatableFields: {
|
|
256
|
+
value: function value() {
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
createCallback: refdata !== null && refdata !== void 0 && refdata.internal ? null : function (data) {
|
|
261
|
+
return editRefdataValue(data);
|
|
262
|
+
},
|
|
263
|
+
editableFields: {
|
|
264
|
+
value: function value() {
|
|
265
|
+
return false;
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
label: label,
|
|
269
|
+
visibleFields: ['label', 'value']
|
|
270
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ConfirmationModal, {
|
|
271
|
+
confirmLabel: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
272
|
+
id: "stripes-kint-components.editableRefdataList.delete"
|
|
155
273
|
}),
|
|
156
|
-
|
|
157
|
-
id: "stripes-kint-components.editableRefdataList.
|
|
158
|
-
})
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
274
|
+
heading: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
275
|
+
id: "stripes-kint-components.editableRefdataList.deleteLabel"
|
|
276
|
+
}),
|
|
277
|
+
message: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
278
|
+
id: "stripes-kint-components.editableRefdataList.deleteLabel.confirmMessage",
|
|
279
|
+
values: {
|
|
280
|
+
name: deleteModal === null || deleteModal === void 0 ? void 0 : (_deleteModal$refdata2 = deleteModal.refdata) === null || _deleteModal$refdata2 === void 0 ? void 0 : _deleteModal$refdata2.label
|
|
281
|
+
}
|
|
282
|
+
}),
|
|
283
|
+
onCancel: function onCancel() {
|
|
284
|
+
return setDeleteModal({
|
|
285
|
+
visible: false,
|
|
286
|
+
refdata: null
|
|
287
|
+
});
|
|
288
|
+
},
|
|
289
|
+
onConfirm: function onConfirm() {
|
|
290
|
+
var _deleteModal$refdata3;
|
|
291
|
+
|
|
292
|
+
deleteRefdataValue(deleteModal === null || deleteModal === void 0 ? void 0 : (_deleteModal$refdata3 = deleteModal.refdata) === null || _deleteModal$refdata3 === void 0 ? void 0 : _deleteModal$refdata3.id);
|
|
293
|
+
setDeleteModal({
|
|
294
|
+
visible: false,
|
|
295
|
+
refdata: null
|
|
296
|
+
});
|
|
297
|
+
},
|
|
298
|
+
open: deleteModal === null || deleteModal === void 0 ? void 0 : deleteModal.visible
|
|
299
|
+
})]
|
|
176
300
|
});
|
|
177
301
|
};
|
|
178
302
|
|
|
179
|
-
__signature__(EditableRefdataList, "useRefdata{{ data: { 0: refdata } = {}, isLoading: isRefdataLoading }}\nuseState{[contentData, setContentData]([])}\nuseEffect{}\nuseMutateRefdataValue{{ delete: deleteRefdataValue, put: editRefdataValue }}", function () {
|
|
180
|
-
return [_hooks.useRefdata, _hooks.useMutateRefdataValue];
|
|
181
|
-
});
|
|
182
|
-
|
|
183
303
|
EditableRefdataList.propTypes = propTypes;
|
|
184
304
|
var _default = EditableRefdataList;
|
|
185
|
-
|
|
186
|
-
exports.default = _default2;
|
|
187
|
-
;
|
|
188
|
-
|
|
189
|
-
(function () {
|
|
190
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
191
|
-
|
|
192
|
-
if (!reactHotLoader) {
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
reactHotLoader.register(propTypes, "propTypes", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableRefdataList/EditableRefdataList.js");
|
|
197
|
-
reactHotLoader.register(EditableRefdataList, "EditableRefdataList", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableRefdataList/EditableRefdataList.js");
|
|
198
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableRefdataList/EditableRefdataList.js");
|
|
199
|
-
})();
|
|
200
|
-
|
|
201
|
-
;
|
|
202
|
-
|
|
203
|
-
(function () {
|
|
204
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
205
|
-
leaveModule && leaveModule(module);
|
|
206
|
-
})();
|
|
305
|
+
exports.default = _default;
|
|
@@ -12,8 +12,4 @@ Object.defineProperty(exports, "default", {
|
|
|
12
12
|
|
|
13
13
|
var _EditableRefdataList = _interopRequireDefault(require("./EditableRefdataList"));
|
|
14
14
|
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
|
|
17
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -21,15 +21,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
(function () {
|
|
25
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
26
|
-
enterModule && enterModule(module);
|
|
27
|
-
})();
|
|
28
|
-
|
|
29
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
30
|
-
return a;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
24
|
var EditableSettingsList = function EditableSettingsList(_ref) {
|
|
34
25
|
var data = _ref.data,
|
|
35
26
|
initialValues = _ref.initialValues,
|
|
@@ -70,24 +61,4 @@ EditableSettingsList.propTypes = {
|
|
|
70
61
|
label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node, _propTypes.default.object])
|
|
71
62
|
};
|
|
72
63
|
var _default = EditableSettingsList;
|
|
73
|
-
|
|
74
|
-
exports.default = _default2;
|
|
75
|
-
;
|
|
76
|
-
|
|
77
|
-
(function () {
|
|
78
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
79
|
-
|
|
80
|
-
if (!reactHotLoader) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
reactHotLoader.register(EditableSettingsList, "EditableSettingsList", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/EditableSettingsList.js");
|
|
85
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/EditableSettingsList.js");
|
|
86
|
-
})();
|
|
87
|
-
|
|
88
|
-
;
|
|
89
|
-
|
|
90
|
-
(function () {
|
|
91
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
92
|
-
leaveModule && leaveModule(module);
|
|
93
|
-
})();
|
|
64
|
+
exports.default = _default;
|
|
@@ -17,21 +17,12 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
(function () {
|
|
21
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
22
|
-
enterModule && enterModule(module);
|
|
23
|
-
})();
|
|
24
|
-
|
|
25
20
|
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; }
|
|
26
21
|
|
|
27
22
|
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; }
|
|
28
23
|
|
|
29
24
|
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; }
|
|
30
25
|
|
|
31
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
32
|
-
return a;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
26
|
var EditableSettingsListFieldArray = function EditableSettingsListFieldArray(_ref) {
|
|
36
27
|
var data = _ref.data,
|
|
37
28
|
fields = _ref.fields,
|
|
@@ -67,24 +58,4 @@ EditableSettingsListFieldArray.propTypes = {
|
|
|
67
58
|
initialValues: _propTypes.default.object
|
|
68
59
|
};
|
|
69
60
|
var _default = EditableSettingsListFieldArray;
|
|
70
|
-
|
|
71
|
-
exports.default = _default2;
|
|
72
|
-
;
|
|
73
|
-
|
|
74
|
-
(function () {
|
|
75
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
76
|
-
|
|
77
|
-
if (!reactHotLoader) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
reactHotLoader.register(EditableSettingsListFieldArray, "EditableSettingsListFieldArray", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/EditableSettingsListFieldArray.js");
|
|
82
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/EditableSettingsListFieldArray.js");
|
|
83
|
-
})();
|
|
84
|
-
|
|
85
|
-
;
|
|
86
|
-
|
|
87
|
-
(function () {
|
|
88
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
89
|
-
leaveModule && leaveModule(module);
|
|
90
|
-
})();
|
|
61
|
+
exports.default = _default;
|
|
@@ -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
|
var _react = _interopRequireDefault(require("react"));
|
|
4
6
|
|
|
5
7
|
require("@folio/stripes-erm-components/test/jest/__mock__");
|
|
@@ -16,19 +18,12 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
16
18
|
|
|
17
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
20
|
|
|
19
|
-
(function () {
|
|
20
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
21
|
-
enterModule && enterModule(module);
|
|
22
|
-
})();
|
|
21
|
+
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; }
|
|
23
22
|
|
|
24
23
|
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); } }
|
|
25
24
|
|
|
26
25
|
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); }); }; }
|
|
27
26
|
|
|
28
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
29
|
-
return a;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
27
|
var onSubmit = jest.fn();
|
|
33
28
|
jest.mock('./SettingField', function () {
|
|
34
29
|
return {
|
|
@@ -69,8 +64,8 @@ var multipleSettings = [{
|
|
|
69
64
|
describe('EditableSettingsListFieldArray', function () {
|
|
70
65
|
describe('with empty initial values', function () {
|
|
71
66
|
var renderComponent;
|
|
72
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
73
|
-
return
|
|
67
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
68
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
74
69
|
while (1) {
|
|
75
70
|
switch (_context.prev = _context.next) {
|
|
76
71
|
case 0:
|
|
@@ -98,8 +93,8 @@ describe('EditableSettingsListFieldArray', function () {
|
|
|
98
93
|
});
|
|
99
94
|
describe('with initial value set', function () {
|
|
100
95
|
var renderComponent;
|
|
101
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
102
|
-
return
|
|
96
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
97
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
103
98
|
while (1) {
|
|
104
99
|
switch (_context2.prev = _context2.next) {
|
|
105
100
|
case 0:
|
|
@@ -129,8 +124,8 @@ describe('EditableSettingsListFieldArray', function () {
|
|
|
129
124
|
});
|
|
130
125
|
describe('with multiple initial values set', function () {
|
|
131
126
|
var renderComponent;
|
|
132
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
133
|
-
return
|
|
127
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
128
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
134
129
|
while (1) {
|
|
135
130
|
switch (_context3.prev = _context3.next) {
|
|
136
131
|
case 0:
|
|
@@ -158,24 +153,4 @@ describe('EditableSettingsListFieldArray', function () {
|
|
|
158
153
|
expect(getAllByText('SettingField').length).toEqual(multipleSettings.length);
|
|
159
154
|
});
|
|
160
155
|
});
|
|
161
|
-
});
|
|
162
|
-
;
|
|
163
|
-
|
|
164
|
-
(function () {
|
|
165
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
166
|
-
|
|
167
|
-
if (!reactHotLoader) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
reactHotLoader.register(onSubmit, "onSubmit", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js");
|
|
172
|
-
reactHotLoader.register(settings, "settings", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js");
|
|
173
|
-
reactHotLoader.register(multipleSettings, "multipleSettings", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js");
|
|
174
|
-
})();
|
|
175
|
-
|
|
176
|
-
;
|
|
177
|
-
|
|
178
|
-
(function () {
|
|
179
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
180
|
-
leaveModule && leaveModule(module);
|
|
181
|
-
})();
|
|
156
|
+
});
|
|
@@ -21,11 +21,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
(function () {
|
|
25
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
26
|
-
enterModule && enterModule(module);
|
|
27
|
-
})();
|
|
28
|
-
|
|
29
24
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
30
25
|
|
|
31
26
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -38,10 +33,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
38
33
|
|
|
39
34
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
40
35
|
|
|
41
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
42
|
-
return a;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
36
|
var EditSettingValue = function EditSettingValue(props) {
|
|
46
37
|
var input = props.input,
|
|
47
38
|
setting = props.currentSetting,
|
|
@@ -124,10 +115,6 @@ var EditSettingValue = function EditSettingValue(props) {
|
|
|
124
115
|
}
|
|
125
116
|
};
|
|
126
117
|
|
|
127
|
-
__signature__(EditSettingValue, "useIntl{intl}", function () {
|
|
128
|
-
return [_reactIntl.useIntl];
|
|
129
|
-
});
|
|
130
|
-
|
|
131
118
|
EditSettingValue.propTypes = {
|
|
132
119
|
currentSetting: _propTypes.default.shape({
|
|
133
120
|
settingType: _propTypes.default.string
|
|
@@ -142,24 +129,4 @@ EditSettingValue.propTypes = {
|
|
|
142
129
|
}))
|
|
143
130
|
};
|
|
144
131
|
var _default = EditSettingValue;
|
|
145
|
-
|
|
146
|
-
exports.default = _default2;
|
|
147
|
-
;
|
|
148
|
-
|
|
149
|
-
(function () {
|
|
150
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
151
|
-
|
|
152
|
-
if (!reactHotLoader) {
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
reactHotLoader.register(EditSettingValue, "EditSettingValue", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/EditSettingValue.js");
|
|
157
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/EditSettingValue.js");
|
|
158
|
-
})();
|
|
159
|
-
|
|
160
|
-
;
|
|
161
|
-
|
|
162
|
-
(function () {
|
|
163
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
164
|
-
leaveModule && leaveModule(module);
|
|
165
|
-
})();
|
|
132
|
+
exports.default = _default;
|
|
@@ -14,15 +14,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
14
14
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
|
|
17
|
-
(function () {
|
|
18
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
19
|
-
enterModule && enterModule(module);
|
|
20
|
-
})();
|
|
21
|
-
|
|
22
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
23
|
-
return a;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
17
|
var onSubmit = jest.fn();
|
|
27
18
|
var stringSetting = {
|
|
28
19
|
id: '12345',
|
|
@@ -420,28 +411,4 @@ describe('EditSettingValue', function () {
|
|
|
420
411
|
});
|
|
421
412
|
});
|
|
422
413
|
});
|
|
423
|
-
});
|
|
424
|
-
;
|
|
425
|
-
|
|
426
|
-
(function () {
|
|
427
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
428
|
-
|
|
429
|
-
if (!reactHotLoader) {
|
|
430
|
-
return;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
reactHotLoader.register(onSubmit, "onSubmit", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/EditSettingValue.test.js");
|
|
434
|
-
reactHotLoader.register(stringSetting, "stringSetting", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/EditSettingValue.test.js");
|
|
435
|
-
reactHotLoader.register(refdata, "refdata", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/EditSettingValue.test.js");
|
|
436
|
-
reactHotLoader.register(moreRefdata, "moreRefdata", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/EditSettingValue.test.js");
|
|
437
|
-
reactHotLoader.register(refdataSetting, "refdataSetting", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/EditSettingValue.test.js");
|
|
438
|
-
reactHotLoader.register(templates, "templates", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/EditSettingValue.test.js");
|
|
439
|
-
reactHotLoader.register(templateSetting, "templateSetting", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/EditSettingValue.test.js");
|
|
440
|
-
})();
|
|
441
|
-
|
|
442
|
-
;
|
|
443
|
-
|
|
444
|
-
(function () {
|
|
445
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
446
|
-
leaveModule && leaveModule(module);
|
|
447
|
-
})();
|
|
414
|
+
});
|