@k-int/stripes-kint-components 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/es/lib/RichSelect/RichSelect.js +1 -0
- package/es/lib/utils/generateKiwtQuery.js +3 -4
- package/es/lib/utils/generateKiwtQueryParams.js +22 -12
- package/junit.xml +138 -138
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +44 -254
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionTrigger.js.html +418 -0
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +24 -9
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +1 -1
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +1 -1
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +1 -1
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +1 -1
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +74 -8
- 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 +31 -4
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +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 +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 +2 -2
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +18 -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/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 +4 -19
- 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 +3 -3
- 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 +56 -5
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/{ResponsiveButtonGroup/ResponsiveButtonGroup.js.html → SettingsActionList/EditSettingValue.js.html} +145 -166
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/RenderSettingValue.js.html +358 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/SettingsActionList.js.html +736 -0
- package/src/artifacts/coverage-jest/lcov-report/{ResponsiveButtonGroup → SettingsActionList}/index.html +42 -27
- package/src/artifacts/coverage-jest/lcov-report/{ResponsiveButtonGroup → SettingsActionList}/index.js.html +4 -4
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +3 -3
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +9 -3
- 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 +1 -1
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +1 -1
- 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 +43 -43
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov.info +680 -585
- package/src/lib/IconSelect/IconSelect.js +22 -20
- package/src/lib/RichSelect/RichSelect.js +1 -0
- package/src/lib/utils/README.md +3 -1
- package/src/lib/utils/generateKiwtQuery.js +3 -3
- package/src/lib/utils/generateKiwtQueryParams.js +27 -13
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +0 -253
- package/yarn-error.log +0 -147
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for
|
|
6
|
+
<title>Code coverage report for SettingsActionList/EditSettingValue.js</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
8
|
<link rel="stylesheet" href="../prettify.css" />
|
|
9
9
|
<link rel="stylesheet" href="../base.css" />
|
|
@@ -19,34 +19,34 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="../index.html">All files</a> / <a href="index.html">
|
|
22
|
+
<h1><a href="../index.html">All files</a> / <a href="index.html">SettingsActionList</a> EditSettingValue.js</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/21</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/15</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/
|
|
42
|
+
<span class='fraction'>0/5</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/21</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -206,14 +206,8 @@
|
|
|
206
206
|
<a name='L141'></a><a href='#L141'>141</a>
|
|
207
207
|
<a name='L142'></a><a href='#L142'>142</a>
|
|
208
208
|
<a name='L143'></a><a href='#L143'>143</a>
|
|
209
|
-
<a name='L144'></a><a href='#L144'>144</a>
|
|
210
|
-
<
|
|
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></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
209
|
+
<a name='L144'></a><a href='#L144'>144</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
210
|
+
<span class="cline-any cline-neutral"> </span>
|
|
217
211
|
<span class="cline-any cline-neutral"> </span>
|
|
218
212
|
<span class="cline-any cline-neutral"> </span>
|
|
219
213
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -237,23 +231,23 @@
|
|
|
237
231
|
<span class="cline-any cline-neutral"> </span>
|
|
238
232
|
<span class="cline-any cline-neutral"> </span>
|
|
239
233
|
<span class="cline-any cline-neutral"> </span>
|
|
240
|
-
<span class="cline-any cline-no"> </span>
|
|
241
|
-
<span class="cline-any cline-no"> </span>
|
|
242
234
|
<span class="cline-any cline-neutral"> </span>
|
|
243
235
|
<span class="cline-any cline-no"> </span>
|
|
244
236
|
<span class="cline-any cline-no"> </span>
|
|
237
|
+
<span class="cline-any cline-no"> </span>
|
|
245
238
|
<span class="cline-any cline-neutral"> </span>
|
|
246
239
|
<span class="cline-any cline-neutral"> </span>
|
|
247
240
|
<span class="cline-any cline-neutral"> </span>
|
|
248
|
-
<span class="cline-any cline-no"> </span>
|
|
249
|
-
<span class="cline-any cline-no"> </span>
|
|
250
|
-
<span class="cline-any cline-no"> </span>
|
|
251
241
|
<span class="cline-any cline-neutral"> </span>
|
|
252
242
|
<span class="cline-any cline-neutral"> </span>
|
|
253
243
|
<span class="cline-any cline-no"> </span>
|
|
254
244
|
<span class="cline-any cline-neutral"> </span>
|
|
255
245
|
<span class="cline-any cline-neutral"> </span>
|
|
256
246
|
<span class="cline-any cline-neutral"> </span>
|
|
247
|
+
<span class="cline-any cline-neutral"> </span>
|
|
248
|
+
<span class="cline-any cline-neutral"> </span>
|
|
249
|
+
<span class="cline-any cline-neutral"> </span>
|
|
250
|
+
<span class="cline-any cline-neutral"> </span>
|
|
257
251
|
<span class="cline-any cline-no"> </span>
|
|
258
252
|
<span class="cline-any cline-neutral"> </span>
|
|
259
253
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -270,17 +264,18 @@
|
|
|
270
264
|
<span class="cline-any cline-neutral"> </span>
|
|
271
265
|
<span class="cline-any cline-neutral"> </span>
|
|
272
266
|
<span class="cline-any cline-neutral"> </span>
|
|
267
|
+
<span class="cline-any cline-neutral"> </span>
|
|
268
|
+
<span class="cline-any cline-neutral"> </span>
|
|
273
269
|
<span class="cline-any cline-no"> </span>
|
|
274
270
|
<span class="cline-any cline-neutral"> </span>
|
|
275
271
|
<span class="cline-any cline-neutral"> </span>
|
|
276
272
|
<span class="cline-any cline-neutral"> </span>
|
|
277
273
|
<span class="cline-any cline-no"> </span>
|
|
278
|
-
<span class="cline-any cline-neutral"> </span>
|
|
279
274
|
<span class="cline-any cline-no"> </span>
|
|
280
275
|
<span class="cline-any cline-no"> </span>
|
|
281
276
|
<span class="cline-any cline-neutral"> </span>
|
|
282
277
|
<span class="cline-any cline-neutral"> </span>
|
|
283
|
-
<span class="cline-any cline-
|
|
278
|
+
<span class="cline-any cline-no"> </span>
|
|
284
279
|
<span class="cline-any cline-neutral"> </span>
|
|
285
280
|
<span class="cline-any cline-neutral"> </span>
|
|
286
281
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -293,17 +288,10 @@
|
|
|
293
288
|
<span class="cline-any cline-neutral"> </span>
|
|
294
289
|
<span class="cline-any cline-neutral"> </span>
|
|
295
290
|
<span class="cline-any cline-no"> </span>
|
|
296
|
-
<span class="cline-any cline-no"> </span>
|
|
297
|
-
<span class="cline-any cline-no"> </span>
|
|
298
|
-
<span class="cline-any cline-no"> </span>
|
|
299
|
-
<span class="cline-any cline-neutral"> </span>
|
|
300
291
|
<span class="cline-any cline-neutral"> </span>
|
|
301
|
-
<span class="cline-any cline-no"> </span>
|
|
302
292
|
<span class="cline-any cline-neutral"> </span>
|
|
303
293
|
<span class="cline-any cline-neutral"> </span>
|
|
304
294
|
<span class="cline-any cline-neutral"> </span>
|
|
305
|
-
<span class="cline-any cline-no"> </span>
|
|
306
|
-
<span class="cline-any cline-no"> </span>
|
|
307
295
|
<span class="cline-any cline-neutral"> </span>
|
|
308
296
|
<span class="cline-any cline-neutral"> </span>
|
|
309
297
|
<span class="cline-any cline-no"> </span>
|
|
@@ -312,14 +300,13 @@
|
|
|
312
300
|
<span class="cline-any cline-neutral"> </span>
|
|
313
301
|
<span class="cline-any cline-neutral"> </span>
|
|
314
302
|
<span class="cline-any cline-neutral"> </span>
|
|
315
|
-
<span class="cline-any cline-no"> </span>
|
|
316
|
-
<span class="cline-any cline-no"> </span>
|
|
317
303
|
<span class="cline-any cline-neutral"> </span>
|
|
304
|
+
<span class="cline-any cline-no"> </span>
|
|
318
305
|
<span class="cline-any cline-neutral"> </span>
|
|
306
|
+
<span class="cline-any cline-no"> </span>
|
|
319
307
|
<span class="cline-any cline-neutral"> </span>
|
|
320
308
|
<span class="cline-any cline-neutral"> </span>
|
|
321
309
|
<span class="cline-any cline-no"> </span>
|
|
322
|
-
<span class="cline-any cline-no"> </span>
|
|
323
310
|
<span class="cline-any cline-neutral"> </span>
|
|
324
311
|
<span class="cline-any cline-neutral"> </span>
|
|
325
312
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -327,31 +314,31 @@
|
|
|
327
314
|
<span class="cline-any cline-neutral"> </span>
|
|
328
315
|
<span class="cline-any cline-neutral"> </span>
|
|
329
316
|
<span class="cline-any cline-neutral"> </span>
|
|
317
|
+
<span class="cline-any cline-no"> </span>
|
|
330
318
|
<span class="cline-any cline-neutral"> </span>
|
|
331
319
|
<span class="cline-any cline-neutral"> </span>
|
|
332
320
|
<span class="cline-any cline-neutral"> </span>
|
|
333
|
-
<span class="cline-any cline-no"> </span>
|
|
334
321
|
<span class="cline-any cline-neutral"> </span>
|
|
335
322
|
<span class="cline-any cline-neutral"> </span>
|
|
323
|
+
<span class="cline-any cline-no"> </span>
|
|
336
324
|
<span class="cline-any cline-neutral"> </span>
|
|
337
325
|
<span class="cline-any cline-neutral"> </span>
|
|
338
326
|
<span class="cline-any cline-neutral"> </span>
|
|
339
327
|
<span class="cline-any cline-neutral"> </span>
|
|
340
328
|
<span class="cline-any cline-neutral"> </span>
|
|
341
329
|
<span class="cline-any cline-neutral"> </span>
|
|
330
|
+
<span class="cline-any cline-no"> </span>
|
|
342
331
|
<span class="cline-any cline-neutral"> </span>
|
|
343
332
|
<span class="cline-any cline-neutral"> </span>
|
|
344
333
|
<span class="cline-any cline-neutral"> </span>
|
|
345
334
|
<span class="cline-any cline-neutral"> </span>
|
|
346
335
|
<span class="cline-any cline-neutral"> </span>
|
|
336
|
+
<span class="cline-any cline-no"> </span>
|
|
347
337
|
<span class="cline-any cline-neutral"> </span>
|
|
348
338
|
<span class="cline-any cline-neutral"> </span>
|
|
349
339
|
<span class="cline-any cline-neutral"> </span>
|
|
350
|
-
<span class="cline-any cline-no"> </span>
|
|
351
|
-
<span class="cline-any cline-no"> </span>
|
|
352
340
|
<span class="cline-any cline-neutral"> </span>
|
|
353
341
|
<span class="cline-any cline-neutral"> </span>
|
|
354
|
-
<span class="cline-any cline-no"> </span>
|
|
355
342
|
<span class="cline-any cline-neutral"> </span>
|
|
356
343
|
<span class="cline-any cline-neutral"> </span>
|
|
357
344
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -360,159 +347,151 @@
|
|
|
360
347
|
<span class="cline-any cline-neutral"> </span>
|
|
361
348
|
<span class="cline-any cline-neutral"> </span>
|
|
362
349
|
<span class="cline-any cline-neutral"> </span>
|
|
363
|
-
<span class="cline-any cline-no"> </span>
|
|
364
350
|
<span class="cline-any cline-neutral"> </span>
|
|
365
351
|
<span class="cline-any cline-neutral"> </span>
|
|
366
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import
|
|
367
|
-
|
|
352
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useContext } from 'react';
|
|
368
353
|
import PropTypes from 'prop-types';
|
|
369
|
-
import classnames from 'classnames';
|
|
370
354
|
|
|
371
|
-
import {
|
|
372
|
-
Button,
|
|
373
|
-
Dropdown,
|
|
374
|
-
DropdownMenu,
|
|
375
|
-
Icon
|
|
376
|
-
} from '@folio/stripes/components';
|
|
377
|
-
|
|
378
|
-
import css from '../../../styles/ResponsiveButtonGroup.css';
|
|
379
|
-
|
|
380
|
-
import useResponsiveButtonGroupSizing from './useResponsiveButtonGroupSizing';
|
|
381
|
-
|
|
382
|
-
const propTypes = <span class="cstat-no" title="statement not covered" >{</span>
|
|
383
|
-
children: PropTypes.node,
|
|
384
|
-
className: PropTypes.string,
|
|
385
|
-
fullWidth: PropTypes.bool,
|
|
386
|
-
selectedIndex: PropTypes.number,
|
|
387
|
-
tagName: PropTypes.string,
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
const SIZE_OF_DOWN_ARROW_BUTTON = <span class="cstat-no" title="statement not covered" >46;</span>
|
|
391
|
-
const calculateCumulativeThreshold = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(a</span>rrayOfNumbers, maximum, index = <span class="branch-0 cbranch-no" title="branch not covered" >0,</span> value = <span class="branch-0 cbranch-no" title="branch not covered" >0)</span> => {</span>
|
|
392
|
-
// If all the numbers fit, return the last index
|
|
393
|
-
<span class="cstat-no" title="statement not covered" > if (arrayOfNumbers.reduce(<span class="fstat-no" title="function not covered" >(p</span>artialSum, a) => <span class="cstat-no" title="statement not covered" >partialSum + a,</span> 0) <= maximum) {</span>
|
|
394
|
-
<span class="cstat-no" title="statement not covered" > return arrayOfNumbers?.length - 1;</span>
|
|
395
|
-
}
|
|
355
|
+
import { Field } from 'react-final-form';
|
|
396
356
|
|
|
397
|
-
|
|
398
|
-
const nextValue = <span class="cstat-no" title="statement not covered" >value + arrayOfNumbers[index];</span>
|
|
399
|
-
<span class="cstat-no" title="statement not covered" > if (nextValue + SIZE_OF_DOWN_ARROW_BUTTON <= maximum && (index + 1 < arrayOfNumbers?.length)) {</span>
|
|
400
|
-
<span class="cstat-no" title="statement not covered" > return calculateCumulativeThreshold(arrayOfNumbers, maximum, index + 1, nextValue);</span>
|
|
401
|
-
}
|
|
357
|
+
import orderBy from 'lodash/orderBy';
|
|
402
358
|
|
|
403
|
-
|
|
404
|
-
|
|
359
|
+
import {
|
|
360
|
+
Select,
|
|
361
|
+
TextField,
|
|
362
|
+
} from '@folio/stripes/components';
|
|
363
|
+
import RefdataButtons from '../RefdataButtons';
|
|
364
|
+
import { useKintIntl, useRefdata, useTemplates } from '../hooks';
|
|
365
|
+
import { SettingsContext } from '../contexts';
|
|
405
366
|
|
|
367
|
+
import { toCamelCase } from '../utils';
|
|
406
368
|
|
|
407
|
-
const
|
|
369
|
+
const EditSettingValue = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(p</span>rops) => {</span>
|
|
408
370
|
const {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
371
|
+
fieldProps: {
|
|
372
|
+
name: fieldName,
|
|
373
|
+
data: setting
|
|
374
|
+
},
|
|
375
|
+
intlKey: passedIntlKey,
|
|
376
|
+
intlNS: passedIntlNS,
|
|
377
|
+
labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
415
378
|
} = <span class="cstat-no" title="statement not covered" >props;</span>
|
|
379
|
+
const kintIntl = <span class="cstat-no" title="statement not covered" >useKintIntl(passedIntlKey, passedIntlNS);</span>
|
|
380
|
+
const { refdataEndpoint, templateEndpoint } = <span class="cstat-no" title="statement not covered" >useContext(SettingsContext);</span>
|
|
416
381
|
|
|
417
382
|
const {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
383
|
+
0: {
|
|
384
|
+
values: refdata = <span class="branch-0 cbranch-no" title="branch not covered" >[]</span>
|
|
385
|
+
} = <span class="branch-0 cbranch-no" title="branch not covered" >{}</span>
|
|
386
|
+
} = <span class="cstat-no" title="statement not covered" >useRefdata({</span>
|
|
387
|
+
endpoint: refdataEndpoint,
|
|
388
|
+
desc: setting.vocab,
|
|
389
|
+
queryParams: {
|
|
390
|
+
enabled: !!setting?.vocab && setting.settingType === 'Refdata'
|
|
391
|
+
}
|
|
425
392
|
});
|
|
426
393
|
|
|
427
|
-
const
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
marginBottom0
|
|
435
|
-
onClick={onToggle}
|
|
436
|
-
onKeyDown={keyHandler}
|
|
437
|
-
type="button"
|
|
438
|
-
{...getTriggerProps()}
|
|
439
|
-
{...ariaProps}
|
|
440
|
-
>
|
|
441
|
-
<Icon icon={open ? 'triangle-up' : 'triangle-down'} iconPosition="end" />
|
|
442
|
-
</Button>
|
|
443
|
-
), [buttonThreshold, selectedIndex]);
|
|
444
|
-
|
|
445
|
-
const displayButtons = <span class="cstat-no" title="statement not covered" >useMemo(<span class="fstat-no" title="function not covered" >()</span> => (</span>
|
|
446
|
-
<span class="cstat-no" title="statement not covered" > buttons?.slice(0, buttonThreshold + 1)?.map(<span class="fstat-no" title="function not covered" >(b</span>utton, index) => {</span>
|
|
447
|
-
<span class="cstat-no" title="statement not covered" > if (index === selectedIndex && !button?.buttonStyle) {</span>
|
|
448
|
-
<span class="cstat-no" title="statement not covered" > return cloneElement(button, { buttonStyle: 'primary' });</span>
|
|
449
|
-
}
|
|
394
|
+
const templates = <span class="cstat-no" title="statement not covered" >useTemplates({</span>
|
|
395
|
+
context: setting.vocab,
|
|
396
|
+
endpoint: templateEndpoint,
|
|
397
|
+
queryParams: {
|
|
398
|
+
enabled: !!setting?.vocab && setting.settingType === 'Template'
|
|
399
|
+
}
|
|
400
|
+
});
|
|
450
401
|
|
|
451
|
-
<span class="cstat-no" title="statement not covered" >
|
|
402
|
+
const fieldLabel = <span class="cstat-no" title="statement not covered" >kintIntl.formatKintMessage({</span>
|
|
403
|
+
id: 'settings.valueFor',
|
|
404
|
+
overrideValue: labelOverrides?.valueFor
|
|
405
|
+
}, {
|
|
406
|
+
name: kintIntl.formatKintMessage({
|
|
407
|
+
id: `settings.${toCamelCase(setting.section)}.${toCamelCase(setting.key)}`,
|
|
408
|
+
fallbackValue: setting?.key
|
|
452
409
|
})
|
|
453
|
-
)
|
|
454
|
-
|
|
455
|
-
const dropdownButtons = <span class="cstat-no" title="statement not covered" >useMemo(<span class="fstat-no" title="function not covered" >()</span> => (</span>
|
|
456
|
-
<span class="cstat-no" title="statement not covered" > [...buttons</span>
|
|
457
|
-
.slice(buttonThreshold + 1, buttons?.length)
|
|
458
|
-
?.map(<span class="fstat-no" title="function not covered" >bu</span>tton => {
|
|
459
|
-
<span class="cstat-no" title="statement not covered" > return cloneElement(button, { buttonStyle: 'dropdownItem' });</span>
|
|
460
|
-
})
|
|
461
|
-
]
|
|
462
|
-
), [buttonThreshold, buttons]);
|
|
410
|
+
});
|
|
463
411
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
412
|
+
<span class="cstat-no" title="statement not covered" > switch (setting.settingType) {</span>
|
|
413
|
+
case 'Refdata':
|
|
414
|
+
// Grab refdata values corresponding to setting
|
|
415
|
+
// eslint-disable-next-line no-case-declarations
|
|
416
|
+
let RefdataComponent = <span class="cstat-no" title="statement not covered" >Select;</span>
|
|
417
|
+
<span class="cstat-no" title="statement not covered" > if (refdata.length > 0 && refdata.length <= 4) {</span>
|
|
418
|
+
<span class="cstat-no" title="statement not covered" > RefdataComponent = RefdataButtons;</span>
|
|
419
|
+
}
|
|
470
420
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
), [displayButtons, renderActionMenuContent, renderActionMenuToggle]);
|
|
421
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
422
|
+
<Field
|
|
423
|
+
aria-label={fieldLabel}
|
|
424
|
+
component={RefdataComponent}
|
|
425
|
+
dataOptions={orderBy(refdata, 'label', 'asc')}
|
|
426
|
+
fullWidth
|
|
427
|
+
marginBottom0
|
|
428
|
+
name={fieldName}
|
|
429
|
+
/>
|
|
430
|
+
);
|
|
482
431
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
<span class="cstat-no" title="statement not covered" >
|
|
501
|
-
|
|
502
|
-
}
|
|
432
|
+
case 'Password':
|
|
433
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
434
|
+
<Field
|
|
435
|
+
aria-label={fieldLabel}
|
|
436
|
+
autoFocus
|
|
437
|
+
component={TextField}
|
|
438
|
+
marginBottom0
|
|
439
|
+
name={fieldName}
|
|
440
|
+
parse={<span class="fstat-no" title="function not covered" >v </span>=> <span class="cstat-no" title="statement not covered" >v}</span> // Lets us send an empty string instead of 'undefined'
|
|
441
|
+
type="password"
|
|
442
|
+
/>
|
|
443
|
+
);
|
|
444
|
+
case 'Template': {
|
|
445
|
+
// Grab refdata values corresponding to setting
|
|
446
|
+
// eslint-disable-next-line no-case-declarations
|
|
447
|
+
const selectTemplateValues = <span class="cstat-no" title="statement not covered" >[</span>
|
|
448
|
+
{ value: '', label: '' },
|
|
449
|
+
...templates.map(<span class="fstat-no" title="function not covered" >t </span>=> (<span class="cstat-no" title="statement not covered" >{ value: t.id, label: t.name })</span>)
|
|
450
|
+
];
|
|
503
451
|
|
|
504
|
-
<span class="cstat-no" title="statement not covered" >
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
452
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
453
|
+
<Field
|
|
454
|
+
aria-label={fieldLabel}
|
|
455
|
+
component={Select}
|
|
456
|
+
dataOptions={selectTemplateValues}
|
|
457
|
+
fullWidth
|
|
458
|
+
marginBottom0
|
|
459
|
+
name={fieldName}
|
|
460
|
+
parse={<span class="fstat-no" title="function not covered" >v </span>=> <span class="cstat-no" title="statement not covered" >v}</span>
|
|
461
|
+
/>
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
default:
|
|
465
|
+
// If in doubt, go with String
|
|
466
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
467
|
+
<Field
|
|
468
|
+
aria-label={fieldLabel}
|
|
469
|
+
autoFocus
|
|
470
|
+
component={TextField}
|
|
471
|
+
marginBottom0
|
|
472
|
+
name={fieldName}
|
|
473
|
+
parse={<span class="fstat-no" title="function not covered" >v </span>=> <span class="cstat-no" title="statement not covered" >v}</span> // Lets us send an empty string instead of 'undefined'
|
|
474
|
+
/>
|
|
475
|
+
);
|
|
476
|
+
}
|
|
511
477
|
};
|
|
512
478
|
|
|
513
|
-
<span class="cstat-no" title="statement not covered" >
|
|
479
|
+
<span class="cstat-no" title="statement not covered" >EditSettingValue.propTypes = {</span>
|
|
480
|
+
fieldProps: PropTypes.shape({
|
|
481
|
+
name: PropTypes.string,
|
|
482
|
+
data: PropTypes.shape({
|
|
483
|
+
section: PropTypes.string,
|
|
484
|
+
settingType: PropTypes.string,
|
|
485
|
+
key: PropTypes.string,
|
|
486
|
+
vocab: PropTypes.string,
|
|
487
|
+
}),
|
|
488
|
+
}),
|
|
489
|
+
intlKey: PropTypes.string,
|
|
490
|
+
intlNS: PropTypes.string,
|
|
491
|
+
labelOverrides: PropTypes.object,
|
|
492
|
+
};
|
|
514
493
|
|
|
515
|
-
export default
|
|
494
|
+
export default EditSettingValue;
|
|
516
495
|
</pre></td></tr></table></pre>
|
|
517
496
|
|
|
518
497
|
<div class='push'></div><!-- for sticky footer -->
|
|
@@ -520,7 +499,7 @@ export default ResponsiveButtonGroup;
|
|
|
520
499
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
521
500
|
Code coverage generated by
|
|
522
501
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
523
|
-
at 2022-
|
|
502
|
+
at 2022-10-18T08:59:08.296Z
|
|
524
503
|
</div>
|
|
525
504
|
<script src="../prettify.js"></script>
|
|
526
505
|
<script>
|