@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
|
@@ -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
|
+
});
|
|
@@ -13,15 +13,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
(function () {
|
|
17
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
18
|
-
enterModule && enterModule(module);
|
|
19
|
-
})();
|
|
20
|
-
|
|
21
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
16
|
var RenderSettingValue = function RenderSettingValue(props) {
|
|
26
17
|
var setting = props.currentSetting,
|
|
27
18
|
refdata = props.refdata,
|
|
@@ -94,29 +85,5 @@ var RenderSettingValue = function RenderSettingValue(props) {
|
|
|
94
85
|
}
|
|
95
86
|
};
|
|
96
87
|
|
|
97
|
-
__signature__(RenderSettingValue, "useIntl{intl}", function () {
|
|
98
|
-
return [_reactIntl.useIntl];
|
|
99
|
-
});
|
|
100
|
-
|
|
101
88
|
var _default = RenderSettingValue;
|
|
102
|
-
|
|
103
|
-
exports.default = _default2;
|
|
104
|
-
;
|
|
105
|
-
|
|
106
|
-
(function () {
|
|
107
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
108
|
-
|
|
109
|
-
if (!reactHotLoader) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
reactHotLoader.register(RenderSettingValue, "RenderSettingValue", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.js");
|
|
114
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.js");
|
|
115
|
-
})();
|
|
116
|
-
|
|
117
|
-
;
|
|
118
|
-
|
|
119
|
-
(function () {
|
|
120
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
121
|
-
leaveModule && leaveModule(module);
|
|
122
|
-
})();
|
|
89
|
+
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__");
|
|
@@ -12,19 +14,12 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
12
14
|
|
|
13
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
16
|
|
|
15
|
-
(function () {
|
|
16
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
17
|
-
enterModule && enterModule(module);
|
|
18
|
-
})();
|
|
17
|
+
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; }
|
|
19
18
|
|
|
20
19
|
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); } }
|
|
21
20
|
|
|
22
21
|
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); }); }; }
|
|
23
22
|
|
|
24
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
25
|
-
return a;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
23
|
var stringSetting = {
|
|
29
24
|
id: '12345',
|
|
30
25
|
key: 'testSettingKey',
|
|
@@ -126,8 +121,8 @@ describe('RenderSettingValue', function () {
|
|
|
126
121
|
describe('render string settings', function () {
|
|
127
122
|
describe('render a string setting', function () {
|
|
128
123
|
var renderComponent;
|
|
129
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
130
|
-
return
|
|
124
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
125
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
131
126
|
while (1) {
|
|
132
127
|
switch (_context.prev = _context.next) {
|
|
133
128
|
case 0:
|
|
@@ -153,8 +148,8 @@ describe('RenderSettingValue', function () {
|
|
|
153
148
|
});
|
|
154
149
|
describe('render a string setting without a value', function () {
|
|
155
150
|
var renderComponent;
|
|
156
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
157
|
-
return
|
|
151
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
152
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
158
153
|
while (1) {
|
|
159
154
|
switch (_context2.prev = _context2.next) {
|
|
160
155
|
case 0:
|
|
@@ -180,8 +175,8 @@ describe('RenderSettingValue', function () {
|
|
|
180
175
|
});
|
|
181
176
|
describe('render a string setting without a value or default', function () {
|
|
182
177
|
var renderComponent;
|
|
183
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
184
|
-
return
|
|
178
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
179
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
185
180
|
while (1) {
|
|
186
181
|
switch (_context3.prev = _context3.next) {
|
|
187
182
|
case 0:
|
|
@@ -209,8 +204,8 @@ describe('RenderSettingValue', function () {
|
|
|
209
204
|
describe('render refdata settings', function () {
|
|
210
205
|
describe('render a refdata setting', function () {
|
|
211
206
|
var renderComponent;
|
|
212
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
213
|
-
return
|
|
207
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
208
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
214
209
|
while (1) {
|
|
215
210
|
switch (_context4.prev = _context4.next) {
|
|
216
211
|
case 0:
|
|
@@ -237,8 +232,8 @@ describe('RenderSettingValue', function () {
|
|
|
237
232
|
});
|
|
238
233
|
describe('render a refdata setting without a value', function () {
|
|
239
234
|
var renderComponent;
|
|
240
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
241
|
-
return
|
|
235
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
236
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
242
237
|
while (1) {
|
|
243
238
|
switch (_context5.prev = _context5.next) {
|
|
244
239
|
case 0:
|
|
@@ -265,8 +260,8 @@ describe('RenderSettingValue', function () {
|
|
|
265
260
|
});
|
|
266
261
|
describe('render a refdata setting without a value or default', function () {
|
|
267
262
|
var renderComponent;
|
|
268
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
269
|
-
return
|
|
263
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
264
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
270
265
|
while (1) {
|
|
271
266
|
switch (_context6.prev = _context6.next) {
|
|
272
267
|
case 0:
|
|
@@ -295,8 +290,8 @@ describe('RenderSettingValue', function () {
|
|
|
295
290
|
describe('render password settings', function () {
|
|
296
291
|
describe('render a password setting', function () {
|
|
297
292
|
var renderComponent;
|
|
298
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
299
|
-
return
|
|
293
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
294
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
300
295
|
while (1) {
|
|
301
296
|
switch (_context7.prev = _context7.next) {
|
|
302
297
|
case 0:
|
|
@@ -322,8 +317,8 @@ describe('RenderSettingValue', function () {
|
|
|
322
317
|
});
|
|
323
318
|
describe('render a password setting without a value', function () {
|
|
324
319
|
var renderComponent;
|
|
325
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
326
|
-
return
|
|
320
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
321
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
327
322
|
while (1) {
|
|
328
323
|
switch (_context8.prev = _context8.next) {
|
|
329
324
|
case 0:
|
|
@@ -349,8 +344,8 @@ describe('RenderSettingValue', function () {
|
|
|
349
344
|
});
|
|
350
345
|
describe('render a password setting without a value or default', function () {
|
|
351
346
|
var renderComponent;
|
|
352
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
353
|
-
return
|
|
347
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
348
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
354
349
|
while (1) {
|
|
355
350
|
switch (_context9.prev = _context9.next) {
|
|
356
351
|
case 0:
|
|
@@ -378,8 +373,8 @@ describe('RenderSettingValue', function () {
|
|
|
378
373
|
describe('render template settings', function () {
|
|
379
374
|
describe('render a template setting', function () {
|
|
380
375
|
var renderComponent;
|
|
381
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
382
|
-
return
|
|
376
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
377
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
383
378
|
while (1) {
|
|
384
379
|
switch (_context10.prev = _context10.next) {
|
|
385
380
|
case 0:
|
|
@@ -406,8 +401,8 @@ describe('RenderSettingValue', function () {
|
|
|
406
401
|
});
|
|
407
402
|
describe('render a template setting without a value', function () {
|
|
408
403
|
var renderComponent;
|
|
409
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
410
|
-
return
|
|
404
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
405
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
411
406
|
while (1) {
|
|
412
407
|
switch (_context11.prev = _context11.next) {
|
|
413
408
|
case 0:
|
|
@@ -434,8 +429,8 @@ describe('RenderSettingValue', function () {
|
|
|
434
429
|
});
|
|
435
430
|
describe('render a template setting without a value or default', function () {
|
|
436
431
|
var renderComponent;
|
|
437
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
438
|
-
return
|
|
432
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
433
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
439
434
|
while (1) {
|
|
440
435
|
switch (_context12.prev = _context12.next) {
|
|
441
436
|
case 0:
|
|
@@ -461,35 +456,4 @@ describe('RenderSettingValue', function () {
|
|
|
461
456
|
});
|
|
462
457
|
});
|
|
463
458
|
});
|
|
464
|
-
});
|
|
465
|
-
;
|
|
466
|
-
|
|
467
|
-
(function () {
|
|
468
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
469
|
-
|
|
470
|
-
if (!reactHotLoader) {
|
|
471
|
-
return;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
reactHotLoader.register(stringSetting, "stringSetting", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
475
|
-
reactHotLoader.register(stringSettingNoValue, "stringSettingNoValue", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
476
|
-
reactHotLoader.register(stringSettingNoValueOrDefault, "stringSettingNoValueOrDefault", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
477
|
-
reactHotLoader.register(passwordSetting, "passwordSetting", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
478
|
-
reactHotLoader.register(passwordSettingNoValue, "passwordSettingNoValue", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
479
|
-
reactHotLoader.register(passwordSettingNoValueOrDefault, "passwordSettingNoValueOrDefault", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
480
|
-
reactHotLoader.register(refdata, "refdata", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
481
|
-
reactHotLoader.register(refdataSetting, "refdataSetting", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
482
|
-
reactHotLoader.register(refdataSettingNoValue, "refdataSettingNoValue", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
483
|
-
reactHotLoader.register(refdataSettingNoValueOrDefault, "refdataSettingNoValueOrDefault", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
484
|
-
reactHotLoader.register(templates, "templates", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
485
|
-
reactHotLoader.register(templateSetting, "templateSetting", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
486
|
-
reactHotLoader.register(templateSettingNoValue, "templateSettingNoValue", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
487
|
-
reactHotLoader.register(templateSettingNoValueOrDefault, "templateSettingNoValueOrDefault", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js");
|
|
488
|
-
})();
|
|
489
|
-
|
|
490
|
-
;
|
|
491
|
-
|
|
492
|
-
(function () {
|
|
493
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
494
|
-
leaveModule && leaveModule(module);
|
|
495
|
-
})();
|
|
459
|
+
});
|
|
@@ -33,11 +33,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
33
33
|
|
|
34
34
|
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; }
|
|
35
35
|
|
|
36
|
-
(function () {
|
|
37
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
38
|
-
enterModule && enterModule(module);
|
|
39
|
-
})();
|
|
40
|
-
|
|
41
36
|
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
37
|
|
|
43
38
|
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; }
|
|
@@ -56,10 +51,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
56
51
|
|
|
57
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
58
53
|
|
|
59
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
60
|
-
return a;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
54
|
var SettingField = function SettingField(settingFieldProps) {
|
|
64
55
|
var onSave = settingFieldProps.onSave,
|
|
65
56
|
_settingFieldProps$se = settingFieldProps.settingData;
|
|
@@ -150,10 +141,6 @@ var SettingField = function SettingField(settingFieldProps) {
|
|
|
150
141
|
});
|
|
151
142
|
};
|
|
152
143
|
|
|
153
|
-
__signature__(SettingField, "useState{[editing, setEditing](false)}\nuseIntl{intl}\nuseContext{{ intlKey, refdataEndpoint, templateEndpoint }}\nuseRefdata{{\n 0: {\n values: refdata = []\n } = {}\n }}\nuseTemplates{templates}", function () {
|
|
154
|
-
return [_reactIntl.useIntl, _hooks.useRefdata, _hooks.useTemplates];
|
|
155
|
-
});
|
|
156
|
-
|
|
157
144
|
SettingField.propTypes = {
|
|
158
145
|
settingData: _propTypes.default.shape({
|
|
159
146
|
refdatavalues: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
@@ -164,24 +151,4 @@ SettingField.propTypes = {
|
|
|
164
151
|
onSave: _propTypes.default.func
|
|
165
152
|
};
|
|
166
153
|
var _default = SettingField;
|
|
167
|
-
|
|
168
|
-
exports.default = _default2;
|
|
169
|
-
;
|
|
170
|
-
|
|
171
|
-
(function () {
|
|
172
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
173
|
-
|
|
174
|
-
if (!reactHotLoader) {
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
reactHotLoader.register(SettingField, "SettingField", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/SettingField.js");
|
|
179
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/SettingField.js");
|
|
180
|
-
})();
|
|
181
|
-
|
|
182
|
-
;
|
|
183
|
-
|
|
184
|
-
(function () {
|
|
185
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
186
|
-
leaveModule && leaveModule(module);
|
|
187
|
-
})();
|
|
154
|
+
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
|
var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
|
|
@@ -20,19 +22,12 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
20
22
|
|
|
21
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
24
|
|
|
23
|
-
(function () {
|
|
24
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
25
|
-
enterModule && enterModule(module);
|
|
26
|
-
})();
|
|
25
|
+
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; }
|
|
27
26
|
|
|
28
27
|
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); } }
|
|
29
28
|
|
|
30
29
|
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); }); }; }
|
|
31
30
|
|
|
32
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
33
|
-
return a;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
31
|
var onSubmit = jest.fn();
|
|
37
32
|
var onSave = jest.fn().mockResolvedValue();
|
|
38
33
|
jest.mock('./EditSettingValue', function () {
|
|
@@ -68,8 +63,8 @@ var setting = {
|
|
|
68
63
|
};
|
|
69
64
|
describe('SettingField', function () {
|
|
70
65
|
var renderComponent;
|
|
71
|
-
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
72
|
-
return
|
|
66
|
+
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
67
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
73
68
|
while (1) {
|
|
74
69
|
switch (_context.prev = _context.next) {
|
|
75
70
|
case 0:
|
|
@@ -101,10 +96,10 @@ describe('SettingField', function () {
|
|
|
101
96
|
test('renders the edit button', function () {
|
|
102
97
|
(0, _stripesTesting.Button)('Edit').exists();
|
|
103
98
|
});
|
|
104
|
-
it('clicking edit/save works as expected', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
99
|
+
it('clicking edit/save works as expected', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
105
100
|
var _renderComponent2, getByRole, findByText, editButton, finishEditing;
|
|
106
101
|
|
|
107
|
-
return
|
|
102
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
108
103
|
while (1) {
|
|
109
104
|
switch (_context2.prev = _context2.next) {
|
|
110
105
|
case 0:
|
|
@@ -157,24 +152,4 @@ describe('SettingField', function () {
|
|
|
157
152
|
}
|
|
158
153
|
}, _callee2);
|
|
159
154
|
})));
|
|
160
|
-
});
|
|
161
|
-
;
|
|
162
|
-
|
|
163
|
-
(function () {
|
|
164
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
165
|
-
|
|
166
|
-
if (!reactHotLoader) {
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
reactHotLoader.register(onSubmit, "onSubmit", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/SettingField.test.js");
|
|
171
|
-
reactHotLoader.register(onSave, "onSave", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/SettingField.test.js");
|
|
172
|
-
reactHotLoader.register(setting, "setting", "/home/ethan/FolioModules/stripes-kint-components/src/lib/EditableSettingsList/SettingField/SettingField.test.js");
|
|
173
|
-
})();
|
|
174
|
-
|
|
175
|
-
;
|
|
176
|
-
|
|
177
|
-
(function () {
|
|
178
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
179
|
-
leaveModule && leaveModule(module);
|
|
180
|
-
})();
|
|
155
|
+
});
|
|
@@ -28,8 +28,4 @@ var _RenderSettingValue = _interopRequireDefault(require("./RenderSettingValue")
|
|
|
28
28
|
|
|
29
29
|
var _EditSettingValue = _interopRequireDefault(require("./EditSettingValue"));
|
|
30
30
|
|
|
31
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
32
|
-
|
|
33
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
34
|
-
return a;
|
|
35
|
-
};
|
|
31
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -28,8 +28,4 @@ var _EditableSettingsListFieldArray = _interopRequireDefault(require("./Editable
|
|
|
28
28
|
|
|
29
29
|
var _SettingField = require("./SettingField");
|
|
30
30
|
|
|
31
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
32
|
-
|
|
33
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
34
|
-
return a;
|
|
35
|
-
};
|
|
31
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -20,11 +20,6 @@ var _excluded = ["footer", "onClose"],
|
|
|
20
20
|
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
22
|
|
|
23
|
-
(function () {
|
|
24
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
25
|
-
enterModule && enterModule(module);
|
|
26
|
-
})();
|
|
27
|
-
|
|
28
23
|
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; }
|
|
29
24
|
|
|
30
25
|
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; }
|
|
@@ -35,10 +30,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
35
30
|
|
|
36
31
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
37
32
|
|
|
38
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
39
|
-
return a;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
33
|
var FormModal = function FormModal(_ref) {
|
|
43
34
|
var _children = _ref.children,
|
|
44
35
|
_ref$labelOverrides = _ref.labelOverrides,
|
|
@@ -55,7 +46,10 @@ var FormModal = function FormModal(_ref) {
|
|
|
55
46
|
}, formProps), {}, {
|
|
56
47
|
children: function children(_ref2) {
|
|
57
48
|
var handleSubmit = _ref2.handleSubmit,
|
|
58
|
-
|
|
49
|
+
_ref2$form = _ref2.form,
|
|
50
|
+
getState = _ref2$form.getState,
|
|
51
|
+
restart = _ref2$form.restart;
|
|
52
|
+
var formState = getState();
|
|
59
53
|
|
|
60
54
|
var handleClose = function handleClose(e) {
|
|
61
55
|
onClose(e);
|
|
@@ -67,18 +61,24 @@ var FormModal = function FormModal(_ref) {
|
|
|
67
61
|
|
|
68
62
|
if (footer) {
|
|
69
63
|
return footer({
|
|
64
|
+
formState: formState,
|
|
70
65
|
handleSubmit: handleSubmit,
|
|
71
66
|
handleClose: handleClose
|
|
72
67
|
});
|
|
73
68
|
}
|
|
74
69
|
|
|
70
|
+
var invalid = formState.invalid,
|
|
71
|
+
pristine = formState.pristine,
|
|
72
|
+
submitting = formState.submitting;
|
|
75
73
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.ModalFooter, {
|
|
76
74
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
77
75
|
buttonStyle: "primary",
|
|
76
|
+
disabled: submitting || invalid || pristine,
|
|
78
77
|
marginBottom0: true,
|
|
79
78
|
onClick: handleSubmit,
|
|
79
|
+
type: "submit",
|
|
80
80
|
children: (_labelOverrides$save = labelOverrides.save) !== null && _labelOverrides$save !== void 0 ? _labelOverrides$save : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
81
|
-
id: "stripes-kint-components.
|
|
81
|
+
id: "stripes-kint-components.saveAndClose"
|
|
82
82
|
})
|
|
83
83
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
84
84
|
marginBottom0: true,
|
|
@@ -114,24 +114,4 @@ FormModal.propTypes = {
|
|
|
114
114
|
onSubmit: _propTypes.default.func
|
|
115
115
|
};
|
|
116
116
|
var _default = FormModal;
|
|
117
|
-
|
|
118
|
-
exports.default = _default2;
|
|
119
|
-
;
|
|
120
|
-
|
|
121
|
-
(function () {
|
|
122
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
123
|
-
|
|
124
|
-
if (!reactHotLoader) {
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
reactHotLoader.register(FormModal, "FormModal", "/home/ethan/FolioModules/stripes-kint-components/src/lib/FormModal/FormModal.js");
|
|
129
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/FormModal/FormModal.js");
|
|
130
|
-
})();
|
|
131
|
-
|
|
132
|
-
;
|
|
133
|
-
|
|
134
|
-
(function () {
|
|
135
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
136
|
-
leaveModule && leaveModule(module);
|
|
137
|
-
})();
|
|
117
|
+
exports.default = _default;
|
|
@@ -12,8 +12,4 @@ Object.defineProperty(exports, "default", {
|
|
|
12
12
|
|
|
13
13
|
var _FormModal = _interopRequireDefault(require("./FormModal"));
|
|
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 }; }
|