@k-int/stripes-kint-components 1.7.0 → 2.1.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 +36 -0
- package/es/index.js +51 -8
- package/es/lib/ActionList/ActionList.js +48 -28
- package/es/lib/ActionList/ActionListFieldArray.js +56 -16
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +198 -0
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +326 -0
- package/es/lib/CustomProperties/Config/CustomPropertiesView.js +166 -0
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +360 -0
- package/es/lib/CustomProperties/Config/index.js +41 -0
- package/es/lib/EditableRefdataList/EditableRefdataList.js +0 -1
- package/es/lib/FormModal/FormModal.js +126 -0
- package/es/lib/{TypeDown → FormModal}/index.js +2 -2
- package/es/lib/NoResultsMessage/NoResultsMessage.js +1 -1
- package/es/lib/SASQRoute/SASQRoute.js +15 -11
- package/es/lib/SASQViewComponent/SASQViewComponent.js +6 -3
- package/es/lib/Typedown/Typedown.js +50 -18
- package/es/lib/constants/customProperties.js +60 -0
- package/es/lib/hooks/index.js +16 -0
- package/es/lib/hooks/useCustomProperties.js +122 -0
- package/es/lib/hooks/useMutateCustomProperties.js +143 -0
- package/es/lib/utils/generateKiwtQueryParams.js +51 -8
- package/junit.xml +40 -40
- package/package.json +5 -3
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +47 -26
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +122 -8
- 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 +418 -0
- package/src/artifacts/coverage-jest/lcov-report/{TypeDown/TypeDown.js.html → CustomProperties/Config/CustomPropertiesSettings.js.html} +268 -232
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesView.js.html +535 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +973 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +176 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +97 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +2 -5
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +298 -0
- package/src/artifacts/coverage-jest/lcov-report/{TypeDown → FormModal}/index.html +14 -14
- package/src/artifacts/coverage-jest/lcov-report/{TypeDown → FormModal}/index.js.html +4 -4
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +43 -16
- 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 +6 -3
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +150 -21
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +112 -0
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +18 -3
- 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 +35 -5
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +8 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.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 +1 -1
- 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 +313 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.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 +271 -0
- 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/useTemplates.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/index.html +62 -47
- 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 +174 -12
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/utils/index.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/renderHelpText.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.info +841 -348
- package/src/index.js +14 -4
- package/src/lib/ActionList/ActionList.js +30 -23
- package/src/lib/ActionList/ActionListFieldArray.js +40 -2
- package/src/lib/ActionList/README.md +4 -1
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +111 -0
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +240 -0
- package/src/lib/CustomProperties/Config/CustomPropertiesView.js +150 -0
- package/src/lib/CustomProperties/Config/CustomPropertyForm.js +296 -0
- package/src/lib/CustomProperties/Config/index.js +4 -0
- package/src/lib/EditableRefdataList/EditableRefdataList.js +0 -1
- package/src/lib/FormModal/FormModal.js +71 -0
- package/src/lib/FormModal/index.js +1 -0
- package/src/lib/NoResultsMessage/NoResultsMessage.js +2 -2
- package/src/lib/SASQRoute/SASQRoute.js +23 -14
- package/src/lib/SASQViewComponent/SASQViewComponent.js +2 -1
- package/src/lib/Typedown/Typedown.js +56 -13
- package/src/lib/constants/customProperties.js +9 -0
- package/src/lib/hooks/index.js +2 -0
- package/src/lib/hooks/useCustomProperties.js +76 -0
- package/src/lib/hooks/useMutateCustomProperties.js +62 -0
- package/src/lib/utils/generateKiwtQueryParams.js +58 -4
- package/styles/TypeDown.css +7 -0
- package/translations/stripes-kint-components/en.json +49 -1
- package/es/lib/TypeDown/TypeDown.js +0 -251
- package/src/lib/TypeDown/README.md +0 -1
- package/src/lib/TypeDown/TypeDown.js +0 -228
- package/src/lib/TypeDown/index.js +0 -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 CustomProperties/Config/CustomPropertiesSettings.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">CustomProperties/Config</a> CustomPropertiesSettings.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/47</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/25</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/18</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/47</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -291,7 +291,19 @@
|
|
|
291
291
|
<a name='L226'></a><a href='#L226'>226</a>
|
|
292
292
|
<a name='L227'></a><a href='#L227'>227</a>
|
|
293
293
|
<a name='L228'></a><a href='#L228'>228</a>
|
|
294
|
-
<a name='L229'></a><a href='#L229'>229</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>
|
|
303
|
+
<a name='L238'></a><a href='#L238'>238</a>
|
|
304
|
+
<a name='L239'></a><a href='#L239'>239</a>
|
|
305
|
+
<a name='L240'></a><a href='#L240'>240</a>
|
|
306
|
+
<a name='L241'></a><a href='#L241'>241</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
295
307
|
<span class="cline-any cline-neutral"> </span>
|
|
296
308
|
<span class="cline-any cline-neutral"> </span>
|
|
297
309
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -312,8 +324,11 @@
|
|
|
312
324
|
<span class="cline-any cline-neutral"> </span>
|
|
313
325
|
<span class="cline-any cline-neutral"> </span>
|
|
314
326
|
<span class="cline-any cline-no"> </span>
|
|
327
|
+
<span class="cline-any cline-no"> </span>
|
|
328
|
+
<span class="cline-any cline-no"> </span>
|
|
315
329
|
<span class="cline-any cline-neutral"> </span>
|
|
316
330
|
<span class="cline-any cline-neutral"> </span>
|
|
331
|
+
<span class="cline-any cline-no"> </span>
|
|
317
332
|
<span class="cline-any cline-neutral"> </span>
|
|
318
333
|
<span class="cline-any cline-neutral"> </span>
|
|
319
334
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -322,26 +337,26 @@
|
|
|
322
337
|
<span class="cline-any cline-neutral"> </span>
|
|
323
338
|
<span class="cline-any cline-neutral"> </span>
|
|
324
339
|
<span class="cline-any cline-no"> </span>
|
|
325
|
-
<span class="cline-any cline-no"> </span>
|
|
326
340
|
<span class="cline-any cline-neutral"> </span>
|
|
327
341
|
<span class="cline-any cline-no"> </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
342
|
<span class="cline-any cline-no"> </span>
|
|
332
|
-
<span class="cline-any cline-neutral"> </span>
|
|
333
343
|
<span class="cline-any cline-no"> </span>
|
|
344
|
+
<span class="cline-any cline-neutral"> </span>
|
|
334
345
|
<span class="cline-any cline-no"> </span>
|
|
335
346
|
<span class="cline-any cline-neutral"> </span>
|
|
336
347
|
<span class="cline-any cline-neutral"> </span>
|
|
337
348
|
<span class="cline-any cline-neutral"> </span>
|
|
349
|
+
<span class="cline-any cline-no"> </span>
|
|
338
350
|
<span class="cline-any cline-neutral"> </span>
|
|
339
351
|
<span class="cline-any cline-neutral"> </span>
|
|
352
|
+
<span class="cline-any cline-no"> </span>
|
|
353
|
+
<span class="cline-any cline-no"> </span>
|
|
340
354
|
<span class="cline-any cline-neutral"> </span>
|
|
341
355
|
<span class="cline-any cline-neutral"> </span>
|
|
342
356
|
<span class="cline-any cline-neutral"> </span>
|
|
343
357
|
<span class="cline-any cline-neutral"> </span>
|
|
344
358
|
<span class="cline-any cline-neutral"> </span>
|
|
359
|
+
<span class="cline-any cline-no"> </span>
|
|
345
360
|
<span class="cline-any cline-neutral"> </span>
|
|
346
361
|
<span class="cline-any cline-neutral"> </span>
|
|
347
362
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -349,11 +364,14 @@
|
|
|
349
364
|
<span class="cline-any cline-neutral"> </span>
|
|
350
365
|
<span class="cline-any cline-neutral"> </span>
|
|
351
366
|
<span class="cline-any cline-neutral"> </span>
|
|
367
|
+
<span class="cline-any cline-no"> </span>
|
|
368
|
+
<span class="cline-any cline-no"> </span>
|
|
369
|
+
<span class="cline-any cline-no"> </span>
|
|
352
370
|
<span class="cline-any cline-neutral"> </span>
|
|
353
371
|
<span class="cline-any cline-neutral"> </span>
|
|
354
372
|
<span class="cline-any cline-neutral"> </span>
|
|
355
373
|
<span class="cline-any cline-no"> </span>
|
|
356
|
-
<span class="cline-any cline-
|
|
374
|
+
<span class="cline-any cline-no"> </span>
|
|
357
375
|
<span class="cline-any cline-no"> </span>
|
|
358
376
|
<span class="cline-any cline-no"> </span>
|
|
359
377
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -363,33 +381,36 @@
|
|
|
363
381
|
<span class="cline-any cline-neutral"> </span>
|
|
364
382
|
<span class="cline-any cline-neutral"> </span>
|
|
365
383
|
<span class="cline-any cline-neutral"> </span>
|
|
384
|
+
<span class="cline-any cline-no"> </span>
|
|
366
385
|
<span class="cline-any cline-neutral"> </span>
|
|
367
386
|
<span class="cline-any cline-neutral"> </span>
|
|
368
387
|
<span class="cline-any cline-no"> </span>
|
|
369
388
|
<span class="cline-any cline-no"> </span>
|
|
389
|
+
<span class="cline-any cline-no"> </span>
|
|
390
|
+
<span class="cline-any cline-neutral"> </span>
|
|
370
391
|
<span class="cline-any cline-neutral"> </span>
|
|
371
392
|
<span class="cline-any cline-no"> </span>
|
|
372
393
|
<span class="cline-any cline-no"> </span>
|
|
373
|
-
<span class="cline-any cline-
|
|
394
|
+
<span class="cline-any cline-no"> </span>
|
|
374
395
|
<span class="cline-any cline-neutral"> </span>
|
|
375
396
|
<span class="cline-any cline-neutral"> </span>
|
|
376
397
|
<span class="cline-any cline-no"> </span>
|
|
377
398
|
<span class="cline-any cline-no"> </span>
|
|
399
|
+
<span class="cline-any cline-no"> </span>
|
|
378
400
|
<span class="cline-any cline-neutral"> </span>
|
|
379
401
|
<span class="cline-any cline-neutral"> </span>
|
|
380
402
|
<span class="cline-any cline-neutral"> </span>
|
|
381
403
|
<span class="cline-any cline-neutral"> </span>
|
|
382
404
|
<span class="cline-any cline-neutral"> </span>
|
|
383
405
|
<span class="cline-any cline-neutral"> </span>
|
|
406
|
+
<span class="cline-any cline-no"> </span>
|
|
407
|
+
<span class="cline-any cline-no"> </span>
|
|
384
408
|
<span class="cline-any cline-neutral"> </span>
|
|
385
409
|
<span class="cline-any cline-neutral"> </span>
|
|
386
410
|
<span class="cline-any cline-neutral"> </span>
|
|
387
411
|
<span class="cline-any cline-neutral"> </span>
|
|
388
412
|
<span class="cline-any cline-neutral"> </span>
|
|
389
413
|
<span class="cline-any cline-no"> </span>
|
|
390
|
-
<span class="cline-any cline-no"> </span>
|
|
391
|
-
<span class="cline-any cline-neutral"> </span>
|
|
392
|
-
<span class="cline-any cline-neutral"> </span>
|
|
393
414
|
<span class="cline-any cline-neutral"> </span>
|
|
394
415
|
<span class="cline-any cline-neutral"> </span>
|
|
395
416
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -397,8 +418,6 @@
|
|
|
397
418
|
<span class="cline-any cline-neutral"> </span>
|
|
398
419
|
<span class="cline-any cline-neutral"> </span>
|
|
399
420
|
<span class="cline-any cline-neutral"> </span>
|
|
400
|
-
<span class="cline-any cline-neutral"> </span>
|
|
401
|
-
<span class="cline-any cline-no"> </span>
|
|
402
421
|
<span class="cline-any cline-no"> </span>
|
|
403
422
|
<span class="cline-any cline-neutral"> </span>
|
|
404
423
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -412,14 +431,17 @@
|
|
|
412
431
|
<span class="cline-any cline-neutral"> </span>
|
|
413
432
|
<span class="cline-any cline-neutral"> </span>
|
|
414
433
|
<span class="cline-any cline-neutral"> </span>
|
|
434
|
+
<span class="cline-any cline-no"> </span>
|
|
415
435
|
<span class="cline-any cline-neutral"> </span>
|
|
416
436
|
<span class="cline-any cline-neutral"> </span>
|
|
417
437
|
<span class="cline-any cline-neutral"> </span>
|
|
418
438
|
<span class="cline-any cline-neutral"> </span>
|
|
419
439
|
<span class="cline-any cline-neutral"> </span>
|
|
440
|
+
<span class="cline-any cline-no"> </span>
|
|
420
441
|
<span class="cline-any cline-neutral"> </span>
|
|
421
442
|
<span class="cline-any cline-neutral"> </span>
|
|
422
443
|
<span class="cline-any cline-neutral"> </span>
|
|
444
|
+
<span class="cline-any cline-no"> </span>
|
|
423
445
|
<span class="cline-any cline-neutral"> </span>
|
|
424
446
|
<span class="cline-any cline-neutral"> </span>
|
|
425
447
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -427,6 +449,8 @@
|
|
|
427
449
|
<span class="cline-any cline-neutral"> </span>
|
|
428
450
|
<span class="cline-any cline-neutral"> </span>
|
|
429
451
|
<span class="cline-any cline-neutral"> </span>
|
|
452
|
+
<span class="cline-any cline-no"> </span>
|
|
453
|
+
<span class="cline-any cline-no"> </span>
|
|
430
454
|
<span class="cline-any cline-neutral"> </span>
|
|
431
455
|
<span class="cline-any cline-neutral"> </span>
|
|
432
456
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -436,8 +460,6 @@
|
|
|
436
460
|
<span class="cline-any cline-neutral"> </span>
|
|
437
461
|
<span class="cline-any cline-neutral"> </span>
|
|
438
462
|
<span class="cline-any cline-neutral"> </span>
|
|
439
|
-
<span class="cline-any cline-neutral"> </span>
|
|
440
|
-
<span class="cline-any cline-no"> </span>
|
|
441
463
|
<span class="cline-any cline-no"> </span>
|
|
442
464
|
<span class="cline-any cline-neutral"> </span>
|
|
443
465
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -449,15 +471,12 @@
|
|
|
449
471
|
<span class="cline-any cline-neutral"> </span>
|
|
450
472
|
<span class="cline-any cline-neutral"> </span>
|
|
451
473
|
<span class="cline-any cline-neutral"> </span>
|
|
452
|
-
<span class="cline-any cline-no"> </span>
|
|
453
|
-
<span class="cline-any cline-neutral"> </span>
|
|
454
474
|
<span class="cline-any cline-neutral"> </span>
|
|
455
475
|
<span class="cline-any cline-neutral"> </span>
|
|
456
476
|
<span class="cline-any cline-neutral"> </span>
|
|
457
477
|
<span class="cline-any cline-neutral"> </span>
|
|
458
478
|
<span class="cline-any cline-neutral"> </span>
|
|
459
479
|
<span class="cline-any cline-neutral"> </span>
|
|
460
|
-
<span class="cline-any cline-no"> </span>
|
|
461
480
|
<span class="cline-any cline-neutral"> </span>
|
|
462
481
|
<span class="cline-any cline-neutral"> </span>
|
|
463
482
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -466,6 +485,7 @@
|
|
|
466
485
|
<span class="cline-any cline-neutral"> </span>
|
|
467
486
|
<span class="cline-any cline-neutral"> </span>
|
|
468
487
|
<span class="cline-any cline-neutral"> </span>
|
|
488
|
+
<span class="cline-any cline-no"> </span>
|
|
469
489
|
<span class="cline-any cline-neutral"> </span>
|
|
470
490
|
<span class="cline-any cline-neutral"> </span>
|
|
471
491
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -495,19 +515,23 @@
|
|
|
495
515
|
<span class="cline-any cline-neutral"> </span>
|
|
496
516
|
<span class="cline-any cline-neutral"> </span>
|
|
497
517
|
<span class="cline-any cline-neutral"> </span>
|
|
518
|
+
<span class="cline-any cline-no"> </span>
|
|
519
|
+
<span class="cline-any cline-neutral"> </span>
|
|
520
|
+
<span class="cline-any cline-no"> </span>
|
|
521
|
+
<span class="cline-any cline-no"> </span>
|
|
522
|
+
<span class="cline-any cline-no"> </span>
|
|
498
523
|
<span class="cline-any cline-neutral"> </span>
|
|
499
524
|
<span class="cline-any cline-neutral"> </span>
|
|
500
525
|
<span class="cline-any cline-neutral"> </span>
|
|
501
526
|
<span class="cline-any cline-neutral"> </span>
|
|
502
|
-
<span class="cline-any cline-no"> </span>
|
|
503
527
|
<span class="cline-any cline-neutral"> </span>
|
|
504
528
|
<span class="cline-any cline-neutral"> </span>
|
|
505
529
|
<span class="cline-any cline-neutral"> </span>
|
|
530
|
+
<span class="cline-any cline-no"> </span>
|
|
506
531
|
<span class="cline-any cline-neutral"> </span>
|
|
507
532
|
<span class="cline-any cline-neutral"> </span>
|
|
508
533
|
<span class="cline-any cline-neutral"> </span>
|
|
509
534
|
<span class="cline-any cline-neutral"> </span>
|
|
510
|
-
<span class="cline-any cline-no"> </span>
|
|
511
535
|
<span class="cline-any cline-neutral"> </span>
|
|
512
536
|
<span class="cline-any cline-neutral"> </span>
|
|
513
537
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -519,234 +543,246 @@
|
|
|
519
543
|
<span class="cline-any cline-neutral"> </span>
|
|
520
544
|
<span class="cline-any cline-neutral"> </span>
|
|
521
545
|
<span class="cline-any cline-neutral"> </span>
|
|
522
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import
|
|
546
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { useState } from 'react';
|
|
523
547
|
import PropTypes from 'prop-types';
|
|
524
|
-
import classnames from 'classnames';
|
|
525
548
|
|
|
526
|
-
import
|
|
549
|
+
import compose from 'compose-function';
|
|
550
|
+
|
|
551
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
552
|
+
|
|
553
|
+
import { useQueryClient } from 'react-query';
|
|
527
554
|
|
|
528
|
-
import
|
|
555
|
+
import SafeHTMLMessage from '@folio/react-intl-safe-html';
|
|
529
556
|
|
|
530
|
-
|
|
531
|
-
import { interactionStyles } from '@folio/stripes-components/lib/sharedStyles/interactionStyles.css';
|
|
557
|
+
import { Button, ConfirmationModal, Pane } from '@folio/stripes/components';
|
|
532
558
|
|
|
533
|
-
import
|
|
534
|
-
import css from '../../../styles/TypeDown.css';
|
|
559
|
+
import FormModal from '../../FormModal/FormModal';
|
|
535
560
|
|
|
536
|
-
import
|
|
537
|
-
import
|
|
561
|
+
import CustomPropertiesLookup from './CustomPropertiesLookup';
|
|
562
|
+
import CustomPropertiesView from './CustomPropertiesView';
|
|
563
|
+
import CustomPropertiesForm from './CustomPropertyForm';
|
|
564
|
+
import { useMutateCustomProperties, useRefdata } from '../../hooks';
|
|
538
565
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
566
|
+
const EDITING = <span class="cstat-no" title="statement not covered" >'edit';</span>
|
|
567
|
+
const CREATING = <span class="cstat-no" title="statement not covered" >'create';</span>
|
|
568
|
+
const VIEWING = <span class="cstat-no" title="statement not covered" >'view';</span>
|
|
569
|
+
|
|
570
|
+
// A default option for setting up panes manually
|
|
571
|
+
const CustomPropertiesSettings = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span></span>
|
|
572
|
+
afterQueryCalls,
|
|
573
|
+
contextFilterOptions,
|
|
574
|
+
customPropertiesEndpoint,
|
|
575
|
+
helpPopovers,
|
|
576
|
+
labelOverrides,
|
|
577
|
+
refdataEndpoint,
|
|
551
578
|
}) => {
|
|
552
|
-
|
|
553
|
-
<span class="cstat-no" title="statement not covered" > if (process.env.NODE_ENV === 'development') {</span>
|
|
554
|
-
// eslint-disable-next-line no-console
|
|
555
|
-
<span class="cstat-no" title="statement not covered" > console.warn('TypeDown component is deprecated, you likely want either Typedown or QueryTypedown');</span>
|
|
556
|
-
}
|
|
557
|
-
}, []);
|
|
579
|
+
const queryClient = <span class="cstat-no" title="statement not covered" >useQueryClient();</span>
|
|
558
580
|
|
|
559
|
-
const
|
|
581
|
+
const intl = <span class="cstat-no" title="statement not covered" >useIntl();</span>
|
|
582
|
+
const [customProperty, setCustomProperty] = <span class="cstat-no" title="statement not covered" >useState();</span>
|
|
583
|
+
const [deleteModal, setDeleteModal] = <span class="cstat-no" title="statement not covered" >useState(false);</span>
|
|
560
584
|
|
|
561
|
-
const
|
|
562
|
-
|
|
585
|
+
const refdata = <span class="cstat-no" title="statement not covered" >useRefdata({</span>
|
|
586
|
+
endpoint: refdataEndpoint,
|
|
587
|
+
});
|
|
563
588
|
|
|
564
|
-
|
|
565
|
-
const {
|
|
566
|
-
refs: {
|
|
567
|
-
listRef,
|
|
568
|
-
triggerRef,
|
|
569
|
-
overlayRef,
|
|
570
|
-
footerRef
|
|
571
|
-
},
|
|
572
|
-
handlers: {
|
|
573
|
-
handleNextFocus,
|
|
574
|
-
listKeyDownHandler,
|
|
575
|
-
searchFieldKeyDownHandler
|
|
576
|
-
},
|
|
577
|
-
variables: {
|
|
578
|
-
open,
|
|
579
|
-
portal,
|
|
580
|
-
resizeRef,
|
|
581
|
-
searchWidth
|
|
582
|
-
}
|
|
583
|
-
} = <span class="cstat-no" title="statement not covered" >useTypedown(input.name);</span>
|
|
589
|
+
const [mode, setMode] = <span class="cstat-no" title="statement not covered" >useState(VIEWING);</span>
|
|
584
590
|
|
|
585
|
-
|
|
586
|
-
<span class="cstat-no" title="statement not covered" >
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
{
|
|
590
|
-
|
|
591
|
-
|
|
591
|
+
// Default props that need hooks are hard
|
|
592
|
+
let renderContextFilterOptions = <span class="cstat-no" title="statement not covered" >contextFilterOptions;</span>
|
|
593
|
+
<span class="cstat-no" title="statement not covered" > if (!contextFilterOptions) {</span>
|
|
594
|
+
/*
|
|
595
|
+
Default is {value: '', label: 'All'}, empty string will map to ALL contexts
|
|
596
|
+
If null context is needed, use
|
|
597
|
+
{value: 'isNull', label: ...}
|
|
598
|
+
*/
|
|
599
|
+
<span class="cstat-no" title="statement not covered" > renderContextFilterOptions = [</span>
|
|
600
|
+
{
|
|
601
|
+
value: '', // empty string is all custoprop contexts
|
|
602
|
+
label: intl.formatMessage({ id: 'stripes-kint-components.customProperties.all' })
|
|
592
603
|
}
|
|
593
|
-
|
|
594
|
-
|
|
604
|
+
];
|
|
605
|
+
}
|
|
595
606
|
|
|
596
|
-
|
|
597
|
-
<span class="cstat-no" title="statement not covered" >
|
|
607
|
+
let renderViewPaneTitle = <span class="cstat-no" title="statement not covered" >labelOverrides?.viewPaneTitle;</span>
|
|
608
|
+
<span class="cstat-no" title="statement not covered" > if (renderViewPaneTitle instanceof Function) {</span>
|
|
609
|
+
<span class="cstat-no" title="statement not covered" > renderViewPaneTitle = renderViewPaneTitle(customProperty);</span>
|
|
610
|
+
}
|
|
598
611
|
|
|
599
|
-
|
|
600
|
-
<span class="cstat-no" title="statement not covered" >
|
|
601
|
-
|
|
602
|
-
|
|
612
|
+
// Defaulting is hard
|
|
613
|
+
const afterQueryCallsSafe = <span class="cstat-no" title="statement not covered" >{</span>
|
|
614
|
+
put: <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >null,</span>
|
|
615
|
+
post: <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >null,</span>
|
|
616
|
+
delete: <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >null,</span>
|
|
617
|
+
...afterQueryCalls
|
|
618
|
+
};
|
|
603
619
|
|
|
604
|
-
const
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
<span class="cstat-no" title="statement not covered" >
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
<span class="cstat-no" title="statement not covered" > handleChange(d);</span>
|
|
630
|
-
<span class="cstat-no" title="statement not covered" > handleNextFocus();</span>
|
|
631
|
-
}}
|
|
632
|
-
onKeyDown={listKeyDownHandler}
|
|
633
|
-
type="button"
|
|
634
|
-
>
|
|
635
|
-
{renderItem(d)}
|
|
636
|
-
</button>
|
|
637
|
-
);
|
|
638
|
-
}) :
|
|
639
|
-
// TODO test this
|
|
640
|
-
<EndOfList />
|
|
641
|
-
}
|
|
642
|
-
</div>
|
|
643
|
-
{renderFooter &&
|
|
644
|
-
<div
|
|
645
|
-
ref={footerRef}
|
|
646
|
-
className={css.footer}
|
|
647
|
-
id="typedown-footer"
|
|
648
|
-
>
|
|
649
|
-
{renderFooter()}
|
|
650
|
-
</div>
|
|
651
|
-
}
|
|
652
|
-
</div>
|
|
653
|
-
);
|
|
654
|
-
}, [
|
|
655
|
-
data,
|
|
656
|
-
footerRef,
|
|
657
|
-
handleChange,
|
|
658
|
-
handleNextFocus,
|
|
659
|
-
input,
|
|
660
|
-
listKeyDownHandler,
|
|
661
|
-
listRef,
|
|
662
|
-
renderFooter,
|
|
663
|
-
renderItem,
|
|
664
|
-
searchWidth,
|
|
665
|
-
uniqueIdentificationPath
|
|
666
|
-
]);
|
|
620
|
+
const {
|
|
621
|
+
post: createCustprop,
|
|
622
|
+
put: editCustProp,
|
|
623
|
+
delete: deleteCustProp
|
|
624
|
+
} = <span class="cstat-no" title="statement not covered" >useMutateCustomProperties({</span>
|
|
625
|
+
afterQueryCalls: {
|
|
626
|
+
put: <span class="fstat-no" title="function not covered" >()</span> => {
|
|
627
|
+
<span class="cstat-no" title="statement not covered" > setMode(VIEWING);</span>
|
|
628
|
+
<span class="cstat-no" title="statement not covered" > queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);</span>
|
|
629
|
+
<span class="cstat-no" title="statement not covered" > afterQueryCallsSafe.put();</span>
|
|
630
|
+
},
|
|
631
|
+
post: <span class="fstat-no" title="function not covered" >()</span> => {
|
|
632
|
+
<span class="cstat-no" title="statement not covered" > setMode(VIEWING);</span>
|
|
633
|
+
<span class="cstat-no" title="statement not covered" > queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);</span>
|
|
634
|
+
<span class="cstat-no" title="statement not covered" > afterQueryCallsSafe.post();</span>
|
|
635
|
+
},
|
|
636
|
+
delete: <span class="fstat-no" title="function not covered" >()</span> => {
|
|
637
|
+
<span class="cstat-no" title="statement not covered" > setMode(VIEWING);</span>
|
|
638
|
+
<span class="cstat-no" title="statement not covered" > queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);</span>
|
|
639
|
+
<span class="cstat-no" title="statement not covered" > afterQueryCallsSafe.delete();</span>
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
endpoint: customPropertiesEndpoint,
|
|
643
|
+
id: customProperty?.id
|
|
644
|
+
});
|
|
667
645
|
|
|
668
|
-
const
|
|
669
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
>
|
|
674
|
-
<SearchField
|
|
675
|
-
// Pass meta through so correct styling gets applied to the TextField
|
|
676
|
-
id="typedown-searchField"
|
|
677
|
-
marginBottom0
|
|
678
|
-
meta={meta}
|
|
679
|
-
onChange={<span class="fstat-no" title="function not covered" >e </span>=> {
|
|
680
|
-
<span class="cstat-no" title="statement not covered" > setCallPath(pathMutator(e.target.value, path));</span>
|
|
681
|
-
}}
|
|
682
|
-
onKeyDown={searchFieldKeyDownHandler}
|
|
683
|
-
/>
|
|
684
|
-
</div>
|
|
685
|
-
);
|
|
646
|
+
const handeContextSubmit = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(s</span>ubmitData) => {</span>
|
|
647
|
+
<span class="cstat-no" title="statement not covered" > return {</span>
|
|
648
|
+
...submitData,
|
|
649
|
+
ctx: submitData?.ctx?.[0]?.value
|
|
650
|
+
};
|
|
686
651
|
};
|
|
687
652
|
|
|
688
653
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
689
|
-
<
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
}}
|
|
705
|
-
overlayProps={{
|
|
706
|
-
'ref': overlayRef,
|
|
707
|
-
'tabIndex': '-1',
|
|
708
|
-
'onClick': <span class="fstat-no" title="function not covered" >(e</span>) => { <span class="cstat-no" title="statement not covered" >e.stopPropagation(); </span>} // prevent propagation of click events
|
|
709
|
-
}}
|
|
710
|
-
overlayRef={overlayRef}
|
|
711
|
-
portal={portal}
|
|
654
|
+
<>
|
|
655
|
+
<Pane
|
|
656
|
+
defaultWidth="fill"
|
|
657
|
+
id="settings-customProperties.lookupPane"
|
|
658
|
+
lastMenu={
|
|
659
|
+
<Button
|
|
660
|
+
marginBottom0
|
|
661
|
+
onClick={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setMode(CREATING)}</span> // TODO do we need to clear form here too?
|
|
662
|
+
>
|
|
663
|
+
<FormattedMessage id="stripes-kint-components.create" />
|
|
664
|
+
</Button>
|
|
665
|
+
}
|
|
666
|
+
paneTitle={labelOverrides.paneTitle ??
|
|
667
|
+
<FormattedMessage id="stripes-kint-components.customProperties" /> // This should be configurable?
|
|
668
|
+
}
|
|
712
669
|
>
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
670
|
+
<CustomPropertiesLookup
|
|
671
|
+
contextFilterOptions={renderContextFilterOptions}
|
|
672
|
+
customPropertiesEndpoint={customPropertiesEndpoint}
|
|
673
|
+
labelOverrides={labelOverrides}
|
|
674
|
+
onSelectCustomProperty={<span class="fstat-no" title="function not covered" >(_</span>e, cp) => <span class="cstat-no" title="statement not covered" >setCustomProperty(cp)}</span>
|
|
675
|
+
/>
|
|
676
|
+
</Pane>
|
|
677
|
+
{customProperty &&
|
|
678
|
+
<Pane
|
|
679
|
+
actionMenu={<span class="fstat-no" title="function not covered" >({</span> onToggle }) => (
|
|
680
|
+
<span class="cstat-no" title="statement not covered" > [</span>
|
|
681
|
+
<Button
|
|
682
|
+
buttonStyle="dropdownItem"
|
|
683
|
+
marginBottom0
|
|
684
|
+
onClick={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setMode(EDITING)}</span>
|
|
685
|
+
>
|
|
686
|
+
<FormattedMessage id="stripes-kint-components.edit" />
|
|
687
|
+
</Button>,
|
|
688
|
+
<Button
|
|
689
|
+
buttonStyle="dropdownItem"
|
|
690
|
+
marginBottom0
|
|
691
|
+
onClick={<span class="fstat-no" title="function not covered" >()</span> => {
|
|
692
|
+
<span class="cstat-no" title="statement not covered" > setDeleteModal(true);</span>
|
|
693
|
+
<span class="cstat-no" title="statement not covered" > onToggle();</span>
|
|
694
|
+
}}
|
|
695
|
+
>
|
|
696
|
+
<FormattedMessage id="stripes-kint-components.delete" />
|
|
697
|
+
</Button>
|
|
698
|
+
]
|
|
720
699
|
)}
|
|
700
|
+
defaultWidth="fill"
|
|
701
|
+
dismissible
|
|
702
|
+
id="settings-customProperties-viewPane"
|
|
703
|
+
onClose={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setCustomProperty()}</span>
|
|
704
|
+
paneTitle={
|
|
705
|
+
renderViewPaneTitle ?? customProperty?.label ?? customProperty?.name
|
|
706
|
+
}
|
|
721
707
|
>
|
|
722
|
-
<
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
{renderItem(input.value)}
|
|
726
|
-
</div>
|
|
727
|
-
<IconButton
|
|
728
|
-
className={css.clearItem}
|
|
729
|
-
icon="times-circle-solid"
|
|
730
|
-
onClick={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >handleChange()}</span>
|
|
708
|
+
<CustomPropertiesView
|
|
709
|
+
customProperty={customProperty}
|
|
710
|
+
labelOverrides={labelOverrides}
|
|
731
711
|
/>
|
|
732
|
-
</
|
|
712
|
+
</Pane>
|
|
733
713
|
}
|
|
734
|
-
|
|
714
|
+
<FormModal
|
|
715
|
+
initialValues={mode === CREATING ?
|
|
716
|
+
{
|
|
717
|
+
weight: 0,
|
|
718
|
+
primary: true,
|
|
719
|
+
defaultInternal: true
|
|
720
|
+
} :
|
|
721
|
+
{
|
|
722
|
+
...customProperty,
|
|
723
|
+
ctx: customProperty?.ctx ? [{ value: customProperty.ctx, label: customProperty.ctx }] : null
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
modalProps={{
|
|
727
|
+
dismissible: true,
|
|
728
|
+
onClose: <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setMode(VIEWING),</span>
|
|
729
|
+
open: (mode === CREATING || mode === EDITING)
|
|
730
|
+
}}
|
|
731
|
+
onSubmit={mode === CREATING ?
|
|
732
|
+
compose(createCustprop, handeContextSubmit) :
|
|
733
|
+
compose(editCustProp, handeContextSubmit)
|
|
734
|
+
}
|
|
735
|
+
>
|
|
736
|
+
<CustomPropertiesForm
|
|
737
|
+
contextFilterOptions={renderContextFilterOptions}
|
|
738
|
+
helpPopovers={helpPopovers}
|
|
739
|
+
labelOverrides={labelOverrides}
|
|
740
|
+
refdata={refdata.map(<span class="fstat-no" title="function not covered" >rd</span>c => (<span class="cstat-no" title="statement not covered" >{ label: rdc.desc, value: rdc.id })</span>)}
|
|
741
|
+
/>
|
|
742
|
+
</FormModal>
|
|
743
|
+
<ConfirmationModal
|
|
744
|
+
buttonStyle="danger"
|
|
745
|
+
confirmLabel={
|
|
746
|
+
labelOverrides?.confirmLabel ??
|
|
747
|
+
<FormattedMessage id="stripes-kint-components.customProperties.delete.confirmLabel" />
|
|
748
|
+
}
|
|
749
|
+
heading={
|
|
750
|
+
labelOverrides?.confirmHeading ??
|
|
751
|
+
<FormattedMessage id="stripes-kint-components.customProperties.delete.confirmHeading" />
|
|
752
|
+
}
|
|
753
|
+
id="delete-job-confirmation"
|
|
754
|
+
message={
|
|
755
|
+
labelOverrides?.confirmMessage ??
|
|
756
|
+
<SafeHTMLMessage id="stripes-kint-components.customProperties.delete.confirmMessage" values={{ name: customProperty?.name }} />
|
|
757
|
+
}
|
|
758
|
+
onCancel={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setDeleteModal(false)}</span>
|
|
759
|
+
onConfirm={<span class="fstat-no" title="function not covered" >()</span> => {
|
|
760
|
+
<span class="cstat-no" title="statement not covered" > deleteCustProp();</span>
|
|
761
|
+
<span class="cstat-no" title="statement not covered" > setCustomProperty();</span>
|
|
762
|
+
<span class="cstat-no" title="statement not covered" > setDeleteModal(false);</span>
|
|
763
|
+
}}
|
|
764
|
+
open={deleteModal}
|
|
765
|
+
/>
|
|
766
|
+
</>
|
|
735
767
|
);
|
|
736
768
|
};
|
|
737
769
|
|
|
738
|
-
<span class="cstat-no" title="statement not covered" >
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
770
|
+
<span class="cstat-no" title="statement not covered" >CustomPropertiesSettings.propTypes = {</span>
|
|
771
|
+
afterQueryCalls: PropTypes.object,
|
|
772
|
+
contextFilterOptions: PropTypes.arrayOf(PropTypes.shape({
|
|
773
|
+
value: PropTypes.string,
|
|
774
|
+
label: PropTypes.oneOfType([
|
|
775
|
+
PropTypes.element,
|
|
776
|
+
PropTypes.string
|
|
777
|
+
])
|
|
778
|
+
})),
|
|
779
|
+
customPropertiesEndpoint: PropTypes.string,
|
|
780
|
+
helpPopovers: PropTypes.object,
|
|
781
|
+
labelOverrides: PropTypes.object,
|
|
782
|
+
refdataEndpoint: PropTypes.string,
|
|
747
783
|
};
|
|
748
784
|
|
|
749
|
-
export default
|
|
785
|
+
export default CustomPropertiesSettings;
|
|
750
786
|
</pre></td></tr></table></pre>
|
|
751
787
|
|
|
752
788
|
<div class='push'></div><!-- for sticky footer -->
|
|
@@ -754,16 +790,16 @@ export default TypeDown;
|
|
|
754
790
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
755
791
|
Code coverage generated by
|
|
756
792
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
757
|
-
at
|
|
793
|
+
at Wed Mar 09 2022 12:00:59 GMT+0000 (Greenwich Mean Time)
|
|
758
794
|
</div>
|
|
759
|
-
<script src="
|
|
795
|
+
<script src="../../prettify.js"></script>
|
|
760
796
|
<script>
|
|
761
797
|
window.onload = function () {
|
|
762
798
|
prettyPrint();
|
|
763
799
|
};
|
|
764
800
|
</script>
|
|
765
|
-
<script src="
|
|
766
|
-
<script src="
|
|
801
|
+
<script src="../../sorter.js"></script>
|
|
802
|
+
<script src="../../block-navigation.js"></script>
|
|
767
803
|
</body>
|
|
768
804
|
</html>
|
|
769
805
|
|