@k-int/stripes-kint-components 2.8.4 → 2.8.6
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 +7 -0
- package/es/lib/ActionList/ActionList.js +3 -1
- package/es/lib/ActionList/ActionListFieldArray.js +4 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +5 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +4 -1
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +6 -4
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +5 -3
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +1 -1
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +1 -1
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +5 -3
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +4 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +4 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +5 -2
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +5 -3
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +3 -1
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +4 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +5 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +5 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +4 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +5 -3
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +4 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +1 -1
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +4 -1
- package/es/lib/CycleButton/CycleButton.js +5 -2
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +6 -4
- package/es/lib/EditableRefdataList/EditableRefdataList.js +6 -4
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +4 -1
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +1 -1
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +1 -1
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +4 -2
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +1 -1
- package/es/lib/FormModal/FormModal.js +4 -1
- package/es/lib/IconSelect/IconSelect.js +4 -2
- package/es/lib/QueryTypedown/QueryTypedown.js +4 -2
- package/es/lib/RefdataButtons/RefdataButtons.js +4 -1
- package/es/lib/RichSelect/RichSelect.js +5 -2
- package/es/lib/RichSelect/useSelectedOption.js +1 -1
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +5 -2
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +4 -1
- package/es/lib/SASQRoute/SASQRoute.js +4 -1
- package/es/lib/SASQViewComponent/SASQViewComponent.js +4 -1
- package/es/lib/SearchField/SearchField.js +4 -1
- package/es/lib/Typedown/Typedown.js +1 -1
- package/es/lib/hooks/settingsHooks/useSettings.js +3 -1
- package/es/lib/hooks/typedownHooks/useTypedownData.js +1 -1
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +1 -1
- package/es/lib/hooks/useActiveElement.js +1 -1
- package/es/lib/hooks/useAvailableCustomProperties.js +1 -1
- package/es/lib/hooks/useCustomProperties.js +4 -1
- package/es/lib/hooks/useHelperApp.js +4 -2
- package/es/lib/hooks/useKiwtFieldArray.js +5 -2
- package/es/lib/hooks/useKiwtSASQuery.js +4 -2
- package/es/lib/hooks/useLocalStorageState.js +1 -1
- package/es/lib/hooks/useMutateCustomProperties.js +1 -1
- package/es/lib/hooks/useMutateRefdataCategory.js +4 -2
- package/es/lib/hooks/useMutateRefdataValue.js +1 -1
- package/es/lib/hooks/useQIndex.js +4 -2
- package/es/lib/utils/generateKiwtQueryParams.js +1 -1
- package/es/lib/utils/groupCustomPropertiesByCtx.js +4 -1
- package/es/lib/utils/highlightString.js +1 -1
- package/es/lib/utils/parseErrorResponse.js +23 -19
- package/junit.xml +150 -150
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +23 -5
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +324 -48
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +7 -7
- 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 +171 -39
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +271 -52
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +293 -74
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +126 -54
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +41 -56
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +23 -5
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +54 -42
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +213 -54
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +260 -41
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +41 -68
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +53 -53
- 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 +62 -3065
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +45 -45
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +103 -64
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +54 -63
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +49 -16
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +69 -18
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +81 -81
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +33 -786
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +45 -45
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +6 -6
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +43 -28
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +20 -2
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +52 -46
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +53 -74
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +25 -25
- 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 +86 -32
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +109 -37
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +41 -14
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +45 -6
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +47 -11
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +65 -14
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +154 -31
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +26 -26
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +18 -18
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +35 -17
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +15 -15
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
- 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 +67 -34
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +49 -7
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +36 -12
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +24 -81
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +3 -3
- 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 +146 -14
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +31 -4
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +53 -8
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +65 -11
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +24 -27
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +47 -17
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +22 -22
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
- 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 +151 -106
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +12 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +25 -25
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +61 -22
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +37 -37
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/index.html +166 -136
- 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 +240 -90
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +62 -62
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +39 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +11 -8
- package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +280 -0
- 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 +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 +124 -76
- package/src/artifacts/coverage-jest/lcov.info +2706 -2419
- package/src/lib/utils/parseErrorResponse.js +3 -2
- package/translations/stripes-kint-components/de.json +41 -41
- package/translations/stripes-kint-components/ja.json +45 -45
- package/translations/stripes-kint-components/ko.json +49 -49
- package/yarn-error.log +0 -147
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">88.88% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>8/9</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -160,7 +160,19 @@
|
|
|
160
160
|
<a name='L95'></a><a href='#L95'>95</a>
|
|
161
161
|
<a name='L96'></a><a href='#L96'>96</a>
|
|
162
162
|
<a name='L97'></a><a href='#L97'>97</a>
|
|
163
|
-
<a name='L98'></a><a href='#L98'>98</a
|
|
163
|
+
<a name='L98'></a><a href='#L98'>98</a>
|
|
164
|
+
<a name='L99'></a><a href='#L99'>99</a>
|
|
165
|
+
<a name='L100'></a><a href='#L100'>100</a>
|
|
166
|
+
<a name='L101'></a><a href='#L101'>101</a>
|
|
167
|
+
<a name='L102'></a><a href='#L102'>102</a>
|
|
168
|
+
<a name='L103'></a><a href='#L103'>103</a>
|
|
169
|
+
<a name='L104'></a><a href='#L104'>104</a>
|
|
170
|
+
<a name='L105'></a><a href='#L105'>105</a>
|
|
171
|
+
<a name='L106'></a><a href='#L106'>106</a>
|
|
172
|
+
<a name='L107'></a><a href='#L107'>107</a>
|
|
173
|
+
<a name='L108'></a><a href='#L108'>108</a>
|
|
174
|
+
<a name='L109'></a><a href='#L109'>109</a>
|
|
175
|
+
<a name='L110'></a><a href='#L110'>110</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
164
176
|
<span class="cline-any cline-neutral"> </span>
|
|
165
177
|
<span class="cline-any cline-neutral"> </span>
|
|
166
178
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -171,16 +183,24 @@
|
|
|
171
183
|
<span class="cline-any cline-neutral"> </span>
|
|
172
184
|
<span class="cline-any cline-neutral"> </span>
|
|
173
185
|
<span class="cline-any cline-neutral"> </span>
|
|
174
|
-
<span class="cline-any cline-yes">
|
|
186
|
+
<span class="cline-any cline-yes">1x</span>
|
|
187
|
+
<span class="cline-any cline-neutral"> </span>
|
|
188
|
+
<span class="cline-any cline-neutral"> </span>
|
|
189
|
+
<span class="cline-any cline-neutral"> </span>
|
|
175
190
|
<span class="cline-any cline-neutral"> </span>
|
|
176
191
|
<span class="cline-any cline-neutral"> </span>
|
|
177
192
|
<span class="cline-any cline-neutral"> </span>
|
|
178
193
|
<span class="cline-any cline-neutral"> </span>
|
|
179
194
|
<span class="cline-any cline-neutral"> </span>
|
|
180
195
|
<span class="cline-any cline-yes">16x</span>
|
|
196
|
+
<span class="cline-any cline-neutral"> </span>
|
|
181
197
|
<span class="cline-any cline-yes">16x</span>
|
|
198
|
+
<span class="cline-any cline-neutral"> </span>
|
|
182
199
|
<span class="cline-any cline-yes">16x</span>
|
|
183
200
|
<span class="cline-any cline-neutral"> </span>
|
|
201
|
+
<span class="cline-any cline-neutral"> </span>
|
|
202
|
+
<span class="cline-any cline-neutral"> </span>
|
|
203
|
+
<span class="cline-any cline-neutral"> </span>
|
|
184
204
|
<span class="cline-any cline-yes">16x</span>
|
|
185
205
|
<span class="cline-any cline-neutral"> </span>
|
|
186
206
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -242,7 +262,11 @@
|
|
|
242
262
|
<span class="cline-any cline-neutral"> </span>
|
|
243
263
|
<span class="cline-any cline-neutral"> </span>
|
|
244
264
|
<span class="cline-any cline-neutral"> </span>
|
|
245
|
-
<span class="cline-any cline-yes">
|
|
265
|
+
<span class="cline-any cline-yes">1x</span>
|
|
266
|
+
<span class="cline-any cline-neutral"> </span>
|
|
267
|
+
<span class="cline-any cline-neutral"> </span>
|
|
268
|
+
<span class="cline-any cline-neutral"> </span>
|
|
269
|
+
<span class="cline-any cline-neutral"> </span>
|
|
246
270
|
<span class="cline-any cline-neutral"> </span>
|
|
247
271
|
<span class="cline-any cline-neutral"> </span>
|
|
248
272
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -259,7 +283,6 @@
|
|
|
259
283
|
<span class="cline-any cline-neutral"> </span>
|
|
260
284
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React from 'react';
|
|
261
285
|
import PropTypes from 'prop-types';
|
|
262
|
-
import { useIntl } from 'react-intl';
|
|
263
286
|
|
|
264
287
|
import { Field } from 'react-final-form';
|
|
265
288
|
import {
|
|
@@ -267,16 +290,25 @@ import {
|
|
|
267
290
|
TextField,
|
|
268
291
|
} from '@folio/stripes/components';
|
|
269
292
|
import RefdataButtons from '../../RefdataButtons';
|
|
293
|
+
import { useKintIntl } from '../../hooks';
|
|
270
294
|
|
|
271
295
|
const EditSettingValue = (props) => {
|
|
272
296
|
const {
|
|
273
|
-
input,
|
|
274
297
|
currentSetting: setting,
|
|
298
|
+
input,
|
|
299
|
+
intlKey: passedIntlKey,
|
|
300
|
+
intlNS: passedIntlNS,
|
|
301
|
+
labelOverrides = {},
|
|
275
302
|
refdata,
|
|
276
303
|
templates
|
|
277
304
|
} = props;
|
|
278
|
-
|
|
279
|
-
const
|
|
305
|
+
|
|
306
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
307
|
+
|
|
308
|
+
const fieldLabel = kintIntl.formatKintMessage({
|
|
309
|
+
id: 'settings.valueFor',
|
|
310
|
+
overrideValue: labelOverrides?.valueFor
|
|
311
|
+
}, { name: setting.key });
|
|
280
312
|
|
|
281
313
|
switch (setting.settingType) {
|
|
282
314
|
case 'Refdata':
|
|
@@ -341,11 +373,15 @@ const EditSettingValue = (props) => {
|
|
|
341
373
|
|
|
342
374
|
EditSettingValue.propTypes = {
|
|
343
375
|
currentSetting: PropTypes.shape({
|
|
344
|
-
settingType: PropTypes.string
|
|
376
|
+
settingType: PropTypes.string,
|
|
377
|
+
key: PropTypes.string,
|
|
345
378
|
}),
|
|
346
379
|
input: PropTypes.shape({
|
|
347
380
|
name: PropTypes.string
|
|
348
381
|
}),
|
|
382
|
+
intlKey: PropTypes.string,
|
|
383
|
+
intlNS: PropTypes.string,
|
|
384
|
+
labelOverrides: PropTypes.object,
|
|
349
385
|
refdata: PropTypes.arrayOf(PropTypes.object),
|
|
350
386
|
templates: PropTypes.arrayOf(PropTypes.shape({
|
|
351
387
|
name: PropTypes.string,
|
|
@@ -361,7 +397,7 @@ export default EditSettingValue;
|
|
|
361
397
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
362
398
|
Code coverage generated by
|
|
363
399
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
364
|
-
at 2022-
|
|
400
|
+
at 2022-12-09T15:17:50.295Z
|
|
365
401
|
</div>
|
|
366
402
|
<script src="../../prettify.js"></script>
|
|
367
403
|
<script>
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>29/29</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">95.
|
|
33
|
+
<span class="strong">95.65% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>22/23</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>27/27</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -122,10 +122,31 @@
|
|
|
122
122
|
<a name='L57'></a><a href='#L57'>57</a>
|
|
123
123
|
<a name='L58'></a><a href='#L58'>58</a>
|
|
124
124
|
<a name='L59'></a><a href='#L59'>59</a>
|
|
125
|
-
<a name='L60'></a><a href='#L60'>60</a
|
|
125
|
+
<a name='L60'></a><a href='#L60'>60</a>
|
|
126
|
+
<a name='L61'></a><a href='#L61'>61</a>
|
|
127
|
+
<a name='L62'></a><a href='#L62'>62</a>
|
|
128
|
+
<a name='L63'></a><a href='#L63'>63</a>
|
|
129
|
+
<a name='L64'></a><a href='#L64'>64</a>
|
|
130
|
+
<a name='L65'></a><a href='#L65'>65</a>
|
|
131
|
+
<a name='L66'></a><a href='#L66'>66</a>
|
|
132
|
+
<a name='L67'></a><a href='#L67'>67</a>
|
|
133
|
+
<a name='L68'></a><a href='#L68'>68</a>
|
|
134
|
+
<a name='L69'></a><a href='#L69'>69</a>
|
|
135
|
+
<a name='L70'></a><a href='#L70'>70</a>
|
|
136
|
+
<a name='L71'></a><a href='#L71'>71</a>
|
|
137
|
+
<a name='L72'></a><a href='#L72'>72</a>
|
|
138
|
+
<a name='L73'></a><a href='#L73'>73</a>
|
|
139
|
+
<a name='L74'></a><a href='#L74'>74</a>
|
|
140
|
+
<a name='L75'></a><a href='#L75'>75</a>
|
|
141
|
+
<a name='L76'></a><a href='#L76'>76</a>
|
|
142
|
+
<a name='L77'></a><a href='#L77'>77</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
143
|
+
<span class="cline-any cline-neutral"> </span>
|
|
144
|
+
<span class="cline-any cline-neutral"> </span>
|
|
145
|
+
<span class="cline-any cline-neutral"> </span>
|
|
146
|
+
<span class="cline-any cline-yes">1x</span>
|
|
147
|
+
<span class="cline-any cline-neutral"> </span>
|
|
126
148
|
<span class="cline-any cline-neutral"> </span>
|
|
127
149
|
<span class="cline-any cline-neutral"> </span>
|
|
128
|
-
<span class="cline-any cline-yes">5x</span>
|
|
129
150
|
<span class="cline-any cline-neutral"> </span>
|
|
130
151
|
<span class="cline-any cline-neutral"> </span>
|
|
131
152
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -135,6 +156,10 @@
|
|
|
135
156
|
<span class="cline-any cline-yes">12x</span>
|
|
136
157
|
<span class="cline-any cline-neutral"> </span>
|
|
137
158
|
<span class="cline-any cline-yes">12x</span>
|
|
159
|
+
<span class="cline-any cline-neutral"> </span>
|
|
160
|
+
<span class="cline-any cline-neutral"> </span>
|
|
161
|
+
<span class="cline-any cline-neutral"> </span>
|
|
162
|
+
<span class="cline-any cline-neutral"> </span>
|
|
138
163
|
<span class="cline-any cline-yes">12x</span>
|
|
139
164
|
<span class="cline-any cline-yes">12x</span>
|
|
140
165
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -180,21 +205,38 @@
|
|
|
180
205
|
<span class="cline-any cline-neutral"> </span>
|
|
181
206
|
<span class="cline-any cline-neutral"> </span>
|
|
182
207
|
<span class="cline-any cline-neutral"> </span>
|
|
208
|
+
<span class="cline-any cline-yes">1x</span>
|
|
209
|
+
<span class="cline-any cline-neutral"> </span>
|
|
210
|
+
<span class="cline-any cline-neutral"> </span>
|
|
211
|
+
<span class="cline-any cline-neutral"> </span>
|
|
212
|
+
<span class="cline-any cline-neutral"> </span>
|
|
213
|
+
<span class="cline-any cline-neutral"> </span>
|
|
214
|
+
<span class="cline-any cline-neutral"> </span>
|
|
215
|
+
<span class="cline-any cline-neutral"> </span>
|
|
183
216
|
<span class="cline-any cline-neutral"> </span>
|
|
184
|
-
<span class="cline-any cline-neutral"> </span
|
|
185
|
-
|
|
217
|
+
<span class="cline-any cline-neutral"> </span>
|
|
218
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import PropTypes from 'prop-types';
|
|
219
|
+
|
|
220
|
+
import { useKintIntl } from '../../hooks';
|
|
186
221
|
|
|
187
222
|
const RenderSettingValue = (props) => {
|
|
188
223
|
const {
|
|
189
224
|
currentSetting: setting,
|
|
190
|
-
|
|
191
|
-
|
|
225
|
+
intlKey: passedIntlKey,
|
|
226
|
+
intlNS: passedIntlNS,
|
|
227
|
+
labelOverrides = {},
|
|
228
|
+
refdata, // TODO ... can we get away without passing these in now, using useRefdata?
|
|
229
|
+
templates // TODO ... can we get away without passing these in now, using useTemplates?
|
|
192
230
|
} = props;
|
|
193
231
|
|
|
194
|
-
const
|
|
232
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
233
|
+
|
|
234
|
+
const NoCurrentValue = kintIntl.formatKintMessage({
|
|
235
|
+
id: 'settings.noCurrentValue',
|
|
236
|
+
overrideValue: labelOverrides?.noCurrentValue
|
|
237
|
+
});
|
|
195
238
|
|
|
196
|
-
const
|
|
197
|
-
const defaultText = `[${intl.formatMessage({ id: 'stripes-kint-components.settings.default' })}]`;
|
|
239
|
+
const defaultText = `[${kintIntl.formatKintMessage({ id: 'settings.default', overrideValue: labelOverrides?.default })}]`;
|
|
198
240
|
switch (setting.settingType) {
|
|
199
241
|
case 'Refdata': {
|
|
200
242
|
if (setting.value) {
|
|
@@ -239,6 +281,15 @@ const RenderSettingValue = (props) => {
|
|
|
239
281
|
}
|
|
240
282
|
};
|
|
241
283
|
|
|
284
|
+
RenderSettingValue.propTypes = {
|
|
285
|
+
currentSetting: PropTypes.object,
|
|
286
|
+
intlKey: PropTypes.string,
|
|
287
|
+
intlNS: PropTypes.string,
|
|
288
|
+
labelOverrides: PropTypes.object,
|
|
289
|
+
refdata: PropTypes.arrayOf(PropTypes.object),
|
|
290
|
+
templates: PropTypes.arrayOf(PropTypes.object),
|
|
291
|
+
};
|
|
292
|
+
|
|
242
293
|
export default RenderSettingValue;
|
|
243
294
|
</pre></td></tr></table></pre>
|
|
244
295
|
|
|
@@ -247,7 +298,7 @@ export default RenderSettingValue;
|
|
|
247
298
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
248
299
|
Code coverage generated by
|
|
249
300
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
250
|
-
at 2022-
|
|
301
|
+
at 2022-12-09T15:17:50.295Z
|
|
251
302
|
</div>
|
|
252
303
|
<script src="../../prettify.js"></script>
|
|
253
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">67.64% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>23/34</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">61.11% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>11/18</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">31.25% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>5/
|
|
42
|
+
<span class='fraction'>5/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">67.64% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>23/34</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 medium'></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>
|
|
@@ -180,7 +180,48 @@
|
|
|
180
180
|
<a name='L115'></a><a href='#L115'>115</a>
|
|
181
181
|
<a name='L116'></a><a href='#L116'>116</a>
|
|
182
182
|
<a name='L117'></a><a href='#L117'>117</a>
|
|
183
|
-
<a name='L118'></a><a href='#L118'>118</a
|
|
183
|
+
<a name='L118'></a><a href='#L118'>118</a>
|
|
184
|
+
<a name='L119'></a><a href='#L119'>119</a>
|
|
185
|
+
<a name='L120'></a><a href='#L120'>120</a>
|
|
186
|
+
<a name='L121'></a><a href='#L121'>121</a>
|
|
187
|
+
<a name='L122'></a><a href='#L122'>122</a>
|
|
188
|
+
<a name='L123'></a><a href='#L123'>123</a>
|
|
189
|
+
<a name='L124'></a><a href='#L124'>124</a>
|
|
190
|
+
<a name='L125'></a><a href='#L125'>125</a>
|
|
191
|
+
<a name='L126'></a><a href='#L126'>126</a>
|
|
192
|
+
<a name='L127'></a><a href='#L127'>127</a>
|
|
193
|
+
<a name='L128'></a><a href='#L128'>128</a>
|
|
194
|
+
<a name='L129'></a><a href='#L129'>129</a>
|
|
195
|
+
<a name='L130'></a><a href='#L130'>130</a>
|
|
196
|
+
<a name='L131'></a><a href='#L131'>131</a>
|
|
197
|
+
<a name='L132'></a><a href='#L132'>132</a>
|
|
198
|
+
<a name='L133'></a><a href='#L133'>133</a>
|
|
199
|
+
<a name='L134'></a><a href='#L134'>134</a>
|
|
200
|
+
<a name='L135'></a><a href='#L135'>135</a>
|
|
201
|
+
<a name='L136'></a><a href='#L136'>136</a>
|
|
202
|
+
<a name='L137'></a><a href='#L137'>137</a>
|
|
203
|
+
<a name='L138'></a><a href='#L138'>138</a>
|
|
204
|
+
<a name='L139'></a><a href='#L139'>139</a>
|
|
205
|
+
<a name='L140'></a><a href='#L140'>140</a>
|
|
206
|
+
<a name='L141'></a><a href='#L141'>141</a>
|
|
207
|
+
<a name='L142'></a><a href='#L142'>142</a>
|
|
208
|
+
<a name='L143'></a><a href='#L143'>143</a>
|
|
209
|
+
<a name='L144'></a><a href='#L144'>144</a>
|
|
210
|
+
<a name='L145'></a><a href='#L145'>145</a>
|
|
211
|
+
<a name='L146'></a><a href='#L146'>146</a>
|
|
212
|
+
<a name='L147'></a><a href='#L147'>147</a>
|
|
213
|
+
<a name='L148'></a><a href='#L148'>148</a>
|
|
214
|
+
<a name='L149'></a><a href='#L149'>149</a>
|
|
215
|
+
<a name='L150'></a><a href='#L150'>150</a>
|
|
216
|
+
<a name='L151'></a><a href='#L151'>151</a>
|
|
217
|
+
<a name='L152'></a><a href='#L152'>152</a>
|
|
218
|
+
<a name='L153'></a><a href='#L153'>153</a>
|
|
219
|
+
<a name='L154'></a><a href='#L154'>154</a>
|
|
220
|
+
<a name='L155'></a><a href='#L155'>155</a>
|
|
221
|
+
<a name='L156'></a><a href='#L156'>156</a>
|
|
222
|
+
<a name='L157'></a><a href='#L157'>157</a>
|
|
223
|
+
<a name='L158'></a><a href='#L158'>158</a>
|
|
224
|
+
<a name='L159'></a><a href='#L159'>159</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
184
225
|
<span class="cline-any cline-neutral"> </span>
|
|
185
226
|
<span class="cline-any cline-neutral"> </span>
|
|
186
227
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -196,7 +237,11 @@
|
|
|
196
237
|
<span class="cline-any cline-neutral"> </span>
|
|
197
238
|
<span class="cline-any cline-neutral"> </span>
|
|
198
239
|
<span class="cline-any cline-neutral"> </span>
|
|
199
|
-
<span class="cline-any cline-
|
|
240
|
+
<span class="cline-any cline-neutral"> </span>
|
|
241
|
+
<span class="cline-any cline-yes">1x</span>
|
|
242
|
+
<span class="cline-any cline-neutral"> </span>
|
|
243
|
+
<span class="cline-any cline-neutral"> </span>
|
|
244
|
+
<span class="cline-any cline-neutral"> </span>
|
|
200
245
|
<span class="cline-any cline-neutral"> </span>
|
|
201
246
|
<span class="cline-any cline-neutral"> </span>
|
|
202
247
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -229,12 +274,40 @@
|
|
|
229
274
|
<span class="cline-any cline-neutral"> </span>
|
|
230
275
|
<span class="cline-any cline-neutral"> </span>
|
|
231
276
|
<span class="cline-any cline-yes">5x</span>
|
|
277
|
+
<span class="cline-any cline-no"> </span>
|
|
278
|
+
<span class="cline-any cline-neutral"> </span>
|
|
279
|
+
<span class="cline-any cline-neutral"> </span>
|
|
280
|
+
<span class="cline-any cline-neutral"> </span>
|
|
281
|
+
<span class="cline-any cline-neutral"> </span>
|
|
282
|
+
<span class="cline-any cline-neutral"> </span>
|
|
283
|
+
<span class="cline-any cline-no"> </span>
|
|
284
|
+
<span class="cline-any cline-no"> </span>
|
|
285
|
+
<span class="cline-any cline-no"> </span>
|
|
286
|
+
<span class="cline-any cline-no"> </span>
|
|
287
|
+
<span class="cline-any cline-no"> </span>
|
|
288
|
+
<span class="cline-any cline-no"> </span>
|
|
289
|
+
<span class="cline-any cline-no"> </span>
|
|
290
|
+
<span class="cline-any cline-no"> </span>
|
|
291
|
+
<span class="cline-any cline-no"> </span>
|
|
292
|
+
<span class="cline-any cline-no"> </span>
|
|
293
|
+
<span class="cline-any cline-neutral"> </span>
|
|
294
|
+
<span class="cline-any cline-neutral"> </span>
|
|
295
|
+
<span class="cline-any cline-neutral"> </span>
|
|
296
|
+
<span class="cline-any cline-neutral"> </span>
|
|
297
|
+
<span class="cline-any cline-neutral"> </span>
|
|
298
|
+
<span class="cline-any cline-neutral"> </span>
|
|
299
|
+
<span class="cline-any cline-yes">5x</span>
|
|
232
300
|
<span class="cline-any cline-yes">5x</span>
|
|
233
301
|
<span class="cline-any cline-neutral"> </span>
|
|
234
302
|
<span class="cline-any cline-neutral"> </span>
|
|
303
|
+
<span class="cline-any cline-neutral"> </span>
|
|
304
|
+
<span class="cline-any cline-neutral"> </span>
|
|
305
|
+
<span class="cline-any cline-neutral"> </span>
|
|
306
|
+
<span class="cline-any cline-neutral"> </span>
|
|
235
307
|
<span class="cline-any cline-yes">5x</span>
|
|
236
308
|
<span class="cline-any cline-neutral"> </span>
|
|
237
309
|
<span class="cline-any cline-neutral"> </span>
|
|
310
|
+
<span class="cline-any cline-neutral"> </span>
|
|
238
311
|
<span class="cline-any cline-yes">2x</span>
|
|
239
312
|
<span class="cline-any cline-yes">2x</span>
|
|
240
313
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -262,6 +335,11 @@
|
|
|
262
335
|
<span class="cline-any cline-yes">5x</span>
|
|
263
336
|
<span class="cline-any cline-neutral"> </span>
|
|
264
337
|
<span class="cline-any cline-neutral"> </span>
|
|
338
|
+
<span class="cline-any cline-neutral"> </span>
|
|
339
|
+
<span class="cline-any cline-neutral"> </span>
|
|
340
|
+
<span class="cline-any cline-neutral"> </span>
|
|
341
|
+
<span class="cline-any cline-neutral"> </span>
|
|
342
|
+
<span class="cline-any cline-neutral"> </span>
|
|
265
343
|
<span class="cline-any cline-yes">5x</span>
|
|
266
344
|
<span class="cline-any cline-neutral"> </span>
|
|
267
345
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -270,6 +348,7 @@
|
|
|
270
348
|
<span class="cline-any cline-neutral"> </span>
|
|
271
349
|
<span class="cline-any cline-neutral"> </span>
|
|
272
350
|
<span class="cline-any cline-neutral"> </span>
|
|
351
|
+
<span class="cline-any cline-neutral"> </span>
|
|
273
352
|
<span class="cline-any cline-yes">5x</span>
|
|
274
353
|
<span class="cline-any cline-neutral"> </span>
|
|
275
354
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -286,7 +365,10 @@
|
|
|
286
365
|
<span class="cline-any cline-neutral"> </span>
|
|
287
366
|
<span class="cline-any cline-neutral"> </span>
|
|
288
367
|
<span class="cline-any cline-neutral"> </span>
|
|
289
|
-
<span class="cline-any cline-
|
|
368
|
+
<span class="cline-any cline-neutral"> </span>
|
|
369
|
+
<span class="cline-any cline-neutral"> </span>
|
|
370
|
+
<span class="cline-any cline-neutral"> </span>
|
|
371
|
+
<span class="cline-any cline-yes">1x</span>
|
|
290
372
|
<span class="cline-any cline-neutral"> </span>
|
|
291
373
|
<span class="cline-any cline-neutral"> </span>
|
|
292
374
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -299,7 +381,7 @@
|
|
|
299
381
|
<span class="cline-any cline-neutral"> </span>
|
|
300
382
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useContext, useState } from 'react';
|
|
301
383
|
import PropTypes from 'prop-types';
|
|
302
|
-
|
|
384
|
+
|
|
303
385
|
import {
|
|
304
386
|
Button,
|
|
305
387
|
Card,
|
|
@@ -309,12 +391,16 @@ import {
|
|
|
309
391
|
import EditSettingValue from './EditSettingValue';
|
|
310
392
|
import RenderSettingValue from './RenderSettingValue';
|
|
311
393
|
import { SettingsContext } from '../../contexts';
|
|
312
|
-
import { useRefdata, useTemplates } from '../../hooks';
|
|
313
|
-
import {
|
|
394
|
+
import { useKintIntl, useRefdata, useTemplates } from '../../hooks';
|
|
395
|
+
import { toCamelCase } from '../../utils';
|
|
314
396
|
|
|
397
|
+
import renderHelpTextCSS from '../../../../styles/renderHelpText.css';
|
|
315
398
|
|
|
316
399
|
const SettingField = (settingFieldProps) => {
|
|
317
400
|
const {
|
|
401
|
+
intlKey: passedIntlKey,
|
|
402
|
+
intlNS: passedIntlNS,
|
|
403
|
+
labelOverrides = {},
|
|
318
404
|
onSave,
|
|
319
405
|
settingData: {
|
|
320
406
|
currentSetting
|
|
@@ -322,13 +408,13 @@ const SettingField = (settingFieldProps) => {
|
|
|
322
408
|
} = settingFieldProps;
|
|
323
409
|
|
|
324
410
|
const [editing, setEditing] = useState(false);
|
|
325
|
-
const
|
|
326
|
-
const {
|
|
411
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
412
|
+
const { refdataEndpoint, templateEndpoint } = useContext(SettingsContext);
|
|
327
413
|
|
|
328
414
|
const {
|
|
329
415
|
0: {
|
|
330
|
-
values: refdata = []
|
|
331
|
-
} = {}
|
|
416
|
+
values: refdata = <span class="branch-0 cbranch-no" title="branch not covered" >[]</span>
|
|
417
|
+
} = <span class="branch-0 cbranch-no" title="branch not covered" >{}</span>
|
|
332
418
|
} = useRefdata({
|
|
333
419
|
endpoint: refdataEndpoint,
|
|
334
420
|
desc: currentSetting.vocab,
|
|
@@ -344,13 +430,41 @@ const SettingField = (settingFieldProps) => {
|
|
|
344
430
|
enabled: !!currentSetting?.vocab && <span class="branch-1 cbranch-no" title="branch not covered" >currentSetting.settingType === 'Template'</span>
|
|
345
431
|
}
|
|
346
432
|
});
|
|
433
|
+
|
|
434
|
+
const renderHelpText = <span class="fstat-no" title="function not covered" >(h</span>elpTextId) => {
|
|
435
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
436
|
+
<div className={renderHelpTextCSS.help}>
|
|
437
|
+
{
|
|
438
|
+
kintIntl.formatKintMessage({
|
|
439
|
+
id: helpTextId
|
|
440
|
+
}, {
|
|
441
|
+
b: <span class="fstat-no" title="function not covered" >(c</span>hunks) => <span class="cstat-no" title="statement not covered" ><b>{chunks}</b>,</span>
|
|
442
|
+
i: <span class="fstat-no" title="function not covered" >(c</span>hunks) => <span class="cstat-no" title="statement not covered" ><i>{chunks}</i>,</span>
|
|
443
|
+
em: <span class="fstat-no" title="function not covered" >(c</span>hunks) => <span class="cstat-no" title="statement not covered" ><em>{chunks}</em>,</span>
|
|
444
|
+
strong: <span class="fstat-no" title="function not covered" >(c</span>hunks) => <span class="cstat-no" title="statement not covered" ><strong>{chunks}</strong>,</span>
|
|
445
|
+
span: <span class="fstat-no" title="function not covered" >(c</span>hunks) => <span class="cstat-no" title="statement not covered" ><span>{chunks}</span>,</span>
|
|
446
|
+
div: <span class="fstat-no" title="function not covered" >(c</span>hunks) => <span class="cstat-no" title="statement not covered" ><div>{chunks}</div>,</span>
|
|
447
|
+
p: <span class="fstat-no" title="function not covered" >(c</span>hunks) => <span class="cstat-no" title="statement not covered" ><p>{chunks}</p>,</span>
|
|
448
|
+
ul: <span class="fstat-no" title="function not covered" >(c</span>hunks) => <span class="cstat-no" title="statement not covered" ><ul>{chunks}</ul>,</span>
|
|
449
|
+
ol: <span class="fstat-no" title="function not covered" >(c</span>hunks) => <span class="cstat-no" title="statement not covered" ><ol>{chunks}</ol>,</span>
|
|
450
|
+
li: <span class="fstat-no" title="function not covered" >(c</span>hunks) => <span class="cstat-no" title="statement not covered" ><li>{chunks}</li>,</span>
|
|
451
|
+
})
|
|
452
|
+
}
|
|
453
|
+
</div>
|
|
454
|
+
);
|
|
455
|
+
};
|
|
347
456
|
|
|
348
457
|
const renderEditButton = () => {
|
|
349
458
|
const EditText = editing ?
|
|
350
|
-
|
|
351
|
-
|
|
459
|
+
kintIntl.formatKintMessage({
|
|
460
|
+
id: 'save'
|
|
461
|
+
}) :
|
|
462
|
+
kintIntl.formatKintMessage({
|
|
463
|
+
id: 'edit'
|
|
464
|
+
});
|
|
352
465
|
return (
|
|
353
466
|
<Button
|
|
467
|
+
marginBottom0
|
|
354
468
|
onClick={(e) => {
|
|
355
469
|
e.preventDefault();
|
|
356
470
|
return (
|
|
@@ -372,19 +486,25 @@ const SettingField = (settingFieldProps) => {
|
|
|
372
486
|
RenderFunction = EditSettingValue;
|
|
373
487
|
}
|
|
374
488
|
|
|
375
|
-
const id =
|
|
489
|
+
const id = `settings.${toCamelCase(currentSetting.section)}.${toCamelCase(currentSetting.key)}.help`;
|
|
376
490
|
|
|
377
491
|
|
|
378
492
|
const renderHeaderStart = () => {
|
|
379
493
|
const settingName = Object.keys(currentSetting).length > 0 ?
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
494
|
+
kintIntl.formatKintMessage({
|
|
495
|
+
id: `settings.${toCamelCase(currentSetting.section)}.${toCamelCase(currentSetting.key)}`
|
|
496
|
+
}) :
|
|
497
|
+
<span class="branch-1 cbranch-no" title="branch not covered" > kintIntl.formatKintMessage({</span>
|
|
498
|
+
id: 'loading'
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
return (
|
|
502
|
+
<>
|
|
503
|
+
{
|
|
504
|
+
kintIntl.messageExists(id) && <span class="branch-1 cbranch-no" title="branch not covered" ><InfoPopover content={renderHelpText(id)} />}</span>
|
|
505
|
+
{settingName}
|
|
506
|
+
</>
|
|
507
|
+
);
|
|
388
508
|
};
|
|
389
509
|
|
|
390
510
|
return (
|
|
@@ -395,6 +515,9 @@ const SettingField = (settingFieldProps) => {
|
|
|
395
515
|
>
|
|
396
516
|
<RenderFunction
|
|
397
517
|
currentSetting={currentSetting}
|
|
518
|
+
intlKey={passedIntlKey}
|
|
519
|
+
intlNS={passedIntlNS}
|
|
520
|
+
labelOverrides={labelOverrides}
|
|
398
521
|
refdata={refdata}
|
|
399
522
|
templates={templates}
|
|
400
523
|
{...settingFieldProps}
|
|
@@ -421,7 +544,7 @@ export default SettingField;
|
|
|
421
544
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
422
545
|
Code coverage generated by
|
|
423
546
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
424
|
-
at 2022-
|
|
547
|
+
at 2022-12-09T15:17:50.295Z
|
|
425
548
|
</div>
|
|
426
549
|
<script src="../../prettify.js"></script>
|
|
427
550
|
<script>
|