@k-int/stripes-kint-components 2.8.2 → 3.0.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 +15 -3
- package/es/index.js +48 -12
- package/es/lib/ActionList/ActionList.js +11 -5
- package/es/lib/ActionList/ActionListFieldArray.js +147 -77
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +43 -31
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +17 -14
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +64 -46
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +17 -24
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +91 -70
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +53 -36
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +50 -31
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +13 -14
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +6 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +8 -12
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +22 -24
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +9 -12
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +62 -13
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +12 -13
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +91 -44
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +80 -73
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +31 -32
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +26 -24
- package/es/lib/CustomProperties/Edit/testResources.js +73 -908
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +21 -29
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +12 -10
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +38 -39
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +28 -13
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +29 -44
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +6 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +16 -10
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +12 -12
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +20 -11
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +4 -3
- package/es/lib/CustomProperties/Filter/testResources.js +37 -233
- package/es/lib/CustomProperties/Filter/useOperators.js +69 -27
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +3 -2
- package/es/lib/CustomProperties/Filter/useValueProps.js +7 -2
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +6 -0
- package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +4 -3
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +13 -19
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +4 -10
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +34 -51
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +35 -27
- package/es/lib/EditableRefdataList/EditableRefdataList.js +41 -31
- package/es/lib/EditableSettingsList/EditableSettingsList.js +11 -1
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +10 -0
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +19 -11
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +9 -8
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +21 -9
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +1 -0
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +83 -16
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +138 -65
- package/es/lib/FormModal/FormModal.js +14 -9
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +91 -0
- package/es/lib/FormattedKintMessage/index.js +15 -0
- package/es/lib/IconSelect/IconSelect.js +18 -12
- package/es/lib/NoResultsMessage/NoResultsMessage.js +13 -2
- package/es/lib/RichSelect/RichSelect.js +13 -34
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +16 -5
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +11 -1
- package/es/lib/SettingPage/SettingPage.js +12 -13
- package/es/lib/SettingPage/SettingPagePane.js +12 -20
- package/es/lib/hooks/__mocks__/index.js +46 -0
- package/es/lib/hooks/index.js +24 -8
- package/es/lib/hooks/settingsHooks/useSettings.js +22 -17
- package/es/lib/hooks/useIntlKey.js +34 -0
- package/es/lib/hooks/useIntlKeyStore.js +84 -0
- package/es/lib/hooks/useKintIntl.js +93 -0
- package/es/lib/utils/index.js +40 -4
- package/es/lib/utils/parseErrorResponse.js +1 -1
- package/es/lib/utils/validators.js +76 -59
- package/jest.config.js +4 -1
- package/junit.xml +157 -656
- package/package.json +54 -33
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +56 -8
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +394 -64
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +10 -10
- 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 +187 -52
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +372 -87
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +293 -74
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +126 -54
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +45 -60
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +23 -5
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +59 -47
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +259 -97
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +399 -105
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +41 -68
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +57 -57
- 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 +67 -688
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +92 -53
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +103 -64
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +54 -63
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +49 -16
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +69 -18
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +89 -89
- 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 +33 -786
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +46 -46
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +45 -36
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +43 -28
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +20 -2
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +50 -41
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +54 -75
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +24 -24
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/{hooks/useAvailableCustomProperties.js.html → CycleButton/CycleButton.js.html} +62 -50
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +664 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +264 -39
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +41 -14
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +45 -6
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +47 -11
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +65 -14
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +154 -31
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +26 -26
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +18 -18
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +35 -17
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +15 -15
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +247 -0
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/{CustomProperties/Config/CustomPropertiesView.js.html → IconSelect/IconSelect.js.html} +158 -257
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +48 -6
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +7 -7
- 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/{CustomProperties/Config/testResources.js.html → RichSelect/RichSelect.js.html} +256 -334
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +146 -0
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +91 -0
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +127 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +52 -7
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +31 -4
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +7 -7
- 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 +24 -27
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +47 -17
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +22 -22
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +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/favicon.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +142 -97
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +13 -4
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +35 -20
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +5 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +7 -7
- 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 +61 -22
- 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/useCustomProperties.js.html +19 -22
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +151 -0
- package/src/artifacts/coverage-jest/lcov-report/{utils/renderHelpText.js.html → hooks/useIntlKeyStore.js.html} +71 -38
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +238 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +23 -11
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +274 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +19 -10
- 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 +205 -130
- package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
- 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 +7 -7
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +34 -34
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +42 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +139 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +5 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +128 -80
- package/src/artifacts/coverage-jest/lcov.info +2603 -2086
- package/src/index.js +11 -4
- package/src/lib/ActionList/ActionList.js +9 -3
- package/src/lib/ActionList/ActionListFieldArray.js +115 -37
- package/src/lib/ActionList/README.md +2 -1
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +60 -16
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +14 -4
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +106 -33
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +16 -9
- package/src/lib/CustomProperties/Config/CustomPropertyForm.js +131 -58
- package/src/lib/CustomProperties/Config/CustomPropertyForm.test.js +52 -33
- package/src/lib/CustomProperties/Config/CustomPropertyView.js +71 -47
- package/src/lib/CustomProperties/Config/CustomPropertyView.test.js +8 -6
- package/src/lib/CustomProperties/Config/README.md +33 -28
- package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.js +6 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +7 -3
- package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +23 -19
- package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +5 -3
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +65 -11
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +10 -8
- package/src/lib/CustomProperties/Edit/CustomPropertyField.js +115 -21
- package/src/lib/CustomProperties/Edit/CustomPropertyField.test.js +59 -60
- package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.js +24 -33
- package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +20 -27
- package/src/lib/CustomProperties/Edit/testResources.js +46 -1047
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +22 -22
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +12 -8
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +44 -31
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +26 -13
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +33 -36
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +3 -3
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +19 -8
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +9 -12
- package/src/lib/CustomProperties/Filter/CustomPropertiesRule.js +22 -5
- package/src/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +3 -1
- package/src/lib/CustomProperties/Filter/testResources.js +14 -265
- package/src/lib/CustomProperties/Filter/useOperators.js +20 -20
- package/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +2 -2
- package/src/lib/CustomProperties/Filter/useValueProps.js +8 -3
- package/src/lib/CustomProperties/View/CustomPropertiesView.js +6 -0
- package/src/lib/CustomProperties/View/CustomPropertiesView.test.js +2 -1
- package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.js +15 -13
- package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +2 -5
- package/src/lib/CustomProperties/View/CustomPropertyCard.js +36 -43
- package/src/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +45 -27
- package/src/lib/EditableRefdataList/EditableRefdataList.js +56 -32
- package/src/lib/EditableSettingsList/EditableSettingsList.js +10 -1
- package/src/lib/EditableSettingsList/EditableSettingsListFieldArray.js +14 -1
- package/src/lib/EditableSettingsList/SettingField/EditSettingValue.js +17 -5
- package/src/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +9 -8
- package/src/lib/EditableSettingsList/SettingField/RenderSettingValue.js +24 -7
- package/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +1 -0
- package/src/lib/EditableSettingsList/SettingField/SettingField.js +57 -16
- package/src/lib/EditableSettingsList/SettingField/SettingField.test.js +14 -19
- package/src/lib/FormModal/FormModal.js +15 -9
- package/src/lib/FormattedKintMessage/FormattedKintMessage.js +54 -0
- package/src/lib/FormattedKintMessage/index.js +1 -0
- package/src/lib/IconSelect/IconSelect.js +17 -8
- package/src/lib/NoResultsMessage/NoResultsMessage.js +15 -1
- package/src/lib/RichSelect/RichSelect.js +16 -36
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +17 -2
- package/src/lib/SASQLookupComponent/TableBody/TableBody.js +10 -1
- package/src/lib/SettingPage/SettingPage.js +12 -13
- package/src/lib/SettingPage/SettingPagePane.js +16 -6
- package/src/lib/hooks/__mocks__/index.js +17 -0
- package/src/lib/hooks/index.js +3 -1
- package/src/lib/hooks/settingsHooks/useSettings.js +25 -12
- package/src/lib/hooks/useIntlKey.js +22 -0
- package/src/lib/hooks/useIntlKeyStore.js +38 -0
- package/src/lib/hooks/useKintIntl.js +51 -0
- package/src/lib/utils/index.js +11 -1
- package/src/lib/utils/parseErrorResponse.js +1 -1
- package/src/lib/utils/validators.js +57 -41
- package/styles/RichSelect.css +7 -4
- package/test/helpers/test-implementor-translations.json +80 -0
- package/test/helpers/translationsProperties.js +6 -1
- package/test/jest/customProperties.js +166 -0
- package/test/jest/helpers/KintHarness.js +1 -1
- package/test/jest/helpers/renderWithKintHarness.js +2 -1
- package/test/jest/index.js +8 -0
- package/test/jest/refdata.js +471 -0
- package/test/jest/resolver.js +29 -0
- package/translations/stripes-kint-components/ar.json +1 -122
- package/translations/stripes-kint-components/cs_CZ.json +1 -122
- package/translations/stripes-kint-components/de.json +1 -122
- package/translations/stripes-kint-components/en.json +1 -148
- package/translations/stripes-kint-components/es.json +1 -122
- package/translations/stripes-kint-components/hi_IN.json +1 -122
- package/translations/stripes-kint-components/hu.json +1 -122
- package/translations/stripes-kint-components/it_IT.json +1 -122
- package/translations/stripes-kint-components/ja.json +1 -122
- package/translations/stripes-kint-components/ko.json +1 -122
- package/translations/stripes-kint-components/pt_PT.json +1 -122
- package/translations/stripes-kint-components/ru.json +1 -122
- package/translations/stripes-kint-components/sv.json +1 -122
- package/translations/stripes-kint-components/zh_CN.json +1 -122
- package/es/lib/CustomProperties/Config/testResources.js +0 -198
- package/es/lib/hooks/useAvailableCustomProperties.js +0 -73
- package/es/lib/utils/renderHelpText.js +0 -80
- package/src/lib/CustomProperties/Config/testResources.js +0 -236
- package/src/lib/hooks/useAvailableCustomProperties.js +0 -40
- package/src/lib/utils/renderHelpText.js +0 -27
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.refdata = exports.labelOverrides = exports.initialValues = exports.helpPopovers = exports.custPropsSettings = exports.custPropView = exports.custPropLookup = exports.contextFilterOptions = void 0;
|
|
7
|
-
var custPropLookup = {
|
|
8
|
-
'contextFilterOptions': [{
|
|
9
|
-
'value': '',
|
|
10
|
-
'label': 'All'
|
|
11
|
-
}, {
|
|
12
|
-
'value': 'OpenAccess',
|
|
13
|
-
'label': 'OpenAccess'
|
|
14
|
-
}, {
|
|
15
|
-
'value': 'isNull',
|
|
16
|
-
'label': 'None'
|
|
17
|
-
}],
|
|
18
|
-
'customPropertiesEndpoint': 'erm/custprops',
|
|
19
|
-
'labelOverrides': {
|
|
20
|
-
'paneTitle': '<Memo />',
|
|
21
|
-
'retired': '<Memo />',
|
|
22
|
-
'primaryRetired': '<Memo />'
|
|
23
|
-
},
|
|
24
|
-
'onSelectCustomProperty': function onSelectCustomProperty() {}
|
|
25
|
-
};
|
|
26
|
-
exports.custPropLookup = custPropLookup;
|
|
27
|
-
var custPropsSettings = {
|
|
28
|
-
'afterQueryCalls': {
|
|
29
|
-
'put': function put() {},
|
|
30
|
-
'post': function post() {},
|
|
31
|
-
'delete': function _delete() {}
|
|
32
|
-
},
|
|
33
|
-
'contextFilterOptions': [{
|
|
34
|
-
'value': '',
|
|
35
|
-
'label': 'All'
|
|
36
|
-
}, {
|
|
37
|
-
'value': 'OpenAccess',
|
|
38
|
-
'label': 'OpenAccess'
|
|
39
|
-
}, {
|
|
40
|
-
'value': 'isNull',
|
|
41
|
-
'label': 'None'
|
|
42
|
-
}],
|
|
43
|
-
'customPropertiesEndpoint': 'erm/custprops',
|
|
44
|
-
'helpPopovers': {
|
|
45
|
-
'name': '<Memo />',
|
|
46
|
-
'label': '<Memo />',
|
|
47
|
-
'ctx': '<Memo />'
|
|
48
|
-
},
|
|
49
|
-
'labelOverrides': {
|
|
50
|
-
'modalTitleEdit': '<Memo />',
|
|
51
|
-
'modalTitleNew': '<Memo />',
|
|
52
|
-
'paneTitle': 'Supplementary properties',
|
|
53
|
-
'retired': '<Memo />',
|
|
54
|
-
'primaryRetired': '<Memo />',
|
|
55
|
-
'ctx': '<Memo />',
|
|
56
|
-
'category': '<Memo />'
|
|
57
|
-
},
|
|
58
|
-
'refdataEndpoint': 'erm/refdata'
|
|
59
|
-
};
|
|
60
|
-
exports.custPropsSettings = custPropsSettings;
|
|
61
|
-
var contextFilterOptions = [{
|
|
62
|
-
'value': '',
|
|
63
|
-
'label': 'All'
|
|
64
|
-
}, {
|
|
65
|
-
'value': 'OpenAccess',
|
|
66
|
-
'label': 'OpenAccess'
|
|
67
|
-
}, {
|
|
68
|
-
'value': 'test',
|
|
69
|
-
'label': 'test'
|
|
70
|
-
}, {
|
|
71
|
-
'value': 'isNull',
|
|
72
|
-
'label': 'None'
|
|
73
|
-
}];
|
|
74
|
-
exports.contextFilterOptions = contextFilterOptions;
|
|
75
|
-
var helpPopovers = {
|
|
76
|
-
'name': '<Memo />',
|
|
77
|
-
'label': '<Memo />'
|
|
78
|
-
};
|
|
79
|
-
exports.helpPopovers = helpPopovers;
|
|
80
|
-
var labelOverrides = {
|
|
81
|
-
'paneTitle': '<Memo />',
|
|
82
|
-
'retired': 'Deprecated',
|
|
83
|
-
'primaryRetired': '<Memo />'
|
|
84
|
-
};
|
|
85
|
-
exports.labelOverrides = labelOverrides;
|
|
86
|
-
var refdata = [{
|
|
87
|
-
'label': 'SubscriptionAgreement.ReasonForClosure',
|
|
88
|
-
'value': '0a7411b65f2260a4ef81b93a5e4e7f78'
|
|
89
|
-
}, {
|
|
90
|
-
'label': 'SubscriptionAgreement.AgreementStatus',
|
|
91
|
-
'value': '19b4550b39b65106b04c0c09f8a56d43'
|
|
92
|
-
}, {
|
|
93
|
-
'label': 'TitleInstance.SubType',
|
|
94
|
-
'value': '2c91809c80f3bc7e0180f3c349720000'
|
|
95
|
-
}, {
|
|
96
|
-
'label': 'TitleInstance.Type',
|
|
97
|
-
'value': '2c91809c80f3bc7e0180f3c349d40003'
|
|
98
|
-
}, {
|
|
99
|
-
'label': 'SubscriptionAgreementOrg.Role',
|
|
100
|
-
'value': '2c91809c80f3bc7e0180f3c349e30006'
|
|
101
|
-
}, {
|
|
102
|
-
'label': 'ContentType.ContentType',
|
|
103
|
-
'value': '2c91809c80f3bc7e0180f3c349ea0008'
|
|
104
|
-
}, {
|
|
105
|
-
'label': 'LicenseAmendmentStatus.Status',
|
|
106
|
-
'value': '2c91809c80f3bc7e0180f3c349fe000c'
|
|
107
|
-
}, {
|
|
108
|
-
'label': 'StringTemplate.Context',
|
|
109
|
-
'value': '2c91809c80f3bc7e0180f3c34a170011'
|
|
110
|
-
}, {
|
|
111
|
-
'label': 'Global.Yes_No',
|
|
112
|
-
'value': '2c91809c80f3bc7e0180f3c34a270014'
|
|
113
|
-
}, {
|
|
114
|
-
'label': 'SubscriptionAgreement.AgreementType',
|
|
115
|
-
'value': '2c91809c80f3bc7e0180f3c34a3e0017'
|
|
116
|
-
}, {
|
|
117
|
-
'label': 'SubscriptionAgreement.RenewalPriority',
|
|
118
|
-
'value': '2c91809c80f3bc7e0180f3c34a4f001b'
|
|
119
|
-
}, {
|
|
120
|
-
'label': 'AgreementRelationship.Type',
|
|
121
|
-
'value': '2c91809c80f3bc7e0180f3c34aa20026'
|
|
122
|
-
}, {
|
|
123
|
-
'label': 'InternalContact.Role',
|
|
124
|
-
'value': '2c91809c80f3bc7e0180f3c34abd002c'
|
|
125
|
-
}, {
|
|
126
|
-
'label': 'Pkg.AvailabilityScope',
|
|
127
|
-
'value': '2c91809c80f3bc7e0180f3c34ad20031'
|
|
128
|
-
}, {
|
|
129
|
-
'label': 'Pkg.LifecycleStatus',
|
|
130
|
-
'value': '2c91809c80f3bc7e0180f3c34ae90036'
|
|
131
|
-
}, {
|
|
132
|
-
'label': 'Pkg.Type',
|
|
133
|
-
'value': '2c91809c80f3bc7e0180f3c34aff003b'
|
|
134
|
-
}, {
|
|
135
|
-
'label': 'RemoteLicenseLink.Status',
|
|
136
|
-
'value': '2c91809c80f3bc7e0180f3c34b11003f'
|
|
137
|
-
}, {
|
|
138
|
-
'label': 'PersistentJob.Result',
|
|
139
|
-
'value': '2c91809c80f3bc7e0180f3c34b220043'
|
|
140
|
-
}, {
|
|
141
|
-
'label': 'PersistentJob.Status',
|
|
142
|
-
'value': '2c91809c80f3bc7e0180f3c34b360048'
|
|
143
|
-
}, {
|
|
144
|
-
'label': 'DocumentAttachment.AtType',
|
|
145
|
-
'value': '2c91809c80f3bc7e0180f3c34b46004c'
|
|
146
|
-
}, {
|
|
147
|
-
'label': 'FileStorageEngines',
|
|
148
|
-
'value': '2c91809c80f3bc7e0180f3c34b920050'
|
|
149
|
-
}, {
|
|
150
|
-
'label': 'Yes/No/Other',
|
|
151
|
-
'value': '2c91809c80f3bc7e0180f3c34c45005a'
|
|
152
|
-
}, {
|
|
153
|
-
'label': 'AuthIdent',
|
|
154
|
-
'value': '2c91809c80f3bc7e0180f3c34c52005e'
|
|
155
|
-
}, {
|
|
156
|
-
'label': 'TitleInstance.PublicationType',
|
|
157
|
-
'value': '2c91809c80f3bc7e0180f3c353de0068'
|
|
158
|
-
}, {
|
|
159
|
-
'label': 'IdentifierOccurrence.Status',
|
|
160
|
-
'value': '2c91809c80f3bc7e0180f3c3543b006a'
|
|
161
|
-
}];
|
|
162
|
-
exports.refdata = refdata;
|
|
163
|
-
var initialValues = {
|
|
164
|
-
'weight': 0,
|
|
165
|
-
'primary': true,
|
|
166
|
-
'retired': false,
|
|
167
|
-
'defaultInternal': true,
|
|
168
|
-
'type': 'Decimal',
|
|
169
|
-
'category': '2c91809c80f3bc7e0180f3c349720000',
|
|
170
|
-
'label': 'Test',
|
|
171
|
-
'name': 'test',
|
|
172
|
-
'description': 'Test description',
|
|
173
|
-
'ctx': [{
|
|
174
|
-
'value': 'OpenAccess',
|
|
175
|
-
'label': 'OpenAccess'
|
|
176
|
-
}]
|
|
177
|
-
};
|
|
178
|
-
exports.initialValues = initialValues;
|
|
179
|
-
var custPropView = {
|
|
180
|
-
'customProperty': {
|
|
181
|
-
'id': '2c91809c813418b80181341fcd620067',
|
|
182
|
-
'retired': false,
|
|
183
|
-
'ctx': 'OpenAccess',
|
|
184
|
-
'name': 'Eligible authors',
|
|
185
|
-
'primary': true,
|
|
186
|
-
'defaultInternal': true,
|
|
187
|
-
'label': 'Does this agreement support publishing',
|
|
188
|
-
'description': 'Does this agreement support publishing',
|
|
189
|
-
'weight': 0,
|
|
190
|
-
'type': 'com.k_int.web.toolkit.custprops.types.CustomPropertyText'
|
|
191
|
-
},
|
|
192
|
-
'labelOverrides': {
|
|
193
|
-
'paneTitle': '<Memo />',
|
|
194
|
-
'retired': 'Deprecated',
|
|
195
|
-
'primaryRetired': '<Memo />'
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
exports.custPropView = custPropView;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
var _reactIntl = require("react-intl");
|
|
11
|
-
|
|
12
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
|
-
|
|
14
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
-
|
|
16
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
17
|
-
|
|
18
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
19
|
-
|
|
20
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
|
-
|
|
22
|
-
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."); }
|
|
23
|
-
|
|
24
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
-
|
|
26
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
27
|
-
|
|
28
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
29
|
-
|
|
30
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
|
-
|
|
32
|
-
var useAvailableCustomProperties = function useAvailableCustomProperties() {
|
|
33
|
-
var customProperties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
34
|
-
var intl = (0, _reactIntl.useIntl)();
|
|
35
|
-
|
|
36
|
-
var _useState = (0, _react.useState)([]),
|
|
37
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
-
custProps = _useState2[0],
|
|
39
|
-
setCustProps = _useState2[1];
|
|
40
|
-
|
|
41
|
-
(0, _react.useEffect)(function () {
|
|
42
|
-
if (customProperties.length !== custProps.length) {
|
|
43
|
-
setCustProps(customProperties.map(function (customProperty) {
|
|
44
|
-
var _customProperty$categ;
|
|
45
|
-
|
|
46
|
-
var options = customProperty === null || customProperty === void 0 ? void 0 : (_customProperty$categ = customProperty.category) === null || _customProperty$categ === void 0 ? void 0 : _customProperty$categ.values;
|
|
47
|
-
|
|
48
|
-
if (options) {
|
|
49
|
-
options = [{
|
|
50
|
-
label: intl.formatMessage({
|
|
51
|
-
id: 'stripes-kint-components.notSet'
|
|
52
|
-
}),
|
|
53
|
-
value: ''
|
|
54
|
-
}].concat(_toConsumableArray(options));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
description: customProperty.description,
|
|
59
|
-
label: customProperty.label,
|
|
60
|
-
primary: customProperty.primary,
|
|
61
|
-
type: customProperty.type,
|
|
62
|
-
options: options,
|
|
63
|
-
value: customProperty.name,
|
|
64
|
-
defaultInternal: customProperty.defaultInternal
|
|
65
|
-
};
|
|
66
|
-
}));
|
|
67
|
-
}
|
|
68
|
-
}, [custProps, customProperties, intl]);
|
|
69
|
-
return custProps;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
var _default = useAvailableCustomProperties;
|
|
73
|
-
exports.default = _default;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactIntl = require("react-intl");
|
|
11
|
-
|
|
12
|
-
var _renderHelpText = _interopRequireDefault(require("../../../styles/renderHelpText.css"));
|
|
13
|
-
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
var renderHelpText = function renderHelpText(id) {
|
|
19
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
20
|
-
className: _renderHelpText.default.help,
|
|
21
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
22
|
-
id: id,
|
|
23
|
-
values: {
|
|
24
|
-
b: function b(chunks) {
|
|
25
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("b", {
|
|
26
|
-
children: chunks
|
|
27
|
-
});
|
|
28
|
-
},
|
|
29
|
-
i: function i(chunks) {
|
|
30
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
|
|
31
|
-
children: chunks
|
|
32
|
-
});
|
|
33
|
-
},
|
|
34
|
-
em: function em(chunks) {
|
|
35
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("em", {
|
|
36
|
-
children: chunks
|
|
37
|
-
});
|
|
38
|
-
},
|
|
39
|
-
strong: function strong(chunks) {
|
|
40
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
|
|
41
|
-
children: chunks
|
|
42
|
-
});
|
|
43
|
-
},
|
|
44
|
-
span: function span(chunks) {
|
|
45
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
46
|
-
children: chunks
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
div: function div(chunks) {
|
|
50
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
51
|
-
children: chunks
|
|
52
|
-
});
|
|
53
|
-
},
|
|
54
|
-
p: function p(chunks) {
|
|
55
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
56
|
-
children: chunks
|
|
57
|
-
});
|
|
58
|
-
},
|
|
59
|
-
ul: function ul(chunks) {
|
|
60
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
|
|
61
|
-
children: chunks
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
ol: function ol(chunks) {
|
|
65
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("ol", {
|
|
66
|
-
children: chunks
|
|
67
|
-
});
|
|
68
|
-
},
|
|
69
|
-
li: function li(chunks) {
|
|
70
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
71
|
-
children: chunks
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
})
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
var _default = renderHelpText;
|
|
80
|
-
exports.default = _default;
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
const custPropLookup = {
|
|
2
|
-
'contextFilterOptions': [{
|
|
3
|
-
'value': '',
|
|
4
|
-
'label': 'All'
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
'value': 'OpenAccess',
|
|
8
|
-
'label': 'OpenAccess'
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
'value': 'isNull',
|
|
12
|
-
'label': 'None'
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
'customPropertiesEndpoint': 'erm/custprops',
|
|
16
|
-
'labelOverrides': {
|
|
17
|
-
'paneTitle': '<Memo />',
|
|
18
|
-
'retired': '<Memo />',
|
|
19
|
-
'primaryRetired': '<Memo />'
|
|
20
|
-
},
|
|
21
|
-
'onSelectCustomProperty': () => {}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const custPropsSettings = {
|
|
25
|
-
'afterQueryCalls': {
|
|
26
|
-
'put': () => {},
|
|
27
|
-
'post': () => {},
|
|
28
|
-
'delete': () => {}
|
|
29
|
-
},
|
|
30
|
-
'contextFilterOptions': [{
|
|
31
|
-
'value': '',
|
|
32
|
-
'label': 'All'
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
'value': 'OpenAccess',
|
|
36
|
-
'label': 'OpenAccess'
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
'value': 'isNull',
|
|
40
|
-
'label': 'None'
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
'customPropertiesEndpoint': 'erm/custprops',
|
|
44
|
-
'helpPopovers': {
|
|
45
|
-
'name': '<Memo />',
|
|
46
|
-
'label': '<Memo />',
|
|
47
|
-
'ctx': '<Memo />'
|
|
48
|
-
},
|
|
49
|
-
'labelOverrides': {
|
|
50
|
-
'modalTitleEdit': '<Memo />',
|
|
51
|
-
'modalTitleNew': '<Memo />',
|
|
52
|
-
'paneTitle': 'Supplementary properties',
|
|
53
|
-
'retired': '<Memo />',
|
|
54
|
-
'primaryRetired': '<Memo />',
|
|
55
|
-
'ctx': '<Memo />',
|
|
56
|
-
'category': '<Memo />'
|
|
57
|
-
},
|
|
58
|
-
'refdataEndpoint': 'erm/refdata'
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const contextFilterOptions = [{
|
|
62
|
-
'value': '',
|
|
63
|
-
'label': 'All'
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
'value': 'OpenAccess',
|
|
67
|
-
'label': 'OpenAccess'
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
'value': 'test',
|
|
71
|
-
'label': 'test'
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
'value': 'isNull',
|
|
75
|
-
'label': 'None'
|
|
76
|
-
}
|
|
77
|
-
];
|
|
78
|
-
|
|
79
|
-
const helpPopovers = {
|
|
80
|
-
'name': '<Memo />',
|
|
81
|
-
'label': '<Memo />'
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
const labelOverrides = {
|
|
85
|
-
'paneTitle': '<Memo />',
|
|
86
|
-
'retired': 'Deprecated',
|
|
87
|
-
'primaryRetired': '<Memo />'
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const refdata = [{
|
|
91
|
-
'label': 'SubscriptionAgreement.ReasonForClosure',
|
|
92
|
-
'value': '0a7411b65f2260a4ef81b93a5e4e7f78'
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
'label': 'SubscriptionAgreement.AgreementStatus',
|
|
96
|
-
'value': '19b4550b39b65106b04c0c09f8a56d43'
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
'label': 'TitleInstance.SubType',
|
|
100
|
-
'value': '2c91809c80f3bc7e0180f3c349720000'
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
'label': 'TitleInstance.Type',
|
|
104
|
-
'value': '2c91809c80f3bc7e0180f3c349d40003'
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
'label': 'SubscriptionAgreementOrg.Role',
|
|
108
|
-
'value': '2c91809c80f3bc7e0180f3c349e30006'
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
'label': 'ContentType.ContentType',
|
|
112
|
-
'value': '2c91809c80f3bc7e0180f3c349ea0008'
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
'label': 'LicenseAmendmentStatus.Status',
|
|
116
|
-
'value': '2c91809c80f3bc7e0180f3c349fe000c'
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
'label': 'StringTemplate.Context',
|
|
120
|
-
'value': '2c91809c80f3bc7e0180f3c34a170011'
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
'label': 'Global.Yes_No',
|
|
124
|
-
'value': '2c91809c80f3bc7e0180f3c34a270014'
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
'label': 'SubscriptionAgreement.AgreementType',
|
|
128
|
-
'value': '2c91809c80f3bc7e0180f3c34a3e0017'
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
'label': 'SubscriptionAgreement.RenewalPriority',
|
|
132
|
-
'value': '2c91809c80f3bc7e0180f3c34a4f001b'
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
'label': 'AgreementRelationship.Type',
|
|
136
|
-
'value': '2c91809c80f3bc7e0180f3c34aa20026'
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
'label': 'InternalContact.Role',
|
|
140
|
-
'value': '2c91809c80f3bc7e0180f3c34abd002c'
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
'label': 'Pkg.AvailabilityScope',
|
|
144
|
-
'value': '2c91809c80f3bc7e0180f3c34ad20031'
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
'label': 'Pkg.LifecycleStatus',
|
|
148
|
-
'value': '2c91809c80f3bc7e0180f3c34ae90036'
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
'label': 'Pkg.Type',
|
|
152
|
-
'value': '2c91809c80f3bc7e0180f3c34aff003b'
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
'label': 'RemoteLicenseLink.Status',
|
|
156
|
-
'value': '2c91809c80f3bc7e0180f3c34b11003f'
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
'label': 'PersistentJob.Result',
|
|
160
|
-
'value': '2c91809c80f3bc7e0180f3c34b220043'
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
'label': 'PersistentJob.Status',
|
|
164
|
-
'value': '2c91809c80f3bc7e0180f3c34b360048'
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
'label': 'DocumentAttachment.AtType',
|
|
168
|
-
'value': '2c91809c80f3bc7e0180f3c34b46004c'
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
'label': 'FileStorageEngines',
|
|
172
|
-
'value': '2c91809c80f3bc7e0180f3c34b920050'
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
'label': 'Yes/No/Other',
|
|
176
|
-
'value': '2c91809c80f3bc7e0180f3c34c45005a'
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
'label': 'AuthIdent',
|
|
180
|
-
'value': '2c91809c80f3bc7e0180f3c34c52005e'
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
'label': 'TitleInstance.PublicationType',
|
|
184
|
-
'value': '2c91809c80f3bc7e0180f3c353de0068'
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
'label': 'IdentifierOccurrence.Status',
|
|
188
|
-
'value': '2c91809c80f3bc7e0180f3c3543b006a'
|
|
189
|
-
}
|
|
190
|
-
];
|
|
191
|
-
|
|
192
|
-
const initialValues = {
|
|
193
|
-
'weight': 0,
|
|
194
|
-
'primary': true,
|
|
195
|
-
'retired': false,
|
|
196
|
-
'defaultInternal': true,
|
|
197
|
-
'type': 'Decimal',
|
|
198
|
-
'category': '2c91809c80f3bc7e0180f3c349720000',
|
|
199
|
-
'label': 'Test',
|
|
200
|
-
'name': 'test',
|
|
201
|
-
'description': 'Test description',
|
|
202
|
-
'ctx': [{
|
|
203
|
-
'value': 'OpenAccess',
|
|
204
|
-
'label': 'OpenAccess'
|
|
205
|
-
}]
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
const custPropView = {
|
|
209
|
-
'customProperty': {
|
|
210
|
-
'id': '2c91809c813418b80181341fcd620067',
|
|
211
|
-
'retired': false,
|
|
212
|
-
'ctx': 'OpenAccess',
|
|
213
|
-
'name': 'Eligible authors',
|
|
214
|
-
'primary': true,
|
|
215
|
-
'defaultInternal': true,
|
|
216
|
-
'label': 'Does this agreement support publishing',
|
|
217
|
-
'description': 'Does this agreement support publishing',
|
|
218
|
-
'weight': 0,
|
|
219
|
-
'type': 'com.k_int.web.toolkit.custprops.types.CustomPropertyText'
|
|
220
|
-
},
|
|
221
|
-
'labelOverrides': {
|
|
222
|
-
'paneTitle': '<Memo />',
|
|
223
|
-
'retired': 'Deprecated',
|
|
224
|
-
'primaryRetired': '<Memo />'
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
export {
|
|
228
|
-
custPropLookup,
|
|
229
|
-
custPropsSettings,
|
|
230
|
-
contextFilterOptions,
|
|
231
|
-
helpPopovers,
|
|
232
|
-
labelOverrides,
|
|
233
|
-
refdata,
|
|
234
|
-
initialValues,
|
|
235
|
-
custPropView
|
|
236
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
import { useIntl } from 'react-intl';
|
|
3
|
-
|
|
4
|
-
const useAvailableCustomProperties = (customProperties = []) => {
|
|
5
|
-
const intl = useIntl();
|
|
6
|
-
const [custProps, setCustProps] = useState([]);
|
|
7
|
-
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
if (customProperties.length !== custProps.length) {
|
|
10
|
-
setCustProps(customProperties.map(customProperty => {
|
|
11
|
-
let options = customProperty?.category?.values;
|
|
12
|
-
if (options) {
|
|
13
|
-
options = [
|
|
14
|
-
{
|
|
15
|
-
label: intl.formatMessage({
|
|
16
|
-
id: 'stripes-kint-components.notSet',
|
|
17
|
-
}),
|
|
18
|
-
value: '',
|
|
19
|
-
},
|
|
20
|
-
...options,
|
|
21
|
-
];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
description: customProperty.description,
|
|
26
|
-
label: customProperty.label,
|
|
27
|
-
primary: customProperty.primary,
|
|
28
|
-
type: customProperty.type,
|
|
29
|
-
options,
|
|
30
|
-
value: customProperty.name,
|
|
31
|
-
defaultInternal: customProperty.defaultInternal,
|
|
32
|
-
};
|
|
33
|
-
}));
|
|
34
|
-
}
|
|
35
|
-
}, [custProps, customProperties, intl]);
|
|
36
|
-
|
|
37
|
-
return custProps;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export default useAvailableCustomProperties;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FormattedMessage } from 'react-intl';
|
|
3
|
-
import css from '../../../styles/renderHelpText.css';
|
|
4
|
-
|
|
5
|
-
const renderHelpText = (id) => {
|
|
6
|
-
return (
|
|
7
|
-
<div className={css.help}>
|
|
8
|
-
<FormattedMessage
|
|
9
|
-
id={id}
|
|
10
|
-
values={{
|
|
11
|
-
b: (chunks) => <b>{chunks}</b>,
|
|
12
|
-
i: (chunks) => <i>{chunks}</i>,
|
|
13
|
-
em: (chunks) => <em>{chunks}</em>,
|
|
14
|
-
strong: (chunks) => <strong>{chunks}</strong>,
|
|
15
|
-
span: (chunks) => <span>{chunks}</span>,
|
|
16
|
-
div: (chunks) => <div>{chunks}</div>,
|
|
17
|
-
p: (chunks) => <p>{chunks}</p>,
|
|
18
|
-
ul: (chunks) => <ul>{chunks}</ul>,
|
|
19
|
-
ol: (chunks) => <ol>{chunks}</ol>,
|
|
20
|
-
li: (chunks) => <li>{chunks}</li>,
|
|
21
|
-
}}
|
|
22
|
-
/>
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export default renderHelpText;
|