@k-int/stripes-kint-components 1.5.0 → 1.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 +14 -0
- package/artifacts/coverage-jest/lcov-report/base.css +224 -0
- package/artifacts/coverage-jest/lcov-report/block-navigation.js +87 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/ActionList/ActionList.js.html +389 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/ActionList/ActionListFieldArray.js.html +1076 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/ActionList/index.html +147 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/ActionList/index.js.html +140 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableRefdataList/EditableRefdataList.js.html +680 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableRefdataList/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableRefdataList/index.js.html +140 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/EditableSettingsList.js.html +353 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js.html +353 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/EditSettingValue.js.html +482 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js.html +434 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/SettingField.js.html +644 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/index.html +162 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/index.js.html +188 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/index.html +147 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/index.js.html +188 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/NoResultsMessage/NoResultsMessage.js.html +449 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/NoResultsMessage/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/NoResultsMessage/index.js.html +140 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/QueryTypedown/QueryTypedown.js.html +413 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/QueryTypedown/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/QueryTypedown/index.js.html +140 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/RefdataButtons/RefdataButtons.js.html +512 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/RefdataButtons/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/RefdataButtons/index.js.html +140 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQLookupComponent/SASQLookupComponent.js.html +1115 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQLookupComponent/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQLookupComponent/index.js.html +140 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQRoute/SASQRoute.js.html +404 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQRoute/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQRoute/index.js.html +140 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQViewComponent/SASQViewComponent.js.html +413 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQViewComponent/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQViewComponent/index.js.html +140 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SearchField/SearchField.js.html +353 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SearchField/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SearchField/index.js.html +140 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SettingPage/SettingPage.js.html +380 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SettingPage/SettingPagePane.js.html +308 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SettingPage/index.html +147 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/SettingPage/index.js.html +164 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/TypeDown/TypeDown.js.html +839 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/TypeDown/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/TypeDown/index.js.html +140 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/Typedown/Typedown.js.html +887 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/Typedown/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/Typedown/index.js.html +140 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/constants/eventCodes.js.html +209 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/constants/index.html +117 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/contexts/SettingsContext.js.html +206 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/contexts/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/contexts/index.js.html +140 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/index.html +252 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/index.js.html +374 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/settingsHooks/index.html +147 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/settingsHooks/index.js.html +164 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/settingsHooks/useSettingSection.js.html +305 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/settingsHooks/useSettings.js.html +584 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/index.html +162 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/index.js.html +188 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/useTypedown.js.html +644 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/useTypedownData.js.html +335 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/useTypedownToggle.js.html +350 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useActiveElement.js.html +323 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useHelperApp.js.html +488 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useKiwtFieldArray.js.html +509 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useKiwtSASQuery.js.html +467 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useLocalStorageState.js.html +329 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useMutateRefdataValue.js.html +488 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useQIndex.js.html +407 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useRefdata.js.html +401 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useTemplates.js.html +314 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/buildUrl.js.html +296 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/generateKiwtQuery.js.html +230 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/generateKiwtQueryParams.js.html +545 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/getFocusableElements.js.html +572 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/index.html +237 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/index.js.html +284 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/renderHelpText.js.html +410 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/selectorSafe.js.html +209 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/sortByLabel.js.html +248 -0
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/toCamelCase.js.html +227 -0
- package/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
- package/artifacts/coverage-jest/lcov-report/index.html +717 -0
- package/artifacts/coverage-jest/lcov-report/prettify.css +1 -0
- package/artifacts/coverage-jest/lcov-report/prettify.js +2 -0
- package/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
- package/artifacts/coverage-jest/lcov-report/sorter.js +196 -0
- package/artifacts/coverage-jest/lcov-report/src/index.html +117 -0
- package/artifacts/coverage-jest/lcov-report/src/index.js.html +305 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/ActionList/ActionList.js.html +248 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/ActionList/ActionListFieldArray.js.html +764 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/ActionList/index.html +147 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/ActionList/index.js.html +89 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableRefdataList/EditableRefdataList.js.html +362 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableRefdataList/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableRefdataList/index.js.html +86 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/EditableSettingsList.js.html +224 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/EditableSettingsListFieldArray.js.html +212 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/EditSettingValue.js.html +308 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/RenderSettingValue.js.html +260 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/SettingField.js.html +437 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/index.html +162 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/index.js.html +95 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/index.html +147 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/index.js.html +95 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/NoResultsMessage/NoResultsMessage.js.html +320 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/NoResultsMessage/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/NoResultsMessage/index.js.html +89 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/QueryTypedown/QueryTypedown.js.html +185 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/QueryTypedown/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/QueryTypedown/index.js.html +89 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/RefdataButtons/RefdataButtons.js.html +371 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/RefdataButtons/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/RefdataButtons/index.js.html +89 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQLookupComponent/SASQLookupComponent.js.html +932 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQLookupComponent/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQLookupComponent/index.js.html +89 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQRoute/SASQRoute.js.html +275 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQRoute/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQRoute/index.js.html +89 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQViewComponent/SASQViewComponent.js.html +251 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQViewComponent/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQViewComponent/index.js.html +89 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SearchField/SearchField.js.html +215 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SearchField/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SearchField/index.js.html +89 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SettingPage/SettingPage.js.html +212 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SettingPage/SettingPagePane.js.html +149 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SettingPage/index.html +147 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/SettingPage/index.js.html +92 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/TypeDown/TypeDown.js.html +764 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/TypeDown/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/TypeDown/index.js.html +89 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/Typedown/Typedown.js.html +788 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/Typedown/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/Typedown/index.js.html +89 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/constants/eventCodes.js.html +95 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/constants/index.html +117 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/contexts/SettingsContext.js.html +98 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/contexts/index.html +132 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/contexts/index.js.html +86 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/index.html +252 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/index.js.html +116 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/settingsHooks/index.html +147 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/settingsHooks/index.js.html +92 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/settingsHooks/useSettingSection.js.html +164 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/settingsHooks/useSettings.js.html +377 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/index.html +162 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/index.js.html +95 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/useTypedown.js.html +524 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/useTypedownData.js.html +164 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/useTypedownToggle.js.html +164 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useActiveElement.js.html +158 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useHelperApp.js.html +284 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useKiwtFieldArray.js.html +275 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useKiwtSASQuery.js.html +179 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useLocalStorageState.js.html +137 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useMutateRefdataValue.js.html +302 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useQIndex.js.html +209 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useRefdata.js.html +287 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useTemplates.js.html +167 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/buildUrl.js.html +194 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/generateKiwtQuery.js.html +110 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/generateKiwtQueryParams.js.html +287 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/getFocusableElements.js.html +380 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/index.html +237 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/index.js.html +116 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/renderHelpText.js.html +167 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/selectorSafe.js.html +104 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/sortByLabel.js.html +131 -0
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/toCamelCase.js.html +128 -0
- package/artifacts/coverage-jest/lcov.info +10040 -0
- package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +109 -0
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +998 -0
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +238 -0
- package/es/index.js +33 -19
- package/es/lib/ActionList/ActionList.js +58 -24
- package/es/lib/ActionList/ActionListFieldArray.js +129 -84
- package/es/lib/ActionList/index.js +7 -3
- package/es/lib/EditableRefdataList/EditableRefdataList.js +52 -16
- package/es/lib/EditableRefdataList/index.js +7 -3
- package/es/lib/EditableSettingsList/EditableSettingsList.js +90 -0
- package/es/lib/{Settings → EditableSettingsList}/EditableSettingsListFieldArray.js +45 -14
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +181 -0
- package/es/lib/{Settings → EditableSettingsList/SettingField}/EditSettingValue.js +72 -9
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +447 -0
- package/es/lib/{Settings → EditableSettingsList/SettingField}/RenderSettingValue.js +45 -7
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +495 -0
- package/es/lib/{Settings → EditableSettingsList/SettingField}/SettingField.js +79 -36
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +180 -0
- package/es/lib/EditableSettingsList/SettingField/index.js +35 -0
- package/es/lib/EditableSettingsList/index.js +35 -0
- package/es/lib/NoResultsMessage/NoResultsMessage.js +65 -32
- package/es/lib/NoResultsMessage/index.js +7 -3
- package/es/lib/QueryTypedown/QueryTypedown.js +47 -8
- package/es/lib/QueryTypedown/index.js +6 -2
- package/es/lib/RefdataButtons/RefdataButtons.js +143 -0
- package/es/lib/RefdataButtons/index.js +19 -0
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +187 -138
- package/es/lib/SASQLookupComponent/index.js +6 -2
- package/es/lib/SASQRoute/SASQRoute.js +55 -18
- package/es/lib/SASQRoute/index.js +6 -2
- package/es/lib/SASQViewComponent/SASQViewComponent.js +50 -11
- package/es/lib/SASQViewComponent/index.js +6 -2
- package/es/lib/SearchField/SearchField.js +48 -13
- package/es/lib/SearchField/index.js +6 -2
- package/es/lib/SettingPage/SettingPage.js +99 -0
- package/es/lib/SettingPage/SettingPagePane.js +83 -0
- package/es/lib/SettingPage/index.js +27 -0
- package/es/lib/TypeDown/TypeDown.js +142 -100
- package/es/lib/TypeDown/index.js +6 -2
- package/es/lib/Typedown/Typedown.js +139 -95
- package/es/lib/Typedown/index.js +6 -2
- package/es/lib/constants/eventCodes.js +31 -1
- package/es/lib/contexts/SettingsContext.js +41 -0
- package/es/lib/contexts/index.js +19 -0
- package/es/lib/hooks/index.js +28 -10
- package/es/lib/hooks/settingsHooks/index.js +27 -0
- package/es/lib/hooks/settingsHooks/useSettingSection.js +74 -0
- package/es/lib/{Settings → hooks/settingsHooks}/useSettings.js +70 -21
- package/es/lib/hooks/typedownHooks/index.js +8 -28
- package/es/lib/hooks/typedownHooks/useTypedown.js +129 -12
- package/es/lib/hooks/typedownHooks/useTypedownData.js +35 -2
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +39 -6
- package/es/lib/hooks/useActiveElement.js +33 -2
- package/es/lib/hooks/useHelperApp.js +41 -8
- package/es/lib/hooks/useKiwtFieldArray.js +35 -2
- package/es/lib/hooks/useKiwtSASQuery.js +40 -6
- package/es/lib/hooks/useLocalStorageState.js +36 -3
- package/es/lib/hooks/useMutateRefdataValue.js +42 -9
- package/es/lib/hooks/useQIndex.js +39 -6
- package/es/lib/hooks/useRefdata.js +40 -7
- package/es/lib/hooks/useTemplates.js +36 -3
- package/es/lib/utils/buildUrl.js +43 -10
- package/es/lib/utils/generateKiwtQuery.js +33 -4
- package/es/lib/utils/generateKiwtQueryParams.js +31 -2
- package/es/lib/utils/index.js +33 -5
- package/es/lib/utils/renderHelpText.js +109 -0
- package/es/lib/utils/selectorSafe.js +31 -2
- package/es/lib/utils/sortByLabel.js +55 -0
- package/es/lib/utils/toCamelCase.js +48 -0
- package/jest.config.js +15 -1
- package/junit.xml +79 -0
- package/package.json +17 -10
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +248 -0
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +764 -0
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +147 -0
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +89 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +362 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +132 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +89 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +224 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +212 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +377 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +263 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +437 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +162 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +95 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +147 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +95 -0
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +320 -0
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +132 -0
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +89 -0
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +185 -0
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +132 -0
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +89 -0
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +371 -0
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +132 -0
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +89 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +932 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +132 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +89 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +275 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +132 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +89 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +251 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +132 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +89 -0
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +215 -0
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +132 -0
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +89 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +212 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +179 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +147 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +92 -0
- package/src/artifacts/coverage-jest/lcov-report/TypeDown/TypeDown.js.html +770 -0
- package/src/artifacts/coverage-jest/lcov-report/TypeDown/index.html +132 -0
- package/src/artifacts/coverage-jest/lcov-report/TypeDown/index.js.html +89 -0
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +791 -0
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +132 -0
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +89 -0
- package/src/artifacts/coverage-jest/lcov-report/base.css +224 -0
- package/src/artifacts/coverage-jest/lcov-report/block-navigation.js +87 -0
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +95 -0
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +117 -0
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +98 -0
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +132 -0
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +92 -0
- package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +252 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +116 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +147 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +92 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +164 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +404 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +162 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +95 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +524 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +164 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +164 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +158 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +284 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +275 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +179 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +137 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +302 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +209 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +287 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +167 -0
- package/src/artifacts/coverage-jest/lcov-report/index.html +402 -0
- package/src/artifacts/coverage-jest/lcov-report/prettify.css +1 -0
- package/src/artifacts/coverage-jest/lcov-report/prettify.js +2 -0
- package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/sorter.js +196 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +194 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +110 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +287 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/getFocusableElements.js.html +386 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +237 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +116 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +167 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +104 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +128 -0
- package/src/artifacts/coverage-jest/lcov.info +2073 -0
- package/src/index.js +13 -6
- package/src/lib/ActionList/index.js +1 -1
- package/src/lib/EditableRefdataList/EditableRefdataList.js +1 -1
- package/src/lib/EditableRefdataList/index.js +1 -1
- package/src/lib/{Settings → EditableSettingsList}/EditableSettingsList.js +0 -0
- package/src/lib/{Settings → EditableSettingsList}/EditableSettingsListFieldArray.js +2 -2
- package/src/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +111 -0
- package/src/lib/{Settings → EditableSettingsList/SettingField}/EditSettingValue.js +24 -1
- package/src/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +379 -0
- package/src/lib/{Settings → EditableSettingsList/SettingField}/RenderSettingValue.js +2 -1
- package/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +368 -0
- package/src/lib/{Settings → EditableSettingsList/SettingField}/SettingField.js +7 -7
- package/src/lib/EditableSettingsList/SettingField/SettingField.test.js +80 -0
- package/src/lib/EditableSettingsList/SettingField/index.js +3 -0
- package/src/lib/EditableSettingsList/index.js +3 -0
- package/src/lib/NoResultsMessage/index.js +1 -1
- package/src/lib/{Settings → RefdataButtons}/RefdataButtons.js +1 -1
- package/src/lib/RefdataButtons/index.js +1 -0
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +1 -1
- package/src/lib/{Settings → SettingPage}/SettingPage.js +5 -5
- package/src/lib/{Settings → SettingPage}/SettingPagePane.js +12 -2
- package/src/lib/SettingPage/index.js +2 -0
- package/src/lib/TypeDown/TypeDown.js +4 -2
- package/src/lib/Typedown/Typedown.js +2 -1
- package/src/lib/{Settings → contexts}/SettingsContext.js +1 -1
- package/src/lib/contexts/index.js +2 -0
- package/src/lib/hooks/index.js +1 -0
- package/src/lib/hooks/settingsHooks/index.js +2 -0
- package/src/lib/{Settings → hooks/settingsHooks}/useSettingSection.js +0 -0
- package/src/lib/{Settings → hooks/settingsHooks}/useSettings.js +14 -6
- package/src/lib/hooks/typedownHooks/index.js +0 -3
- package/src/lib/hooks/typedownHooks/useTypedown.js +93 -11
- package/src/lib/utils/index.js +5 -0
- package/src/lib/{Settings/utils → utils}/renderHelpText.js +1 -1
- package/src/lib/{Settings/utils → utils}/sortByLabel.js +1 -1
- package/src/lib/{Settings/utils → utils}/toCamelCase.js +0 -0
- package/test/helpers/index.js +1 -0
- package/test/helpers/translationsProperties.js +40 -0
- package/test/jest/helpers/KintHarness.js +36 -0
- package/test/jest/helpers/index.js +2 -0
- package/test/jest/helpers/renderWithKintHarness.js +15 -0
- package/test/jest/jest-transformer.js +4 -0
- package/test/jest/setupTests.js +1 -0
- package/translations/stripes-kint-components/en.json +1 -0
- package/yarn-error.log +15050 -0
- package/babelOptions.js +0 -30
- package/es/lib/Settings/EditableSettingsList.js +0 -57
- package/es/lib/Settings/RefdataButtons.js +0 -100
- package/es/lib/Settings/SettingPage.js +0 -64
- package/es/lib/Settings/SettingPagePane.js +0 -43
- package/es/lib/Settings/SettingsContext.js +0 -18
- package/es/lib/Settings/index.js +0 -71
- package/es/lib/Settings/useSettingSection.js +0 -41
- package/es/lib/Settings/utils/index.js +0 -31
- package/es/lib/Settings/utils/renderHelpText.js +0 -57
- package/es/lib/Settings/utils/sortByLabel.js +0 -26
- package/es/lib/Settings/utils/toCamelCase.js +0 -19
- package/es/lib/hooks/typedownHooks/useTypedownFooter.js +0 -47
- package/es/lib/hooks/typedownHooks/useTypedownList.js +0 -45
- package/es/lib/hooks/typedownHooks/useTypedownSearchField.js +0 -47
- package/es/lib/utils/getFocusableElements.js +0 -132
- package/src/lib/Settings/index.js +0 -8
- package/src/lib/Settings/utils/index.js +0 -3
- package/src/lib/hooks/typedownHooks/useTypedownFooter.js +0 -43
- package/src/lib/hooks/typedownHooks/useTypedownList.js +0 -36
- package/src/lib/hooks/typedownHooks/useTypedownSearchField.js +0 -39
- package/src/lib/utils/getFocusableElements.js +0 -99
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '@folio/stripes-erm-components/test/jest/__mock__';
|
|
3
|
+
import RenderSettingValue from './RenderSettingValue';
|
|
4
|
+
|
|
5
|
+
import { renderWithKintHarness } from '../../../../test/jest/helpers';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
const stringSetting = {
|
|
9
|
+
id: '12345',
|
|
10
|
+
key: 'testSettingKey',
|
|
11
|
+
section: 'testSettingSection',
|
|
12
|
+
settingType: 'String',
|
|
13
|
+
value: 'diku-shared',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const stringSettingNoValue = {
|
|
17
|
+
id: '12345',
|
|
18
|
+
key: 'testSettingKey',
|
|
19
|
+
section: 'testSettingSection',
|
|
20
|
+
settingType: 'String',
|
|
21
|
+
defValue: 'diku-shared',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const stringSettingNoValueOrDefault = {
|
|
25
|
+
id: '12345',
|
|
26
|
+
key: 'testSettingKey',
|
|
27
|
+
section: 'testSettingSection',
|
|
28
|
+
settingType: 'String'
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const passwordSetting = {
|
|
32
|
+
id: '12345',
|
|
33
|
+
key: 'testSettingKey',
|
|
34
|
+
section: 'testSettingSection',
|
|
35
|
+
settingType: 'Password',
|
|
36
|
+
value: 'secret password',
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const passwordSettingNoValue = {
|
|
40
|
+
id: '12345',
|
|
41
|
+
key: 'testSettingKey',
|
|
42
|
+
section: 'testSettingSection',
|
|
43
|
+
settingType: 'Password',
|
|
44
|
+
defValue: 'secret password',
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const passwordSettingNoValueOrDefault = {
|
|
48
|
+
id: '12345',
|
|
49
|
+
key: 'testSettingKey',
|
|
50
|
+
section: 'testSettingSection',
|
|
51
|
+
settingType: 'Password'
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const refdata = [
|
|
55
|
+
{
|
|
56
|
+
value: 'test_refdata_value',
|
|
57
|
+
label: 'Test refdata value'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
value: 'other_refdata_value',
|
|
61
|
+
label: 'Other refdata value'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
value: 'final_refdata_value',
|
|
65
|
+
label: 'Final refdata value'
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
const refdataSetting = {
|
|
70
|
+
id: '12345',
|
|
71
|
+
key: 'testSettingKey',
|
|
72
|
+
section: 'testSettingSection',
|
|
73
|
+
settingType: 'Refdata',
|
|
74
|
+
value: 'test_refdata_value',
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const refdataSettingNoValue = {
|
|
78
|
+
id: '12345',
|
|
79
|
+
key: 'testSettingKey',
|
|
80
|
+
section: 'testSettingSection',
|
|
81
|
+
settingType: 'Refdata',
|
|
82
|
+
defValue: 'test_refdata_value',
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const refdataSettingNoValueOrDefault = {
|
|
86
|
+
id: '12345',
|
|
87
|
+
key: 'testSettingKey',
|
|
88
|
+
section: 'testSettingSection',
|
|
89
|
+
settingType: 'Refdata'
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const templates = [
|
|
93
|
+
{
|
|
94
|
+
id: 'abcde',
|
|
95
|
+
name: 'Test template'
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: '98765',
|
|
99
|
+
name: 'Red herring template'
|
|
100
|
+
},
|
|
101
|
+
];
|
|
102
|
+
|
|
103
|
+
const templateSetting = {
|
|
104
|
+
id: '12345',
|
|
105
|
+
key: 'testSettingKey',
|
|
106
|
+
section: 'testSettingSection',
|
|
107
|
+
settingType: 'Template',
|
|
108
|
+
value: 'abcde',
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const templateSettingNoValue = {
|
|
112
|
+
id: '12345',
|
|
113
|
+
key: 'testSettingKey',
|
|
114
|
+
section: 'testSettingSection',
|
|
115
|
+
settingType: 'Template',
|
|
116
|
+
defValue: 'abcde',
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const templateSettingNoValueOrDefault = {
|
|
120
|
+
id: '12345',
|
|
121
|
+
key: 'testSettingKey',
|
|
122
|
+
section: 'testSettingSection',
|
|
123
|
+
settingType: 'Template'
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
describe('RenderSettingValue', () => {
|
|
127
|
+
describe('render string settings', () => {
|
|
128
|
+
describe('render a string setting', () => {
|
|
129
|
+
let renderComponent;
|
|
130
|
+
beforeEach(async () => {
|
|
131
|
+
renderComponent = renderWithKintHarness(
|
|
132
|
+
<RenderSettingValue
|
|
133
|
+
currentSetting={stringSetting}
|
|
134
|
+
input={{
|
|
135
|
+
name: 'test'
|
|
136
|
+
}}
|
|
137
|
+
/>
|
|
138
|
+
);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it('renders the value', () => {
|
|
142
|
+
const { getByText } = renderComponent;
|
|
143
|
+
expect(getByText('diku-shared')).toBeInTheDocument();
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
describe('render a string setting without a value', () => {
|
|
148
|
+
let renderComponent;
|
|
149
|
+
beforeEach(async () => {
|
|
150
|
+
renderComponent = renderWithKintHarness(
|
|
151
|
+
<RenderSettingValue
|
|
152
|
+
currentSetting={stringSettingNoValue}
|
|
153
|
+
input={{
|
|
154
|
+
name: 'test'
|
|
155
|
+
}}
|
|
156
|
+
/>
|
|
157
|
+
);
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it('renders the default value', () => {
|
|
161
|
+
const { getByText } = renderComponent;
|
|
162
|
+
expect(getByText('[default] diku-shared')).toBeInTheDocument();
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
describe('render a string setting without a value or default', () => {
|
|
167
|
+
let renderComponent;
|
|
168
|
+
beforeEach(async () => {
|
|
169
|
+
renderComponent = renderWithKintHarness(
|
|
170
|
+
<RenderSettingValue
|
|
171
|
+
currentSetting={stringSettingNoValueOrDefault}
|
|
172
|
+
input={{
|
|
173
|
+
name: 'test'
|
|
174
|
+
}}
|
|
175
|
+
/>
|
|
176
|
+
);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
it('renders the empty message', () => {
|
|
180
|
+
const { getByText } = renderComponent;
|
|
181
|
+
expect(getByText('No current value')).toBeInTheDocument();
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
describe('render refdata settings', () => {
|
|
187
|
+
describe('render a refdata setting', () => {
|
|
188
|
+
let renderComponent;
|
|
189
|
+
beforeEach(async () => {
|
|
190
|
+
renderComponent = renderWithKintHarness(
|
|
191
|
+
<RenderSettingValue
|
|
192
|
+
currentSetting={refdataSetting}
|
|
193
|
+
input={{
|
|
194
|
+
name: 'test'
|
|
195
|
+
}}
|
|
196
|
+
refdata={refdata}
|
|
197
|
+
/>
|
|
198
|
+
);
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
it('renders the value', () => {
|
|
202
|
+
const { getByText } = renderComponent;
|
|
203
|
+
expect(getByText('Test refdata value')).toBeInTheDocument();
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
describe('render a refdata setting without a value', () => {
|
|
208
|
+
let renderComponent;
|
|
209
|
+
beforeEach(async () => {
|
|
210
|
+
renderComponent = renderWithKintHarness(
|
|
211
|
+
<RenderSettingValue
|
|
212
|
+
currentSetting={refdataSettingNoValue}
|
|
213
|
+
input={{
|
|
214
|
+
name: 'test'
|
|
215
|
+
}}
|
|
216
|
+
refdata={refdata}
|
|
217
|
+
/>
|
|
218
|
+
);
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
it('renders the default value', () => {
|
|
222
|
+
const { getByText } = renderComponent;
|
|
223
|
+
expect(getByText('[default] Test refdata value')).toBeInTheDocument();
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
describe('render a refdata setting without a value or default', () => {
|
|
228
|
+
let renderComponent;
|
|
229
|
+
beforeEach(async () => {
|
|
230
|
+
renderComponent = renderWithKintHarness(
|
|
231
|
+
<RenderSettingValue
|
|
232
|
+
currentSetting={refdataSettingNoValueOrDefault}
|
|
233
|
+
input={{
|
|
234
|
+
name: 'test'
|
|
235
|
+
}}
|
|
236
|
+
refdata={refdata}
|
|
237
|
+
/>
|
|
238
|
+
);
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
it('renders the empty message', () => {
|
|
242
|
+
const { getByText } = renderComponent;
|
|
243
|
+
expect(getByText('No current value')).toBeInTheDocument();
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
describe('render password settings', () => {
|
|
249
|
+
describe('render a password setting', () => {
|
|
250
|
+
let renderComponent;
|
|
251
|
+
beforeEach(async () => {
|
|
252
|
+
renderComponent = renderWithKintHarness(
|
|
253
|
+
<RenderSettingValue
|
|
254
|
+
currentSetting={passwordSetting}
|
|
255
|
+
input={{
|
|
256
|
+
name: 'test'
|
|
257
|
+
}}
|
|
258
|
+
/>
|
|
259
|
+
);
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
it('renders the value', () => {
|
|
263
|
+
const { getByText } = renderComponent;
|
|
264
|
+
expect(getByText('********')).toBeInTheDocument();
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
describe('render a password setting without a value', () => {
|
|
269
|
+
let renderComponent;
|
|
270
|
+
beforeEach(async () => {
|
|
271
|
+
renderComponent = renderWithKintHarness(
|
|
272
|
+
<RenderSettingValue
|
|
273
|
+
currentSetting={passwordSettingNoValue}
|
|
274
|
+
input={{
|
|
275
|
+
name: 'test'
|
|
276
|
+
}}
|
|
277
|
+
/>
|
|
278
|
+
);
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
it('renders the default value', () => {
|
|
282
|
+
const { getByText } = renderComponent;
|
|
283
|
+
expect(getByText('[default] ********')).toBeInTheDocument();
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
describe('render a password setting without a value or default', () => {
|
|
288
|
+
let renderComponent;
|
|
289
|
+
beforeEach(async () => {
|
|
290
|
+
renderComponent = renderWithKintHarness(
|
|
291
|
+
<RenderSettingValue
|
|
292
|
+
currentSetting={passwordSettingNoValueOrDefault}
|
|
293
|
+
input={{
|
|
294
|
+
name: 'test'
|
|
295
|
+
}}
|
|
296
|
+
/>
|
|
297
|
+
);
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
it('renders the empty message', () => {
|
|
301
|
+
const { getByText } = renderComponent;
|
|
302
|
+
expect(getByText('No current value')).toBeInTheDocument();
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
describe('render template settings', () => {
|
|
308
|
+
describe('render a template setting', () => {
|
|
309
|
+
let renderComponent;
|
|
310
|
+
beforeEach(async () => {
|
|
311
|
+
renderComponent = renderWithKintHarness(
|
|
312
|
+
<RenderSettingValue
|
|
313
|
+
currentSetting={templateSetting}
|
|
314
|
+
input={{
|
|
315
|
+
name: 'test'
|
|
316
|
+
}}
|
|
317
|
+
templates={templates}
|
|
318
|
+
/>
|
|
319
|
+
);
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
it('renders the value', () => {
|
|
323
|
+
const { getByText } = renderComponent;
|
|
324
|
+
expect(getByText('Test template')).toBeInTheDocument();
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
describe('render a template setting without a value', () => {
|
|
329
|
+
let renderComponent;
|
|
330
|
+
beforeEach(async () => {
|
|
331
|
+
renderComponent = renderWithKintHarness(
|
|
332
|
+
<RenderSettingValue
|
|
333
|
+
currentSetting={templateSettingNoValue}
|
|
334
|
+
input={{
|
|
335
|
+
name: 'test'
|
|
336
|
+
}}
|
|
337
|
+
templates={templates}
|
|
338
|
+
/>
|
|
339
|
+
);
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
it('renders the default value', () => {
|
|
343
|
+
const { getByText } = renderComponent;
|
|
344
|
+
expect(getByText('Test template')).toBeInTheDocument(); // TODO this doesn't currently have a [default] marking on it
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
describe('render a template setting without a value or default', () => {
|
|
349
|
+
let renderComponent;
|
|
350
|
+
beforeEach(async () => {
|
|
351
|
+
renderComponent = renderWithKintHarness(
|
|
352
|
+
<RenderSettingValue
|
|
353
|
+
currentSetting={templateSettingNoValueOrDefault}
|
|
354
|
+
input={{
|
|
355
|
+
name: 'test'
|
|
356
|
+
}}
|
|
357
|
+
templates={templates}
|
|
358
|
+
/>
|
|
359
|
+
);
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
it('renders the empty message', () => {
|
|
363
|
+
const { getByText } = renderComponent;
|
|
364
|
+
expect(getByText('No current value')).toBeInTheDocument();
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
});
|
|
@@ -9,9 +9,10 @@ import {
|
|
|
9
9
|
|
|
10
10
|
import EditSettingValue from './EditSettingValue';
|
|
11
11
|
import RenderSettingValue from './RenderSettingValue';
|
|
12
|
-
import SettingsContext from '
|
|
13
|
-
import { useRefdata, useTemplates } from '
|
|
14
|
-
import { renderHelpText, toCamelCase } from '
|
|
12
|
+
import { SettingsContext } from '../../contexts';
|
|
13
|
+
import { useRefdata, useTemplates } from '../../hooks';
|
|
14
|
+
import { renderHelpText, toCamelCase } from '../../utils';
|
|
15
|
+
|
|
15
16
|
|
|
16
17
|
const SettingField = (settingFieldProps) => {
|
|
17
18
|
const {
|
|
@@ -33,7 +34,7 @@ const SettingField = (settingFieldProps) => {
|
|
|
33
34
|
endpoint: refdataEndpoint,
|
|
34
35
|
desc: currentSetting.vocab,
|
|
35
36
|
queryParams: {
|
|
36
|
-
enabled: !!currentSetting?.vocab
|
|
37
|
+
enabled: !!currentSetting?.vocab && currentSetting.settingType === 'Refdata'
|
|
37
38
|
}
|
|
38
39
|
});
|
|
39
40
|
|
|
@@ -41,7 +42,7 @@ const SettingField = (settingFieldProps) => {
|
|
|
41
42
|
context: currentSetting.vocab,
|
|
42
43
|
endpoint: templateEndpoint,
|
|
43
44
|
queryParams: {
|
|
44
|
-
enabled: !!currentSetting?.vocab
|
|
45
|
+
enabled: !!currentSetting?.vocab && currentSetting.settingType === 'Template'
|
|
45
46
|
}
|
|
46
47
|
});
|
|
47
48
|
|
|
@@ -85,7 +86,7 @@ const SettingField = (settingFieldProps) => {
|
|
|
85
86
|
{settingName}
|
|
86
87
|
</>
|
|
87
88
|
);
|
|
88
|
-
}
|
|
89
|
+
};
|
|
89
90
|
|
|
90
91
|
return (
|
|
91
92
|
<Card
|
|
@@ -99,7 +100,6 @@ const SettingField = (settingFieldProps) => {
|
|
|
99
100
|
templates={templates}
|
|
100
101
|
{...settingFieldProps}
|
|
101
102
|
/>
|
|
102
|
-
|
|
103
103
|
</Card>
|
|
104
104
|
);
|
|
105
105
|
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import userEvent from '@testing-library/user-event';
|
|
3
|
+
import '@folio/stripes-erm-components/test/jest/__mock__';
|
|
4
|
+
import { TestForm } from '@folio/stripes-erm-components/test/jest/helpers';
|
|
5
|
+
import { Button } from '@folio/stripes-testing';
|
|
6
|
+
import { Field } from 'react-final-form';
|
|
7
|
+
import SettingField from './SettingField';
|
|
8
|
+
|
|
9
|
+
import { renderWithKintHarness } from '../../../../test/jest/helpers';
|
|
10
|
+
|
|
11
|
+
const onSubmit = jest.fn();
|
|
12
|
+
const onSave = jest.fn().mockResolvedValue();
|
|
13
|
+
|
|
14
|
+
jest.mock('./EditSettingValue', () => () => <div>EditSettingValue</div>);
|
|
15
|
+
jest.mock('./RenderSettingValue', () => () => <div>RenderSettingValue</div>);
|
|
16
|
+
|
|
17
|
+
jest.mock('../../hooks', () => ({
|
|
18
|
+
useRefdata: () => [],
|
|
19
|
+
useTemplates: () => [],
|
|
20
|
+
}));
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
const setting = {
|
|
24
|
+
id: 'ff8081817d94374a017d94449a660049',
|
|
25
|
+
key: 'S3BucketName',
|
|
26
|
+
section: 'fileStorage',
|
|
27
|
+
settingType: 'String',
|
|
28
|
+
value: 'diku-shared'
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
describe('SettingField', () => {
|
|
32
|
+
let renderComponent;
|
|
33
|
+
beforeEach(async () => {
|
|
34
|
+
renderComponent = renderWithKintHarness(
|
|
35
|
+
<TestForm
|
|
36
|
+
initialValues={{}}
|
|
37
|
+
onSubmit={onSubmit}
|
|
38
|
+
>
|
|
39
|
+
<Field
|
|
40
|
+
component={SettingField}
|
|
41
|
+
name="test"
|
|
42
|
+
onSave={onSave}
|
|
43
|
+
settingData={{
|
|
44
|
+
currentSetting: setting
|
|
45
|
+
}}
|
|
46
|
+
/>
|
|
47
|
+
</TestForm>
|
|
48
|
+
);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it('renders RenderSettingValue', () => {
|
|
52
|
+
const { getByText } = renderComponent;
|
|
53
|
+
expect(getByText('RenderSettingValue')).toBeInTheDocument();
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test('renders the edit button', () => {
|
|
57
|
+
Button('Edit').exists();
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('clicking edit/save works as expected', async () => {
|
|
61
|
+
const { getByRole, findByText } = renderComponent;
|
|
62
|
+
|
|
63
|
+
// before clicking on edit button, we should be rendering setting value
|
|
64
|
+
expect(await findByText('RenderSettingValue')).toBeInTheDocument();
|
|
65
|
+
|
|
66
|
+
// Clicking edit button
|
|
67
|
+
const editButton = getByRole('button', { name: /Edit/i });
|
|
68
|
+
expect(editButton).toBeInTheDocument();
|
|
69
|
+
userEvent.click(editButton);
|
|
70
|
+
// Should be rendering the "edit" for a setting value
|
|
71
|
+
expect(await findByText('EditSettingValue')).toBeInTheDocument();
|
|
72
|
+
|
|
73
|
+
// Clicking finish editing button
|
|
74
|
+
const finishEditing = getByRole('button', { name: /Finish editing/i });
|
|
75
|
+
expect(finishEditing).toBeInTheDocument();
|
|
76
|
+
userEvent.click(finishEditing);
|
|
77
|
+
// Should be rendering the setting value again
|
|
78
|
+
expect(await findByText('RenderSettingValue')).toBeInTheDocument();
|
|
79
|
+
});
|
|
80
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default
|
|
1
|
+
export { default } from './NoResultsMessage';
|
|
@@ -27,7 +27,7 @@ const RefdataButtons = (props) => {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
return (
|
|
30
|
-
<Col xs={dynamicColumnWidth ? (12 / numberOfButtons) : (12 / maximumColumns)}
|
|
30
|
+
<Col key={`${input.name}:${option.id}`} xs={dynamicColumnWidth ? (12 / numberOfButtons) : (12 / maximumColumns)}>
|
|
31
31
|
<RadioButton
|
|
32
32
|
{...buttonProps}
|
|
33
33
|
/>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './RefdataButtons';
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
PaneMenu,
|
|
23
23
|
SearchField,
|
|
24
24
|
} from '@folio/stripes/components';
|
|
25
|
-
import
|
|
25
|
+
import NoResultsMessage from '../NoResultsMessage';
|
|
26
26
|
|
|
27
27
|
import { generateKiwtQuery } from '../utils';
|
|
28
28
|
import { useKiwtSASQuery, useLocalStorageState } from '../hooks';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
|
-
import EditableSettingsList from '
|
|
5
|
-
import SettingsContext from '
|
|
6
|
-
import useSettingSection from '
|
|
4
|
+
import { EditableSettingsList } from '../EditableSettingsList';
|
|
5
|
+
import { SettingsContext } from '../contexts';
|
|
6
|
+
import { useSettingSection } from '../hooks';
|
|
7
7
|
|
|
8
8
|
const SettingPage = ({ sectionName }) => {
|
|
9
9
|
const { settingEndpoint } = useContext(SettingsContext);
|
|
@@ -31,10 +31,10 @@ SettingPage.propTypes = {
|
|
|
31
31
|
sectionName: PropTypes.string,
|
|
32
32
|
resources: PropTypes.shape({
|
|
33
33
|
settings: PropTypes.shape({
|
|
34
|
-
records: PropTypes.
|
|
34
|
+
records: PropTypes.arrayOf(PropTypes.object)
|
|
35
35
|
}),
|
|
36
36
|
refdatavalues: PropTypes.shape({
|
|
37
|
-
records: PropTypes.
|
|
37
|
+
records: PropTypes.arrayOf(PropTypes.object)
|
|
38
38
|
})
|
|
39
39
|
})
|
|
40
40
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
2
4
|
import { Pane } from '@folio/stripes/components';
|
|
3
5
|
import { FormattedMessage } from 'react-intl';
|
|
4
|
-
import SettingsContext from '
|
|
5
|
-
import { toCamelCase } from '
|
|
6
|
+
import { SettingsContext } from '../contexts';
|
|
7
|
+
import { toCamelCase } from '../utils';
|
|
6
8
|
|
|
7
9
|
const SettingPagePane = ({ sectionName, children }) => {
|
|
8
10
|
const { intlKey } = useContext(SettingsContext);
|
|
@@ -18,4 +20,12 @@ const SettingPagePane = ({ sectionName, children }) => {
|
|
|
18
20
|
);
|
|
19
21
|
};
|
|
20
22
|
|
|
23
|
+
SettingPagePane.propTypes = {
|
|
24
|
+
sectionName: PropTypes.string,
|
|
25
|
+
children: PropTypes.oneOfType([
|
|
26
|
+
PropTypes.func,
|
|
27
|
+
PropTypes.node
|
|
28
|
+
])
|
|
29
|
+
};
|
|
30
|
+
|
|
21
31
|
export default SettingPagePane;
|
|
@@ -30,6 +30,7 @@ const TypeDown = ({
|
|
|
30
30
|
}) => {
|
|
31
31
|
useEffect(() => {
|
|
32
32
|
if (process.env.NODE_ENV === 'development') {
|
|
33
|
+
// eslint-disable-next-line no-console
|
|
33
34
|
console.warn('TypeDown component is deprecated, you likely want either Typedown or QueryTypedown');
|
|
34
35
|
}
|
|
35
36
|
}, []);
|
|
@@ -71,13 +72,13 @@ const TypeDown = ({
|
|
|
71
72
|
</div>
|
|
72
73
|
), [renderListItem, uniqueIdentificationPath]);
|
|
73
74
|
|
|
74
|
-
const handleChange = value => {
|
|
75
|
+
const handleChange = useCallback(value => {
|
|
75
76
|
input.onChange(value);
|
|
76
77
|
|
|
77
78
|
if (typeof onChange === 'function') {
|
|
78
79
|
onChange(value);
|
|
79
80
|
}
|
|
80
|
-
};
|
|
81
|
+
}, [input, onChange]);
|
|
81
82
|
|
|
82
83
|
const dropDown = useCallback(() => {
|
|
83
84
|
return (
|
|
@@ -132,6 +133,7 @@ const TypeDown = ({
|
|
|
132
133
|
}, [
|
|
133
134
|
data,
|
|
134
135
|
footerRef,
|
|
136
|
+
handleChange,
|
|
135
137
|
handleNextFocus,
|
|
136
138
|
input,
|
|
137
139
|
listKeyDownHandler,
|
|
@@ -131,7 +131,7 @@ const Typedown = ({
|
|
|
131
131
|
<div
|
|
132
132
|
ref={footerRef}
|
|
133
133
|
className={css.footer}
|
|
134
|
-
id=
|
|
134
|
+
id={`typedown-footer-${selectorSafe(input.name)}`}
|
|
135
135
|
>
|
|
136
136
|
{renderFooter()}
|
|
137
137
|
</div>
|
|
@@ -222,6 +222,7 @@ const Typedown = ({
|
|
|
222
222
|
|
|
223
223
|
Typedown.propTypes = {
|
|
224
224
|
dataOptions: PropTypes.arrayOf(PropTypes.object),
|
|
225
|
+
filterPath: PropTypes.string,
|
|
225
226
|
input: PropTypes.object,
|
|
226
227
|
meta: PropTypes.object,
|
|
227
228
|
onChange: PropTypes.func,
|
package/src/lib/hooks/index.js
CHANGED
|
@@ -6,4 +6,5 @@ export { default as useKiwtSASQuery } from './useKiwtSASQuery';
|
|
|
6
6
|
export { default as useHelperApp } from './useHelperApp';
|
|
7
7
|
export { default as useLocalStorageState } from './useLocalStorageState';
|
|
8
8
|
export { default as useQIndex } from './useQIndex';
|
|
9
|
+
export { useSettings, useSettingSection } from './settingsHooks';
|
|
9
10
|
export { default as useKiwtFieldArray } from './useKiwtFieldArray';
|
|
File without changes
|