@k-int/stripes-kint-components 3.2.2 → 3.2.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 +3 -0
- package/es/lib/ActionList/ActionListFieldArray.js +2 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +2 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +22 -24
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +26 -32
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +2 -2
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +39 -47
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +82 -100
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +2 -2
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +22 -28
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +69 -85
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +2 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +26 -32
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +2 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +15 -19
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +17 -21
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +129 -161
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +2 -2
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +2 -2
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +2 -2
- package/es/lib/CycleButton/CycleButton.js +2 -2
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +22 -24
- package/es/lib/EditableRefdataList/EditableRefdataList.js +25 -27
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +44 -50
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +1 -1
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +139 -163
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +9 -9
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +117 -133
- package/es/lib/IconSelect/IconSelect.js +2 -2
- package/es/lib/QueryTypedown/QueryTypedown.js +2 -2
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +1 -1
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +2 -2
- package/es/lib/RichSelect/RichSelect.js +2 -2
- package/es/lib/RichSelect/useSelectedOption.js +2 -2
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +2 -2
- package/es/lib/Typedown/Typedown.js +2 -2
- package/es/lib/hooks/settingsHooks/useAppSettings.js +1 -1
- package/es/lib/hooks/settingsHooks/useSettings.js +1 -1
- package/es/lib/hooks/typedownHooks/useTypedownData.js +2 -2
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +2 -2
- package/es/lib/hooks/useActiveElement.js +2 -2
- package/es/lib/hooks/useHelperApp.js +2 -2
- package/es/lib/hooks/useKiwtFieldArray.js +2 -2
- package/es/lib/hooks/useKiwtSASQuery.js +2 -2
- package/es/lib/hooks/useLocalStorageState.js +2 -2
- package/es/lib/hooks/useMutateCustomProperties.js +23 -29
- package/es/lib/hooks/useMutateRefdataCategory.js +21 -25
- package/es/lib/hooks/useMutateRefdataValue.js +30 -34
- package/es/lib/hooks/useQIndex.js +2 -2
- package/es/lib/hooks/useSASQQueryMeta.js +1 -1
- package/es/lib/utils/generateKiwtQueryParams.js +2 -2
- package/es/lib/utils/groupCustomPropertiesByCtx.js +1 -1
- package/es/lib/utils/highlightString.js +2 -2
- package/es/lib/utils/parseErrorResponse.js +42 -44
- package/junit.xml +1492 -222
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +12 -3
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +53 -14
- 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 +42 -42
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +166 -88
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +58 -58
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +27 -27
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +53 -53
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +26 -26
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +90 -90
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +116 -116
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +26 -26
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +64 -64
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +31 -31
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +48 -48
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +20 -20
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +43 -43
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +96 -96
- 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 +5 -5
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +35 -35
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +37 -37
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +35 -35
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +14 -14
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +43 -43
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +5 -5
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +31 -31
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +96 -9
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +152 -29
- 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 +13 -4
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +29 -20
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +37 -37
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +62 -62
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +85 -70
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +43 -43
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +21 -21
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +30 -30
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +21 -21
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +23 -8
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +52 -52
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +21 -21
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +11 -2
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +58 -10
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +1 -1
- 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 +16 -4
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +20 -8
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +12 -12
- 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/hooks/index.html +34 -34
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +2 -5
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +30 -18
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +24 -24
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +38 -38
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/index.html +161 -146
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.html +161 -0
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.js.html +94 -0
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useAppSettings.js.html +292 -0
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettingSection.js.html +211 -0
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettings.js.html +466 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +4 -4
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +22 -22
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +42 -57
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +2 -35
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +161 -80
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +45 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +16 -16
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/validators/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/validators/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/validators/validators.js.html +370 -0
- package/src/artifacts/coverage-jest/lcov.info +1843 -1735
- package/src/lib/CustomProperties/View/CustomPropertyCard.js +3 -3
|
@@ -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">6.89% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>2/29</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>0/23</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>0/4</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">7.4% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>2/27</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 low'></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>
|
|
@@ -151,56 +151,56 @@
|
|
|
151
151
|
<span class="cline-any cline-neutral"> </span>
|
|
152
152
|
<span class="cline-any cline-neutral"> </span>
|
|
153
153
|
<span class="cline-any cline-neutral"> </span>
|
|
154
|
-
<span class="cline-any cline-
|
|
154
|
+
<span class="cline-any cline-no"> </span>
|
|
155
155
|
<span class="cline-any cline-neutral"> </span>
|
|
156
|
-
<span class="cline-any cline-
|
|
156
|
+
<span class="cline-any cline-no"> </span>
|
|
157
157
|
<span class="cline-any cline-neutral"> </span>
|
|
158
|
-
<span class="cline-any cline-
|
|
158
|
+
<span class="cline-any cline-no"> </span>
|
|
159
159
|
<span class="cline-any cline-neutral"> </span>
|
|
160
160
|
<span class="cline-any cline-neutral"> </span>
|
|
161
161
|
<span class="cline-any cline-neutral"> </span>
|
|
162
162
|
<span class="cline-any cline-neutral"> </span>
|
|
163
|
-
<span class="cline-any cline-
|
|
164
|
-
<span class="cline-any cline-
|
|
163
|
+
<span class="cline-any cline-no"> </span>
|
|
164
|
+
<span class="cline-any cline-no"> </span>
|
|
165
165
|
<span class="cline-any cline-neutral"> </span>
|
|
166
|
-
<span class="cline-any cline-
|
|
167
|
-
<span class="cline-any cline-
|
|
166
|
+
<span class="cline-any cline-no"> </span>
|
|
167
|
+
<span class="cline-any cline-no"> </span>
|
|
168
168
|
<span class="cline-any cline-neutral"> </span>
|
|
169
169
|
<span class="cline-any cline-neutral"> </span>
|
|
170
|
-
<span class="cline-any cline-
|
|
171
|
-
<span class="cline-any cline-
|
|
172
|
-
<span class="cline-any cline-
|
|
170
|
+
<span class="cline-any cline-no"> </span>
|
|
171
|
+
<span class="cline-any cline-no"> </span>
|
|
172
|
+
<span class="cline-any cline-no"> </span>
|
|
173
173
|
<span class="cline-any cline-neutral"> </span>
|
|
174
174
|
<span class="cline-any cline-neutral"> </span>
|
|
175
|
-
<span class="cline-any cline-
|
|
175
|
+
<span class="cline-any cline-no"> </span>
|
|
176
176
|
<span class="cline-any cline-neutral"> </span>
|
|
177
177
|
<span class="cline-any cline-neutral"> </span>
|
|
178
|
-
<span class="cline-any cline-
|
|
179
|
-
<span class="cline-any cline-
|
|
178
|
+
<span class="cline-any cline-no"> </span>
|
|
179
|
+
<span class="cline-any cline-no"> </span>
|
|
180
180
|
<span class="cline-any cline-neutral"> </span>
|
|
181
181
|
<span class="cline-any cline-neutral"> </span>
|
|
182
|
-
<span class="cline-any cline-
|
|
183
|
-
<span class="cline-any cline-
|
|
182
|
+
<span class="cline-any cline-no"> </span>
|
|
183
|
+
<span class="cline-any cline-no"> </span>
|
|
184
184
|
<span class="cline-any cline-neutral"> </span>
|
|
185
185
|
<span class="cline-any cline-neutral"> </span>
|
|
186
|
-
<span class="cline-any cline-
|
|
186
|
+
<span class="cline-any cline-no"> </span>
|
|
187
187
|
<span class="cline-any cline-neutral"> </span>
|
|
188
188
|
<span class="cline-any cline-neutral"> </span>
|
|
189
|
-
<span class="cline-any cline-
|
|
190
|
-
<span class="cline-any cline-
|
|
191
|
-
<span class="cline-any cline-
|
|
189
|
+
<span class="cline-any cline-no"> </span>
|
|
190
|
+
<span class="cline-any cline-no"> </span>
|
|
191
|
+
<span class="cline-any cline-no"> </span>
|
|
192
192
|
<span class="cline-any cline-neutral"> </span>
|
|
193
|
-
<span class="cline-any cline-
|
|
193
|
+
<span class="cline-any cline-no"> </span>
|
|
194
194
|
<span class="cline-any cline-neutral"> </span>
|
|
195
195
|
<span class="cline-any cline-neutral"> </span>
|
|
196
|
-
<span class="cline-any cline-
|
|
197
|
-
<span class="cline-any cline-
|
|
196
|
+
<span class="cline-any cline-no"> </span>
|
|
197
|
+
<span class="cline-any cline-no"> </span>
|
|
198
198
|
<span class="cline-any cline-neutral"> </span>
|
|
199
199
|
<span class="cline-any cline-neutral"> </span>
|
|
200
|
-
<span class="cline-any cline-
|
|
201
|
-
<span class="cline-any cline-
|
|
200
|
+
<span class="cline-any cline-no"> </span>
|
|
201
|
+
<span class="cline-any cline-no"> </span>
|
|
202
202
|
<span class="cline-any cline-neutral"> </span>
|
|
203
|
-
<span class="cline-any cline-
|
|
203
|
+
<span class="cline-any cline-no"> </span>
|
|
204
204
|
<span class="cline-any cline-neutral"> </span>
|
|
205
205
|
<span class="cline-any cline-neutral"> </span>
|
|
206
206
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -219,64 +219,64 @@
|
|
|
219
219
|
|
|
220
220
|
import { useKintIntl } from '../../hooks';
|
|
221
221
|
|
|
222
|
-
const RenderSettingValue = (
|
|
222
|
+
const RenderSettingValue = <span class="fstat-no" title="function not covered" >(p</span>rops) => {
|
|
223
223
|
const {
|
|
224
224
|
currentSetting: setting,
|
|
225
225
|
intlKey: passedIntlKey,
|
|
226
226
|
intlNS: passedIntlNS,
|
|
227
|
-
labelOverrides = {}
|
|
227
|
+
labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
228
228
|
refdata, // TODO ... can we get away without passing these in now, using useRefdata?
|
|
229
229
|
templates // TODO ... can we get away without passing these in now, using useTemplates?
|
|
230
|
-
} = props
|
|
230
|
+
} = <span class="cstat-no" title="statement not covered" >props;</span>
|
|
231
231
|
|
|
232
|
-
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS)
|
|
232
|
+
const kintIntl = <span class="cstat-no" title="statement not covered" >useKintIntl(passedIntlKey, passedIntlNS);</span>
|
|
233
233
|
|
|
234
|
-
const NoCurrentValue = kintIntl.formatKintMessage({
|
|
234
|
+
const NoCurrentValue = <span class="cstat-no" title="statement not covered" >kintIntl.formatKintMessage({</span>
|
|
235
235
|
id: 'settings.noCurrentValue',
|
|
236
236
|
overrideValue: labelOverrides?.noCurrentValue
|
|
237
237
|
});
|
|
238
238
|
|
|
239
|
-
const defaultText =
|
|
240
|
-
switch (setting.settingType) {
|
|
239
|
+
const defaultText = <span class="cstat-no" title="statement not covered" >`[${kintIntl.formatKintMessage({ id: 'settings.default', overrideValue: labelOverrides?.default })}]`;</span>
|
|
240
|
+
<span class="cstat-no" title="statement not covered" > switch (setting.settingType) {</span>
|
|
241
241
|
case 'Refdata': {
|
|
242
|
-
if (setting.value) {
|
|
243
|
-
return refdata?.filter((
|
|
242
|
+
<span class="cstat-no" title="statement not covered" > if (setting.value) {</span>
|
|
243
|
+
<span class="cstat-no" title="statement not covered" > return refdata?.filter(<span class="fstat-no" title="function not covered" >(o</span>bj) => <span class="cstat-no" title="statement not covered" >obj.value === setting.value)</span>[0]?.label ?? null;</span>
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
if (setting.defValue) {
|
|
247
|
-
const defValue = refdata?.filter((
|
|
248
|
-
return `${defaultText} ${defValue}
|
|
246
|
+
<span class="cstat-no" title="statement not covered" > if (setting.defValue) {</span>
|
|
247
|
+
const defValue = <span class="cstat-no" title="statement not covered" >refdata?.filter(<span class="fstat-no" title="function not covered" >(o</span>bj) => <span class="cstat-no" title="statement not covered" >obj.value === setting.defValue)</span>[0]?.label;</span>
|
|
248
|
+
<span class="cstat-no" title="statement not covered" > return `${defaultText} ${defValue}`;</span>
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
return NoCurrentValue
|
|
251
|
+
<span class="cstat-no" title="statement not covered" > return NoCurrentValue;</span>
|
|
252
252
|
}
|
|
253
253
|
case 'Password': {
|
|
254
|
-
if (setting.value) {
|
|
255
|
-
return '********'
|
|
254
|
+
<span class="cstat-no" title="statement not covered" > if (setting.value) {</span>
|
|
255
|
+
<span class="cstat-no" title="statement not covered" > return '********';</span>
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
if (setting.defValue) {
|
|
259
|
-
return `${defaultText}
|
|
258
|
+
<span class="cstat-no" title="statement not covered" > if (setting.defValue) {</span>
|
|
259
|
+
<span class="cstat-no" title="statement not covered" > return `${defaultText} ********`;</span>
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
return NoCurrentValue
|
|
262
|
+
<span class="cstat-no" title="statement not covered" > return NoCurrentValue;</span>
|
|
263
263
|
}
|
|
264
264
|
case 'Template': {
|
|
265
|
-
const templateValue = templates.filter((
|
|
266
|
-
const settingId = setting.value || setting.defValue
|
|
267
|
-
return obj.id === settingId
|
|
265
|
+
const templateValue = <span class="cstat-no" title="statement not covered" >templates.filter(<span class="fstat-no" title="function not covered" >(o</span>bj) => {</span>
|
|
266
|
+
const settingId = <span class="cstat-no" title="statement not covered" >setting.value || setting.defValue;</span>
|
|
267
|
+
<span class="cstat-no" title="statement not covered" > return obj.id === settingId;</span>
|
|
268
268
|
})[0];
|
|
269
|
-
return templateValue?.name || NoCurrentValue
|
|
269
|
+
<span class="cstat-no" title="statement not covered" > return templateValue?.name || NoCurrentValue;</span>
|
|
270
270
|
}
|
|
271
271
|
default: {
|
|
272
|
-
if (setting.value) {
|
|
273
|
-
return setting.value
|
|
272
|
+
<span class="cstat-no" title="statement not covered" > if (setting.value) {</span>
|
|
273
|
+
<span class="cstat-no" title="statement not covered" > return setting.value;</span>
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
if (setting.defValue) {
|
|
277
|
-
return `${defaultText} ${setting.defValue}
|
|
276
|
+
<span class="cstat-no" title="statement not covered" > if (setting.defValue) {</span>
|
|
277
|
+
<span class="cstat-no" title="statement not covered" > return `${defaultText} ${setting.defValue}`;</span>
|
|
278
278
|
}
|
|
279
|
-
return NoCurrentValue
|
|
279
|
+
<span class="cstat-no" title="statement not covered" > return NoCurrentValue;</span>
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
};
|
|
@@ -298,7 +298,7 @@ export default RenderSettingValue;
|
|
|
298
298
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
299
299
|
Code coverage generated by
|
|
300
300
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
301
|
-
at 2023-
|
|
301
|
+
at 2023-03-21T17:34:57.995Z
|
|
302
302
|
</div>
|
|
303
303
|
<script src="../../prettify.js"></script>
|
|
304
304
|
<script>
|
|
@@ -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">5.55% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>2/36</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>0/21</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>0/16</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">5.55% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>2/36</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 low'></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>
|
|
@@ -221,7 +221,12 @@
|
|
|
221
221
|
<a name='L156'></a><a href='#L156'>156</a>
|
|
222
222
|
<a name='L157'></a><a href='#L157'>157</a>
|
|
223
223
|
<a name='L158'></a><a href='#L158'>158</a>
|
|
224
|
-
<a name='L159'></a><a href='#L159'>159</a
|
|
224
|
+
<a name='L159'></a><a href='#L159'>159</a>
|
|
225
|
+
<a name='L160'></a><a href='#L160'>160</a>
|
|
226
|
+
<a name='L161'></a><a href='#L161'>161</a>
|
|
227
|
+
<a name='L162'></a><a href='#L162'>162</a>
|
|
228
|
+
<a name='L163'></a><a href='#L163'>163</a>
|
|
229
|
+
<a name='L164'></a><a href='#L164'>164</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
225
230
|
<span class="cline-any cline-neutral"> </span>
|
|
226
231
|
<span class="cline-any cline-neutral"> </span>
|
|
227
232
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -247,17 +252,18 @@
|
|
|
247
252
|
<span class="cline-any cline-neutral"> </span>
|
|
248
253
|
<span class="cline-any cline-neutral"> </span>
|
|
249
254
|
<span class="cline-any cline-neutral"> </span>
|
|
250
|
-
<span class="cline-any cline-yes">5x</span>
|
|
251
255
|
<span class="cline-any cline-neutral"> </span>
|
|
252
|
-
<span class="cline-any cline-
|
|
253
|
-
<span class="cline-any cline-
|
|
254
|
-
<span class="cline-any cline-
|
|
256
|
+
<span class="cline-any cline-no"> </span>
|
|
257
|
+
<span class="cline-any cline-neutral"> </span>
|
|
258
|
+
<span class="cline-any cline-no"> </span>
|
|
259
|
+
<span class="cline-any cline-no"> </span>
|
|
260
|
+
<span class="cline-any cline-no"> </span>
|
|
255
261
|
<span class="cline-any cline-neutral"> </span>
|
|
256
262
|
<span class="cline-any cline-neutral"> </span>
|
|
257
263
|
<span class="cline-any cline-neutral"> </span>
|
|
258
264
|
<span class="cline-any cline-neutral"> </span>
|
|
259
265
|
<span class="cline-any cline-neutral"> </span>
|
|
260
|
-
<span class="cline-any cline-
|
|
266
|
+
<span class="cline-any cline-no"> </span>
|
|
261
267
|
<span class="cline-any cline-neutral"> </span>
|
|
262
268
|
<span class="cline-any cline-neutral"> </span>
|
|
263
269
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -265,7 +271,7 @@
|
|
|
265
271
|
<span class="cline-any cline-neutral"> </span>
|
|
266
272
|
<span class="cline-any cline-neutral"> </span>
|
|
267
273
|
<span class="cline-any cline-neutral"> </span>
|
|
268
|
-
<span class="cline-any cline-
|
|
274
|
+
<span class="cline-any cline-no"> </span>
|
|
269
275
|
<span class="cline-any cline-neutral"> </span>
|
|
270
276
|
<span class="cline-any cline-neutral"> </span>
|
|
271
277
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -273,7 +279,7 @@
|
|
|
273
279
|
<span class="cline-any cline-neutral"> </span>
|
|
274
280
|
<span class="cline-any cline-neutral"> </span>
|
|
275
281
|
<span class="cline-any cline-neutral"> </span>
|
|
276
|
-
<span class="cline-any cline-
|
|
282
|
+
<span class="cline-any cline-no"> </span>
|
|
277
283
|
<span class="cline-any cline-no"> </span>
|
|
278
284
|
<span class="cline-any cline-neutral"> </span>
|
|
279
285
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -296,22 +302,23 @@
|
|
|
296
302
|
<span class="cline-any cline-neutral"> </span>
|
|
297
303
|
<span class="cline-any cline-neutral"> </span>
|
|
298
304
|
<span class="cline-any cline-neutral"> </span>
|
|
299
|
-
<span class="cline-any cline-
|
|
300
|
-
<span class="cline-any cline-
|
|
305
|
+
<span class="cline-any cline-no"> </span>
|
|
306
|
+
<span class="cline-any cline-no"> </span>
|
|
301
307
|
<span class="cline-any cline-neutral"> </span>
|
|
302
308
|
<span class="cline-any cline-neutral"> </span>
|
|
303
309
|
<span class="cline-any cline-neutral"> </span>
|
|
304
310
|
<span class="cline-any cline-neutral"> </span>
|
|
305
311
|
<span class="cline-any cline-neutral"> </span>
|
|
306
312
|
<span class="cline-any cline-neutral"> </span>
|
|
307
|
-
<span class="cline-any cline-
|
|
313
|
+
<span class="cline-any cline-no"> </span>
|
|
314
|
+
<span class="cline-any cline-no"> </span>
|
|
308
315
|
<span class="cline-any cline-neutral"> </span>
|
|
309
316
|
<span class="cline-any cline-neutral"> </span>
|
|
310
317
|
<span class="cline-any cline-neutral"> </span>
|
|
311
|
-
<span class="cline-any cline-
|
|
312
|
-
<span class="cline-any cline-
|
|
318
|
+
<span class="cline-any cline-no"> </span>
|
|
319
|
+
<span class="cline-any cline-no"> </span>
|
|
313
320
|
<span class="cline-any cline-neutral"> </span>
|
|
314
|
-
<span class="cline-any cline-
|
|
321
|
+
<span class="cline-any cline-no"> </span>
|
|
315
322
|
<span class="cline-any cline-neutral"> </span>
|
|
316
323
|
<span class="cline-any cline-neutral"> </span>
|
|
317
324
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -320,19 +327,21 @@
|
|
|
320
327
|
<span class="cline-any cline-neutral"> </span>
|
|
321
328
|
<span class="cline-any cline-neutral"> </span>
|
|
322
329
|
<span class="cline-any cline-neutral"> </span>
|
|
330
|
+
<span class="cline-any cline-no"> </span>
|
|
323
331
|
<span class="cline-any cline-neutral"> </span>
|
|
324
332
|
<span class="cline-any cline-neutral"> </span>
|
|
325
|
-
<span class="cline-any cline-yes">5x</span>
|
|
326
|
-
<span class="cline-any cline-yes">4x</span>
|
|
327
333
|
<span class="cline-any cline-neutral"> </span>
|
|
328
|
-
<span class="cline-any cline-
|
|
334
|
+
<span class="cline-any cline-no"> </span>
|
|
335
|
+
<span class="cline-any cline-no"> </span>
|
|
336
|
+
<span class="cline-any cline-neutral"> </span>
|
|
337
|
+
<span class="cline-any cline-no"> </span>
|
|
329
338
|
<span class="cline-any cline-neutral"> </span>
|
|
330
339
|
<span class="cline-any cline-neutral"> </span>
|
|
331
|
-
<span class="cline-any cline-
|
|
340
|
+
<span class="cline-any cline-no"> </span>
|
|
332
341
|
<span class="cline-any cline-neutral"> </span>
|
|
333
342
|
<span class="cline-any cline-neutral"> </span>
|
|
334
|
-
<span class="cline-any cline-
|
|
335
|
-
<span class="cline-any cline-
|
|
343
|
+
<span class="cline-any cline-no"> </span>
|
|
344
|
+
<span class="cline-any cline-no"> </span>
|
|
336
345
|
<span class="cline-any cline-neutral"> </span>
|
|
337
346
|
<span class="cline-any cline-neutral"> </span>
|
|
338
347
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -340,7 +349,7 @@
|
|
|
340
349
|
<span class="cline-any cline-neutral"> </span>
|
|
341
350
|
<span class="cline-any cline-neutral"> </span>
|
|
342
351
|
<span class="cline-any cline-neutral"> </span>
|
|
343
|
-
<span class="cline-any cline-
|
|
352
|
+
<span class="cline-any cline-no"> </span>
|
|
344
353
|
<span class="cline-any cline-neutral"> </span>
|
|
345
354
|
<span class="cline-any cline-neutral"> </span>
|
|
346
355
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -349,7 +358,7 @@
|
|
|
349
358
|
<span class="cline-any cline-neutral"> </span>
|
|
350
359
|
<span class="cline-any cline-neutral"> </span>
|
|
351
360
|
<span class="cline-any cline-neutral"> </span>
|
|
352
|
-
<span class="cline-any cline-
|
|
361
|
+
<span class="cline-any cline-no"> </span>
|
|
353
362
|
<span class="cline-any cline-neutral"> </span>
|
|
354
363
|
<span class="cline-any cline-neutral"> </span>
|
|
355
364
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -379,6 +388,7 @@
|
|
|
379
388
|
<span class="cline-any cline-neutral"> </span>
|
|
380
389
|
<span class="cline-any cline-neutral"> </span>
|
|
381
390
|
<span class="cline-any cline-neutral"> </span>
|
|
391
|
+
<span class="cline-any cline-neutral"> </span>
|
|
382
392
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useContext, useState } from 'react';
|
|
383
393
|
import PropTypes from 'prop-types';
|
|
384
394
|
|
|
@@ -396,42 +406,43 @@ import { toCamelCase } from '../../utils';
|
|
|
396
406
|
|
|
397
407
|
import renderHelpTextCSS from '../../../../styles/renderHelpText.css';
|
|
398
408
|
|
|
399
|
-
const SettingField = (
|
|
409
|
+
const SettingField = <span class="fstat-no" title="function not covered" >(s</span>ettingFieldProps) => {
|
|
400
410
|
const {
|
|
411
|
+
allowEdit = <span class="branch-0 cbranch-no" title="branch not covered" >true,</span>
|
|
401
412
|
intlKey: passedIntlKey,
|
|
402
413
|
intlNS: passedIntlNS,
|
|
403
|
-
labelOverrides = {}
|
|
414
|
+
labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
404
415
|
onSave,
|
|
405
416
|
settingData: {
|
|
406
417
|
currentSetting
|
|
407
418
|
} = <span class="branch-0 cbranch-no" title="branch not covered" >{}</span>
|
|
408
|
-
} = settingFieldProps
|
|
419
|
+
} = <span class="cstat-no" title="statement not covered" >settingFieldProps;</span>
|
|
409
420
|
|
|
410
|
-
const [editing, setEditing] = useState(false)
|
|
411
|
-
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS)
|
|
412
|
-
const { refdataEndpoint, templateEndpoint } = useContext(SettingsContext)
|
|
421
|
+
const [editing, setEditing] = <span class="cstat-no" title="statement not covered" >useState(false);</span>
|
|
422
|
+
const kintIntl = <span class="cstat-no" title="statement not covered" >useKintIntl(passedIntlKey, passedIntlNS);</span>
|
|
423
|
+
const { refdataEndpoint, templateEndpoint } = <span class="cstat-no" title="statement not covered" >useContext(SettingsContext);</span>
|
|
413
424
|
|
|
414
425
|
const {
|
|
415
426
|
0: {
|
|
416
427
|
values: refdata = <span class="branch-0 cbranch-no" title="branch not covered" >[]</span>
|
|
417
428
|
} = <span class="branch-0 cbranch-no" title="branch not covered" >{}</span>
|
|
418
|
-
} = useRefdata({
|
|
429
|
+
} = <span class="cstat-no" title="statement not covered" >useRefdata({</span>
|
|
419
430
|
endpoint: refdataEndpoint,
|
|
420
431
|
desc: currentSetting.vocab,
|
|
421
432
|
queryParams: {
|
|
422
|
-
enabled: !!currentSetting?.vocab &&
|
|
433
|
+
enabled: !!currentSetting?.vocab && currentSetting.settingType === 'Refdata'
|
|
423
434
|
}
|
|
424
435
|
});
|
|
425
436
|
|
|
426
|
-
const templates = useTemplates({
|
|
437
|
+
const templates = <span class="cstat-no" title="statement not covered" >useTemplates({</span>
|
|
427
438
|
context: currentSetting.vocab,
|
|
428
439
|
endpoint: templateEndpoint,
|
|
429
440
|
queryParams: {
|
|
430
|
-
enabled: !!currentSetting?.vocab &&
|
|
441
|
+
enabled: !!currentSetting?.vocab && currentSetting.settingType === 'Template'
|
|
431
442
|
}
|
|
432
443
|
});
|
|
433
444
|
|
|
434
|
-
const renderHelpText = <span class="fstat-no" title="function not covered" >(h</span>elpTextId) => {
|
|
445
|
+
const renderHelpText = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(h</span>elpTextId) => {</span>
|
|
435
446
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
436
447
|
<div className={renderHelpTextCSS.help}>
|
|
437
448
|
{
|
|
@@ -454,60 +465,63 @@ const SettingField = (settingFieldProps) => {
|
|
|
454
465
|
);
|
|
455
466
|
};
|
|
456
467
|
|
|
457
|
-
const renderEditButton = () => {
|
|
458
|
-
const EditText = editing
|
|
468
|
+
const renderEditButton = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
469
|
+
const EditText = <span class="cstat-no" title="statement not covered" >editing ?</span>
|
|
459
470
|
kintIntl.formatKintMessage({
|
|
460
471
|
id: 'save'
|
|
461
472
|
}) :
|
|
462
473
|
kintIntl.formatKintMessage({
|
|
463
474
|
id: 'edit'
|
|
464
475
|
});
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
e
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
476
|
+
<span class="cstat-no" title="statement not covered" > if (allowEdit) {</span>
|
|
477
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
478
|
+
<Button
|
|
479
|
+
marginBottom0
|
|
480
|
+
onClick={<span class="fstat-no" title="function not covered" >(e</span>) => {
|
|
481
|
+
<span class="cstat-no" title="statement not covered" > e.preventDefault();</span>
|
|
482
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
483
|
+
editing ?
|
|
484
|
+
onSave().then(<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setEditing(false))</span> :
|
|
485
|
+
setEditing(true)
|
|
486
|
+
);
|
|
487
|
+
}}
|
|
488
|
+
>
|
|
489
|
+
{EditText}
|
|
490
|
+
</Button>
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
<span class="cstat-no" title="statement not covered" > return null;</span>
|
|
480
494
|
};
|
|
481
495
|
|
|
482
496
|
let RenderFunction;
|
|
483
|
-
if (editing === false) {
|
|
484
|
-
RenderFunction = RenderSettingValue
|
|
497
|
+
<span class="cstat-no" title="statement not covered" > if (editing === false) {</span>
|
|
498
|
+
<span class="cstat-no" title="statement not covered" > RenderFunction = RenderSettingValue;</span>
|
|
485
499
|
} else {
|
|
486
|
-
RenderFunction = EditSettingValue
|
|
500
|
+
<span class="cstat-no" title="statement not covered" > RenderFunction = EditSettingValue;</span>
|
|
487
501
|
}
|
|
488
502
|
|
|
489
|
-
const id =
|
|
503
|
+
const id = <span class="cstat-no" title="statement not covered" >`settings.${toCamelCase(currentSetting.section)}.${toCamelCase(currentSetting.key)}.help`;</span>
|
|
490
504
|
|
|
491
505
|
|
|
492
|
-
const renderHeaderStart = () => {
|
|
493
|
-
const settingName = Object.keys(currentSetting).length > 0
|
|
506
|
+
const renderHeaderStart = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
507
|
+
const settingName = <span class="cstat-no" title="statement not covered" >Object.keys(currentSetting).length > 0 ?</span>
|
|
494
508
|
kintIntl.formatKintMessage({
|
|
495
509
|
id: `settings.${toCamelCase(currentSetting.section)}.${toCamelCase(currentSetting.key)}`
|
|
496
510
|
}) :
|
|
497
|
-
|
|
511
|
+
kintIntl.formatKintMessage({
|
|
498
512
|
id: 'loading'
|
|
499
513
|
});
|
|
500
514
|
|
|
501
|
-
return (
|
|
515
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
502
516
|
<>
|
|
503
517
|
{
|
|
504
|
-
kintIntl.messageExists(id) &&
|
|
518
|
+
kintIntl.messageExists(id) && <InfoPopover content={renderHelpText(id)} />}
|
|
505
519
|
{settingName}
|
|
506
520
|
</>
|
|
507
521
|
);
|
|
508
522
|
};
|
|
509
523
|
|
|
510
|
-
return (
|
|
524
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
511
525
|
<Card
|
|
512
526
|
headerEnd={renderEditButton()}
|
|
513
527
|
headerStart={renderHeaderStart()}
|
|
@@ -527,6 +541,7 @@ const SettingField = (settingFieldProps) => {
|
|
|
527
541
|
};
|
|
528
542
|
|
|
529
543
|
SettingField.propTypes = {
|
|
544
|
+
allowEdit: PropTypes.bool,
|
|
530
545
|
settingData: PropTypes.shape({
|
|
531
546
|
refdatavalues: PropTypes.arrayOf(PropTypes.object),
|
|
532
547
|
currentSetting: PropTypes.object,
|
|
@@ -544,7 +559,7 @@ export default SettingField;
|
|
|
544
559
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
545
560
|
Code coverage generated by
|
|
546
561
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
547
|
-
at 2023-
|
|
562
|
+
at 2023-03-21T17:34:57.995Z
|
|
548
563
|
</div>
|
|
549
564
|
<script src="../../prettify.js"></script>
|
|
550
565
|
<script>
|