@k-int/stripes-kint-components 3.0.4 → 3.1.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 +10 -10
- package/LICENSE +201 -0
- package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +6 -19
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +2 -182
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +64 -94
- package/es/index.js +13 -27
- package/es/lib/ActionList/ActionList.js +20 -40
- package/es/lib/ActionList/ActionListFieldArray.js +67 -129
- package/es/lib/ActionList/index.js +0 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +34 -61
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +2 -9
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +92 -138
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +3 -18
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +18 -51
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +13 -35
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +5 -14
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -23
- package/es/lib/CustomProperties/Config/index.js +0 -5
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +8 -14
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +1 -9
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +25 -35
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +1 -9
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +32 -75
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +3 -20
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +34 -91
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +6 -33
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +15 -27
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +3 -13
- package/es/lib/CustomProperties/Edit/index.js +0 -6
- package/es/lib/CustomProperties/Edit/testResources.js +0 -3
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +35 -67
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +2 -19
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +13 -42
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -12
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +6 -18
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +2 -19
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +10 -23
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +2 -19
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +13 -31
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +1 -32
- package/es/lib/CustomProperties/Filter/index.js +0 -7
- package/es/lib/CustomProperties/Filter/testResources.js +0 -3
- package/es/lib/CustomProperties/Filter/useOperators.js +5 -19
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +3 -15
- package/es/lib/CustomProperties/Filter/useValueProps.js +5 -22
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +8 -14
- package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +1 -10
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +45 -62
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +1 -13
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +11 -33
- package/es/lib/CustomProperties/View/index.js +0 -4
- package/es/lib/CustomProperties/index.js +0 -4
- package/es/lib/CycleButton/CycleButton.js +8 -33
- package/es/lib/CycleButton/index.js +0 -2
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +87 -132
- package/es/lib/EditableRefdataCategoryList/index.js +0 -2
- package/es/lib/EditableRefdataList/EditableRefdataList.js +92 -140
- package/es/lib/EditableRefdataList/index.js +0 -2
- package/es/lib/EditableSettingsList/EditableSettingsList.js +7 -17
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +6 -19
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +4 -19
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +7 -29
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +19 -26
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +6 -23
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +14 -35
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +18 -55
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/index.js +0 -4
- package/es/lib/EditableSettingsList/index.js +0 -4
- package/es/lib/FormModal/FormModal.js +16 -35
- package/es/lib/FormModal/index.js +0 -2
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +10 -31
- package/es/lib/FormattedKintMessage/index.js +0 -2
- package/es/lib/IconSelect/IconSelect.js +26 -63
- package/es/lib/IconSelect/index.js +0 -2
- package/es/lib/NoResultsMessage/NoResultsMessage.js +18 -28
- package/es/lib/NoResultsMessage/index.js +0 -2
- package/es/lib/QueryTypedown/QueryTypedown.js +9 -36
- package/es/lib/QueryTypedown/index.js +0 -2
- package/es/lib/RefdataButtons/RefdataButtons.js +5 -24
- package/es/lib/RefdataButtons/index.js +0 -2
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +148 -0
- package/es/lib/ResponsiveButtonGroup/index.js +13 -0
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +74 -0
- package/es/lib/RichSelect/RichSelect.js +37 -65
- package/es/lib/RichSelect/index.js +0 -3
- package/es/lib/RichSelect/useSelectedOption.js +3 -14
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +75 -93
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +20 -33
- package/es/lib/SASQLookupComponent/TableBody/index.js +0 -2
- package/es/lib/SASQLookupComponent/index.js +0 -3
- package/es/lib/SASQRoute/SASQRoute.js +21 -29
- package/es/lib/SASQRoute/index.js +0 -2
- package/es/lib/SASQViewComponent/SASQViewComponent.js +37 -41
- package/es/lib/SASQViewComponent/index.js +0 -2
- package/es/lib/SearchField/SearchField.js +1 -17
- package/es/lib/SearchField/index.js +0 -2
- package/es/lib/SettingPage/SettingPage.js +10 -25
- package/es/lib/SettingPage/SettingPagePane.js +3 -11
- package/es/lib/SettingPage/index.js +0 -3
- package/es/lib/Typedown/Typedown.js +51 -82
- package/es/lib/Typedown/index.js +0 -2
- package/es/lib/contexts/SettingsContext.js +0 -2
- package/es/lib/contexts/index.js +0 -2
- package/es/lib/hooks/__mocks__/index.js +0 -5
- package/es/lib/hooks/index.js +7 -18
- package/es/lib/hooks/settingsHooks/index.js +0 -4
- package/es/lib/hooks/settingsHooks/useAppSettings.js +6 -27
- package/es/lib/hooks/settingsHooks/useSettingSection.js +10 -20
- package/es/lib/hooks/settingsHooks/useSettings.js +13 -44
- package/es/lib/hooks/typedownHooks/index.js +0 -4
- package/es/lib/hooks/typedownHooks/useTypedown.js +17 -37
- package/es/lib/hooks/typedownHooks/useTypedownData.js +12 -26
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +5 -19
- package/es/lib/hooks/useActiveElement.js +3 -15
- package/es/lib/hooks/useCustomProperties.js +11 -25
- package/es/lib/hooks/useHelperApp.js +7 -30
- package/es/lib/hooks/useIntlKey.js +0 -7
- package/es/lib/hooks/useIntlKeyStore.js +2 -24
- package/es/lib/hooks/useInvalidateRefdata.js +0 -4
- package/es/lib/hooks/useKintIntl.js +13 -32
- package/es/lib/hooks/useKiwtFieldArray.js +5 -29
- package/es/lib/hooks/useKiwtSASQuery.js +12 -37
- package/es/lib/hooks/useLocalStorageState.js +5 -21
- package/es/lib/hooks/useMutateCustomProperties.js +11 -28
- package/es/lib/hooks/useMutateRefdataCategory.js +9 -29
- package/es/lib/hooks/useMutateRefdataValue.js +10 -27
- package/es/lib/hooks/useQIndex.js +3 -27
- package/es/lib/hooks/useRefdata.js +7 -16
- package/es/lib/hooks/useSASQQueryMeta.js +41 -0
- package/es/lib/hooks/useTemplates.js +6 -17
- package/es/lib/utils/buildUrl.js +1 -10
- package/es/lib/utils/generateKiwtQuery.js +0 -4
- package/es/lib/utils/generateKiwtQueryParams.js +24 -62
- package/es/lib/utils/groupCustomPropertiesByCtx.js +0 -14
- package/es/lib/utils/highlightString.js +6 -23
- package/es/lib/utils/index.js +0 -15
- package/es/lib/utils/matchString.js +0 -6
- package/es/lib/utils/parseErrorResponse.js +1 -23
- package/es/lib/utils/refdataQueryKey.js +0 -4
- package/es/lib/utils/selectorSafe.js +0 -2
- package/es/lib/utils/sortByLabel.js +0 -6
- package/es/lib/utils/toCamelCase.js +6 -5
- package/es/lib/utils/typedownQueryKey.js +0 -4
- package/es/lib/utils/validators.js +5 -38
- package/junit.xml +150 -150
- package/package.json +2 -2
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +4 -4
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +5 -5
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +29 -92
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +19 -19
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +15 -15
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +535 -0
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +146 -0
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +253 -0
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +99 -12
- 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 +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +53 -8
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +65 -11
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +9 -9
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +24 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +5 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +1 -1
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +187 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/index.html +74 -59
- 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 +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +20 -20
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +2 -2
- 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/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 +39 -39
- package/src/artifacts/coverage-jest/lcov.info +567 -359
- package/src/index.js +4 -1
- package/src/lib/CustomProperties/Edit/CustomPropertyField.js +0 -7
- package/src/lib/NoResultsMessage/NoResultsMessage.js +1 -1
- package/src/lib/ResponsiveButtonGroup/README.md +31 -0
- package/src/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +150 -0
- package/src/lib/ResponsiveButtonGroup/index.js +1 -0
- package/src/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +56 -0
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +34 -5
- package/src/lib/SASQRoute/SASQRoute.js +18 -3
- package/src/lib/SASQViewComponent/SASQViewComponent.js +23 -5
- package/src/lib/hooks/index.js +1 -0
- package/src/lib/hooks/useSASQQueryMeta.js +34 -0
- package/styles/ResponsiveButtonGroup.css +79 -0
- package/yarn-error.log +147 -0
|
@@ -4,44 +4,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _reactFinalForm = require("react-final-form");
|
|
13
|
-
|
|
14
10
|
var _components = require("@folio/stripes/components");
|
|
15
|
-
|
|
16
11
|
var _RefdataButtons = _interopRequireDefault(require("../../RefdataButtons"));
|
|
17
|
-
|
|
18
12
|
var _hooks = require("../../hooks");
|
|
19
|
-
|
|
20
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
15
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
25
|
-
|
|
26
16
|
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."); }
|
|
27
|
-
|
|
28
17
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
29
|
-
|
|
30
18
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
31
|
-
|
|
32
19
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
33
|
-
|
|
34
20
|
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; }
|
|
35
|
-
|
|
36
21
|
var EditSettingValue = function EditSettingValue(props) {
|
|
37
22
|
var setting = props.currentSetting,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
23
|
+
input = props.input,
|
|
24
|
+
passedIntlKey = props.intlKey,
|
|
25
|
+
passedIntlNS = props.intlNS,
|
|
26
|
+
_props$labelOverrides = props.labelOverrides,
|
|
27
|
+
labelOverrides = _props$labelOverrides === void 0 ? {} : _props$labelOverrides,
|
|
28
|
+
refdata = props.refdata,
|
|
29
|
+
templates = props.templates;
|
|
45
30
|
var kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
|
|
46
31
|
var fieldLabel = kintIntl.formatKintMessage({
|
|
47
32
|
id: 'settings.valueFor',
|
|
@@ -49,24 +34,20 @@ var EditSettingValue = function EditSettingValue(props) {
|
|
|
49
34
|
}, {
|
|
50
35
|
name: setting.key
|
|
51
36
|
});
|
|
52
|
-
|
|
53
37
|
switch (setting.settingType) {
|
|
54
38
|
case 'Refdata':
|
|
55
39
|
// Grab refdata values corresponding to setting
|
|
56
40
|
// eslint-disable-next-line no-case-declarations
|
|
57
41
|
var RefdataComponent = _components.Select;
|
|
58
|
-
|
|
59
42
|
if (refdata.length > 0 && refdata.length <= 4) {
|
|
60
43
|
RefdataComponent = _RefdataButtons.default;
|
|
61
44
|
}
|
|
62
|
-
|
|
63
45
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
|
|
64
46
|
"aria-label": fieldLabel,
|
|
65
47
|
component: RefdataComponent,
|
|
66
48
|
dataOptions: refdata,
|
|
67
49
|
name: "".concat(input.name, ".value")
|
|
68
50
|
});
|
|
69
|
-
|
|
70
51
|
case 'Password':
|
|
71
52
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
|
|
72
53
|
"aria-label": fieldLabel,
|
|
@@ -79,7 +60,6 @@ var EditSettingValue = function EditSettingValue(props) {
|
|
|
79
60
|
,
|
|
80
61
|
type: "password"
|
|
81
62
|
});
|
|
82
|
-
|
|
83
63
|
case 'Template':
|
|
84
64
|
{
|
|
85
65
|
// Grab refdata values corresponding to setting
|
|
@@ -103,7 +83,6 @@ var EditSettingValue = function EditSettingValue(props) {
|
|
|
103
83
|
}
|
|
104
84
|
});
|
|
105
85
|
}
|
|
106
|
-
|
|
107
86
|
default:
|
|
108
87
|
// If in doubt, go with String
|
|
109
88
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
|
|
@@ -114,7 +93,6 @@ var EditSettingValue = function EditSettingValue(props) {
|
|
|
114
93
|
parse: function parse(v) {
|
|
115
94
|
return v;
|
|
116
95
|
} // Lets us send an empty string instead of 'undefined'
|
|
117
|
-
|
|
118
96
|
});
|
|
119
97
|
}
|
|
120
98
|
};
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
|
-
|
|
5
4
|
require("@folio/stripes-erm-components/test/jest/__mock__");
|
|
6
|
-
|
|
7
5
|
var _helpers = require("@folio/stripes-erm-components/test/jest/helpers");
|
|
8
|
-
|
|
9
6
|
var _EditSettingValue = _interopRequireDefault(require("./EditSettingValue"));
|
|
10
|
-
|
|
11
7
|
var _helpers2 = require("../../../../test/jest/helpers");
|
|
12
|
-
|
|
13
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
|
|
15
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
|
|
17
10
|
var onSubmit = jest.fn();
|
|
18
11
|
jest.mock('../../hooks');
|
|
19
12
|
var stringSetting = {
|
|
@@ -100,7 +93,7 @@ describe('EditSettingValue', function () {
|
|
|
100
93
|
});
|
|
101
94
|
test('renders the edit field', function () {
|
|
102
95
|
var _renderComponent = renderComponent,
|
|
103
|
-
|
|
96
|
+
getByRole = _renderComponent.getByRole;
|
|
104
97
|
expect(getByRole('textbox', {
|
|
105
98
|
name: 'Value for setting testSettingKey'
|
|
106
99
|
}));
|
|
@@ -126,13 +119,15 @@ describe('EditSettingValue', function () {
|
|
|
126
119
|
});
|
|
127
120
|
test('renders the expected value in the edit field', function () {
|
|
128
121
|
var _renderComponent2 = renderComponent,
|
|
129
|
-
|
|
122
|
+
getByRole = _renderComponent2.getByRole;
|
|
130
123
|
expect(getByRole('textbox', {
|
|
131
124
|
name: 'Value for setting testSettingKey'
|
|
132
125
|
})).toHaveDisplayValue('diku-shared');
|
|
133
126
|
});
|
|
134
127
|
});
|
|
135
|
-
});
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
// NOTE -- Password textbox works weirdly so isn't tested here
|
|
136
131
|
|
|
137
132
|
describe('edit refdata setting', function () {
|
|
138
133
|
describe('with no initial value for refdata with <4 options', function () {
|
|
@@ -152,7 +147,7 @@ describe('EditSettingValue', function () {
|
|
|
152
147
|
});
|
|
153
148
|
test('renders the expected radio buttons', function () {
|
|
154
149
|
var _renderComponent3 = renderComponent,
|
|
155
|
-
|
|
150
|
+
getByRole = _renderComponent3.getByRole;
|
|
156
151
|
expect(getByRole('radio', {
|
|
157
152
|
name: 'Test refdata value'
|
|
158
153
|
}));
|
|
@@ -165,7 +160,7 @@ describe('EditSettingValue', function () {
|
|
|
165
160
|
});
|
|
166
161
|
test('no radio buttons are checked', function () {
|
|
167
162
|
var _renderComponent4 = renderComponent,
|
|
168
|
-
|
|
163
|
+
getByRole = _renderComponent4.getByRole;
|
|
169
164
|
expect(getByRole('radio', {
|
|
170
165
|
name: 'Test refdata value'
|
|
171
166
|
})).not.toHaveAttribute('checked');
|
|
@@ -198,7 +193,7 @@ describe('EditSettingValue', function () {
|
|
|
198
193
|
});
|
|
199
194
|
test('renders the expected radio buttons', function () {
|
|
200
195
|
var _renderComponent5 = renderComponent,
|
|
201
|
-
|
|
196
|
+
getByRole = _renderComponent5.getByRole;
|
|
202
197
|
expect(getByRole('radio', {
|
|
203
198
|
name: 'Test refdata value'
|
|
204
199
|
}));
|
|
@@ -211,7 +206,7 @@ describe('EditSettingValue', function () {
|
|
|
211
206
|
});
|
|
212
207
|
test('the correct radio button is checked', function () {
|
|
213
208
|
var _renderComponent6 = renderComponent,
|
|
214
|
-
|
|
209
|
+
getByRole = _renderComponent6.getByRole;
|
|
215
210
|
expect(getByRole('radio', {
|
|
216
211
|
name: 'Test refdata value'
|
|
217
212
|
})).toHaveAttribute('checked');
|
|
@@ -240,14 +235,14 @@ describe('EditSettingValue', function () {
|
|
|
240
235
|
});
|
|
241
236
|
test('renders the expected select field', function () {
|
|
242
237
|
var _renderComponent7 = renderComponent,
|
|
243
|
-
|
|
238
|
+
getByRole = _renderComponent7.getByRole;
|
|
244
239
|
expect(getByRole('combobox', {
|
|
245
240
|
name: 'Value for setting testSettingKey'
|
|
246
241
|
}));
|
|
247
242
|
});
|
|
248
243
|
test('renders the expected refdata options', function () {
|
|
249
244
|
var _renderComponent8 = renderComponent,
|
|
250
|
-
|
|
245
|
+
getByRole = _renderComponent8.getByRole;
|
|
251
246
|
expect(getByRole('option', {
|
|
252
247
|
name: 'Test refdata value'
|
|
253
248
|
}));
|
|
@@ -289,7 +284,7 @@ describe('EditSettingValue', function () {
|
|
|
289
284
|
});
|
|
290
285
|
test('renders the expected refdata options', function () {
|
|
291
286
|
var _renderComponent9 = renderComponent,
|
|
292
|
-
|
|
287
|
+
getByRole = _renderComponent9.getByRole;
|
|
293
288
|
expect(getByRole('option', {
|
|
294
289
|
name: 'Test refdata value'
|
|
295
290
|
}));
|
|
@@ -311,7 +306,7 @@ describe('EditSettingValue', function () {
|
|
|
311
306
|
});
|
|
312
307
|
test('renders the expected value in the refdata dropdown', function () {
|
|
313
308
|
var _renderComponent10 = renderComponent,
|
|
314
|
-
|
|
309
|
+
getByRole = _renderComponent10.getByRole;
|
|
315
310
|
expect(getByRole('combobox', {
|
|
316
311
|
name: 'Value for setting testSettingKey'
|
|
317
312
|
})).toHaveDisplayValue('Test refdata value');
|
|
@@ -336,18 +331,17 @@ describe('EditSettingValue', function () {
|
|
|
336
331
|
});
|
|
337
332
|
test('renders the edit field', function () {
|
|
338
333
|
var _renderComponent11 = renderComponent,
|
|
339
|
-
|
|
334
|
+
getByRole = _renderComponent11.getByRole;
|
|
340
335
|
expect(getByRole('combobox', {
|
|
341
336
|
name: 'Value for setting testSettingKey'
|
|
342
337
|
}));
|
|
343
338
|
});
|
|
344
339
|
test('renders the expected template options', function () {
|
|
345
340
|
var _renderComponent12 = renderComponent,
|
|
346
|
-
|
|
341
|
+
getByRole = _renderComponent12.getByRole;
|
|
347
342
|
expect(getByRole('option', {
|
|
348
343
|
name: ''
|
|
349
344
|
})); // empty option
|
|
350
|
-
|
|
351
345
|
expect(getByRole('option', {
|
|
352
346
|
name: 'Test template'
|
|
353
347
|
}));
|
|
@@ -357,7 +351,7 @@ describe('EditSettingValue', function () {
|
|
|
357
351
|
});
|
|
358
352
|
test('renders expected display item in template dropdown', function () {
|
|
359
353
|
var _renderComponent13 = renderComponent,
|
|
360
|
-
|
|
354
|
+
getByRole = _renderComponent13.getByRole;
|
|
361
355
|
expect(getByRole('combobox', {
|
|
362
356
|
name: 'Value for setting testSettingKey'
|
|
363
357
|
})).toHaveDisplayValue('');
|
|
@@ -384,18 +378,17 @@ describe('EditSettingValue', function () {
|
|
|
384
378
|
});
|
|
385
379
|
test('renders the edit field', function () {
|
|
386
380
|
var _renderComponent14 = renderComponent,
|
|
387
|
-
|
|
381
|
+
getByRole = _renderComponent14.getByRole;
|
|
388
382
|
expect(getByRole('combobox', {
|
|
389
383
|
name: 'Value for setting testSettingKey'
|
|
390
384
|
}));
|
|
391
385
|
});
|
|
392
386
|
test('renders the expected template options', function () {
|
|
393
387
|
var _renderComponent15 = renderComponent,
|
|
394
|
-
|
|
388
|
+
getByRole = _renderComponent15.getByRole;
|
|
395
389
|
expect(getByRole('option', {
|
|
396
390
|
name: ''
|
|
397
391
|
})); // empty option
|
|
398
|
-
|
|
399
392
|
expect(getByRole('option', {
|
|
400
393
|
name: 'Test template'
|
|
401
394
|
}));
|
|
@@ -405,7 +398,7 @@ describe('EditSettingValue', function () {
|
|
|
405
398
|
});
|
|
406
399
|
test('renders expected display item in template dropdown', function () {
|
|
407
400
|
var _renderComponent16 = renderComponent,
|
|
408
|
-
|
|
401
|
+
getByRole = _renderComponent16.getByRole;
|
|
409
402
|
expect(getByRole('combobox', {
|
|
410
403
|
name: 'Value for setting testSettingKey'
|
|
411
404
|
})).toHaveDisplayValue('Test template');
|
|
@@ -4,21 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
|
|
10
8
|
var _hooks = require("../../hooks");
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
var RenderSettingValue = function RenderSettingValue(props) {
|
|
15
11
|
var setting = props.currentSetting,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
passedIntlKey = props.intlKey,
|
|
13
|
+
passedIntlNS = props.intlNS,
|
|
14
|
+
_props$labelOverrides = props.labelOverrides,
|
|
15
|
+
labelOverrides = _props$labelOverrides === void 0 ? {} : _props$labelOverrides,
|
|
16
|
+
refdata = props.refdata,
|
|
17
|
+
templates = props.templates;
|
|
22
18
|
var kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
|
|
23
19
|
var NoCurrentValue = kintIntl.formatKintMessage({
|
|
24
20
|
id: 'settings.noCurrentValue',
|
|
@@ -28,43 +24,34 @@ var RenderSettingValue = function RenderSettingValue(props) {
|
|
|
28
24
|
id: 'settings.default',
|
|
29
25
|
overrideValue: labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.default
|
|
30
26
|
}), "]");
|
|
31
|
-
|
|
32
27
|
switch (setting.settingType) {
|
|
33
28
|
case 'Refdata':
|
|
34
29
|
{
|
|
35
30
|
if (setting.value) {
|
|
36
31
|
var _refdata$filter$0$lab, _refdata$filter$;
|
|
37
|
-
|
|
38
32
|
return (_refdata$filter$0$lab = refdata === null || refdata === void 0 ? void 0 : (_refdata$filter$ = refdata.filter(function (obj) {
|
|
39
33
|
return obj.value === setting.value;
|
|
40
34
|
})[0]) === null || _refdata$filter$ === void 0 ? void 0 : _refdata$filter$.label) !== null && _refdata$filter$0$lab !== void 0 ? _refdata$filter$0$lab : null;
|
|
41
35
|
}
|
|
42
|
-
|
|
43
36
|
if (setting.defValue) {
|
|
44
37
|
var _refdata$filter$2;
|
|
45
|
-
|
|
46
38
|
var defValue = refdata === null || refdata === void 0 ? void 0 : (_refdata$filter$2 = refdata.filter(function (obj) {
|
|
47
39
|
return obj.value === setting.defValue;
|
|
48
40
|
})[0]) === null || _refdata$filter$2 === void 0 ? void 0 : _refdata$filter$2.label;
|
|
49
41
|
return "".concat(defaultText, " ").concat(defValue);
|
|
50
42
|
}
|
|
51
|
-
|
|
52
43
|
return NoCurrentValue;
|
|
53
44
|
}
|
|
54
|
-
|
|
55
45
|
case 'Password':
|
|
56
46
|
{
|
|
57
47
|
if (setting.value) {
|
|
58
48
|
return '********';
|
|
59
49
|
}
|
|
60
|
-
|
|
61
50
|
if (setting.defValue) {
|
|
62
51
|
return "".concat(defaultText, " ********");
|
|
63
52
|
}
|
|
64
|
-
|
|
65
53
|
return NoCurrentValue;
|
|
66
54
|
}
|
|
67
|
-
|
|
68
55
|
case 'Template':
|
|
69
56
|
{
|
|
70
57
|
var templateValue = templates.filter(function (obj) {
|
|
@@ -73,22 +60,18 @@ var RenderSettingValue = function RenderSettingValue(props) {
|
|
|
73
60
|
})[0];
|
|
74
61
|
return (templateValue === null || templateValue === void 0 ? void 0 : templateValue.name) || NoCurrentValue;
|
|
75
62
|
}
|
|
76
|
-
|
|
77
63
|
default:
|
|
78
64
|
{
|
|
79
65
|
if (setting.value) {
|
|
80
66
|
return setting.value;
|
|
81
67
|
}
|
|
82
|
-
|
|
83
68
|
if (setting.defValue) {
|
|
84
69
|
return "".concat(defaultText, " ").concat(setting.defValue);
|
|
85
70
|
}
|
|
86
|
-
|
|
87
71
|
return NoCurrentValue;
|
|
88
72
|
}
|
|
89
73
|
}
|
|
90
74
|
};
|
|
91
|
-
|
|
92
75
|
RenderSettingValue.propTypes = {
|
|
93
76
|
currentSetting: _propTypes.default.object,
|
|
94
77
|
intlKey: _propTypes.default.string,
|
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
|
-
|
|
5
4
|
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
|
|
7
5
|
require("@folio/stripes-erm-components/test/jest/__mock__");
|
|
8
|
-
|
|
9
6
|
var _RenderSettingValue = _interopRequireDefault(require("./RenderSettingValue"));
|
|
10
|
-
|
|
11
7
|
var _helpers = require("../../../../test/jest/helpers");
|
|
12
|
-
|
|
13
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
|
|
15
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
|
|
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; }
|
|
18
|
-
|
|
10
|
+
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, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $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 defineProperty(generator, "_invoke", { value: makeInvokeMethod(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; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(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); } }; } 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, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), 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 (val) { var object = Object(val), 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
11
|
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); } }
|
|
20
|
-
|
|
21
12
|
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); }); }; }
|
|
22
|
-
|
|
23
13
|
jest.mock('../../hooks');
|
|
24
14
|
var stringSetting = {
|
|
25
15
|
id: '12345',
|
|
@@ -133,7 +123,6 @@ describe('RenderSettingValue', function () {
|
|
|
133
123
|
name: 'test'
|
|
134
124
|
}
|
|
135
125
|
}));
|
|
136
|
-
|
|
137
126
|
case 1:
|
|
138
127
|
case "end":
|
|
139
128
|
return _context.stop();
|
|
@@ -143,7 +132,7 @@ describe('RenderSettingValue', function () {
|
|
|
143
132
|
})));
|
|
144
133
|
it('renders the value', function () {
|
|
145
134
|
var _renderComponent = renderComponent,
|
|
146
|
-
|
|
135
|
+
getByText = _renderComponent.getByText;
|
|
147
136
|
expect(getByText('diku-shared')).toBeInTheDocument();
|
|
148
137
|
});
|
|
149
138
|
});
|
|
@@ -160,7 +149,6 @@ describe('RenderSettingValue', function () {
|
|
|
160
149
|
name: 'test'
|
|
161
150
|
}
|
|
162
151
|
}));
|
|
163
|
-
|
|
164
152
|
case 1:
|
|
165
153
|
case "end":
|
|
166
154
|
return _context2.stop();
|
|
@@ -170,7 +158,7 @@ describe('RenderSettingValue', function () {
|
|
|
170
158
|
})));
|
|
171
159
|
it('renders the default value', function () {
|
|
172
160
|
var _renderComponent2 = renderComponent,
|
|
173
|
-
|
|
161
|
+
getByText = _renderComponent2.getByText;
|
|
174
162
|
expect(getByText('[default] diku-shared')).toBeInTheDocument();
|
|
175
163
|
});
|
|
176
164
|
});
|
|
@@ -187,7 +175,6 @@ describe('RenderSettingValue', function () {
|
|
|
187
175
|
name: 'test'
|
|
188
176
|
}
|
|
189
177
|
}));
|
|
190
|
-
|
|
191
178
|
case 1:
|
|
192
179
|
case "end":
|
|
193
180
|
return _context3.stop();
|
|
@@ -197,7 +184,7 @@ describe('RenderSettingValue', function () {
|
|
|
197
184
|
})));
|
|
198
185
|
it('renders the empty message', function () {
|
|
199
186
|
var _renderComponent3 = renderComponent,
|
|
200
|
-
|
|
187
|
+
getByText = _renderComponent3.getByText;
|
|
201
188
|
expect(getByText('No current value')).toBeInTheDocument();
|
|
202
189
|
});
|
|
203
190
|
});
|
|
@@ -217,7 +204,6 @@ describe('RenderSettingValue', function () {
|
|
|
217
204
|
},
|
|
218
205
|
refdata: refdata
|
|
219
206
|
}));
|
|
220
|
-
|
|
221
207
|
case 1:
|
|
222
208
|
case "end":
|
|
223
209
|
return _context4.stop();
|
|
@@ -227,7 +213,7 @@ describe('RenderSettingValue', function () {
|
|
|
227
213
|
})));
|
|
228
214
|
it('renders the value', function () {
|
|
229
215
|
var _renderComponent4 = renderComponent,
|
|
230
|
-
|
|
216
|
+
getByText = _renderComponent4.getByText;
|
|
231
217
|
expect(getByText('Test refdata value')).toBeInTheDocument();
|
|
232
218
|
});
|
|
233
219
|
});
|
|
@@ -245,7 +231,6 @@ describe('RenderSettingValue', function () {
|
|
|
245
231
|
},
|
|
246
232
|
refdata: refdata
|
|
247
233
|
}));
|
|
248
|
-
|
|
249
234
|
case 1:
|
|
250
235
|
case "end":
|
|
251
236
|
return _context5.stop();
|
|
@@ -255,7 +240,7 @@ describe('RenderSettingValue', function () {
|
|
|
255
240
|
})));
|
|
256
241
|
it('renders the default value', function () {
|
|
257
242
|
var _renderComponent5 = renderComponent,
|
|
258
|
-
|
|
243
|
+
getByText = _renderComponent5.getByText;
|
|
259
244
|
expect(getByText('[default] Test refdata value')).toBeInTheDocument();
|
|
260
245
|
});
|
|
261
246
|
});
|
|
@@ -273,7 +258,6 @@ describe('RenderSettingValue', function () {
|
|
|
273
258
|
},
|
|
274
259
|
refdata: refdata
|
|
275
260
|
}));
|
|
276
|
-
|
|
277
261
|
case 1:
|
|
278
262
|
case "end":
|
|
279
263
|
return _context6.stop();
|
|
@@ -283,7 +267,7 @@ describe('RenderSettingValue', function () {
|
|
|
283
267
|
})));
|
|
284
268
|
it('renders the empty message', function () {
|
|
285
269
|
var _renderComponent6 = renderComponent,
|
|
286
|
-
|
|
270
|
+
getByText = _renderComponent6.getByText;
|
|
287
271
|
expect(getByText('No current value')).toBeInTheDocument();
|
|
288
272
|
});
|
|
289
273
|
});
|
|
@@ -302,7 +286,6 @@ describe('RenderSettingValue', function () {
|
|
|
302
286
|
name: 'test'
|
|
303
287
|
}
|
|
304
288
|
}));
|
|
305
|
-
|
|
306
289
|
case 1:
|
|
307
290
|
case "end":
|
|
308
291
|
return _context7.stop();
|
|
@@ -312,7 +295,7 @@ describe('RenderSettingValue', function () {
|
|
|
312
295
|
})));
|
|
313
296
|
it('renders the value', function () {
|
|
314
297
|
var _renderComponent7 = renderComponent,
|
|
315
|
-
|
|
298
|
+
getByText = _renderComponent7.getByText;
|
|
316
299
|
expect(getByText('********')).toBeInTheDocument();
|
|
317
300
|
});
|
|
318
301
|
});
|
|
@@ -329,7 +312,6 @@ describe('RenderSettingValue', function () {
|
|
|
329
312
|
name: 'test'
|
|
330
313
|
}
|
|
331
314
|
}));
|
|
332
|
-
|
|
333
315
|
case 1:
|
|
334
316
|
case "end":
|
|
335
317
|
return _context8.stop();
|
|
@@ -339,7 +321,7 @@ describe('RenderSettingValue', function () {
|
|
|
339
321
|
})));
|
|
340
322
|
it('renders the default value', function () {
|
|
341
323
|
var _renderComponent8 = renderComponent,
|
|
342
|
-
|
|
324
|
+
getByText = _renderComponent8.getByText;
|
|
343
325
|
expect(getByText('[default] ********')).toBeInTheDocument();
|
|
344
326
|
});
|
|
345
327
|
});
|
|
@@ -356,7 +338,6 @@ describe('RenderSettingValue', function () {
|
|
|
356
338
|
name: 'test'
|
|
357
339
|
}
|
|
358
340
|
}));
|
|
359
|
-
|
|
360
341
|
case 1:
|
|
361
342
|
case "end":
|
|
362
343
|
return _context9.stop();
|
|
@@ -366,7 +347,7 @@ describe('RenderSettingValue', function () {
|
|
|
366
347
|
})));
|
|
367
348
|
it('renders the empty message', function () {
|
|
368
349
|
var _renderComponent9 = renderComponent,
|
|
369
|
-
|
|
350
|
+
getByText = _renderComponent9.getByText;
|
|
370
351
|
expect(getByText('No current value')).toBeInTheDocument();
|
|
371
352
|
});
|
|
372
353
|
});
|
|
@@ -386,7 +367,6 @@ describe('RenderSettingValue', function () {
|
|
|
386
367
|
},
|
|
387
368
|
templates: templates
|
|
388
369
|
}));
|
|
389
|
-
|
|
390
370
|
case 1:
|
|
391
371
|
case "end":
|
|
392
372
|
return _context10.stop();
|
|
@@ -396,7 +376,7 @@ describe('RenderSettingValue', function () {
|
|
|
396
376
|
})));
|
|
397
377
|
it('renders the value', function () {
|
|
398
378
|
var _renderComponent10 = renderComponent,
|
|
399
|
-
|
|
379
|
+
getByText = _renderComponent10.getByText;
|
|
400
380
|
expect(getByText('Test template')).toBeInTheDocument();
|
|
401
381
|
});
|
|
402
382
|
});
|
|
@@ -414,7 +394,6 @@ describe('RenderSettingValue', function () {
|
|
|
414
394
|
},
|
|
415
395
|
templates: templates
|
|
416
396
|
}));
|
|
417
|
-
|
|
418
397
|
case 1:
|
|
419
398
|
case "end":
|
|
420
399
|
return _context11.stop();
|
|
@@ -424,10 +403,11 @@ describe('RenderSettingValue', function () {
|
|
|
424
403
|
})));
|
|
425
404
|
it('renders the default value', function () {
|
|
426
405
|
var _renderComponent11 = renderComponent,
|
|
427
|
-
|
|
406
|
+
getByText = _renderComponent11.getByText;
|
|
428
407
|
expect(getByText('Test template')).toBeInTheDocument(); // TODO this doesn't currently have a [default] marking on it
|
|
429
408
|
});
|
|
430
409
|
});
|
|
410
|
+
|
|
431
411
|
describe('render a template setting without a value or default', function () {
|
|
432
412
|
var renderComponent;
|
|
433
413
|
beforeEach( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
@@ -442,7 +422,6 @@ describe('RenderSettingValue', function () {
|
|
|
442
422
|
},
|
|
443
423
|
templates: templates
|
|
444
424
|
}));
|
|
445
|
-
|
|
446
425
|
case 1:
|
|
447
426
|
case "end":
|
|
448
427
|
return _context12.stop();
|
|
@@ -452,7 +431,7 @@ describe('RenderSettingValue', function () {
|
|
|
452
431
|
})));
|
|
453
432
|
it('renders the empty message', function () {
|
|
454
433
|
var _renderComponent12 = renderComponent,
|
|
455
|
-
|
|
434
|
+
getByText = _renderComponent12.getByText;
|
|
456
435
|
expect(getByText('No current value')).toBeInTheDocument();
|
|
457
436
|
});
|
|
458
437
|
});
|