@k-int/stripes-kint-components 2.5.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -1
- package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +1 -28
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -4
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +1 -28
- package/es/index.js +7 -5
- package/es/lib/ActionList/ActionList.js +1 -31
- package/es/lib/ActionList/ActionListFieldArray.js +6 -40
- package/es/lib/ActionList/index.js +1 -5
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +55 -46
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +53 -0
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +102 -62
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +125 -0
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +131 -138
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +200 -0
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +22 -37
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +194 -0
- package/es/lib/CustomProperties/Config/index.js +1 -5
- package/es/lib/CustomProperties/Config/testResources.js +198 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -30
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +48 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +1 -34
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +48 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +1 -37
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +113 -0
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +63 -64
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +283 -0
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -30
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +65 -0
- package/es/lib/CustomProperties/Edit/index.js +1 -5
- package/es/lib/CustomProperties/Edit/testResources.js +923 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +10 -35
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +102 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +1 -34
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +41 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +1 -34
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +91 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +1 -30
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +86 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +1 -35
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +321 -0
- package/es/lib/CustomProperties/Filter/index.js +1 -5
- package/es/lib/CustomProperties/Filter/testResources.js +262 -0
- package/es/lib/CustomProperties/Filter/useOperators.js +9 -39
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +5 -36
- package/es/lib/CustomProperties/Filter/useValueProps.js +13 -35
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -30
- package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +48 -0
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +1 -34
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +55 -0
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +13 -32
- package/es/lib/CustomProperties/View/index.js +1 -5
- package/es/lib/CustomProperties/View/testResources.js +144 -0
- package/es/lib/CustomProperties/index.js +1 -5
- package/es/lib/EditableRefdataList/EditableRefdataList.js +163 -64
- package/es/lib/EditableRefdataList/index.js +1 -5
- package/es/lib/EditableSettingsList/EditableSettingsList.js +1 -30
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +1 -30
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +10 -35
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +28 -64
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +8 -33
- package/es/lib/EditableSettingsList/SettingField/index.js +1 -5
- package/es/lib/EditableSettingsList/index.js +1 -5
- package/es/lib/FormModal/FormModal.js +2 -31
- package/es/lib/FormModal/index.js +1 -5
- package/es/lib/NoResultsMessage/NoResultsMessage.js +1 -30
- package/es/lib/NoResultsMessage/index.js +1 -5
- package/es/lib/QueryTypedown/QueryTypedown.js +1 -34
- package/es/lib/QueryTypedown/index.js +1 -5
- package/es/lib/RefdataButtons/RefdataButtons.js +1 -34
- package/es/lib/RefdataButtons/index.js +1 -5
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +2 -34
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +1 -34
- package/es/lib/SASQLookupComponent/TableBody/index.js +1 -5
- package/es/lib/SASQLookupComponent/index.js +1 -5
- package/es/lib/SASQRoute/SASQRoute.js +1 -30
- package/es/lib/SASQRoute/index.js +1 -5
- package/es/lib/SASQViewComponent/SASQViewComponent.js +1 -34
- package/es/lib/SASQViewComponent/index.js +1 -5
- package/es/lib/SearchField/SearchField.js +1 -31
- package/es/lib/SearchField/index.js +1 -5
- package/es/lib/SettingPage/SettingPage.js +1 -34
- package/es/lib/SettingPage/SettingPagePane.js +1 -32
- package/es/lib/SettingPage/index.js +1 -5
- package/es/lib/Typedown/Typedown.js +1 -34
- package/es/lib/Typedown/index.js +1 -5
- package/es/lib/constants/customProperties.js +4 -39
- package/es/lib/constants/eventCodes.js +1 -31
- package/es/lib/contexts/SettingsContext.js +1 -30
- package/es/lib/contexts/index.js +1 -5
- package/es/lib/hooks/index.js +7 -5
- package/es/lib/hooks/settingsHooks/index.js +8 -4
- package/es/lib/hooks/settingsHooks/useAppSettings.js +84 -0
- package/es/lib/hooks/settingsHooks/useSettingSection.js +1 -34
- package/es/lib/hooks/settingsHooks/useSettings.js +1 -36
- package/es/lib/hooks/typedownHooks/index.js +1 -5
- package/es/lib/hooks/typedownHooks/useTypedown.js +1 -34
- package/es/lib/hooks/typedownHooks/useTypedownData.js +1 -34
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +1 -34
- package/es/lib/hooks/useActiveElement.js +1 -32
- package/es/lib/hooks/useAvailableCustomProperties.js +1 -34
- package/es/lib/hooks/useCustomProperties.js +4 -34
- package/es/lib/hooks/useHelperApp.js +1 -34
- package/es/lib/hooks/useInvalidateRefdata.js +1 -34
- package/es/lib/hooks/useKiwtFieldArray.js +1 -34
- package/es/lib/hooks/useKiwtSASQuery.js +1 -35
- package/es/lib/hooks/useLocalStorageState.js +1 -34
- package/es/lib/hooks/useMutateCustomProperties.js +14 -42
- package/es/lib/hooks/useMutateRefdataValue.js +11 -39
- package/es/lib/hooks/useQIndex.js +1 -34
- package/es/lib/hooks/useRefdata.js +1 -34
- package/es/lib/hooks/useTemplates.js +1 -34
- package/es/lib/utils/buildUrl.js +2 -31
- package/es/lib/utils/generateKiwtQuery.js +1 -30
- package/es/lib/utils/generateKiwtQueryParams.js +1 -30
- package/es/lib/utils/groupCustomPropertiesByCtx.js +1 -30
- package/es/lib/utils/highlightString.js +1 -29
- package/es/lib/utils/index.js +1 -5
- package/es/lib/utils/matchString.js +1 -30
- package/es/lib/utils/refdataOptions.js +1 -30
- package/es/lib/utils/refdataQueryKey.js +1 -30
- package/es/lib/utils/renderHelpText.js +1 -30
- package/es/lib/utils/selectorSafe.js +1 -30
- package/es/lib/utils/sortByLabel.js +1 -30
- package/es/lib/utils/toCamelCase.js +1 -30
- package/es/lib/utils/typedownQueryKey.js +1 -30
- package/es/lib/utils/validators.js +1 -32
- package/junit.xml +731 -38
- package/package.json +4 -4
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +142 -28
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +93 -27
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +308 -188
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +92 -32
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +65 -50
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +793 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +15 -15
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +161 -77
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +29 -26
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +61 -46
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +892 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +19 -19
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +42 -42
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +23 -23
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +19 -19
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +41 -41
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +102 -87
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +976 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +58 -37
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +47 -29
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +38 -38
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +30 -6
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +48 -33
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +571 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +134 -17
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +27 -12
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +13 -13
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +32 -32
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +21 -21
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +6 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +18 -18
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +32 -26
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +13 -13
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +92 -92
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +292 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +8 -8
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +32 -17
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +29 -11
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/index.html +109 -109
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +22 -22
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +31 -31
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +46 -46
- package/src/artifacts/coverage-jest/lcov.info +1124 -916
- package/src/index.js +2 -1
- package/src/lib/ActionList/ActionListFieldArray.js +3 -2
- package/src/lib/ActionList/README.md +12 -1
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +46 -8
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +35 -0
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +63 -20
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +51 -0
- package/src/lib/CustomProperties/Config/CustomPropertyForm.js +172 -132
- package/src/lib/CustomProperties/Config/CustomPropertyForm.test.js +126 -0
- package/src/lib/CustomProperties/Config/CustomPropertyView.js +29 -9
- package/src/lib/CustomProperties/Config/CustomPropertyView.test.js +55 -0
- package/src/lib/CustomProperties/Config/testResources.js +236 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +29 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +29 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +51 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyField.js +56 -24
- package/src/lib/CustomProperties/Edit/CustomPropertyField.test.js +185 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.js +1 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +57 -0
- package/src/lib/CustomProperties/Edit/testResources.js +1063 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +15 -3
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +43 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +32 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +44 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +40 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +111 -0
- package/src/lib/CustomProperties/Filter/testResources.js +297 -0
- package/src/lib/CustomProperties/Filter/useOperators.js +7 -0
- package/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +5 -2
- package/src/lib/CustomProperties/Filter/useValueProps.js +6 -0
- package/src/lib/CustomProperties/View/CustomPropertiesView.test.js +32 -0
- package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +32 -0
- package/src/lib/CustomProperties/View/CustomPropertyCard.js +8 -0
- package/src/lib/CustomProperties/View/testResources.js +162 -0
- package/src/lib/EditableRefdataList/EditableRefdataList.js +97 -17
- package/src/lib/EditableRefdataList/README.md +3 -0
- package/src/lib/FormModal/FormModal.js +1 -1
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +1 -0
- package/src/lib/constants/customProperties.js +2 -0
- package/src/lib/hooks/README.md +28 -3
- package/src/lib/hooks/index.js +1 -1
- package/src/lib/hooks/settingsHooks/index.js +1 -0
- package/src/lib/hooks/settingsHooks/useAppSettings.js +69 -0
- package/src/lib/hooks/useCustomProperties.js +5 -0
- package/src/lib/hooks/useMutateCustomProperties.js +7 -3
- package/src/lib/hooks/useMutateRefdataValue.js +5 -2
- package/styles/ActionListFieldArray.css +2 -1
- package/styles/CustomProperties.css +17 -0
- package/translations/stripes-kint-components/ar.json +11 -2
- package/translations/stripes-kint-components/cs_CZ.json +10 -1
- package/translations/stripes-kint-components/de.json +11 -2
- package/translations/stripes-kint-components/en.json +12 -3
- package/translations/stripes-kint-components/es.json +11 -2
- package/translations/stripes-kint-components/fr.json +1 -105
- package/translations/stripes-kint-components/hi_IN.json +1 -105
- package/translations/stripes-kint-components/hu.json +11 -2
- package/translations/stripes-kint-components/it_IT.json +11 -2
- package/translations/stripes-kint-components/ja.json +10 -1
- package/translations/stripes-kint-components/ko.json +11 -2
- package/translations/stripes-kint-components/pl.json +11 -2
- package/translations/stripes-kint-components/pt_PT.json +11 -2
- package/translations/stripes-kint-components/ru.json +11 -2
- package/translations/stripes-kint-components/sv.json +11 -2
- package/translations/stripes-kint-components/zh_CN.json +10 -1
|
@@ -15,16 +15,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
(function () {
|
|
19
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
20
|
-
enterModule && enterModule(module);
|
|
21
|
-
})();
|
|
22
|
-
|
|
23
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
24
|
-
return a;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
18
|
var REFDATA = CUSTPROP_TYPES.REFDATA_CLASS_NAME,
|
|
19
|
+
MULTIREFDATA = CUSTPROP_TYPES.MULTI_REFDATA_CLASS_NAME,
|
|
28
20
|
DECIMAL = CUSTPROP_TYPES.DECIMAL_CLASS_NAME,
|
|
29
21
|
INTEGER = CUSTPROP_TYPES.INTEGER_CLASS_NAME,
|
|
30
22
|
DATE = CUSTPROP_TYPES.DATE_CLASS_NAME,
|
|
@@ -92,6 +84,13 @@ var useOperators = function useOperators(type) {
|
|
|
92
84
|
});
|
|
93
85
|
}
|
|
94
86
|
|
|
87
|
+
if (!type || type === MULTIREFDATA) {
|
|
88
|
+
operators.push({
|
|
89
|
+
value: '==',
|
|
90
|
+
label: getLabel('stripes-kint-components.operator.contains')
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
95
94
|
if (!type || type === TEXT) {
|
|
96
95
|
operators.push({
|
|
97
96
|
value: '=~',
|
|
@@ -105,34 +104,5 @@ var useOperators = function useOperators(type) {
|
|
|
105
104
|
return operators;
|
|
106
105
|
};
|
|
107
106
|
|
|
108
|
-
__signature__(useOperators, "useIntl{intl}", function () {
|
|
109
|
-
return [_reactIntl.useIntl];
|
|
110
|
-
});
|
|
111
|
-
|
|
112
107
|
var _default = useOperators;
|
|
113
|
-
|
|
114
|
-
exports.default = _default2;
|
|
115
|
-
;
|
|
116
|
-
|
|
117
|
-
(function () {
|
|
118
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
119
|
-
|
|
120
|
-
if (!reactHotLoader) {
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
reactHotLoader.register(REFDATA, "REFDATA", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
|
|
125
|
-
reactHotLoader.register(DECIMAL, "DECIMAL", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
|
|
126
|
-
reactHotLoader.register(INTEGER, "INTEGER", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
|
|
127
|
-
reactHotLoader.register(DATE, "DATE", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
|
|
128
|
-
reactHotLoader.register(TEXT, "TEXT", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
|
|
129
|
-
reactHotLoader.register(useOperators, "useOperators", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
|
|
130
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
|
|
131
|
-
})();
|
|
132
|
-
|
|
133
|
-
;
|
|
134
|
-
|
|
135
|
-
(function () {
|
|
136
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
137
|
-
leaveModule && leaveModule(module);
|
|
138
|
-
})();
|
|
108
|
+
exports.default = _default;
|
|
@@ -9,11 +9,6 @@ var _useOperators = _interopRequireDefault(require("./useOperators"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
-
(function () {
|
|
13
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
14
|
-
enterModule && enterModule(module);
|
|
15
|
-
})();
|
|
16
|
-
|
|
17
12
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
18
13
|
|
|
19
14
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -26,10 +21,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
26
21
|
|
|
27
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
23
|
|
|
29
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
30
|
-
return a;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
24
|
var useParseActiveFilterStrings = function useParseActiveFilterStrings(filterStrings) {
|
|
34
25
|
var operators = (0, _useOperators.default)().map(function (o) {
|
|
35
26
|
return o.value;
|
|
@@ -42,16 +33,18 @@ var useParseActiveFilterStrings = function useParseActiveFilterStrings(filterStr
|
|
|
42
33
|
|
|
43
34
|
// ruleString is constructed in this.handleSubmit passed to CustomPropertyFiltersForm
|
|
44
35
|
// and has shape "customProperties.foo.value!=42"
|
|
36
|
+
// OR customProperties.foo.value.id==1234, so make sure to disregard the .id
|
|
45
37
|
var _ruleString$split = ruleString.split('.value'),
|
|
46
38
|
_ruleString$split2 = _slicedToArray(_ruleString$split, 2),
|
|
47
39
|
customPropertyPath = _ruleString$split2[0],
|
|
48
40
|
rule = _ruleString$split2[1];
|
|
49
41
|
|
|
42
|
+
var idSafeRule = rule.replace('.id', '');
|
|
50
43
|
customProperty = customPropertyPath.replace('customProperties.', '');
|
|
51
44
|
var operator = (_operators$find = operators.find(function (o) {
|
|
52
|
-
return
|
|
45
|
+
return idSafeRule.startsWith(o);
|
|
53
46
|
})) !== null && _operators$find !== void 0 ? _operators$find : '';
|
|
54
|
-
var value =
|
|
47
|
+
var value = idSafeRule.substring(operator.length);
|
|
55
48
|
numberOfFilters += 1;
|
|
56
49
|
return {
|
|
57
50
|
operator: operator,
|
|
@@ -69,29 +62,5 @@ var useParseActiveFilterStrings = function useParseActiveFilterStrings(filterStr
|
|
|
69
62
|
};
|
|
70
63
|
};
|
|
71
64
|
|
|
72
|
-
__signature__(useParseActiveFilterStrings, "useOperators{}", function () {
|
|
73
|
-
return [_useOperators.default];
|
|
74
|
-
});
|
|
75
|
-
|
|
76
65
|
var _default = useParseActiveFilterStrings;
|
|
77
|
-
|
|
78
|
-
exports.default = _default2;
|
|
79
|
-
;
|
|
80
|
-
|
|
81
|
-
(function () {
|
|
82
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
83
|
-
|
|
84
|
-
if (!reactHotLoader) {
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
reactHotLoader.register(useParseActiveFilterStrings, "useParseActiveFilterStrings", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js");
|
|
89
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js");
|
|
90
|
-
})();
|
|
91
|
-
|
|
92
|
-
;
|
|
93
|
-
|
|
94
|
-
(function () {
|
|
95
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
96
|
-
leaveModule && leaveModule(module);
|
|
97
|
-
})();
|
|
66
|
+
exports.default = _default;
|
|
@@ -17,16 +17,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
-
(function () {
|
|
21
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
22
|
-
enterModule && enterModule(module);
|
|
23
|
-
})();
|
|
24
|
-
|
|
25
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
26
|
-
return a;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
20
|
var REFDATA = CUSTPROP_TYPES.REFDATA_CLASS_NAME,
|
|
21
|
+
MULTIREFDATA = CUSTPROP_TYPES.MULTI_REFDATA_CLASS_NAME,
|
|
30
22
|
DECIMAL = CUSTPROP_TYPES.DECIMAL_CLASS_NAME,
|
|
31
23
|
INTEGER = CUSTPROP_TYPES.INTEGER_CLASS_NAME,
|
|
32
24
|
DATE = CUSTPROP_TYPES.DATE_CLASS_NAME,
|
|
@@ -56,6 +48,17 @@ var useValueProps = function useValueProps(custPropDefinition) {
|
|
|
56
48
|
props.placeholder = ' ';
|
|
57
49
|
break;
|
|
58
50
|
|
|
51
|
+
case MULTIREFDATA:
|
|
52
|
+
props.component = _components.Select;
|
|
53
|
+
props.dataOptions = custPropDefinition.category.values.map(function (mrdv) {
|
|
54
|
+
return {
|
|
55
|
+
label: mrdv.label,
|
|
56
|
+
value: mrdv.id
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
props.placeholder = ' ';
|
|
60
|
+
break;
|
|
61
|
+
|
|
59
62
|
case DATE:
|
|
60
63
|
props.component = _components.Datepicker;
|
|
61
64
|
props.backendDateStandard = 'YYYY-MM-DD';
|
|
@@ -73,29 +76,4 @@ var useValueProps = function useValueProps(custPropDefinition) {
|
|
|
73
76
|
};
|
|
74
77
|
|
|
75
78
|
var _default = useValueProps;
|
|
76
|
-
|
|
77
|
-
exports.default = _default2;
|
|
78
|
-
;
|
|
79
|
-
|
|
80
|
-
(function () {
|
|
81
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
82
|
-
|
|
83
|
-
if (!reactHotLoader) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
reactHotLoader.register(REFDATA, "REFDATA", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useValueProps.js");
|
|
88
|
-
reactHotLoader.register(DECIMAL, "DECIMAL", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useValueProps.js");
|
|
89
|
-
reactHotLoader.register(INTEGER, "INTEGER", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useValueProps.js");
|
|
90
|
-
reactHotLoader.register(DATE, "DATE", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useValueProps.js");
|
|
91
|
-
reactHotLoader.register(TEXT, "TEXT", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useValueProps.js");
|
|
92
|
-
reactHotLoader.register(useValueProps, "useValueProps", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useValueProps.js");
|
|
93
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useValueProps.js");
|
|
94
|
-
})();
|
|
95
|
-
|
|
96
|
-
;
|
|
97
|
-
|
|
98
|
-
(function () {
|
|
99
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
100
|
-
leaveModule && leaveModule(module);
|
|
101
|
-
})();
|
|
79
|
+
exports.default = _default;
|
|
@@ -13,15 +13,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
(function () {
|
|
17
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
18
|
-
enterModule && enterModule(module);
|
|
19
|
-
})();
|
|
20
|
-
|
|
21
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
16
|
var CustomPropertiesView = function CustomPropertiesView(_ref) {
|
|
26
17
|
var _ref$contexts = _ref.contexts,
|
|
27
18
|
contexts = _ref$contexts === void 0 ? [] : _ref$contexts,
|
|
@@ -50,24 +41,4 @@ CustomPropertiesView.propTypes = {
|
|
|
50
41
|
nameOverride: _propTypes.default.string
|
|
51
42
|
};
|
|
52
43
|
var _default = CustomPropertiesView;
|
|
53
|
-
|
|
54
|
-
exports.default = _default2;
|
|
55
|
-
;
|
|
56
|
-
|
|
57
|
-
(function () {
|
|
58
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
59
|
-
|
|
60
|
-
if (!reactHotLoader) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
reactHotLoader.register(CustomPropertiesView, "CustomPropertiesView", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/View/CustomPropertiesView.js");
|
|
65
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/View/CustomPropertiesView.js");
|
|
66
|
-
})();
|
|
67
|
-
|
|
68
|
-
;
|
|
69
|
-
|
|
70
|
-
(function () {
|
|
71
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
72
|
-
leaveModule && leaveModule(module);
|
|
73
|
-
})();
|
|
44
|
+
exports.default = _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
require("@folio/stripes-erm-components/test/jest/__mock__");
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@testing-library/react");
|
|
8
|
+
|
|
9
|
+
var _reactRouterDom = require("react-router-dom");
|
|
10
|
+
|
|
11
|
+
var _helpers = require("../../../../test/jest/helpers");
|
|
12
|
+
|
|
13
|
+
var _testResources = require("./testResources");
|
|
14
|
+
|
|
15
|
+
var _CustomPropertiesView = _interopRequireDefault(require("./CustomPropertiesView"));
|
|
16
|
+
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
|
|
21
|
+
jest.mock('./CustomPropertiesViewCtx', function () {
|
|
22
|
+
return function () {
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
24
|
+
children: "CustomPropertiesViewCtx"
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
describe('CustomPropertiesView', function () {
|
|
29
|
+
var renderComponent;
|
|
30
|
+
beforeEach(function () {
|
|
31
|
+
renderComponent = (0, _helpers.renderWithKintHarness)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.MemoryRouter, {
|
|
32
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertiesView.default, {
|
|
33
|
+
contexts: _testResources.contexts,
|
|
34
|
+
customProperties: _testResources.customProperties,
|
|
35
|
+
customPropertiesEndpoint: "erm/custprops",
|
|
36
|
+
id: "supplementaryProperties",
|
|
37
|
+
labelOverrides: _testResources.labelOverrides
|
|
38
|
+
})
|
|
39
|
+
}));
|
|
40
|
+
});
|
|
41
|
+
it('renders CustomPropertiesViewCtx component ', function () {
|
|
42
|
+
var _renderComponent = renderComponent,
|
|
43
|
+
getByText = _renderComponent.getByText;
|
|
44
|
+
(0, _react2.waitFor)(function () {
|
|
45
|
+
return expect(getByText('CustomPropertiesViewCtx')).toBeInTheDocument();
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -19,11 +19,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
-
(function () {
|
|
23
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
24
|
-
enterModule && enterModule(module);
|
|
25
|
-
})();
|
|
26
|
-
|
|
27
22
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
28
23
|
|
|
29
24
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -36,10 +31,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
36
31
|
|
|
37
32
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
38
33
|
|
|
39
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
40
|
-
return a;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
34
|
var CustomPropertiesViewCtx = function CustomPropertiesViewCtx(_ref) {
|
|
44
35
|
var _custprops$filter$len, _custprops$filter;
|
|
45
36
|
|
|
@@ -160,10 +151,6 @@ var CustomPropertiesViewCtx = function CustomPropertiesViewCtx(_ref) {
|
|
|
160
151
|
});
|
|
161
152
|
};
|
|
162
153
|
|
|
163
|
-
__signature__(CustomPropertiesViewCtx, "useCustomProperties{{ data: custprops, isLoading }}", function () {
|
|
164
|
-
return [_hooks.useCustomProperties];
|
|
165
|
-
});
|
|
166
|
-
|
|
167
154
|
CustomPropertiesViewCtx.propTypes = {
|
|
168
155
|
ctx: _propTypes.default.string,
|
|
169
156
|
customProperties: _propTypes.default.object,
|
|
@@ -172,24 +159,4 @@ CustomPropertiesViewCtx.propTypes = {
|
|
|
172
159
|
labelOverrides: _propTypes.default.object
|
|
173
160
|
};
|
|
174
161
|
var _default = CustomPropertiesViewCtx;
|
|
175
|
-
|
|
176
|
-
exports.default = _default2;
|
|
177
|
-
;
|
|
178
|
-
|
|
179
|
-
(function () {
|
|
180
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
181
|
-
|
|
182
|
-
if (!reactHotLoader) {
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
reactHotLoader.register(CustomPropertiesViewCtx, "CustomPropertiesViewCtx", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/View/CustomPropertiesViewCtx.js");
|
|
187
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/View/CustomPropertiesViewCtx.js");
|
|
188
|
-
})();
|
|
189
|
-
|
|
190
|
-
;
|
|
191
|
-
|
|
192
|
-
(function () {
|
|
193
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
194
|
-
leaveModule && leaveModule(module);
|
|
195
|
-
})();
|
|
162
|
+
exports.default = _default;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
require("@folio/stripes-erm-components/test/jest/__mock__");
|
|
6
|
+
|
|
7
|
+
var _reactRouterDom = require("react-router-dom");
|
|
8
|
+
|
|
9
|
+
var _react2 = require("@testing-library/react");
|
|
10
|
+
|
|
11
|
+
var _helpers = require("../../../../test/jest/helpers");
|
|
12
|
+
|
|
13
|
+
var _testResources = require("./testResources");
|
|
14
|
+
|
|
15
|
+
var _CustomPropertiesViewCtx = _interopRequireDefault(require("./CustomPropertiesViewCtx"));
|
|
16
|
+
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
|
|
21
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
|
+
|
|
23
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24
|
+
|
|
25
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
26
|
+
|
|
27
|
+
jest.mock('../../hooks', function () {
|
|
28
|
+
return {
|
|
29
|
+
useCustomProperties: function useCustomProperties() {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
jest.mock('./CustomPropertyCard', function () {
|
|
35
|
+
return function () {
|
|
36
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
37
|
+
children: "CustomPropertyCard"
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
describe('CustomPropertiesViewCtx', function () {
|
|
42
|
+
var renderComponent;
|
|
43
|
+
beforeEach(function () {
|
|
44
|
+
renderComponent = (0, _helpers.renderWithKintHarness)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.MemoryRouter, {
|
|
45
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertiesViewCtx.default, _objectSpread({}, _testResources.data))
|
|
46
|
+
}));
|
|
47
|
+
});
|
|
48
|
+
it('renders CustomPropertyCard component ', function () {
|
|
49
|
+
var _renderComponent = renderComponent,
|
|
50
|
+
getByText = _renderComponent.getByText;
|
|
51
|
+
(0, _react2.waitFor)(function () {
|
|
52
|
+
return expect(getByText('CustomPropertyCard')).toBeInTheDocument();
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -23,15 +23,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
(function () {
|
|
27
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
28
|
-
enterModule && enterModule(module);
|
|
29
|
-
})();
|
|
30
|
-
|
|
31
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
32
|
-
return a;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
26
|
var CustomPropertyCard = function CustomPropertyCard(_ref) {
|
|
36
27
|
var _labelOverrides$value, _labelOverrides$inter3, _labelOverrides$visib, _labelOverrides$publi;
|
|
37
28
|
|
|
@@ -84,7 +75,7 @@ var CustomPropertyCard = function CustomPropertyCard(_ref) {
|
|
|
84
75
|
};
|
|
85
76
|
|
|
86
77
|
var renderValue = function renderValue() {
|
|
87
|
-
var _customProperty$value, _customProperty$value2, _customProperty$value3;
|
|
78
|
+
var _customProperty$value, _customProperty$value2, _customProperty$value3, _customProperty$value4;
|
|
88
79
|
|
|
89
80
|
if (!customProperty) {
|
|
90
81
|
var _labelOverrides$notSe;
|
|
@@ -95,8 +86,18 @@ var CustomPropertyCard = function CustomPropertyCard(_ref) {
|
|
|
95
86
|
}
|
|
96
87
|
|
|
97
88
|
switch (customPropertyDefinition.type) {
|
|
89
|
+
case CUSTPROP_TYPES.MULTI_REFDATA_CLASS_NAME:
|
|
90
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.List, {
|
|
91
|
+
items: (_customProperty$value = customProperty.value) === null || _customProperty$value === void 0 ? void 0 : _customProperty$value.map(function (item) {
|
|
92
|
+
var _item$label;
|
|
93
|
+
|
|
94
|
+
return (_item$label = item === null || item === void 0 ? void 0 : item.label) !== null && _item$label !== void 0 ? _item$label : item === null || item === void 0 ? void 0 : item.value;
|
|
95
|
+
}),
|
|
96
|
+
listStyle: "bullets"
|
|
97
|
+
});
|
|
98
|
+
|
|
98
99
|
case CUSTPROP_TYPES.REFDATA_CLASS_NAME:
|
|
99
|
-
return (_customProperty$
|
|
100
|
+
return (_customProperty$value2 = (_customProperty$value3 = customProperty.value) === null || _customProperty$value3 === void 0 ? void 0 : _customProperty$value3.label) !== null && _customProperty$value2 !== void 0 ? _customProperty$value2 : (_customProperty$value4 = customProperty.value) === null || _customProperty$value4 === void 0 ? void 0 : _customProperty$value4.value;
|
|
100
101
|
|
|
101
102
|
case CUSTPROP_TYPES.DECIMAL_CLASS_NAME:
|
|
102
103
|
case CUSTPROP_TYPES.INTEGER_CLASS_NAME:
|
|
@@ -182,24 +183,4 @@ CustomPropertyCard.propTypes = {
|
|
|
182
183
|
labelOverrides: _propTypes.default.object
|
|
183
184
|
};
|
|
184
185
|
var _default = CustomPropertyCard;
|
|
185
|
-
|
|
186
|
-
exports.default = _default2;
|
|
187
|
-
;
|
|
188
|
-
|
|
189
|
-
(function () {
|
|
190
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
191
|
-
|
|
192
|
-
if (!reactHotLoader) {
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
reactHotLoader.register(CustomPropertyCard, "CustomPropertyCard", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/View/CustomPropertyCard.js");
|
|
197
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/View/CustomPropertyCard.js");
|
|
198
|
-
})();
|
|
199
|
-
|
|
200
|
-
;
|
|
201
|
-
|
|
202
|
-
(function () {
|
|
203
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
204
|
-
leaveModule && leaveModule(module);
|
|
205
|
-
})();
|
|
186
|
+
exports.default = _default;
|
|
@@ -28,8 +28,4 @@ var _CustomPropertiesViewCtx = _interopRequireDefault(require("./CustomPropertie
|
|
|
28
28
|
|
|
29
29
|
var _CustomPropertyCard = _interopRequireDefault(require("./CustomPropertyCard"));
|
|
30
30
|
|
|
31
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
32
|
-
|
|
33
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
34
|
-
return a;
|
|
35
|
-
};
|
|
31
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.labelOverrides = exports.data = exports.customProperties = exports.contexts = void 0;
|
|
7
|
+
var contexts = ['isNull', 'OpenAccess'];
|
|
8
|
+
exports.contexts = contexts;
|
|
9
|
+
var customProperties = {
|
|
10
|
+
'AuthorIdentification': [{
|
|
11
|
+
'id': 2,
|
|
12
|
+
'publicNote': 'public note',
|
|
13
|
+
'note': 'internal note',
|
|
14
|
+
'internal': true,
|
|
15
|
+
'value': {
|
|
16
|
+
'id': '2c91809c813e654501813e6c3bc50061',
|
|
17
|
+
'value': 'orcid',
|
|
18
|
+
'label': 'ORCID'
|
|
19
|
+
},
|
|
20
|
+
'type': {
|
|
21
|
+
'id': '2c91809c813e654501813e6c3c6a0066',
|
|
22
|
+
'retired': false,
|
|
23
|
+
'ctx': 'OpenAccess',
|
|
24
|
+
'name': 'AuthorIdentification',
|
|
25
|
+
'primary': true,
|
|
26
|
+
'category': {
|
|
27
|
+
'id': '2c91809c813e654501813e6c3bbb005e',
|
|
28
|
+
'desc': 'AuthIdent',
|
|
29
|
+
'internal': false,
|
|
30
|
+
'values': [{
|
|
31
|
+
'id': '2c91809c813e654501813e6c3bc50061',
|
|
32
|
+
'value': 'orcid',
|
|
33
|
+
'label': 'ORCID'
|
|
34
|
+
}, {
|
|
35
|
+
'id': '2c91809c813e654501813e6c3bcf0064',
|
|
36
|
+
'value': 'ringgold_id',
|
|
37
|
+
'label': 'Ringgold ID'
|
|
38
|
+
}, {
|
|
39
|
+
'id': '2c91809c813e654501813e6c3bcc0063',
|
|
40
|
+
'value': 'over_ip_range',
|
|
41
|
+
'label': 'Over IP Range'
|
|
42
|
+
}, {
|
|
43
|
+
'id': '2c91809c813e654501813e6c3bd20065',
|
|
44
|
+
'value': 'ror_id',
|
|
45
|
+
'label': 'ROR ID'
|
|
46
|
+
}, {
|
|
47
|
+
'id': '2c91809c813e654501813e6c3bbd005f',
|
|
48
|
+
'value': 'other',
|
|
49
|
+
'label': 'Other'
|
|
50
|
+
}, {
|
|
51
|
+
'id': '2c91809c813e654501813e6c3bc90062',
|
|
52
|
+
'value': 'over_institute',
|
|
53
|
+
'label': 'Over Institute'
|
|
54
|
+
}, {
|
|
55
|
+
'id': '2c91809c813e654501813e6c3bc20060',
|
|
56
|
+
'value': 'email_domain',
|
|
57
|
+
'label': 'Email Domain'
|
|
58
|
+
}]
|
|
59
|
+
},
|
|
60
|
+
'defaultInternal': true,
|
|
61
|
+
'label': 'Author Identification',
|
|
62
|
+
'description': 'Author Identification',
|
|
63
|
+
'weight': 0,
|
|
64
|
+
'type': 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata'
|
|
65
|
+
}
|
|
66
|
+
}]
|
|
67
|
+
};
|
|
68
|
+
exports.customProperties = customProperties;
|
|
69
|
+
var labelOverrides = {
|
|
70
|
+
'defaultTitle': 'ƒ defaultTitle() {}',
|
|
71
|
+
'noContext': '<Memo />',
|
|
72
|
+
'OpenAccess': '<Memo />',
|
|
73
|
+
'retiredName': 'ƒ retiredName() {}'
|
|
74
|
+
};
|
|
75
|
+
exports.labelOverrides = labelOverrides;
|
|
76
|
+
var data = {
|
|
77
|
+
'ctx': 'isNull',
|
|
78
|
+
'customProperties': {
|
|
79
|
+
'AuthorIdentification': [{
|
|
80
|
+
'id': 2,
|
|
81
|
+
'internal': true,
|
|
82
|
+
'value': {
|
|
83
|
+
'id': '2c91809c815d4e6d01815d55adfd0060',
|
|
84
|
+
'value': 'email_domain',
|
|
85
|
+
'label': 'Email Domain'
|
|
86
|
+
},
|
|
87
|
+
'type': {
|
|
88
|
+
'id': '2c91809c815d4e6d01815d55af070066',
|
|
89
|
+
'retired': false,
|
|
90
|
+
'ctx': 'OpenAccess',
|
|
91
|
+
'name': 'AuthorIdentification',
|
|
92
|
+
'primary': true,
|
|
93
|
+
'category': {
|
|
94
|
+
'id': '2c91809c815d4e6d01815d55adf7005e',
|
|
95
|
+
'desc': 'AuthIdent',
|
|
96
|
+
'internal': false,
|
|
97
|
+
'values': [{
|
|
98
|
+
'id': '2c91809c815d4e6d01815d55adf9005f',
|
|
99
|
+
'value': 'other',
|
|
100
|
+
'label': 'Other'
|
|
101
|
+
}, {
|
|
102
|
+
'id': '2c91809c815d4e6d01815d55ae080063',
|
|
103
|
+
'value': 'over_ip_range',
|
|
104
|
+
'label': 'Over IP Range'
|
|
105
|
+
}, {
|
|
106
|
+
'id': '2c91809c815d4e6d01815d55ae050062',
|
|
107
|
+
'value': 'over_institute',
|
|
108
|
+
'label': 'Over Institute'
|
|
109
|
+
}, {
|
|
110
|
+
'id': '2c91809c815d4e6d01815d55ae010061',
|
|
111
|
+
'value': 'orcid',
|
|
112
|
+
'label': 'ORCID'
|
|
113
|
+
}, {
|
|
114
|
+
'id': '2c91809c815d4e6d01815d55ae0c0064',
|
|
115
|
+
'value': 'ringgold_id',
|
|
116
|
+
'label': 'Ringgold ID'
|
|
117
|
+
}, {
|
|
118
|
+
'id': '2c91809c815d4e6d01815d55ae0f0065',
|
|
119
|
+
'value': 'ror_id',
|
|
120
|
+
'label': 'ROR ID'
|
|
121
|
+
}, {
|
|
122
|
+
'id': '2c91809c815d4e6d01815d55adfd0060',
|
|
123
|
+
'value': 'email_domain',
|
|
124
|
+
'label': 'Email Domain'
|
|
125
|
+
}]
|
|
126
|
+
},
|
|
127
|
+
'defaultInternal': true,
|
|
128
|
+
'label': 'Author Identification',
|
|
129
|
+
'description': 'Author Identification',
|
|
130
|
+
'weight': 0,
|
|
131
|
+
'type': 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata'
|
|
132
|
+
}
|
|
133
|
+
}]
|
|
134
|
+
},
|
|
135
|
+
'customPropertiesEndpoint': 'erm/custprops',
|
|
136
|
+
'id': 'supplementaryProperties',
|
|
137
|
+
'labelOverrides': {
|
|
138
|
+
'defaultTitle': 'ƒ defaultTitle() {}',
|
|
139
|
+
'noContext': '<Memo />',
|
|
140
|
+
'OpenAccess': '<Memo />',
|
|
141
|
+
'retiredName': 'ƒ retiredName() {}'
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
exports.data = data;
|
|
@@ -118,8 +118,4 @@ var _Edit = require("./Edit");
|
|
|
118
118
|
|
|
119
119
|
var _View = require("./View");
|
|
120
120
|
|
|
121
|
-
var _Filter = require("./Filter");
|
|
122
|
-
|
|
123
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
124
|
-
return a;
|
|
125
|
-
};
|
|
121
|
+
var _Filter = require("./Filter");
|