@k-int/stripes-kint-components 2.8.2 → 2.8.4
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 +6 -0
- package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +6 -19
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +2 -182
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +64 -94
- package/es/index.js +0 -27
- package/es/lib/ActionList/ActionList.js +18 -38
- package/es/lib/ActionList/ActionListFieldArray.js +57 -112
- package/es/lib/ActionList/index.js +0 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +32 -63
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +2 -13
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +91 -140
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +3 -22
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +14 -50
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +17 -34
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +3 -12
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -26
- package/es/lib/CustomProperties/Config/index.js +0 -5
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +6 -12
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +1 -13
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +24 -39
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +1 -13
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +25 -69
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +3 -23
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +26 -77
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +6 -33
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +19 -33
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +3 -14
- package/es/lib/CustomProperties/Edit/index.js +0 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +33 -70
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +2 -18
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +14 -44
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -10
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +4 -23
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +2 -19
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +8 -22
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +2 -20
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +9 -27
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +1 -32
- package/es/lib/CustomProperties/Filter/index.js +0 -7
- package/es/lib/CustomProperties/Filter/useOperators.js +5 -21
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +3 -15
- package/es/lib/CustomProperties/Filter/useValueProps.js +5 -20
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +6 -12
- package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +1 -10
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +43 -65
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +1 -13
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +10 -38
- package/es/lib/CustomProperties/View/index.js +0 -4
- package/es/lib/CustomProperties/index.js +0 -4
- package/es/lib/CycleButton/CycleButton.js +8 -33
- package/es/lib/CycleButton/index.js +0 -2
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +85 -131
- package/es/lib/EditableRefdataCategoryList/index.js +0 -2
- package/es/lib/EditableRefdataList/EditableRefdataList.js +90 -139
- package/es/lib/EditableRefdataList/index.js +0 -2
- package/es/lib/EditableSettingsList/EditableSettingsList.js +3 -13
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +2 -15
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +4 -19
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +3 -25
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +19 -26
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +2 -20
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +14 -35
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +15 -51
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +6 -31
- package/es/lib/EditableSettingsList/SettingField/index.js +0 -4
- package/es/lib/EditableSettingsList/index.js +0 -4
- package/es/lib/FormModal/FormModal.js +14 -34
- package/es/lib/FormModal/index.js +0 -2
- package/es/lib/IconSelect/IconSelect.js +29 -67
- package/es/lib/IconSelect/index.js +0 -2
- package/es/lib/NoResultsMessage/NoResultsMessage.js +13 -22
- package/es/lib/NoResultsMessage/index.js +0 -2
- package/es/lib/QueryTypedown/QueryTypedown.js +9 -36
- package/es/lib/QueryTypedown/index.js +0 -2
- package/es/lib/RefdataButtons/RefdataButtons.js +5 -24
- package/es/lib/RefdataButtons/index.js +0 -2
- package/es/lib/RichSelect/RichSelect.js +39 -67
- package/es/lib/RichSelect/index.js +0 -3
- package/es/lib/RichSelect/useSelectedOption.js +3 -14
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +36 -80
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +16 -29
- package/es/lib/SASQLookupComponent/TableBody/index.js +0 -2
- package/es/lib/SASQLookupComponent/index.js +0 -3
- package/es/lib/SASQRoute/SASQRoute.js +6 -23
- package/es/lib/SASQRoute/index.js +0 -2
- package/es/lib/SASQViewComponent/SASQViewComponent.js +17 -36
- package/es/lib/SASQViewComponent/index.js +0 -2
- package/es/lib/SearchField/SearchField.js +1 -17
- package/es/lib/SearchField/index.js +0 -2
- package/es/lib/SettingPage/SettingPage.js +6 -21
- package/es/lib/SettingPage/SettingPagePane.js +2 -17
- package/es/lib/SettingPage/index.js +0 -3
- package/es/lib/Typedown/Typedown.js +51 -82
- package/es/lib/Typedown/index.js +0 -2
- package/es/lib/contexts/SettingsContext.js +0 -2
- package/es/lib/contexts/index.js +0 -2
- package/es/lib/hooks/index.js +0 -16
- package/es/lib/hooks/settingsHooks/index.js +0 -4
- package/es/lib/hooks/settingsHooks/useAppSettings.js +6 -27
- package/es/lib/hooks/settingsHooks/useSettingSection.js +10 -20
- package/es/lib/hooks/settingsHooks/useSettings.js +10 -43
- package/es/lib/hooks/typedownHooks/index.js +0 -4
- package/es/lib/hooks/typedownHooks/useTypedown.js +17 -37
- package/es/lib/hooks/typedownHooks/useTypedownData.js +12 -26
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +5 -19
- package/es/lib/hooks/useActiveElement.js +3 -15
- package/es/lib/hooks/useAvailableCustomProperties.js +3 -22
- package/es/lib/hooks/useCustomProperties.js +11 -25
- package/es/lib/hooks/useHelperApp.js +7 -30
- package/es/lib/hooks/useInvalidateRefdata.js +0 -4
- package/es/lib/hooks/useKiwtFieldArray.js +5 -29
- package/es/lib/hooks/useKiwtSASQuery.js +12 -37
- package/es/lib/hooks/useLocalStorageState.js +5 -21
- package/es/lib/hooks/useMutateCustomProperties.js +11 -28
- package/es/lib/hooks/useMutateRefdataCategory.js +9 -29
- package/es/lib/hooks/useMutateRefdataValue.js +10 -27
- package/es/lib/hooks/useQIndex.js +3 -27
- package/es/lib/hooks/useRefdata.js +7 -16
- package/es/lib/hooks/useTemplates.js +6 -17
- package/es/lib/utils/buildUrl.js +1 -10
- package/es/lib/utils/generateKiwtQuery.js +0 -4
- package/es/lib/utils/generateKiwtQueryParams.js +24 -62
- package/es/lib/utils/groupCustomPropertiesByCtx.js +0 -14
- package/es/lib/utils/highlightString.js +6 -23
- package/es/lib/utils/index.js +0 -15
- package/es/lib/utils/matchString.js +0 -6
- package/es/lib/utils/parseErrorResponse.js +2 -24
- package/es/lib/utils/refdataQueryKey.js +0 -4
- package/es/lib/utils/renderHelpText.js +0 -7
- package/es/lib/utils/selectorSafe.js +0 -2
- package/es/lib/utils/sortByLabel.js +0 -6
- package/es/lib/utils/toCamelCase.js +6 -5
- package/es/lib/utils/typedownQueryKey.js +0 -4
- package/es/lib/utils/validators.js +4 -35
- package/junit.xml +164 -663
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +35 -5
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +120 -24
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +8 -8
- 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 +29 -26
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +136 -70
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +5 -5
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +35 -35
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +15 -15
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +88 -88
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +92 -80
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +4 -4
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +44 -44
- 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 +2394 -12
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +72 -33
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +4 -4
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +4 -4
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +37 -37
- 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 +4 -4
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +14 -14
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +9 -6
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +6 -6
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +217 -0
- 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 +610 -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 +192 -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 +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +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/IconSelect/IconSelect.js.html +475 -0
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/{CustomProperties/Config/CustomPropertiesView.js.html → ResponsiveButtonGroup/ResponsiveButtonGroup.js.html} +186 -252
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +146 -0
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +253 -0
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +775 -0
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +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 +44 -29
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +6 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +22 -7
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +2 -2
- 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 +2 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +32 -32
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +34 -37
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +151 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +199 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +238 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +18 -6
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +274 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +14 -5
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +187 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/index.html +138 -78
- 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 +16 -16
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +66 -66
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +53 -38
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +11 -2
- 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/renderHelpText.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +28 -28
- package/src/artifacts/coverage-jest/lcov.info +1724 -1155
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +1 -1
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +0 -1
- package/src/lib/utils/parseErrorResponse.js +1 -1
- package/translate.sh +4 -0
- package/translations/stripes-kint-components/ar.json +12 -12
- package/translations/stripes-kint-components/cs_CZ.json +4 -4
- package/translations/stripes-kint-components/en_GB.json +1 -0
- package/translations/stripes-kint-components/en_SE.json +1 -0
- package/translations/stripes-kint-components/es_419.json +122 -0
- package/translations/stripes-kint-components/es_ES.json +122 -0
- package/translations/stripes-kint-components/fr.json +105 -1
- package/translations/stripes-kint-components/fr_FR.json +105 -0
- package/translations/stripes-kint-components/hu.json +12 -12
- package/translations/stripes-kint-components/it_IT.json +6 -6
- package/translations/stripes-kint-components/pt_PT.json +6 -6
- package/translations/stripes-kint-components/ru.json +1 -1
- package/translations/stripes-kint-components/sv.json +7 -7
- package/translations/stripes-kint-components/zh_TW.json +122 -0
- package/yarn-error.log +147 -0
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">80.85% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>38/47</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">65.71% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>23/35</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">88.23% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>15/17</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">81.81% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>36/44</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
<span class="cline-any cline-neutral"> </span>
|
|
267
267
|
<span class="cline-any cline-neutral"> </span>
|
|
268
268
|
<span class="cline-any cline-neutral"> </span>
|
|
269
|
-
<span class="cline-any cline-
|
|
269
|
+
<span class="cline-any cline-yes">1x</span>
|
|
270
270
|
<span class="cline-any cline-neutral"> </span>
|
|
271
271
|
<span class="cline-any cline-neutral"> </span>
|
|
272
272
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -278,10 +278,10 @@
|
|
|
278
278
|
<span class="cline-any cline-neutral"> </span>
|
|
279
279
|
<span class="cline-any cline-neutral"> </span>
|
|
280
280
|
<span class="cline-any cline-neutral"> </span>
|
|
281
|
-
<span class="cline-any cline-
|
|
282
|
-
<span class="cline-any cline-
|
|
281
|
+
<span class="cline-any cline-yes">13x</span>
|
|
282
|
+
<span class="cline-any cline-yes">13x</span>
|
|
283
283
|
<span class="cline-any cline-neutral"> </span>
|
|
284
|
-
<span class="cline-any cline-
|
|
284
|
+
<span class="cline-any cline-yes">13x</span>
|
|
285
285
|
<span class="cline-any cline-neutral"> </span>
|
|
286
286
|
<span class="cline-any cline-neutral"> </span>
|
|
287
287
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -292,15 +292,15 @@
|
|
|
292
292
|
<span class="cline-any cline-neutral"> </span>
|
|
293
293
|
<span class="cline-any cline-neutral"> </span>
|
|
294
294
|
<span class="cline-any cline-neutral"> </span>
|
|
295
|
-
<span class="cline-any cline-
|
|
296
|
-
<span class="cline-any cline-
|
|
297
|
-
<span class="cline-any cline-
|
|
295
|
+
<span class="cline-any cline-yes">9x</span>
|
|
296
|
+
<span class="cline-any cline-yes">9x</span>
|
|
297
|
+
<span class="cline-any cline-yes">88x</span>
|
|
298
298
|
<span class="cline-any cline-neutral"> </span>
|
|
299
299
|
<span class="cline-any cline-neutral"> </span>
|
|
300
|
-
<span class="cline-any cline-no"> </span>
|
|
301
300
|
<span class="cline-any cline-neutral"> </span>
|
|
302
301
|
<span class="cline-any cline-neutral"> </span>
|
|
303
|
-
<span class="cline-any cline-
|
|
302
|
+
<span class="cline-any cline-neutral"> </span>
|
|
303
|
+
<span class="cline-any cline-yes">13x</span>
|
|
304
304
|
<span class="cline-any cline-no"> </span>
|
|
305
305
|
<span class="cline-any cline-neutral"> </span>
|
|
306
306
|
<span class="cline-any cline-no"> </span>
|
|
@@ -317,16 +317,16 @@
|
|
|
317
317
|
<span class="cline-any cline-neutral"> </span>
|
|
318
318
|
<span class="cline-any cline-neutral"> </span>
|
|
319
319
|
<span class="cline-any cline-neutral"> </span>
|
|
320
|
-
<span class="cline-any cline-
|
|
320
|
+
<span class="cline-any cline-yes">13x</span>
|
|
321
321
|
<span class="cline-any cline-neutral"> </span>
|
|
322
|
-
<span class="cline-any cline-
|
|
323
|
-
<span class="cline-any cline-
|
|
324
|
-
<span class="cline-any cline-
|
|
325
|
-
<span class="cline-any cline-
|
|
322
|
+
<span class="cline-any cline-yes">16x</span>
|
|
323
|
+
<span class="cline-any cline-yes">16x</span>
|
|
324
|
+
<span class="cline-any cline-yes">104x</span>
|
|
325
|
+
<span class="cline-any cline-yes">104x</span>
|
|
326
326
|
<span class="cline-any cline-neutral"> </span>
|
|
327
|
-
<span class="cline-any cline-
|
|
327
|
+
<span class="cline-any cline-yes">52x</span>
|
|
328
328
|
<span class="cline-any cline-neutral"> </span>
|
|
329
|
-
<span class="cline-any cline-
|
|
329
|
+
<span class="cline-any cline-yes">52x</span>
|
|
330
330
|
<span class="cline-any cline-neutral"> </span>
|
|
331
331
|
<span class="cline-any cline-neutral"> </span>
|
|
332
332
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -345,27 +345,27 @@
|
|
|
345
345
|
<span class="cline-any cline-neutral"> </span>
|
|
346
346
|
<span class="cline-any cline-neutral"> </span>
|
|
347
347
|
<span class="cline-any cline-neutral"> </span>
|
|
348
|
-
<span class="cline-any cline-
|
|
348
|
+
<span class="cline-any cline-yes">104x</span>
|
|
349
349
|
<span class="cline-any cline-neutral"> </span>
|
|
350
350
|
<span class="cline-any cline-neutral"> </span>
|
|
351
|
-
<span class="cline-any cline-
|
|
351
|
+
<span class="cline-any cline-yes">13x</span>
|
|
352
352
|
<span class="cline-any cline-neutral"> </span>
|
|
353
353
|
<span class="cline-any cline-neutral"> </span>
|
|
354
|
-
<span class="cline-any cline-
|
|
354
|
+
<span class="cline-any cline-yes">8x</span>
|
|
355
355
|
<span class="cline-any cline-neutral"> </span>
|
|
356
356
|
<span class="cline-any cline-neutral"> </span>
|
|
357
357
|
<span class="cline-any cline-neutral"> </span>
|
|
358
358
|
<span class="cline-any cline-neutral"> </span>
|
|
359
359
|
<span class="cline-any cline-neutral"> </span>
|
|
360
360
|
<span class="cline-any cline-neutral"> </span>
|
|
361
|
-
<span class="cline-any cline-
|
|
361
|
+
<span class="cline-any cline-yes">104x</span>
|
|
362
362
|
<span class="cline-any cline-neutral"> </span>
|
|
363
363
|
<span class="cline-any cline-neutral"> </span>
|
|
364
364
|
<span class="cline-any cline-neutral"> </span>
|
|
365
365
|
<span class="cline-any cline-neutral"> </span>
|
|
366
366
|
<span class="cline-any cline-neutral"> </span>
|
|
367
367
|
<span class="cline-any cline-neutral"> </span>
|
|
368
|
-
<span class="cline-any cline-
|
|
368
|
+
<span class="cline-any cline-yes">104x</span>
|
|
369
369
|
<span class="cline-any cline-neutral"> </span>
|
|
370
370
|
<span class="cline-any cline-neutral"> </span>
|
|
371
371
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -383,41 +383,41 @@
|
|
|
383
383
|
<span class="cline-any cline-neutral"> </span>
|
|
384
384
|
<span class="cline-any cline-neutral"> </span>
|
|
385
385
|
<span class="cline-any cline-neutral"> </span>
|
|
386
|
-
<span class="cline-any cline-
|
|
386
|
+
<span class="cline-any cline-yes">1x</span>
|
|
387
387
|
<span class="cline-any cline-neutral"> </span>
|
|
388
388
|
<span class="cline-any cline-neutral"> </span>
|
|
389
389
|
<span class="cline-any cline-neutral"> </span>
|
|
390
390
|
<span class="cline-any cline-neutral"> </span>
|
|
391
391
|
<span class="cline-any cline-neutral"> </span>
|
|
392
|
-
<span class="cline-any cline-
|
|
393
|
-
<span class="cline-any cline-
|
|
392
|
+
<span class="cline-any cline-yes">9x</span>
|
|
393
|
+
<span class="cline-any cline-yes">9x</span>
|
|
394
394
|
<span class="cline-any cline-neutral"> </span>
|
|
395
|
-
<span class="cline-any cline-
|
|
396
|
-
<span class="cline-any cline-
|
|
397
|
-
<span class="cline-any cline-
|
|
398
|
-
<span class="cline-any cline-
|
|
399
|
-
<span class="cline-any cline-
|
|
395
|
+
<span class="cline-any cline-yes">9x</span>
|
|
396
|
+
<span class="cline-any cline-yes">9x</span>
|
|
397
|
+
<span class="cline-any cline-yes">9x</span>
|
|
398
|
+
<span class="cline-any cline-yes">9x</span>
|
|
399
|
+
<span class="cline-any cline-yes">198x</span>
|
|
400
400
|
<span class="cline-any cline-neutral"> </span>
|
|
401
401
|
<span class="cline-any cline-neutral"> </span>
|
|
402
|
-
<span class="cline-any cline-
|
|
402
|
+
<span class="cline-any cline-yes">117x</span>
|
|
403
403
|
<span class="cline-any cline-neutral"> </span>
|
|
404
404
|
<span class="cline-any cline-neutral"> </span>
|
|
405
405
|
<span class="cline-any cline-neutral"> </span>
|
|
406
406
|
<span class="cline-any cline-neutral"> </span>
|
|
407
|
-
<span class="cline-any cline-
|
|
408
|
-
<span class="cline-any cline-
|
|
407
|
+
<span class="cline-any cline-yes">57x</span>
|
|
408
|
+
<span class="cline-any cline-yes">4x</span>
|
|
409
409
|
<span class="cline-any cline-neutral"> </span>
|
|
410
410
|
<span class="cline-any cline-neutral"> </span>
|
|
411
411
|
<span class="cline-any cline-neutral"> </span>
|
|
412
|
-
<span class="cline-any cline-
|
|
412
|
+
<span class="cline-any cline-yes">5x</span>
|
|
413
413
|
<span class="cline-any cline-neutral"> </span>
|
|
414
414
|
<span class="cline-any cline-neutral"> </span>
|
|
415
|
-
<span class="cline-any cline-
|
|
415
|
+
<span class="cline-any cline-yes">9x</span>
|
|
416
416
|
<span class="cline-any cline-neutral"> </span>
|
|
417
417
|
<span class="cline-any cline-neutral"> </span>
|
|
418
418
|
<span class="cline-any cline-neutral"> </span>
|
|
419
419
|
<span class="cline-any cline-neutral"> </span>
|
|
420
|
-
<span class="cline-any cline-
|
|
420
|
+
<span class="cline-any cline-yes">9x</span>
|
|
421
421
|
<span class="cline-any cline-neutral"> </span>
|
|
422
422
|
<span class="cline-any cline-neutral"> </span>
|
|
423
423
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -431,13 +431,13 @@
|
|
|
431
431
|
<span class="cline-any cline-neutral"> </span>
|
|
432
432
|
<span class="cline-any cline-neutral"> </span>
|
|
433
433
|
<span class="cline-any cline-neutral"> </span>
|
|
434
|
-
<span class="cline-any cline-
|
|
434
|
+
<span class="cline-any cline-yes">1x</span>
|
|
435
435
|
<span class="cline-any cline-neutral"> </span>
|
|
436
436
|
<span class="cline-any cline-neutral"> </span>
|
|
437
437
|
<span class="cline-any cline-neutral"> </span>
|
|
438
438
|
<span class="cline-any cline-neutral"> </span>
|
|
439
439
|
<span class="cline-any cline-neutral"> </span>
|
|
440
|
-
<span class="cline-any cline-
|
|
440
|
+
<span class="cline-any cline-yes">1x</span>
|
|
441
441
|
<span class="cline-any cline-neutral"> </span>
|
|
442
442
|
<span class="cline-any cline-neutral"> </span>
|
|
443
443
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -460,22 +460,22 @@ import { FormattedMessage } from 'react-intl';
|
|
|
460
460
|
import { useAvailableCustomProperties } from '../../hooks';
|
|
461
461
|
import CustomPropertyFormCard from './CustomPropertyFormCard';
|
|
462
462
|
|
|
463
|
-
const CustomPropertiesList =
|
|
463
|
+
const CustomPropertiesList = ({
|
|
464
464
|
availableCustomProperties = <span class="branch-0 cbranch-no" title="branch not covered" >[],</span>
|
|
465
465
|
input: {
|
|
466
466
|
name,
|
|
467
467
|
onChange,
|
|
468
468
|
value
|
|
469
469
|
},
|
|
470
|
-
labelOverrides
|
|
470
|
+
labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
471
471
|
meta: {
|
|
472
472
|
pristine
|
|
473
473
|
},
|
|
474
474
|
}) => {
|
|
475
|
-
const [customProperties, setCustomProperties] =
|
|
476
|
-
const [dirtying, setDirtying] =
|
|
475
|
+
const [customProperties, setCustomProperties] = useState([]); // This is the list of customProperties we're currently displaying for edit.
|
|
476
|
+
const [dirtying, setDirtying] = useState(false);
|
|
477
477
|
|
|
478
|
-
|
|
478
|
+
useEffect(() => {
|
|
479
479
|
// When the user loads this form, we want to init the list of customProperties
|
|
480
480
|
// we're displaying (state.customProperties) with the list of customProperties that have been set
|
|
481
481
|
// either via defaults or previously-saved data. Since that data may come in
|
|
@@ -486,15 +486,15 @@ const CustomPropertiesList = <span class="cstat-no" title="statement not covered
|
|
|
486
486
|
// the component when we add/remove rows. That happens _before_ `onChange` is called,
|
|
487
487
|
// so internally we use `state.dirtying` to show that we just initiated an action
|
|
488
488
|
// that will result in a dirty component.
|
|
489
|
-
<span class="
|
|
490
|
-
|
|
491
|
-
|
|
489
|
+
<span class="missing-if-branch" title="else path not taken" >E</span>if (pristine && !dirtying) {
|
|
490
|
+
setCustomProperties(availableCustomProperties.filter(
|
|
491
|
+
customProperty => value[customProperty.value] !== undefined
|
|
492
492
|
));
|
|
493
493
|
}
|
|
494
|
-
|
|
494
|
+
|
|
495
495
|
}, [availableCustomProperties, dirtying, pristine, value]);
|
|
496
496
|
|
|
497
|
-
const handleDeleteCustomProperty = <span class="
|
|
497
|
+
const handleDeleteCustomProperty = <span class="fstat-no" title="function not covered" >(c</span>ustomProperty, i) => {
|
|
498
498
|
const currentValue = <span class="cstat-no" title="statement not covered" >value[customProperty.value]?.[0] ?? {};</span>
|
|
499
499
|
|
|
500
500
|
const newCustomProperties = <span class="cstat-no" title="statement not covered" >[...customProperties];</span>
|
|
@@ -511,16 +511,16 @@ const CustomPropertiesList = <span class="cstat-no" title="statement not covered
|
|
|
511
511
|
});
|
|
512
512
|
};
|
|
513
513
|
|
|
514
|
-
const renderCustomProperties =
|
|
514
|
+
const renderCustomProperties = (customPropertyType) => {
|
|
515
515
|
// This is necessary to track individually since "index" will span primary/optional for a given set
|
|
516
|
-
let internalPropertyCounter =
|
|
517
|
-
|
|
518
|
-
<span class="
|
|
519
|
-
|
|
516
|
+
let internalPropertyCounter = 0;
|
|
517
|
+
return customProperties.map((customProperty, index) => {
|
|
518
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (customPropertyType === 'primary' && !customProperty.primary) <span class="cstat-no" title="statement not covered" >return undefined;</span>
|
|
519
|
+
if (customPropertyType === 'optional' && customProperty.primary) return undefined;
|
|
520
520
|
|
|
521
|
-
|
|
521
|
+
internalPropertyCounter += 1;
|
|
522
522
|
|
|
523
|
-
|
|
523
|
+
return (
|
|
524
524
|
<CustomPropertyFormCard
|
|
525
525
|
key={`customPropertyField-${customProperty.value}-${index}`}
|
|
526
526
|
{...{
|
|
@@ -539,27 +539,27 @@ const CustomPropertiesList = <span class="cstat-no" title="statement not covered
|
|
|
539
539
|
}}
|
|
540
540
|
/>
|
|
541
541
|
);
|
|
542
|
-
}).filter(
|
|
542
|
+
}).filter(cp => cp !== undefined);
|
|
543
543
|
};
|
|
544
544
|
|
|
545
|
-
|
|
545
|
+
return (
|
|
546
546
|
<>
|
|
547
547
|
{
|
|
548
|
-
availableCustomProperties.some(
|
|
548
|
+
availableCustomProperties.some((customProperty = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> => customProperty.primary) &&
|
|
549
549
|
<KeyValue
|
|
550
|
-
label={labelOverrides.primaryProperties ??
|
|
550
|
+
label={labelOverrides.primaryProperties ?? <span class="branch-1 cbranch-no" title="branch not covered" ><FormattedMessage id="stripes-kint-components.customProperties.primaryProperties" />}</span>
|
|
551
551
|
value={renderCustomProperties('primary')}
|
|
552
552
|
/>
|
|
553
553
|
}
|
|
554
554
|
{
|
|
555
|
-
availableCustomProperties.some(
|
|
555
|
+
availableCustomProperties.some((customProperty = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> => !customProperty.primary) &&
|
|
556
556
|
<KeyValue
|
|
557
|
-
label={labelOverrides.optionalProperties ??
|
|
557
|
+
label={labelOverrides.optionalProperties ?? <span class="branch-1 cbranch-no" title="branch not covered" ><FormattedMessage id="stripes-kint-components.customProperties.optionalProperties" />}</span>
|
|
558
558
|
value={renderCustomProperties('optional')}
|
|
559
559
|
/>
|
|
560
560
|
}
|
|
561
561
|
{
|
|
562
|
-
availableCustomProperties.some(
|
|
562
|
+
availableCustomProperties.some((customProperty = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> => !customProperty.primary) &&
|
|
563
563
|
<Button
|
|
564
564
|
id="add-customproperty-btn"
|
|
565
565
|
onClick={<span class="fstat-no" title="function not covered" >()</span> => {
|
|
@@ -577,41 +577,41 @@ const CustomPropertiesList = <span class="cstat-no" title="statement not covered
|
|
|
577
577
|
);
|
|
578
578
|
};
|
|
579
579
|
|
|
580
|
-
const CustomPropertiesListField =
|
|
580
|
+
const CustomPropertiesListField = ({
|
|
581
581
|
ctx,
|
|
582
582
|
customProperties,
|
|
583
583
|
labelOverrides,
|
|
584
584
|
...fieldProps
|
|
585
585
|
}) => {
|
|
586
|
-
const fieldRef =
|
|
587
|
-
const availableCustomProperties =
|
|
586
|
+
const fieldRef = useRef();
|
|
587
|
+
const availableCustomProperties = useAvailableCustomProperties(customProperties);
|
|
588
588
|
|
|
589
|
-
const { initialValues } =
|
|
590
|
-
const getInitialValue =
|
|
591
|
-
const cps =
|
|
592
|
-
<span class="
|
|
593
|
-
.filter(
|
|
589
|
+
const { initialValues } = useFormState();
|
|
590
|
+
const getInitialValue = () => {
|
|
591
|
+
const cps = {};
|
|
592
|
+
(customProperties || <span class="branch-1 cbranch-no" title="branch not covered" >[])</span>
|
|
593
|
+
.filter(cp => cp.primary)
|
|
594
594
|
// Change default to be an ignored customProperty.
|
|
595
595
|
// This means any changes without setting the value will be ignored
|
|
596
|
-
.forEach(
|
|
596
|
+
.forEach(cp => { cps[cp.name] = [{ _delete: true }]; });
|
|
597
597
|
|
|
598
598
|
// IMPORTANT -- All customproperty ctx sections are adding to the same "initialValue" field
|
|
599
599
|
// Ensure that we don't already have initialValues for this particular set before setting them,
|
|
600
600
|
// to ensure no looping behaviour
|
|
601
|
-
|
|
602
|
-
|
|
601
|
+
if (Object.keys(cps).every(key => initialValues.customProperties?.[key] !== undefined)) {
|
|
602
|
+
return initialValues.customProperties;
|
|
603
603
|
}
|
|
604
604
|
|
|
605
605
|
// Ensure that if we already had these values in initialvalues they're not overwritten
|
|
606
|
-
|
|
606
|
+
return ({ ...cps, ...initialValues.customProperties });
|
|
607
607
|
};
|
|
608
608
|
|
|
609
|
-
|
|
609
|
+
return (
|
|
610
610
|
<Field
|
|
611
611
|
{...fieldProps}
|
|
612
612
|
initialValue={getInitialValue()}
|
|
613
|
-
render={
|
|
614
|
-
|
|
613
|
+
render={p => {
|
|
614
|
+
return (
|
|
615
615
|
<CustomPropertiesList
|
|
616
616
|
ref={fieldRef}
|
|
617
617
|
availableCustomProperties={availableCustomProperties}
|
|
@@ -625,13 +625,13 @@ const CustomPropertiesListField = <span class="cstat-no" title="statement not co
|
|
|
625
625
|
);
|
|
626
626
|
};
|
|
627
627
|
|
|
628
|
-
|
|
628
|
+
CustomPropertiesListField.propTypes = {
|
|
629
629
|
ctx: PropTypes.string,
|
|
630
630
|
customProperties: PropTypes.arrayOf(PropTypes.object),
|
|
631
631
|
labelOverrides: PropTypes.object,
|
|
632
632
|
};
|
|
633
633
|
|
|
634
|
-
|
|
634
|
+
CustomPropertiesList.propTypes = {
|
|
635
635
|
availableCustomProperties: PropTypes.arrayOf(PropTypes.object),
|
|
636
636
|
ctx: PropTypes.string,
|
|
637
637
|
input: PropTypes.shape({
|
|
@@ -652,7 +652,7 @@ export default CustomPropertiesListField;
|
|
|
652
652
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
653
653
|
Code coverage generated by
|
|
654
654
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
655
|
-
at
|
|
655
|
+
at 2022-11-22T09:57:19.883Z
|
|
656
656
|
</div>
|
|
657
657
|
<script src="../../prettify.js"></script>
|
|
658
658
|
<script>
|