@k-int/stripes-kint-components 2.8.2 → 2.8.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/CustomProperties/Config/CustomPropertiesSettings.js +2 -2
- package/junit.xml +157 -656
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +56 -8
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +394 -64
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +10 -10
- 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 +187 -52
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +372 -87
- 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 +45 -60
- 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 +59 -47
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +259 -97
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +399 -105
- 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 +57 -57
- 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 +67 -688
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +92 -53
- 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 +89 -89
- 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 +46 -46
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +45 -36
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +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 +50 -41
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +54 -75
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +24 -24
- 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/{hooks/useAvailableCustomProperties.js.html → CycleButton/CycleButton.js.html} +62 -50
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +664 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +264 -39
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +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 +247 -0
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/{CustomProperties/Config/CustomPropertiesView.js.html → IconSelect/IconSelect.js.html} +158 -257
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +48 -6
- 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/{CustomProperties/Config/testResources.js.html → RichSelect/RichSelect.js.html} +256 -334
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +146 -0
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +91 -0
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +127 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +52 -7
- 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 +7 -7
- 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 +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 +2 -2
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +142 -97
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +13 -4
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +35 -20
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +5 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +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 +19 -22
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +151 -0
- package/src/artifacts/coverage-jest/lcov-report/{utils/renderHelpText.js.html → hooks/useIntlKeyStore.js.html} +71 -38
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +238 -0
- 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 +23 -11
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +274 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +19 -10
- 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/useTemplates.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/index.html +205 -130
- package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +2 -2
- 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 +34 -34
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +42 -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 +139 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +5 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/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 +128 -80
- package/src/artifacts/coverage-jest/lcov.info +2603 -2086
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +1 -1
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for
|
|
6
|
+
<title>Code coverage report for RichSelect/RichSelect.js</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="
|
|
8
|
+
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
11
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
12
|
<style type='text/css'>
|
|
13
13
|
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(
|
|
14
|
+
background-image: url(../sort-arrow-sprite.png);
|
|
15
15
|
}
|
|
16
16
|
</style>
|
|
17
17
|
</head>
|
|
@@ -19,34 +19,34 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="
|
|
22
|
+
<h1><a href="../index.html">All files</a> / <a href="index.html">RichSelect</a> RichSelect.js</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>0/40</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'>0/
|
|
35
|
+
<span class='fraction'>0/50</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/14</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>0/37</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>
|
|
@@ -273,70 +273,7 @@
|
|
|
273
273
|
<a name='L208'></a><a href='#L208'>208</a>
|
|
274
274
|
<a name='L209'></a><a href='#L209'>209</a>
|
|
275
275
|
<a name='L210'></a><a href='#L210'>210</a>
|
|
276
|
-
<a name='L211'></a><a href='#L211'>211</a>
|
|
277
|
-
<a name='L212'></a><a href='#L212'>212</a>
|
|
278
|
-
<a name='L213'></a><a href='#L213'>213</a>
|
|
279
|
-
<a name='L214'></a><a href='#L214'>214</a>
|
|
280
|
-
<a name='L215'></a><a href='#L215'>215</a>
|
|
281
|
-
<a name='L216'></a><a href='#L216'>216</a>
|
|
282
|
-
<a name='L217'></a><a href='#L217'>217</a>
|
|
283
|
-
<a name='L218'></a><a href='#L218'>218</a>
|
|
284
|
-
<a name='L219'></a><a href='#L219'>219</a>
|
|
285
|
-
<a name='L220'></a><a href='#L220'>220</a>
|
|
286
|
-
<a name='L221'></a><a href='#L221'>221</a>
|
|
287
|
-
<a name='L222'></a><a href='#L222'>222</a>
|
|
288
|
-
<a name='L223'></a><a href='#L223'>223</a>
|
|
289
|
-
<a name='L224'></a><a href='#L224'>224</a>
|
|
290
|
-
<a name='L225'></a><a href='#L225'>225</a>
|
|
291
|
-
<a name='L226'></a><a href='#L226'>226</a>
|
|
292
|
-
<a name='L227'></a><a href='#L227'>227</a>
|
|
293
|
-
<a name='L228'></a><a href='#L228'>228</a>
|
|
294
|
-
<a name='L229'></a><a href='#L229'>229</a>
|
|
295
|
-
<a name='L230'></a><a href='#L230'>230</a>
|
|
296
|
-
<a name='L231'></a><a href='#L231'>231</a>
|
|
297
|
-
<a name='L232'></a><a href='#L232'>232</a>
|
|
298
|
-
<a name='L233'></a><a href='#L233'>233</a>
|
|
299
|
-
<a name='L234'></a><a href='#L234'>234</a>
|
|
300
|
-
<a name='L235'></a><a href='#L235'>235</a>
|
|
301
|
-
<a name='L236'></a><a href='#L236'>236</a>
|
|
302
|
-
<a name='L237'></a><a href='#L237'>237</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">4x</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>
|
|
307
|
-
<span class="cline-any cline-neutral"> </span>
|
|
308
|
-
<span class="cline-any cline-neutral"> </span>
|
|
309
|
-
<span class="cline-any cline-neutral"> </span>
|
|
310
|
-
<span class="cline-any cline-neutral"> </span>
|
|
311
|
-
<span class="cline-any cline-neutral"> </span>
|
|
312
|
-
<span class="cline-any cline-neutral"> </span>
|
|
313
|
-
<span class="cline-any cline-neutral"> </span>
|
|
314
|
-
<span class="cline-any cline-neutral"> </span>
|
|
315
|
-
<span class="cline-any cline-neutral"> </span>
|
|
316
|
-
<span class="cline-any cline-neutral"> </span>
|
|
317
|
-
<span class="cline-any cline-neutral"> </span>
|
|
318
|
-
<span class="cline-any cline-neutral"> </span>
|
|
319
|
-
<span class="cline-any cline-neutral"> </span>
|
|
320
|
-
<span class="cline-any cline-neutral"> </span>
|
|
321
|
-
<span class="cline-any cline-neutral"> </span>
|
|
322
|
-
<span class="cline-any cline-neutral"> </span>
|
|
323
|
-
<span class="cline-any cline-neutral"> </span>
|
|
324
|
-
<span class="cline-any cline-neutral"> </span>
|
|
325
|
-
<span class="cline-any cline-yes">4x</span>
|
|
326
|
-
<span class="cline-any cline-neutral"> </span>
|
|
327
|
-
<span class="cline-any cline-neutral"> </span>
|
|
328
|
-
<span class="cline-any cline-neutral"> </span>
|
|
329
|
-
<span class="cline-any cline-neutral"> </span>
|
|
330
|
-
<span class="cline-any cline-neutral"> </span>
|
|
331
|
-
<span class="cline-any cline-neutral"> </span>
|
|
332
|
-
<span class="cline-any cline-neutral"> </span>
|
|
333
|
-
<span class="cline-any cline-neutral"> </span>
|
|
334
|
-
<span class="cline-any cline-neutral"> </span>
|
|
335
|
-
<span class="cline-any cline-neutral"> </span>
|
|
336
|
-
<span class="cline-any cline-neutral"> </span>
|
|
337
|
-
<span class="cline-any cline-neutral"> </span>
|
|
338
|
-
<span class="cline-any cline-neutral"> </span>
|
|
339
|
-
<span class="cline-any cline-neutral"> </span>
|
|
276
|
+
<a name='L211'></a><a href='#L211'>211</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
340
277
|
<span class="cline-any cline-neutral"> </span>
|
|
341
278
|
<span class="cline-any cline-neutral"> </span>
|
|
342
279
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -351,6 +288,7 @@
|
|
|
351
288
|
<span class="cline-any cline-neutral"> </span>
|
|
352
289
|
<span class="cline-any cline-neutral"> </span>
|
|
353
290
|
<span class="cline-any cline-neutral"> </span>
|
|
291
|
+
<span class="cline-any cline-no"> </span>
|
|
354
292
|
<span class="cline-any cline-neutral"> </span>
|
|
355
293
|
<span class="cline-any cline-neutral"> </span>
|
|
356
294
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -359,7 +297,6 @@
|
|
|
359
297
|
<span class="cline-any cline-neutral"> </span>
|
|
360
298
|
<span class="cline-any cline-neutral"> </span>
|
|
361
299
|
<span class="cline-any cline-neutral"> </span>
|
|
362
|
-
<span class="cline-any cline-yes">4x</span>
|
|
363
300
|
<span class="cline-any cline-neutral"> </span>
|
|
364
301
|
<span class="cline-any cline-neutral"> </span>
|
|
365
302
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -370,25 +307,37 @@
|
|
|
370
307
|
<span class="cline-any cline-neutral"> </span>
|
|
371
308
|
<span class="cline-any cline-neutral"> </span>
|
|
372
309
|
<span class="cline-any cline-neutral"> </span>
|
|
310
|
+
<span class="cline-any cline-no"> </span>
|
|
373
311
|
<span class="cline-any cline-neutral"> </span>
|
|
312
|
+
<span class="cline-any cline-no"> </span>
|
|
374
313
|
<span class="cline-any cline-neutral"> </span>
|
|
314
|
+
<span class="cline-any cline-no"> </span>
|
|
315
|
+
<span class="cline-any cline-no"> </span>
|
|
375
316
|
<span class="cline-any cline-neutral"> </span>
|
|
376
317
|
<span class="cline-any cline-neutral"> </span>
|
|
318
|
+
<span class="cline-any cline-no"> </span>
|
|
377
319
|
<span class="cline-any cline-neutral"> </span>
|
|
320
|
+
<span class="cline-any cline-no"> </span>
|
|
378
321
|
<span class="cline-any cline-neutral"> </span>
|
|
322
|
+
<span class="cline-any cline-no"> </span>
|
|
323
|
+
<span class="cline-any cline-no"> </span>
|
|
324
|
+
<span class="cline-any cline-no"> </span>
|
|
325
|
+
<span class="cline-any cline-no"> </span>
|
|
326
|
+
<span class="cline-any cline-no"> </span>
|
|
327
|
+
<span class="cline-any cline-no"> </span>
|
|
379
328
|
<span class="cline-any cline-neutral"> </span>
|
|
380
|
-
<span class="cline-any cline-yes">4x</span>
|
|
381
329
|
<span class="cline-any cline-neutral"> </span>
|
|
382
330
|
<span class="cline-any cline-neutral"> </span>
|
|
383
331
|
<span class="cline-any cline-neutral"> </span>
|
|
332
|
+
<span class="cline-any cline-no"> </span>
|
|
384
333
|
<span class="cline-any cline-neutral"> </span>
|
|
385
|
-
<span class="cline-any cline-yes">4x</span>
|
|
386
334
|
<span class="cline-any cline-neutral"> </span>
|
|
387
335
|
<span class="cline-any cline-neutral"> </span>
|
|
336
|
+
<span class="cline-any cline-no"> </span>
|
|
337
|
+
<span class="cline-any cline-no"> </span>
|
|
388
338
|
<span class="cline-any cline-neutral"> </span>
|
|
389
339
|
<span class="cline-any cline-neutral"> </span>
|
|
390
340
|
<span class="cline-any cline-neutral"> </span>
|
|
391
|
-
<span class="cline-any cline-yes">4x</span>
|
|
392
341
|
<span class="cline-any cline-neutral"> </span>
|
|
393
342
|
<span class="cline-any cline-neutral"> </span>
|
|
394
343
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -414,17 +363,28 @@
|
|
|
414
363
|
<span class="cline-any cline-neutral"> </span>
|
|
415
364
|
<span class="cline-any cline-neutral"> </span>
|
|
416
365
|
<span class="cline-any cline-neutral"> </span>
|
|
366
|
+
<span class="cline-any cline-no"> </span>
|
|
417
367
|
<span class="cline-any cline-neutral"> </span>
|
|
368
|
+
<span class="cline-any cline-no"> </span>
|
|
369
|
+
<span class="cline-any cline-no"> </span>
|
|
418
370
|
<span class="cline-any cline-neutral"> </span>
|
|
419
371
|
<span class="cline-any cline-neutral"> </span>
|
|
420
372
|
<span class="cline-any cline-neutral"> </span>
|
|
373
|
+
<span class="cline-any cline-no"> </span>
|
|
374
|
+
<span class="cline-any cline-no"> </span>
|
|
421
375
|
<span class="cline-any cline-neutral"> </span>
|
|
422
376
|
<span class="cline-any cline-neutral"> </span>
|
|
423
377
|
<span class="cline-any cline-neutral"> </span>
|
|
378
|
+
<span class="cline-any cline-no"> </span>
|
|
379
|
+
<span class="cline-any cline-no"> </span>
|
|
424
380
|
<span class="cline-any cline-neutral"> </span>
|
|
425
381
|
<span class="cline-any cline-neutral"> </span>
|
|
382
|
+
<span class="cline-any cline-no"> </span>
|
|
426
383
|
<span class="cline-any cline-neutral"> </span>
|
|
384
|
+
<span class="cline-any cline-no"> </span>
|
|
385
|
+
<span class="cline-any cline-no"> </span>
|
|
427
386
|
<span class="cline-any cline-neutral"> </span>
|
|
387
|
+
<span class="cline-any cline-no"> </span>
|
|
428
388
|
<span class="cline-any cline-neutral"> </span>
|
|
429
389
|
<span class="cline-any cline-neutral"> </span>
|
|
430
390
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -432,8 +392,10 @@
|
|
|
432
392
|
<span class="cline-any cline-neutral"> </span>
|
|
433
393
|
<span class="cline-any cline-neutral"> </span>
|
|
434
394
|
<span class="cline-any cline-neutral"> </span>
|
|
395
|
+
<span class="cline-any cline-no"> </span>
|
|
435
396
|
<span class="cline-any cline-neutral"> </span>
|
|
436
397
|
<span class="cline-any cline-neutral"> </span>
|
|
398
|
+
<span class="cline-any cline-no"> </span>
|
|
437
399
|
<span class="cline-any cline-neutral"> </span>
|
|
438
400
|
<span class="cline-any cline-neutral"> </span>
|
|
439
401
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -443,6 +405,7 @@
|
|
|
443
405
|
<span class="cline-any cline-neutral"> </span>
|
|
444
406
|
<span class="cline-any cline-neutral"> </span>
|
|
445
407
|
<span class="cline-any cline-neutral"> </span>
|
|
408
|
+
<span class="cline-any cline-no"> </span>
|
|
446
409
|
<span class="cline-any cline-neutral"> </span>
|
|
447
410
|
<span class="cline-any cline-neutral"> </span>
|
|
448
411
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -459,11 +422,17 @@
|
|
|
459
422
|
<span class="cline-any cline-neutral"> </span>
|
|
460
423
|
<span class="cline-any cline-neutral"> </span>
|
|
461
424
|
<span class="cline-any cline-neutral"> </span>
|
|
425
|
+
<span class="cline-any cline-no"> </span>
|
|
426
|
+
<span class="cline-any cline-no"> </span>
|
|
462
427
|
<span class="cline-any cline-neutral"> </span>
|
|
428
|
+
<span class="cline-any cline-no"> </span>
|
|
463
429
|
<span class="cline-any cline-neutral"> </span>
|
|
464
430
|
<span class="cline-any cline-neutral"> </span>
|
|
465
431
|
<span class="cline-any cline-neutral"> </span>
|
|
432
|
+
<span class="cline-any cline-no"> </span>
|
|
433
|
+
<span class="cline-any cline-no"> </span>
|
|
466
434
|
<span class="cline-any cline-neutral"> </span>
|
|
435
|
+
<span class="cline-any cline-no"> </span>
|
|
467
436
|
<span class="cline-any cline-neutral"> </span>
|
|
468
437
|
<span class="cline-any cline-neutral"> </span>
|
|
469
438
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -480,6 +449,7 @@
|
|
|
480
449
|
<span class="cline-any cline-neutral"> </span>
|
|
481
450
|
<span class="cline-any cline-neutral"> </span>
|
|
482
451
|
<span class="cline-any cline-neutral"> </span>
|
|
452
|
+
<span class="cline-any cline-no"> </span>
|
|
483
453
|
<span class="cline-any cline-neutral"> </span>
|
|
484
454
|
<span class="cline-any cline-neutral"> </span>
|
|
485
455
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -490,7 +460,6 @@
|
|
|
490
460
|
<span class="cline-any cline-neutral"> </span>
|
|
491
461
|
<span class="cline-any cline-neutral"> </span>
|
|
492
462
|
<span class="cline-any cline-neutral"> </span>
|
|
493
|
-
<span class="cline-any cline-yes">4x</span>
|
|
494
463
|
<span class="cline-any cline-neutral"> </span>
|
|
495
464
|
<span class="cline-any cline-neutral"> </span>
|
|
496
465
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -506,7 +475,6 @@
|
|
|
506
475
|
<span class="cline-any cline-neutral"> </span>
|
|
507
476
|
<span class="cline-any cline-neutral"> </span>
|
|
508
477
|
<span class="cline-any cline-neutral"> </span>
|
|
509
|
-
<span class="cline-any cline-yes">4x</span>
|
|
510
478
|
<span class="cline-any cline-neutral"> </span>
|
|
511
479
|
<span class="cline-any cline-neutral"> </span>
|
|
512
480
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -515,262 +483,216 @@
|
|
|
515
483
|
<span class="cline-any cline-neutral"> </span>
|
|
516
484
|
<span class="cline-any cline-neutral"> </span>
|
|
517
485
|
<span class="cline-any cline-neutral"> </span>
|
|
518
|
-
<span class="cline-any cline-neutral"> </span>
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
<span class="
|
|
534
|
-
|
|
535
|
-
<span class="
|
|
536
|
-
<span class="
|
|
537
|
-
|
|
538
|
-
<span class="
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
486
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
487
|
+
import PropTypes from 'prop-types';
|
|
488
|
+
|
|
489
|
+
import {
|
|
490
|
+
Button,
|
|
491
|
+
Dropdown,
|
|
492
|
+
DropdownButton,
|
|
493
|
+
DropdownMenu,
|
|
494
|
+
nativeChangeFieldValue as nativeChangeField,
|
|
495
|
+
Label,
|
|
496
|
+
} from '@folio/stripes/components';
|
|
497
|
+
|
|
498
|
+
import css from '../../../styles/RichSelect.css';
|
|
499
|
+
import FormattedKintMessage from '../FormattedKintMessage';
|
|
500
|
+
|
|
501
|
+
const RichSelect = <span class="cstat-no" title="statement not covered" >forwardRef(<span class="fstat-no" title="function not covered" >({</span></span>
|
|
502
|
+
ariaLabel,
|
|
503
|
+
disabled = <span class="branch-0 cbranch-no" title="branch not covered" >false,</span>
|
|
504
|
+
dropdownProps = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
505
|
+
id,
|
|
506
|
+
input: formInput = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
507
|
+
intlKey: passedIntlKey,
|
|
508
|
+
intlNS: passedIntlNS,
|
|
509
|
+
label,
|
|
510
|
+
meta,
|
|
511
|
+
onChange,
|
|
512
|
+
options: userOptions = <span class="branch-0 cbranch-no" title="branch not covered" >[],</span>
|
|
513
|
+
placeholder,
|
|
514
|
+
renderMenu,
|
|
515
|
+
renderOption,
|
|
516
|
+
renderTrigger,
|
|
517
|
+
required = <span class="branch-0 cbranch-no" title="branch not covered" >false,</span>
|
|
518
|
+
value
|
|
519
|
+
}, ref) => {
|
|
520
|
+
const hiddenInput = <span class="cstat-no" title="statement not covered" >useRef(null);</span>
|
|
521
|
+
|
|
522
|
+
const [internalValue, setInternalValue] = <span class="cstat-no" title="statement not covered" >useState(meta?.initial ?? value ?? '');</span>
|
|
523
|
+
|
|
524
|
+
const findSelectedOptionByValue = <span class="cstat-no" title="statement not covered" >useCallback(<span class="fstat-no" title="function not covered" >(v</span>al) => {</span>
|
|
525
|
+
<span class="cstat-no" title="statement not covered" > return userOptions.find(<span class="fstat-no" title="function not covered" >op</span>t => <span class="cstat-no" title="statement not covered" >opt.value === val)</span>;</span>
|
|
526
|
+
}, [userOptions]);
|
|
527
|
+
|
|
528
|
+
const [selectedOption, setSelectedOption] = <span class="cstat-no" title="statement not covered" >useState(findSelectedOptionByValue(meta?.initial ?? '') ?? {});</span>
|
|
529
|
+
|
|
530
|
+
<span class="cstat-no" title="statement not covered" > useEffect(<span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
531
|
+
// We treat non-undefined value/formInput values as valid values, whereas undefined is only relevant when prop has not been provided
|
|
532
|
+
<span class="cstat-no" title="statement not covered" > if (value !== undefined && !(value === selectedOption?.value && value === internalValue)) {</span>
|
|
533
|
+
<span class="cstat-no" title="statement not covered" > setSelectedOption(findSelectedOptionByValue(value));</span>
|
|
534
|
+
<span class="cstat-no" title="statement not covered" > setInternalValue(value);</span>
|
|
535
|
+
} else <span class="cstat-no" title="statement not covered" >if (formInput?.value !== undefined && !(value === selectedOption?.value && value === internalValue)) {</span>
|
|
536
|
+
<span class="cstat-no" title="statement not covered" > setSelectedOption(findSelectedOptionByValue(formInput.value));</span>
|
|
537
|
+
<span class="cstat-no" title="statement not covered" > setInternalValue(formInput.value);</span>
|
|
550
538
|
}
|
|
551
|
-
]
|
|
552
|
-
'customPropertiesEndpoint': 'erm/custprops',
|
|
553
|
-
'labelOverrides': {
|
|
554
|
-
'paneTitle': '<Memo />',
|
|
555
|
-
'retired': '<Memo />',
|
|
556
|
-
'primaryRetired': '<Memo />'
|
|
557
|
-
},
|
|
558
|
-
'onSelectCustomProperty': <span class="fstat-no" title="function not covered" >()</span> => {}
|
|
559
|
-
};
|
|
539
|
+
}, [formInput, value, internalValue, selectedOption, findSelectedOptionByValue]);
|
|
560
540
|
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
541
|
+
// Way to grab internal selectedOption state, thereby avoiding having to reparse options for it
|
|
542
|
+
<span class="cstat-no" title="statement not covered" > useImperativeHandle(ref, <span class="fstat-no" title="function not covered" >()</span> => (<span class="cstat-no" title="statement not covered" >{</span></span>
|
|
543
|
+
selectedOption
|
|
544
|
+
}));
|
|
545
|
+
|
|
546
|
+
const defaultRenderTrigger = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span> onToggle, triggerRef, keyHandler, ariaProps, getTriggerProps }) => {</span>
|
|
547
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
548
|
+
<DropdownButton
|
|
549
|
+
ref={triggerRef}
|
|
550
|
+
buttonClass={css.triggerButton}
|
|
551
|
+
buttonStyle="none"
|
|
552
|
+
disabled={disabled}
|
|
553
|
+
marginBottom0
|
|
554
|
+
onClick={onToggle}
|
|
555
|
+
onKeyDown={keyHandler}
|
|
556
|
+
paddingSide0
|
|
557
|
+
type="button"
|
|
558
|
+
{...getTriggerProps()}
|
|
559
|
+
{...ariaProps}
|
|
560
|
+
>
|
|
561
|
+
{
|
|
562
|
+
selectedOption?.label ??
|
|
563
|
+
selectedOption?.value ??
|
|
564
|
+
(internalValue || null) ??
|
|
565
|
+
placeholder ??
|
|
566
|
+
<FormattedKintMessage
|
|
567
|
+
id="pleaseSelectOption"
|
|
568
|
+
intlKey={passedIntlKey}
|
|
569
|
+
intlNS={passedIntlNS}
|
|
570
|
+
/>
|
|
571
|
+
}
|
|
572
|
+
</DropdownButton>
|
|
573
|
+
);
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
const handleChange = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(e</span>) => {</span>
|
|
577
|
+
// Actually set the value in the form (If formInput exists)
|
|
578
|
+
<span class="cstat-no" title="statement not covered" > if (formInput?.onChange) {</span>
|
|
579
|
+
<span class="cstat-no" title="statement not covered" > formInput.onChange(e);</span>
|
|
578
580
|
}
|
|
579
|
-
],
|
|
580
|
-
'customPropertiesEndpoint': 'erm/custprops',
|
|
581
|
-
'helpPopovers': {
|
|
582
|
-
'name': '<Memo />',
|
|
583
|
-
'label': '<Memo />',
|
|
584
|
-
'ctx': '<Memo />'
|
|
585
|
-
},
|
|
586
|
-
'labelOverrides': {
|
|
587
|
-
'modalTitleEdit': '<Memo />',
|
|
588
|
-
'modalTitleNew': '<Memo />',
|
|
589
|
-
'paneTitle': 'Supplementary properties',
|
|
590
|
-
'retired': '<Memo />',
|
|
591
|
-
'primaryRetired': '<Memo />',
|
|
592
|
-
'ctx': '<Memo />',
|
|
593
|
-
'category': '<Memo />'
|
|
594
|
-
},
|
|
595
|
-
'refdataEndpoint': 'erm/refdata'
|
|
596
|
-
};
|
|
597
581
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
'value': 'OpenAccess',
|
|
604
|
-
'label': 'OpenAccess'
|
|
605
|
-
},
|
|
606
|
-
{
|
|
607
|
-
'value': 'test',
|
|
608
|
-
'label': 'test'
|
|
609
|
-
},
|
|
610
|
-
{
|
|
611
|
-
'value': 'isNull',
|
|
612
|
-
'label': 'None'
|
|
613
|
-
}
|
|
614
|
-
];
|
|
582
|
+
// If the user has set up an onChange, this will ensure that that fires
|
|
583
|
+
<span class="cstat-no" title="statement not covered" > if (onChange) {</span>
|
|
584
|
+
<span class="cstat-no" title="statement not covered" > onChange(e, e.target.value);</span>
|
|
585
|
+
}
|
|
586
|
+
};
|
|
615
587
|
|
|
616
|
-
const
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
};
|
|
588
|
+
const changeField = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(v</span>al) => {</span>
|
|
589
|
+
<span class="cstat-no" title="statement not covered" > nativeChangeField(hiddenInput, false, val);</span>
|
|
590
|
+
};
|
|
620
591
|
|
|
621
|
-
const
|
|
622
|
-
'paneTitle': '<Memo />',
|
|
623
|
-
'retired': 'Deprecated',
|
|
624
|
-
'primaryRetired': '<Memo />'
|
|
625
|
-
};
|
|
592
|
+
const defaultRenderOption = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(o</span>pt) => (<span class="cstat-no" title="statement not covered" >opt.label ?? opt.value)</span>;</span>
|
|
626
593
|
|
|
627
|
-
const
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
{
|
|
640
|
-
'label': 'TitleInstance.Type',
|
|
641
|
-
'value': '2c91809c80f3bc7e0180f3c349d40003'
|
|
642
|
-
},
|
|
643
|
-
{
|
|
644
|
-
'label': 'SubscriptionAgreementOrg.Role',
|
|
645
|
-
'value': '2c91809c80f3bc7e0180f3c349e30006'
|
|
646
|
-
},
|
|
647
|
-
{
|
|
648
|
-
'label': 'ContentType.ContentType',
|
|
649
|
-
'value': '2c91809c80f3bc7e0180f3c349ea0008'
|
|
650
|
-
},
|
|
651
|
-
{
|
|
652
|
-
'label': 'LicenseAmendmentStatus.Status',
|
|
653
|
-
'value': '2c91809c80f3bc7e0180f3c349fe000c'
|
|
654
|
-
},
|
|
655
|
-
{
|
|
656
|
-
'label': 'StringTemplate.Context',
|
|
657
|
-
'value': '2c91809c80f3bc7e0180f3c34a170011'
|
|
658
|
-
},
|
|
659
|
-
{
|
|
660
|
-
'label': 'Global.Yes_No',
|
|
661
|
-
'value': '2c91809c80f3bc7e0180f3c34a270014'
|
|
662
|
-
},
|
|
663
|
-
{
|
|
664
|
-
'label': 'SubscriptionAgreement.AgreementType',
|
|
665
|
-
'value': '2c91809c80f3bc7e0180f3c34a3e0017'
|
|
666
|
-
},
|
|
667
|
-
{
|
|
668
|
-
'label': 'SubscriptionAgreement.RenewalPriority',
|
|
669
|
-
'value': '2c91809c80f3bc7e0180f3c34a4f001b'
|
|
670
|
-
},
|
|
671
|
-
{
|
|
672
|
-
'label': 'AgreementRelationship.Type',
|
|
673
|
-
'value': '2c91809c80f3bc7e0180f3c34aa20026'
|
|
674
|
-
},
|
|
675
|
-
{
|
|
676
|
-
'label': 'InternalContact.Role',
|
|
677
|
-
'value': '2c91809c80f3bc7e0180f3c34abd002c'
|
|
678
|
-
},
|
|
679
|
-
{
|
|
680
|
-
'label': 'Pkg.AvailabilityScope',
|
|
681
|
-
'value': '2c91809c80f3bc7e0180f3c34ad20031'
|
|
682
|
-
},
|
|
683
|
-
{
|
|
684
|
-
'label': 'Pkg.LifecycleStatus',
|
|
685
|
-
'value': '2c91809c80f3bc7e0180f3c34ae90036'
|
|
686
|
-
},
|
|
687
|
-
{
|
|
688
|
-
'label': 'Pkg.Type',
|
|
689
|
-
'value': '2c91809c80f3bc7e0180f3c34aff003b'
|
|
690
|
-
},
|
|
691
|
-
{
|
|
692
|
-
'label': 'RemoteLicenseLink.Status',
|
|
693
|
-
'value': '2c91809c80f3bc7e0180f3c34b11003f'
|
|
694
|
-
},
|
|
695
|
-
{
|
|
696
|
-
'label': 'PersistentJob.Result',
|
|
697
|
-
'value': '2c91809c80f3bc7e0180f3c34b220043'
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
'label': 'PersistentJob.Status',
|
|
701
|
-
'value': '2c91809c80f3bc7e0180f3c34b360048'
|
|
702
|
-
},
|
|
703
|
-
{
|
|
704
|
-
'label': 'DocumentAttachment.AtType',
|
|
705
|
-
'value': '2c91809c80f3bc7e0180f3c34b46004c'
|
|
706
|
-
},
|
|
707
|
-
{
|
|
708
|
-
'label': 'FileStorageEngines',
|
|
709
|
-
'value': '2c91809c80f3bc7e0180f3c34b920050'
|
|
710
|
-
},
|
|
711
|
-
{
|
|
712
|
-
'label': 'Yes/No/Other',
|
|
713
|
-
'value': '2c91809c80f3bc7e0180f3c34c45005a'
|
|
714
|
-
},
|
|
715
|
-
{
|
|
716
|
-
'label': 'AuthIdent',
|
|
717
|
-
'value': '2c91809c80f3bc7e0180f3c34c52005e'
|
|
718
|
-
},
|
|
719
|
-
{
|
|
720
|
-
'label': 'TitleInstance.PublicationType',
|
|
721
|
-
'value': '2c91809c80f3bc7e0180f3c353de0068'
|
|
722
|
-
},
|
|
723
|
-
{
|
|
724
|
-
'label': 'IdentifierOccurrence.Status',
|
|
725
|
-
'value': '2c91809c80f3bc7e0180f3c3543b006a'
|
|
726
|
-
}
|
|
727
|
-
];
|
|
594
|
+
const defaultRenderMenu = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span> onToggle }) => (</span>
|
|
595
|
+
<span class="cstat-no" title="statement not covered" > <DropdownMenu></span>
|
|
596
|
+
{userOptions.map(<span class="fstat-no" title="function not covered" >op</span>t => {
|
|
597
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
598
|
+
<Button
|
|
599
|
+
autoFocus={selectedOption?.value === opt.value}
|
|
600
|
+
buttonStyle="dropdownItem"
|
|
601
|
+
id={`${id}-${formInput.name}-option-${opt.value}`}
|
|
602
|
+
marginBottom0
|
|
603
|
+
onClick={<span class="fstat-no" title="function not covered" >()</span> => {
|
|
604
|
+
// Trigger change event
|
|
605
|
+
<span class="cstat-no" title="statement not covered" > changeField(opt.value);</span>
|
|
728
606
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
'ctx': [{
|
|
740
|
-
'value': 'OpenAccess',
|
|
741
|
-
'label': 'OpenAccess'
|
|
742
|
-
}]
|
|
743
|
-
};
|
|
607
|
+
// Close the menu on select
|
|
608
|
+
<span class="cstat-no" title="statement not covered" > onToggle();</span>
|
|
609
|
+
}}
|
|
610
|
+
>
|
|
611
|
+
{renderOption ? renderOption(opt) : defaultRenderOption(opt)}
|
|
612
|
+
</Button>
|
|
613
|
+
);
|
|
614
|
+
})}
|
|
615
|
+
</DropdownMenu>
|
|
616
|
+
);
|
|
744
617
|
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
618
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
619
|
+
<>
|
|
620
|
+
{(label || ariaLabel) ? (
|
|
621
|
+
<Label
|
|
622
|
+
className={ariaLabel && 'sr-only'}
|
|
623
|
+
htmlFor={id}
|
|
624
|
+
id={`${id}-label`}
|
|
625
|
+
required={required}
|
|
626
|
+
>
|
|
627
|
+
{ariaLabel || label}
|
|
628
|
+
</Label>)
|
|
629
|
+
: ''
|
|
630
|
+
}
|
|
631
|
+
<Dropdown
|
|
632
|
+
hasPadding
|
|
633
|
+
placement="bottom-start"
|
|
634
|
+
renderMenu={<span class="fstat-no" title="function not covered" >(m</span>enuProps) => {
|
|
635
|
+
<span class="cstat-no" title="statement not covered" > if (renderMenu) {</span>
|
|
636
|
+
<span class="cstat-no" title="statement not covered" > return renderMenu({ ...menuProps, selectedOption, changeField });</span>
|
|
637
|
+
} else {
|
|
638
|
+
<span class="cstat-no" title="statement not covered" > return defaultRenderMenu(menuProps);</span>
|
|
639
|
+
}
|
|
640
|
+
}}
|
|
641
|
+
renderTrigger={<span class="fstat-no" title="function not covered" >(t</span>riggerProps) => {
|
|
642
|
+
<span class="cstat-no" title="statement not covered" > if (renderTrigger) {</span>
|
|
643
|
+
<span class="cstat-no" title="statement not covered" > return renderTrigger({ ...triggerProps, selectedOption });</span>
|
|
644
|
+
} else {
|
|
645
|
+
<span class="cstat-no" title="statement not covered" > return defaultRenderTrigger(triggerProps);</span>
|
|
646
|
+
}
|
|
647
|
+
}}
|
|
648
|
+
{...dropdownProps}
|
|
649
|
+
/>
|
|
650
|
+
<input
|
|
651
|
+
{...formInput}
|
|
652
|
+
ref={hiddenInput}
|
|
653
|
+
hidden
|
|
654
|
+
onChange={handleChange}
|
|
655
|
+
type="text"
|
|
656
|
+
value={internalValue}
|
|
657
|
+
/>
|
|
658
|
+
</>
|
|
659
|
+
);
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
<span class="cstat-no" title="statement not covered" >RichSelect.propTypes = {</span>
|
|
663
|
+
ariaLabel: PropTypes.string,
|
|
664
|
+
disabled: PropTypes.bool,
|
|
665
|
+
dropdownProps: PropTypes.object,
|
|
666
|
+
id: PropTypes.string,
|
|
667
|
+
input: PropTypes.object,
|
|
668
|
+
intlKey: PropTypes.string,
|
|
669
|
+
intlNS: PropTypes.string,
|
|
670
|
+
label: PropTypes.oneOfType([
|
|
671
|
+
PropTypes.string,
|
|
672
|
+
PropTypes.func,
|
|
673
|
+
PropTypes.node
|
|
674
|
+
]),
|
|
675
|
+
meta: PropTypes.object,
|
|
676
|
+
onChange: PropTypes.func,
|
|
677
|
+
options: PropTypes.arrayOf(PropTypes.shape({
|
|
678
|
+
value: PropTypes.string.isRequired,
|
|
679
|
+
label: PropTypes.oneOfType([
|
|
680
|
+
PropTypes.string,
|
|
681
|
+
PropTypes.node
|
|
682
|
+
])
|
|
683
|
+
})),
|
|
684
|
+
placeholder: PropTypes.oneOfType([
|
|
685
|
+
PropTypes.string,
|
|
686
|
+
PropTypes.node
|
|
687
|
+
]),
|
|
688
|
+
renderMenu: PropTypes.func,
|
|
689
|
+
renderOption: PropTypes.func,
|
|
690
|
+
renderTrigger: PropTypes.func,
|
|
691
|
+
required: PropTypes.bool,
|
|
692
|
+
value: PropTypes.string,
|
|
773
693
|
};
|
|
694
|
+
|
|
695
|
+
export default RichSelect;
|
|
774
696
|
</pre></td></tr></table></pre>
|
|
775
697
|
|
|
776
698
|
<div class='push'></div><!-- for sticky footer -->
|
|
@@ -778,16 +700,16 @@ export {
|
|
|
778
700
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
779
701
|
Code coverage generated by
|
|
780
702
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
781
|
-
at
|
|
703
|
+
at 2022-09-16T13:23:25.290Z
|
|
782
704
|
</div>
|
|
783
|
-
<script src="
|
|
705
|
+
<script src="../prettify.js"></script>
|
|
784
706
|
<script>
|
|
785
707
|
window.onload = function () {
|
|
786
708
|
prettyPrint();
|
|
787
709
|
};
|
|
788
710
|
</script>
|
|
789
|
-
<script src="
|
|
790
|
-
<script src="
|
|
711
|
+
<script src="../sorter.js"></script>
|
|
712
|
+
<script src="../block-navigation.js"></script>
|
|
791
713
|
</body>
|
|
792
714
|
</html>
|
|
793
715
|
|