@k-int/stripes-kint-components 4.7.1 → 4.7.3
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 +8 -1
- package/README.md +1 -1
- package/es/index.js +2 -2
- package/es/lib/ActionList/ActionList.js +3 -4
- package/es/lib/ActionList/ActionListFieldArray.js +32 -36
- package/es/lib/ComboButton/ComboButton.js +6 -8
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +5 -9
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +30 -34
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +59 -60
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +2 -2
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +33 -35
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +2 -3
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +4 -5
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +6 -12
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +21 -29
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +5 -5
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +3 -4
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +3 -3
- package/es/lib/CustomProperties/Edit/testResources.js +14 -17
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +7 -13
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +21 -30
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +7 -8
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +1 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +9 -10
- package/es/lib/CustomProperties/Filter/testResources.js +5 -9
- package/es/lib/CustomProperties/Filter/useOperators.js +3 -4
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +2 -4
- package/es/lib/CustomProperties/Filter/useValueProps.js +3 -4
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +2 -3
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +19 -28
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +10 -15
- package/es/lib/CustomProperties/View/testResources.js +5 -9
- package/es/lib/CycleButton/CycleButton.js +2 -3
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +24 -36
- package/es/lib/EditableRefdataList/EditableRefdataList.js +29 -37
- package/es/lib/EditableSettingsList/EditableSettingsList.js +1 -2
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +2 -3
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +6 -7
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +11 -14
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +7 -8
- package/es/lib/FormModal/FormModal.js +1 -2
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +5 -9
- package/es/lib/IconSelect/IconSelect.js +8 -13
- package/es/lib/NoResultsMessage/NoResultsMessage.js +5 -6
- package/es/lib/QueryTypedown/QueryTypedown.js +3 -4
- package/es/lib/RefdataButtons/RefdataButtons.js +4 -5
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +22 -30
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +6 -8
- package/es/lib/RichSelect/RichSelect.js +15 -21
- package/es/lib/RichSelect/useSelectedOption.js +2 -4
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +15 -19
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +5 -8
- package/es/lib/SASQRoute/SASQRoute.js +3 -4
- package/es/lib/SASQViewComponent/SASQViewComponent.js +6 -11
- package/es/lib/SearchField/SearchField.js +1 -2
- package/es/lib/SettingPage/SettingPage.js +3 -4
- package/es/lib/SettingPage/SettingPagePane.js +3 -4
- package/es/lib/SettingsFormContainer/SettingsFormContainer.js +3 -4
- package/es/lib/Typedown/Typedown.js +22 -30
- package/es/lib/constants/customProperties.js +11 -22
- package/es/lib/constants/endpoints.js +1 -2
- package/es/lib/constants/eventCodes.js +3 -6
- package/es/lib/contexts/SettingsContext.js +1 -2
- package/es/lib/hooks/typedownHooks/useTypedown.js +3 -4
- package/es/lib/hooks/typedownHooks/useTypedownData.js +1 -2
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +3 -4
- package/es/lib/hooks/useActiveElement.js +2 -3
- package/es/lib/hooks/useCustomProperties.js +3 -4
- package/es/lib/hooks/useHelperApp.js +9 -10
- package/es/lib/hooks/useIntlKey.js +1 -2
- package/es/lib/hooks/useIntlKeyStore.js +5 -9
- package/es/lib/hooks/useInvalidateRefdata.js +1 -2
- package/es/lib/hooks/useKintIntl.js +6 -13
- package/es/lib/hooks/useKiwtFieldArray.js +1 -2
- package/es/lib/hooks/useKiwtSASQuery.js +4 -5
- package/es/lib/hooks/useLocalStorageState.js +3 -4
- package/es/lib/hooks/useModConfigEntries.js +3 -4
- package/es/lib/hooks/useMutateCustomProperties.js +9 -10
- package/es/lib/hooks/useMutateModConfigEntry.js +3 -4
- package/es/lib/hooks/useMutateRefdataCategory.js +5 -6
- package/es/lib/hooks/useMutateRefdataValue.js +7 -8
- package/es/lib/hooks/useQIndex.js +8 -9
- package/es/lib/hooks/useRefdata.js +4 -5
- package/es/lib/hooks/useSASQQueryMeta.js +1 -2
- package/es/lib/hooks/useTemplates.js +5 -6
- package/es/lib/settingsHooks/useAppSettings.js +8 -13
- package/es/lib/settingsHooks/useSettingSection.js +3 -4
- package/es/lib/settingsHooks/useSettings.js +4 -5
- package/es/lib/utils/buildUrl.js +1 -1
- package/es/lib/utils/generateKiwtQuery.js +1 -2
- package/es/lib/utils/generateKiwtQueryParams.js +28 -38
- package/es/lib/utils/groupCustomPropertiesByCtx.js +3 -5
- package/es/lib/utils/matchString.js +2 -3
- package/es/lib/utils/modConfigEntriesQueryKey.js +1 -2
- package/es/lib/utils/parseErrorResponse.js +3 -5
- package/es/lib/utils/parseKiwtQueryGroups.js +5 -7
- package/es/lib/utils/parseModConfigEntry.js +1 -2
- package/es/lib/utils/refdataOptions.js +2 -3
- package/es/lib/utils/refdataQueryKey.js +1 -2
- package/es/lib/utils/selectorSafe.js +4 -6
- package/es/lib/utils/sortByLabel.js +3 -5
- package/es/lib/utils/toCamelCase.js +1 -2
- package/es/lib/utils/typedownQueryKey.js +1 -2
- package/es/lib/validators/validators.js +3 -3
- package/package.json +12 -2
- package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -69
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -814
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +0 -181
- package/junit.xml +0 -293
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +0 -373
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +0 -1465
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +0 -667
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +0 -1240
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +0 -1474
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +0 -733
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +0 -176
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +0 -97
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +0 -793
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +0 -208
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +0 -352
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +0 -826
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +0 -1297
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +0 -454
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +0 -206
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +0 -100
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +0 -271
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +0 -499
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +0 -568
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +0 -415
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +0 -340
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +0 -502
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +0 -251
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +0 -103
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +0 -223
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +0 -271
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +0 -199
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +0 -253
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +0 -211
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +0 -445
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +0 -619
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +0 -176
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +0 -571
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +0 -116
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +0 -175
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +0 -217
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +0 -751
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +0 -853
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +0 -280
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -259
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +0 -412
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +0 -313
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +0 -574
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +0 -379
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +0 -247
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +0 -508
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +0 -361
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +0 -205
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +0 -370
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +0 -580
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +0 -301
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +0 -718
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +0 -127
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +0 -1069
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +0 -400
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +0 -346
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +0 -307
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +0 -214
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +0 -220
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +0 -208
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/SettingsFormContainer.js.html +0 -337
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +0 -913
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/base.css +0 -224
- package/src/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -87
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +0 -121
- package/src/artifacts/coverage-jest/lcov-report/constants/endpoints.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +0 -97
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +0 -401
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +0 -142
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +0 -292
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +0 -214
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +0 -463
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +0 -520
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +0 -181
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +0 -163
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +0 -157
- package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +0 -205
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +0 -325
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +0 -295
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +0 -151
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +0 -199
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +0 -118
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +0 -238
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +0 -274
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +0 -196
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +0 -136
- package/src/artifacts/coverage-jest/lcov-report/hooks/useModConfigEntries.js.html +0 -226
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +0 -283
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateModConfigEntry.js.html +0 -238
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +0 -274
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +0 -322
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +0 -208
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +0 -265
- package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +0 -187
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +0 -166
- package/src/artifacts/coverage-jest/lcov-report/index.html +0 -611
- package/src/artifacts/coverage-jest/lcov-report/prettify.css +0 -1
- package/src/artifacts/coverage-jest/lcov-report/prettify.js +0 -2
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useAppSettings.js.html +0 -292
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettingSection.js.html +0 -211
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettings.js.html +0 -466
- package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/sorter.js +0 -196
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +0 -193
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +0 -109
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +0 -631
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +0 -124
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +0 -211
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +0 -356
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +0 -169
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +0 -127
- package/src/artifacts/coverage-jest/lcov-report/utils/modConfigEntriesQueryKey.js.html +0 -142
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +0 -142
- package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +0 -361
- package/src/artifacts/coverage-jest/lcov-report/utils/parseModConfigEntry.js.html +0 -130
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +0 -109
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +0 -112
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +0 -166
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +0 -145
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +0 -130
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +0 -127
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +0 -112
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +0 -370
- package/src/artifacts/coverage-jest/lcov-report/validators/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/validators/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/validators/validators.js.html +0 -370
- package/src/artifacts/coverage-jest/lcov.info +0 -5223
|
@@ -10,8 +10,8 @@ var _components = require("@folio/stripes/components");
|
|
|
10
10
|
var CUSTOM_PROPERTY_TYPES = _interopRequireWildcard(require("../../constants/customProperties"));
|
|
11
11
|
var _hooks = require("../../hooks");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _getRequireWildcardCache(
|
|
14
|
-
function _interopRequireWildcard(
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
const CustomPropertyField = _ref => {
|
|
17
17
|
let {
|
|
@@ -32,12 +32,11 @@ const CustomPropertyField = _ref => {
|
|
|
32
32
|
|
|
33
33
|
// Set up the validator for the customProperty
|
|
34
34
|
const customPropertyValidator = (fieldValue, allValues) => {
|
|
35
|
-
var _allValues$customProp, _allValues$customProp2, _allValues$customProp3;
|
|
36
35
|
const {
|
|
37
36
|
note,
|
|
38
37
|
publicNote,
|
|
39
38
|
value: currentValue
|
|
40
|
-
} =
|
|
39
|
+
} = allValues?.customProperties?.[customProperty?.value]?.[0] ?? {};
|
|
41
40
|
if (note && !currentValue || publicNote && !currentValue) {
|
|
42
41
|
if (customProperty.type === CUSTOM_PROPERTY_TYPES.DECIMAL_CLASS_NAME || customProperty.type === CUSTOM_PROPERTY_TYPES.INTEGER_CLASS_NAME) {
|
|
43
42
|
return kintIntl.formatKintMessage({
|
|
@@ -80,9 +79,7 @@ const CustomPropertyField = _ref => {
|
|
|
80
79
|
return availableCustomProperties.find(cp => cp.value === customPropertyValue);
|
|
81
80
|
};
|
|
82
81
|
const renderCustomPropertyName = () => {
|
|
83
|
-
var _customPropertyValue$;
|
|
84
82
|
const unsetCustomProperties = availableCustomProperties.filter(t => {
|
|
85
|
-
var _custPropValue$;
|
|
86
83
|
// Only optional properties can be set
|
|
87
84
|
if (t.primary) return false;
|
|
88
85
|
const custPropValue = value[t.value];
|
|
@@ -91,16 +88,16 @@ const CustomPropertyField = _ref => {
|
|
|
91
88
|
if (custPropValue === undefined) return true;
|
|
92
89
|
|
|
93
90
|
// The customProperty is set but is marked for deletion. Allow reuse.
|
|
94
|
-
if (
|
|
91
|
+
if (custPropValue[0]?._delete) return true;
|
|
95
92
|
return false;
|
|
96
93
|
});
|
|
97
94
|
const customPropertyValue = value[customProperty.value];
|
|
98
|
-
const id = customPropertyValue
|
|
95
|
+
const id = customPropertyValue?.[0]?.id;
|
|
99
96
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Select, {
|
|
100
97
|
autoFocus: !id,
|
|
101
98
|
dataOptions: [customProperty, ...unsetCustomProperties] // The selected customProperty, and the available unset customProperties
|
|
102
99
|
,
|
|
103
|
-
id:
|
|
100
|
+
id: `edit-customproperty-${index}-name`,
|
|
104
101
|
label: kintIntl.formatKintMessage({
|
|
105
102
|
id: 'customProperties.name',
|
|
106
103
|
overrideValue: labelOverrides.name
|
|
@@ -132,7 +129,6 @@ const CustomPropertyField = _ref => {
|
|
|
132
129
|
});
|
|
133
130
|
};
|
|
134
131
|
const renderCustomPropertyValue = () => {
|
|
135
|
-
var _customProperty$optio;
|
|
136
132
|
const currentValue = value[customProperty.value] ? value[customProperty.value][0] : {};
|
|
137
133
|
const min = Number.MIN_SAFE_INTEGER;
|
|
138
134
|
const max = Number.MAX_SAFE_INTEGER;
|
|
@@ -156,14 +152,14 @@ const CustomPropertyField = _ref => {
|
|
|
156
152
|
fieldProps = {
|
|
157
153
|
component: _components.Select,
|
|
158
154
|
dataOptions: customProperty.options,
|
|
159
|
-
format: v => v
|
|
155
|
+
format: v => v?.value
|
|
160
156
|
};
|
|
161
157
|
break;
|
|
162
158
|
case CUSTOM_PROPERTY_TYPES.MULTI_REFDATA_CLASS_NAME:
|
|
163
159
|
fieldProps = {
|
|
164
160
|
component: _components.MultiSelection,
|
|
165
161
|
// The "not set" value is not relevant for a multi select
|
|
166
|
-
dataOptions:
|
|
162
|
+
dataOptions: customProperty.options?.filter(opt => !!opt?.value),
|
|
167
163
|
renderToOverlay: true
|
|
168
164
|
};
|
|
169
165
|
// MultiSelection passes the changed array as a value not an event
|
|
@@ -172,7 +168,7 @@ const CustomPropertyField = _ref => {
|
|
|
172
168
|
...value,
|
|
173
169
|
[customProperty.value]: [{
|
|
174
170
|
...currentValue,
|
|
175
|
-
_delete:
|
|
171
|
+
_delete: refdataArray?.length === 0 ? true : undefined,
|
|
176
172
|
// Delete customProperty if removing all values.
|
|
177
173
|
value: refdataArray
|
|
178
174
|
}]
|
|
@@ -223,12 +219,12 @@ const CustomPropertyField = _ref => {
|
|
|
223
219
|
}
|
|
224
220
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
|
|
225
221
|
"data-test-customproperty-value": true,
|
|
226
|
-
id:
|
|
222
|
+
id: `edit-customproperty-${index}-value`,
|
|
227
223
|
label: kintIntl.formatKintMessage({
|
|
228
224
|
id: 'customProperties.value',
|
|
229
225
|
overrideValue: labelOverrides.value
|
|
230
226
|
}),
|
|
231
|
-
name:
|
|
227
|
+
name: `${name}.${customProperty.value}[0].value`,
|
|
232
228
|
onChange: handleChange,
|
|
233
229
|
required: !customProperty.primary,
|
|
234
230
|
validate: (fieldValue, allValues) => customPropertyValidator(fieldValue, allValues),
|
|
@@ -236,8 +232,7 @@ const CustomPropertyField = _ref => {
|
|
|
236
232
|
});
|
|
237
233
|
};
|
|
238
234
|
const renderCustomPropertyVisibility = () => {
|
|
239
|
-
|
|
240
|
-
const customPropertyObject = (_value$customProperty = (_value$customProperty2 = value[customProperty.value]) === null || _value$customProperty2 === void 0 ? void 0 : _value$customProperty2[0]) !== null && _value$customProperty !== void 0 ? _value$customProperty : {};
|
|
235
|
+
const customPropertyObject = value[customProperty.value]?.[0] ?? {};
|
|
241
236
|
const handleChange = e => {
|
|
242
237
|
onChange({
|
|
243
238
|
...value,
|
|
@@ -262,18 +257,17 @@ const CustomPropertyField = _ref => {
|
|
|
262
257
|
overrideValue: labelOverrides.internalFalse
|
|
263
258
|
})
|
|
264
259
|
}],
|
|
265
|
-
id:
|
|
260
|
+
id: `edit-customproperty-${index}-visibility`,
|
|
266
261
|
label: kintIntl.formatKintMessage({
|
|
267
262
|
id: 'customProperties.visibility',
|
|
268
263
|
overrideValue: labelOverrides.visibility
|
|
269
264
|
}),
|
|
270
265
|
onChange: handleChange,
|
|
271
|
-
value:
|
|
266
|
+
value: customPropertyObject?.internal ?? customProperty.defaultInternal
|
|
272
267
|
});
|
|
273
268
|
};
|
|
274
269
|
const renderCustomPropertyNoteInternal = () => {
|
|
275
|
-
|
|
276
|
-
const customPropertyObject = (_value$customProperty3 = (_value$customProperty4 = value[customProperty.value]) === null || _value$customProperty4 === void 0 ? void 0 : _value$customProperty4[0]) !== null && _value$customProperty3 !== void 0 ? _value$customProperty3 : {};
|
|
270
|
+
const customPropertyObject = value[customProperty.value]?.[0] ?? {};
|
|
277
271
|
const handleChange = e => {
|
|
278
272
|
onChange({
|
|
279
273
|
...value,
|
|
@@ -285,18 +279,17 @@ const CustomPropertyField = _ref => {
|
|
|
285
279
|
};
|
|
286
280
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextArea, {
|
|
287
281
|
"data-test-customproperty-note": true,
|
|
288
|
-
id:
|
|
282
|
+
id: `edit-customproperty-${index}-internal-note`,
|
|
289
283
|
label: kintIntl.formatKintMessage({
|
|
290
284
|
id: 'customProperties.internalNote',
|
|
291
285
|
overrideValue: labelOverrides.internalNote
|
|
292
286
|
}),
|
|
293
287
|
onChange: handleChange,
|
|
294
|
-
value: customPropertyObject
|
|
288
|
+
value: customPropertyObject?.note
|
|
295
289
|
});
|
|
296
290
|
};
|
|
297
291
|
const renderCustomPropertyNotePublic = () => {
|
|
298
|
-
|
|
299
|
-
const customPropertyObject = (_value$customProperty5 = (_value$customProperty6 = value[customProperty.value]) === null || _value$customProperty6 === void 0 ? void 0 : _value$customProperty6[0]) !== null && _value$customProperty5 !== void 0 ? _value$customProperty5 : {};
|
|
292
|
+
const customPropertyObject = value[customProperty.value]?.[0] ?? {};
|
|
300
293
|
const handleChange = e => {
|
|
301
294
|
onChange({
|
|
302
295
|
...value,
|
|
@@ -308,13 +301,13 @@ const CustomPropertyField = _ref => {
|
|
|
308
301
|
};
|
|
309
302
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextArea, {
|
|
310
303
|
"data-test-customproperty-public-note": true,
|
|
311
|
-
id:
|
|
304
|
+
id: `edit-customproperty-${index}-public-note`,
|
|
312
305
|
label: kintIntl.formatKintMessage({
|
|
313
306
|
id: 'customProperties.publicNote',
|
|
314
307
|
overrideValue: labelOverrides.publicNote
|
|
315
308
|
}),
|
|
316
309
|
onChange: handleChange,
|
|
317
|
-
value: customPropertyObject
|
|
310
|
+
value: customPropertyObject?.publicNote
|
|
318
311
|
});
|
|
319
312
|
};
|
|
320
313
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
@@ -363,5 +356,4 @@ CustomPropertyField.propTypes = {
|
|
|
363
356
|
setCustomProperties: _propTypes.default.func,
|
|
364
357
|
value: _propTypes.default.object
|
|
365
358
|
};
|
|
366
|
-
var _default = CustomPropertyField;
|
|
367
|
-
exports.default = _default;
|
|
359
|
+
var _default = exports.default = CustomPropertyField;
|
|
@@ -12,11 +12,11 @@ const onSubmit = jest.fn();
|
|
|
12
12
|
jest.mock('../../hooks');
|
|
13
13
|
const onChange = () => {};
|
|
14
14
|
const setCustomProperties = () => {};
|
|
15
|
-
const authIdentCustom = _jest.availableCustomProperties
|
|
16
|
-
const decimalCustProp = _jest.availableCustomProperties
|
|
17
|
-
const integerCustProp = _jest.availableCustomProperties
|
|
18
|
-
const dateCustProp = _jest.availableCustomProperties
|
|
19
|
-
const multiRefdataCustProp = _jest.availableCustomProperties
|
|
15
|
+
const authIdentCustom = _jest.availableCustomProperties?.find(cp => cp.value === 'AuthorIdentification');
|
|
16
|
+
const decimalCustProp = _jest.availableCustomProperties?.find(cp => cp.value === 'decimal');
|
|
17
|
+
const integerCustProp = _jest.availableCustomProperties?.find(cp => cp.value === 'integer');
|
|
18
|
+
const dateCustProp = _jest.availableCustomProperties?.find(cp => cp.value === 'date');
|
|
19
|
+
const multiRefdataCustProp = _jest.availableCustomProperties?.find(cp => cp.value === 'MultiRefdata');
|
|
20
20
|
const defaultProps = {
|
|
21
21
|
availableCustomProperties: _jest.availableCustomProperties,
|
|
22
22
|
customProperties: _jest.customProperties,
|
|
@@ -57,7 +57,7 @@ const CustomPropertyFormCard = _ref => {
|
|
|
57
57
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Card, {
|
|
58
58
|
"data-testid": "custom-property-form-card",
|
|
59
59
|
headerEnd: customPropertyType === 'optional' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Tooltip, {
|
|
60
|
-
id:
|
|
60
|
+
id: `customProperty-${customProperty.value}-${index}`,
|
|
61
61
|
text: getTooltipText(),
|
|
62
62
|
children: _ref2 => {
|
|
63
63
|
let {
|
|
@@ -68,7 +68,7 @@ const CustomPropertyFormCard = _ref => {
|
|
|
68
68
|
ref: ref,
|
|
69
69
|
"aria-labelledby": ariaIds.text,
|
|
70
70
|
icon: "trash",
|
|
71
|
-
id:
|
|
71
|
+
id: `edit-customproperty-${index}-delete`,
|
|
72
72
|
onClick: () => handleDeleteCustomProperty(customProperty, index)
|
|
73
73
|
});
|
|
74
74
|
}
|
|
@@ -111,5 +111,4 @@ CustomPropertyFormCard.propTypes = {
|
|
|
111
111
|
setCustomProperties: _propTypes.default.func,
|
|
112
112
|
value: _propTypes.default.object
|
|
113
113
|
};
|
|
114
|
-
var _default = CustomPropertyFormCard;
|
|
115
|
-
exports.default = _default;
|
|
114
|
+
var _default = exports.default = CustomPropertyFormCard;
|
|
@@ -5,14 +5,14 @@ var _CustomPropertyFormCard = _interopRequireDefault(require("./CustomPropertyFo
|
|
|
5
5
|
var _customProperties = _interopRequireWildcard(require("../../../../test/jest/customProperties"));
|
|
6
6
|
var _jest = require("../../../../test/jest");
|
|
7
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
-
function _getRequireWildcardCache(
|
|
9
|
-
function _interopRequireWildcard(
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
jest.mock('../../hooks');
|
|
12
12
|
jest.mock('./CustomPropertyField', () => () => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
13
13
|
children: "CustomPropertyField"
|
|
14
14
|
}));
|
|
15
|
-
const customProperty = _customProperties.availableCustomProperties
|
|
15
|
+
const customProperty = _customProperties.availableCustomProperties?.find(cp => cp.value === 'AuthorIdentification');
|
|
16
16
|
const onChange = jest.fn();
|
|
17
17
|
const setCustomProperties = jest.fn();
|
|
18
18
|
describe('CustomPropertyFormCard', () => {
|
|
@@ -5,23 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.value = exports.initialValues = void 0;
|
|
7
7
|
var _jest = require("../../../../test/jest");
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const value = {
|
|
8
|
+
const agreementStatusRefdata = _jest.refdata?.find(rdc => rdc.desc === 'SubscriptionAgreement.AgreementStatus');
|
|
9
|
+
const licenseAmendmentStatusRefdata = _jest.refdata?.find(rdc => rdc.desc === 'LicenseAmendmentStatus.Status');
|
|
10
|
+
const value = exports.value = {
|
|
12
11
|
AuthorIdentification: [{
|
|
13
12
|
id: 2,
|
|
14
13
|
internal: true,
|
|
15
14
|
publicNote: 'this is a public note',
|
|
16
15
|
note: 'this is an internal note',
|
|
17
|
-
value: agreementStatusRefdata
|
|
18
|
-
type: _jest.customProperties
|
|
16
|
+
value: agreementStatusRefdata?.values?.find(rdv => rdv.value === 'active'),
|
|
17
|
+
type: _jest.customProperties?.find(cp => cp.name === 'AuthorIdentification')
|
|
19
18
|
}],
|
|
20
19
|
Test: [{
|
|
21
20
|
id: 4,
|
|
22
21
|
internal: true,
|
|
23
|
-
value: agreementStatusRefdata
|
|
24
|
-
type: _jest.customProperties
|
|
22
|
+
value: agreementStatusRefdata?.values?.find(rdv => rdv.value === 'active'),
|
|
23
|
+
type: _jest.customProperties?.find(cp => cp.name === 'Test')
|
|
25
24
|
}],
|
|
26
25
|
decimal: [{
|
|
27
26
|
id: 8,
|
|
@@ -29,7 +28,7 @@ const value = {
|
|
|
29
28
|
note: 'decimal',
|
|
30
29
|
internal: true,
|
|
31
30
|
value: 1,
|
|
32
|
-
type: _jest.customProperties
|
|
31
|
+
type: _jest.customProperties?.find(cp => cp.name === 'decimal')
|
|
33
32
|
}],
|
|
34
33
|
integer: [{
|
|
35
34
|
id: 6,
|
|
@@ -37,7 +36,7 @@ const value = {
|
|
|
37
36
|
note: 'Integer',
|
|
38
37
|
internal: true,
|
|
39
38
|
value: 1,
|
|
40
|
-
type: _jest.customProperties
|
|
39
|
+
type: _jest.customProperties?.find(cp => cp.name === 'integer')
|
|
41
40
|
}],
|
|
42
41
|
text: [{
|
|
43
42
|
id: 7,
|
|
@@ -45,19 +44,17 @@ const value = {
|
|
|
45
44
|
note: 'text',
|
|
46
45
|
internal: true,
|
|
47
46
|
value: 'text',
|
|
48
|
-
type: _jest.customProperties
|
|
47
|
+
type: _jest.customProperties?.find(cp => cp.name === 'text')
|
|
49
48
|
}],
|
|
50
49
|
Refdata: [{
|
|
51
50
|
id: 5,
|
|
52
51
|
publicNote: 'refdata',
|
|
53
52
|
note: 'refdata',
|
|
54
53
|
internal: true,
|
|
55
|
-
value: licenseAmendmentStatusRefdata
|
|
56
|
-
type: _jest.customProperties
|
|
54
|
+
value: licenseAmendmentStatusRefdata?.values?.find(rdv => rdv.value === 'current'),
|
|
55
|
+
type: _jest.customProperties?.find(cp => cp.name === 'Refdata')
|
|
57
56
|
}]
|
|
58
57
|
};
|
|
59
|
-
exports.
|
|
60
|
-
const initialValues = {
|
|
58
|
+
const initialValues = exports.initialValues = {
|
|
61
59
|
customProperties: value
|
|
62
|
-
};
|
|
63
|
-
exports.initialValues = initialValues;
|
|
60
|
+
};
|
|
@@ -14,7 +14,6 @@ var _customProperties = require("../../constants/customProperties");
|
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
const CustomPropertiesFilter = _ref => {
|
|
17
|
-
var _parsedFilterData$num, _parsedFilterData$num2;
|
|
18
17
|
let {
|
|
19
18
|
activeFilters: {
|
|
20
19
|
customProperties: custPropFilters,
|
|
@@ -75,13 +74,9 @@ const CustomPropertiesFilter = _ref => {
|
|
|
75
74
|
filters = []
|
|
76
75
|
} = values;
|
|
77
76
|
const filterStrings = filters.filter(filter => filter.rules).map(filter => {
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
return filter.rules.map(rule => {
|
|
82
|
-
var _rule$value;
|
|
83
|
-
return "customProperties.".concat(filter.customProperty, ".value").concat(filterByValueId ? '.id' : '').concat(rule.operator).concat((_rule$value = rule.value) !== null && _rule$value !== void 0 ? _rule$value : '');
|
|
84
|
-
}).join('||');
|
|
77
|
+
const relevantCustomProperty = custprops?.filter(cp => cp.name === filter.customProperty)?.[0] ?? {};
|
|
78
|
+
const filterByValueId = relevantCustomProperty?.type === _customProperties.MULTI_REFDATA_CLASS_NAME || relevantCustomProperty?.type === _customProperties.REFDATA_CLASS_NAME;
|
|
79
|
+
return filter.rules.map(rule => `customProperties.${filter.customProperty}.value${filterByValueId ? '.id' : ''}${rule.operator}${rule.value ?? ''}`).join('||');
|
|
85
80
|
});
|
|
86
81
|
filterHandlers.state({
|
|
87
82
|
...restOfFilters,
|
|
@@ -92,7 +87,7 @@ const CustomPropertiesFilter = _ref => {
|
|
|
92
87
|
};
|
|
93
88
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Accordion, {
|
|
94
89
|
closedByDefault: true,
|
|
95
|
-
displayClearButton: (
|
|
90
|
+
displayClearButton: (parsedFilterData?.numberOfFilters ?? 0) > 0,
|
|
96
91
|
header: _components.FilterAccordionHeader,
|
|
97
92
|
id: "clickable-custprop-filter",
|
|
98
93
|
label: kintIntl.formatKintMessage({
|
|
@@ -110,12 +105,12 @@ const CustomPropertiesFilter = _ref => {
|
|
|
110
105
|
id: 'customProperty.filtersApplied',
|
|
111
106
|
overrideValue: labelOverrides.filtersApplied
|
|
112
107
|
}, {
|
|
113
|
-
count:
|
|
108
|
+
count: parsedFilterData?.numberOfFilters ?? 0
|
|
114
109
|
})
|
|
115
110
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertiesFilterForm.default, {
|
|
116
111
|
customProperties: custprops,
|
|
117
112
|
editingFilters: editingFilters,
|
|
118
|
-
filters: parsedFilterData
|
|
113
|
+
filters: parsedFilterData?.filters,
|
|
119
114
|
handlers: {
|
|
120
115
|
closeEditModal,
|
|
121
116
|
openEditModal
|
|
@@ -133,5 +128,4 @@ CustomPropertiesFilter.propTypes = {
|
|
|
133
128
|
intlNS: _propTypes.default.string,
|
|
134
129
|
labelOverrides: _propTypes.default.object
|
|
135
130
|
};
|
|
136
|
-
var _default = CustomPropertiesFilter;
|
|
137
|
-
exports.default = _default;
|
|
131
|
+
var _default = exports.default = CustomPropertiesFilter;
|
|
@@ -15,7 +15,6 @@ var _hooks = require("../../hooks");
|
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
const CustomPropertiesFilterField = _ref => {
|
|
18
|
-
var _customProperties$fin, _customProperties$fin2, _fields$value$index2;
|
|
19
18
|
let {
|
|
20
19
|
customProperties = [],
|
|
21
20
|
fields,
|
|
@@ -38,16 +37,15 @@ const CustomPropertiesFilterField = _ref => {
|
|
|
38
37
|
const kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
|
|
39
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
40
39
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
|
|
41
|
-
id:
|
|
40
|
+
id: `input-custprop-${index}`,
|
|
42
41
|
label: kintIntl.formatKintMessage({
|
|
43
42
|
id: 'customProperty',
|
|
44
43
|
overrideValue: labelOverrides.customProperty
|
|
45
44
|
}),
|
|
46
|
-
name:
|
|
45
|
+
name: `${name}.customProperty`,
|
|
47
46
|
placeholder: " ",
|
|
48
47
|
render: fieldProps => {
|
|
49
|
-
|
|
50
|
-
const sortedGroupedCustProps = (_Object$entries = Object.entries(groupedCustomProperties)) === null || _Object$entries === void 0 ? void 0 : _Object$entries.sort((a, b) => {
|
|
48
|
+
const sortedGroupedCustProps = Object.entries(groupedCustomProperties)?.sort((a, b) => {
|
|
51
49
|
if (a[0] === 'isNull') return -1; // Make sure noContext is at top
|
|
52
50
|
|
|
53
51
|
if (a[0].toLowerCase() < b[0].toLowerCase()) return -1;
|
|
@@ -76,22 +74,19 @@ const CustomPropertiesFilterField = _ref => {
|
|
|
76
74
|
}) : v.label
|
|
77
75
|
}, v.id);
|
|
78
76
|
})
|
|
79
|
-
},
|
|
77
|
+
}, `custom-property-optgroup-${key}`);
|
|
80
78
|
})]
|
|
81
79
|
});
|
|
82
80
|
},
|
|
83
81
|
required: true,
|
|
84
82
|
validate: _validators.required
|
|
85
83
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
86
|
-
"data-testid":
|
|
87
|
-
id:
|
|
84
|
+
"data-testid": `selected-custprop-name-${index}`,
|
|
85
|
+
id: `selected-custprop-name-${index}`,
|
|
88
86
|
style: {
|
|
89
87
|
display: 'none'
|
|
90
88
|
},
|
|
91
|
-
children:
|
|
92
|
-
var _fields$value$index;
|
|
93
|
-
return t.name === ((_fields$value$index = fields.value[index]) === null || _fields$value$index === void 0 ? void 0 : _fields$value$index.customProperty);
|
|
94
|
-
})) === null || _customProperties$fin2 === void 0 ? void 0 : _customProperties$fin2.label) !== null && _customProperties$fin !== void 0 ? _customProperties$fin : ''
|
|
89
|
+
children: customProperties.find(t => t.name === fields.value[index]?.customProperty)?.label ?? ''
|
|
95
90
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Row, {
|
|
96
91
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
|
|
97
92
|
xs: 2
|
|
@@ -119,29 +114,26 @@ const CustomPropertiesFilterField = _ref => {
|
|
|
119
114
|
xs: 2
|
|
120
115
|
})]
|
|
121
116
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalFormArrays.FieldArray, {
|
|
122
|
-
name:
|
|
117
|
+
name: `${name}.rules`,
|
|
123
118
|
children: _ref3 => {
|
|
124
119
|
let {
|
|
125
120
|
fields: ruleFields
|
|
126
121
|
} = _ref3;
|
|
127
|
-
return ruleFields.map((ruleFieldName, ruleFieldIndex) => {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
value: (_values$filters$index = values.filters[index]) === null || _values$filters$index === void 0 ? void 0 : _values$filters$index.rules[ruleFieldIndex]
|
|
138
|
-
}, ruleFieldName);
|
|
139
|
-
});
|
|
122
|
+
return ruleFields.map((ruleFieldName, ruleFieldIndex) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertiesRule.default, {
|
|
123
|
+
ariaLabelledby: `selected-custprop-name-${index}`,
|
|
124
|
+
clearRuleValue: () => change(`filters[${index}].rules[${ruleFieldIndex}].value`, ''),
|
|
125
|
+
custPropDefinition: customProperties.find(t => t.name === fields.value[index].customProperty),
|
|
126
|
+
index: ruleFieldIndex,
|
|
127
|
+
labelOverrides: labelOverrides,
|
|
128
|
+
name: ruleFieldName,
|
|
129
|
+
onDelete: () => ruleFields.remove(ruleFieldIndex),
|
|
130
|
+
value: values.filters[index]?.rules[ruleFieldIndex]
|
|
131
|
+
}, ruleFieldName));
|
|
140
132
|
}
|
|
141
133
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
142
134
|
"data-test-add-rule-btn": true,
|
|
143
|
-
disabled: !
|
|
144
|
-
onClick: () => push(
|
|
135
|
+
disabled: !fields.value[index]?.customProperty,
|
|
136
|
+
onClick: () => push(`${name}.rules`),
|
|
145
137
|
children: kintIntl.formatKintMessage({
|
|
146
138
|
id: 'addRule',
|
|
147
139
|
overrideValue: labelOverrides.addRule
|
|
@@ -158,5 +150,4 @@ CustomPropertiesFilterField.propTypes = {
|
|
|
158
150
|
labelOverrides: _propTypes.default.object,
|
|
159
151
|
name: _propTypes.default.string
|
|
160
152
|
};
|
|
161
|
-
var _default = CustomPropertiesFilterField;
|
|
162
|
-
exports.default = _default;
|
|
153
|
+
var _default = exports.default = CustomPropertiesFilterField;
|
|
@@ -36,7 +36,7 @@ const CustomPropertiesFilterFieldArray = _ref => {
|
|
|
36
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
37
37
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Card, {
|
|
38
38
|
headerEnd: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Tooltip, {
|
|
39
|
-
id:
|
|
39
|
+
id: `custom-property-filter-card-delete-[${index}]-tooltip`,
|
|
40
40
|
text: kintIntl.formatKintMessage({
|
|
41
41
|
id: 'customProperty.removeFilter',
|
|
42
42
|
overrideValue: labelOverrides.removeFilter
|
|
@@ -52,7 +52,7 @@ const CustomPropertiesFilterFieldArray = _ref => {
|
|
|
52
52
|
ref: ref,
|
|
53
53
|
"aria-labelledby": ariaIds.text,
|
|
54
54
|
icon: "trash",
|
|
55
|
-
id:
|
|
55
|
+
id: `custom-property-filter-card-delete-[${index}]`,
|
|
56
56
|
onClick: () => fields.remove(index)
|
|
57
57
|
});
|
|
58
58
|
}
|
|
@@ -72,15 +72,15 @@ const CustomPropertiesFilterFieldArray = _ref => {
|
|
|
72
72
|
index: index,
|
|
73
73
|
labelOverrides: labelOverrides,
|
|
74
74
|
name: name
|
|
75
|
-
},
|
|
76
|
-
},
|
|
75
|
+
}, `custom-property-filter-field-${name}[${index}]`)
|
|
76
|
+
}, `custom-property-filter-card[${index}]`), index < fields.value.length - 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Layout, {
|
|
77
77
|
className: "textCentered",
|
|
78
78
|
children: kintIntl.formatKintMessage({
|
|
79
79
|
id: 'AND',
|
|
80
80
|
overrideValue: labelOverrides.AND
|
|
81
81
|
})
|
|
82
|
-
},
|
|
83
|
-
},
|
|
82
|
+
}, `custom-property-filter[${index}]-AND`)]
|
|
83
|
+
}, `custom-property-filter-card[${index}]-container`);
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
@@ -100,5 +100,4 @@ CustomPropertiesFilterFieldArray.propTypes = {
|
|
|
100
100
|
intlNS: _propTypes.default.string,
|
|
101
101
|
labelOverrides: _propTypes.default.object
|
|
102
102
|
};
|
|
103
|
-
var _default = CustomPropertiesFilterFieldArray;
|
|
104
|
-
exports.default = _default;
|
|
103
|
+
var _default = exports.default = CustomPropertiesFilterFieldArray;
|
|
@@ -81,5 +81,4 @@ CustomPropertyFiltersForm.propTypes = {
|
|
|
81
81
|
labelOverrides: _propTypes.default.object,
|
|
82
82
|
onSubmit: _propTypes.default.func.isRequired
|
|
83
83
|
};
|
|
84
|
-
var _default = CustomPropertyFiltersForm;
|
|
85
|
-
exports.default = _default;
|
|
84
|
+
var _default = exports.default = CustomPropertyFiltersForm;
|
|
@@ -51,7 +51,7 @@ const CustomPropertiesRule = _ref => {
|
|
|
51
51
|
const operators = (0, _useOperators.default)(custPropDefinition.type, passedIntlKey, passedIntlNS, labelOverrides);
|
|
52
52
|
const valueProps = (0, _useValueProps.default)(custPropDefinition, passedIntlKey, passedIntlNS, labelOverrides);
|
|
53
53
|
const kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
|
|
54
|
-
const selectedOperator = operators.find(o => o.value ===
|
|
54
|
+
const selectedOperator = operators.find(o => o.value === value?.operator);
|
|
55
55
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Row, {
|
|
56
56
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
|
|
57
57
|
xs: 2,
|
|
@@ -65,7 +65,7 @@ const CustomPropertiesRule = _ref => {
|
|
|
65
65
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
|
|
66
66
|
xs: 4,
|
|
67
67
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
|
|
68
|
-
name:
|
|
68
|
+
name: `${name}.operator`,
|
|
69
69
|
validate: _validators.required,
|
|
70
70
|
children: _ref2 => {
|
|
71
71
|
let {
|
|
@@ -74,13 +74,13 @@ const CustomPropertiesRule = _ref => {
|
|
|
74
74
|
} = _ref2;
|
|
75
75
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Select, {
|
|
76
76
|
...input,
|
|
77
|
-
"aria-labelledby":
|
|
77
|
+
"aria-labelledby": `${ariaLabelledby}-rule-column-header-comparator`,
|
|
78
78
|
dataOptions: operators,
|
|
79
|
-
error:
|
|
79
|
+
error: meta?.touched && meta?.error,
|
|
80
80
|
onChange: e => {
|
|
81
81
|
input.onChange(e);
|
|
82
82
|
const newlySelectedOperator = operators.find(o => o.value === e.target.value);
|
|
83
|
-
if (newlySelectedOperator
|
|
83
|
+
if (newlySelectedOperator?.noValueAllowed) {
|
|
84
84
|
clearRuleValue();
|
|
85
85
|
}
|
|
86
86
|
},
|
|
@@ -91,9 +91,9 @@ const CustomPropertiesRule = _ref => {
|
|
|
91
91
|
})
|
|
92
92
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
|
|
93
93
|
xs: 4,
|
|
94
|
-
children: selectedOperator
|
|
95
|
-
"aria-labelledby":
|
|
96
|
-
name:
|
|
94
|
+
children: selectedOperator?.noValueAllowed ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
|
|
95
|
+
"aria-labelledby": `${ariaLabelledby}-rule-column-header-value`,
|
|
96
|
+
name: `${name}.value`,
|
|
97
97
|
required: true,
|
|
98
98
|
validate: _validators.required,
|
|
99
99
|
...valueProps
|
|
@@ -125,5 +125,4 @@ const CustomPropertiesRule = _ref => {
|
|
|
125
125
|
}, name);
|
|
126
126
|
};
|
|
127
127
|
CustomPropertiesRule.propTypes = propTypes;
|
|
128
|
-
var _default = CustomPropertiesRule;
|
|
129
|
-
exports.default = _default;
|
|
128
|
+
var _default = exports.default = CustomPropertiesRule;
|