@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
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">42.3% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>11/26</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">27.77% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>5/18</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">47.82% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>11/23</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -188,7 +188,20 @@
|
|
|
188
188
|
<a name='L123'></a><a href='#L123'>123</a>
|
|
189
189
|
<a name='L124'></a><a href='#L124'>124</a>
|
|
190
190
|
<a name='L125'></a><a href='#L125'>125</a>
|
|
191
|
-
<a name='L126'></a><a href='#L126'>126</a
|
|
191
|
+
<a name='L126'></a><a href='#L126'>126</a>
|
|
192
|
+
<a name='L127'></a><a href='#L127'>127</a>
|
|
193
|
+
<a name='L128'></a><a href='#L128'>128</a>
|
|
194
|
+
<a name='L129'></a><a href='#L129'>129</a>
|
|
195
|
+
<a name='L130'></a><a href='#L130'>130</a>
|
|
196
|
+
<a name='L131'></a><a href='#L131'>131</a>
|
|
197
|
+
<a name='L132'></a><a href='#L132'>132</a>
|
|
198
|
+
<a name='L133'></a><a href='#L133'>133</a>
|
|
199
|
+
<a name='L134'></a><a href='#L134'>134</a>
|
|
200
|
+
<a name='L135'></a><a href='#L135'>135</a>
|
|
201
|
+
<a name='L136'></a><a href='#L136'>136</a>
|
|
202
|
+
<a name='L137'></a><a href='#L137'>137</a>
|
|
203
|
+
<a name='L138'></a><a href='#L138'>138</a>
|
|
204
|
+
<a name='L139'></a><a href='#L139'>139</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
192
205
|
<span class="cline-any cline-neutral"> </span>
|
|
193
206
|
<span class="cline-any cline-neutral"> </span>
|
|
194
207
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -211,14 +224,15 @@
|
|
|
211
224
|
<span class="cline-any cline-neutral"> </span>
|
|
212
225
|
<span class="cline-any cline-neutral"> </span>
|
|
213
226
|
<span class="cline-any cline-neutral"> </span>
|
|
214
|
-
<span class="cline-any cline-yes">8x</span>
|
|
215
|
-
<span class="cline-any cline-yes">8x</span>
|
|
216
|
-
<span class="cline-any cline-yes">8x</span>
|
|
217
227
|
<span class="cline-any cline-neutral"> </span>
|
|
218
|
-
<span class="cline-any cline-yes">8x</span>
|
|
219
228
|
<span class="cline-any cline-neutral"> </span>
|
|
229
|
+
<span class="cline-any cline-yes">4x</span>
|
|
230
|
+
<span class="cline-any cline-yes">4x</span>
|
|
231
|
+
<span class="cline-any cline-yes">4x</span>
|
|
220
232
|
<span class="cline-any cline-neutral"> </span>
|
|
233
|
+
<span class="cline-any cline-yes">4x</span>
|
|
221
234
|
<span class="cline-any cline-neutral"> </span>
|
|
235
|
+
<span class="cline-any cline-yes">4x</span>
|
|
222
236
|
<span class="cline-any cline-neutral"> </span>
|
|
223
237
|
<span class="cline-any cline-neutral"> </span>
|
|
224
238
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -226,24 +240,17 @@
|
|
|
226
240
|
<span class="cline-any cline-neutral"> </span>
|
|
227
241
|
<span class="cline-any cline-neutral"> </span>
|
|
228
242
|
<span class="cline-any cline-neutral"> </span>
|
|
229
|
-
<span class="cline-any cline-no"> </span>
|
|
230
|
-
<span class="cline-any cline-neutral"> </span>
|
|
231
|
-
<span class="cline-any cline-no"> </span>
|
|
232
|
-
<span class="cline-any cline-no"> </span>
|
|
233
|
-
<span class="cline-any cline-no"> </span>
|
|
234
|
-
<span class="cline-any cline-neutral"> </span>
|
|
235
|
-
<span class="cline-any cline-neutral"> </span>
|
|
236
|
-
<span class="cline-any cline-no"> </span>
|
|
237
243
|
<span class="cline-any cline-neutral"> </span>
|
|
238
244
|
<span class="cline-any cline-neutral"> </span>
|
|
239
245
|
<span class="cline-any cline-neutral"> </span>
|
|
240
246
|
<span class="cline-any cline-neutral"> </span>
|
|
247
|
+
<span class="cline-any cline-yes">4x</span>
|
|
241
248
|
<span class="cline-any cline-neutral"> </span>
|
|
249
|
+
<span class="cline-any cline-yes">4x</span>
|
|
250
|
+
<span class="cline-any cline-no"> </span>
|
|
242
251
|
<span class="cline-any cline-neutral"> </span>
|
|
243
252
|
<span class="cline-any cline-neutral"> </span>
|
|
244
253
|
<span class="cline-any cline-neutral"> </span>
|
|
245
|
-
<span class="cline-any cline-no"> </span>
|
|
246
|
-
<span class="cline-any cline-no"> </span>
|
|
247
254
|
<span class="cline-any cline-neutral"> </span>
|
|
248
255
|
<span class="cline-any cline-neutral"> </span>
|
|
249
256
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -258,23 +265,35 @@
|
|
|
258
265
|
<span class="cline-any cline-neutral"> </span>
|
|
259
266
|
<span class="cline-any cline-neutral"> </span>
|
|
260
267
|
<span class="cline-any cline-neutral"> </span>
|
|
268
|
+
<span class="cline-any cline-yes">4x</span>
|
|
269
|
+
<span class="cline-any cline-no"> </span>
|
|
261
270
|
<span class="cline-any cline-neutral"> </span>
|
|
262
271
|
<span class="cline-any cline-no"> </span>
|
|
263
272
|
<span class="cline-any cline-no"> </span>
|
|
264
273
|
<span class="cline-any cline-neutral"> </span>
|
|
265
274
|
<span class="cline-any cline-no"> </span>
|
|
275
|
+
<span class="cline-any cline-neutral"> </span>
|
|
276
|
+
<span class="cline-any cline-neutral"> </span>
|
|
266
277
|
<span class="cline-any cline-no"> </span>
|
|
278
|
+
<span class="cline-any cline-neutral"> </span>
|
|
279
|
+
<span class="cline-any cline-neutral"> </span>
|
|
280
|
+
<span class="cline-any cline-neutral"> </span>
|
|
267
281
|
<span class="cline-any cline-no"> </span>
|
|
282
|
+
<span class="cline-any cline-neutral"> </span>
|
|
268
283
|
<span class="cline-any cline-no"> </span>
|
|
269
284
|
<span class="cline-any cline-neutral"> </span>
|
|
270
285
|
<span class="cline-any cline-neutral"> </span>
|
|
286
|
+
<span class="cline-any cline-neutral"> </span>
|
|
287
|
+
<span class="cline-any cline-neutral"> </span>
|
|
271
288
|
<span class="cline-any cline-no"> </span>
|
|
272
289
|
<span class="cline-any cline-no"> </span>
|
|
273
290
|
<span class="cline-any cline-neutral"> </span>
|
|
274
291
|
<span class="cline-any cline-no"> </span>
|
|
275
292
|
<span class="cline-any cline-neutral"> </span>
|
|
276
293
|
<span class="cline-any cline-neutral"> </span>
|
|
277
|
-
<span class="cline-any cline-
|
|
294
|
+
<span class="cline-any cline-yes">4x</span>
|
|
295
|
+
<span class="cline-any cline-neutral"> </span>
|
|
296
|
+
<span class="cline-any cline-neutral"> </span>
|
|
278
297
|
<span class="cline-any cline-neutral"> </span>
|
|
279
298
|
<span class="cline-any cline-neutral"> </span>
|
|
280
299
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -305,6 +324,11 @@
|
|
|
305
324
|
<span class="cline-any cline-neutral"> </span>
|
|
306
325
|
<span class="cline-any cline-neutral"> </span>
|
|
307
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>
|
|
308
332
|
<span class="cline-any cline-yes">1x</span>
|
|
309
333
|
<span class="cline-any cline-neutral"> </span>
|
|
310
334
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -313,9 +337,10 @@
|
|
|
313
337
|
<span class="cline-any cline-neutral"> </span>
|
|
314
338
|
<span class="cline-any cline-neutral"> </span>
|
|
315
339
|
<span class="cline-any cline-neutral"> </span>
|
|
340
|
+
<span class="cline-any cline-neutral"> </span>
|
|
341
|
+
<span class="cline-any cline-neutral"> </span>
|
|
316
342
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { useState } from 'react';
|
|
317
343
|
import PropTypes from 'prop-types';
|
|
318
|
-
import { FormattedMessage } from 'react-intl';
|
|
319
344
|
|
|
320
345
|
import {
|
|
321
346
|
Accordion,
|
|
@@ -323,9 +348,10 @@ import {
|
|
|
323
348
|
Layout,
|
|
324
349
|
Spinner
|
|
325
350
|
} from '@folio/stripes/components';
|
|
326
|
-
import { useCustomProperties } from '../../hooks';
|
|
351
|
+
import { useCustomProperties, useKintIntl } from '../../hooks';
|
|
327
352
|
import useParseActiveFilterStrings from './useParseActiveFilterStrings';
|
|
328
353
|
import CustomPropertiesFilterForm from './CustomPropertiesFilterForm';
|
|
354
|
+
import { MULTI_REFDATA_CLASS_NAME, REFDATA_CLASS_NAME } from '../../constants/customProperties';
|
|
329
355
|
|
|
330
356
|
const CustomPropertiesFilter = ({
|
|
331
357
|
activeFilters: {
|
|
@@ -334,11 +360,15 @@ const CustomPropertiesFilter = ({
|
|
|
334
360
|
},
|
|
335
361
|
customPropertiesEndpoint,
|
|
336
362
|
filterHandlers,
|
|
337
|
-
|
|
363
|
+
intlKey: passedIntlKey,
|
|
364
|
+
intlNS: passedIntlNS,
|
|
365
|
+
labelOverrides = {}
|
|
338
366
|
}) => {
|
|
339
367
|
const [editingFilters, setEditingFilters] = useState(false);
|
|
340
368
|
const openEditModal = <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setEditingFilters(true);</span>
|
|
341
369
|
const closeEditModal = <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setEditingFilters(false);</span>
|
|
370
|
+
|
|
371
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
342
372
|
|
|
343
373
|
const { data: custprops, isLoading } = useCustomProperties({
|
|
344
374
|
endpoint: customPropertiesEndpoint,
|
|
@@ -347,35 +377,24 @@ const CustomPropertiesFilter = ({
|
|
|
347
377
|
sort: [
|
|
348
378
|
{ path: 'ctx' }, // Group by ctx
|
|
349
379
|
{ path: 'retired' }, // Place retired custprops at the end
|
|
380
|
+
{ path: 'weight' }, // Within those groups, sort by weight first
|
|
350
381
|
{ path: 'label' } // Within those groups, sort by label
|
|
351
382
|
],
|
|
352
383
|
}
|
|
353
384
|
});
|
|
354
|
-
const parsedFilterData = <span class="
|
|
385
|
+
const parsedFilterData = useParseActiveFilterStrings(custPropFilters || <span class="branch-1 cbranch-no" title="branch not covered" >[],</span> passedIntlKey, passedIntlNS, labelOverrides);
|
|
355
386
|
|
|
356
|
-
|
|
357
|
-
<span class="cstat-no" title="statement not covered" > if (labelOverrides.filtersApplied && typeof labelOverrides.filtersApplied === 'function') {</span>
|
|
358
|
-
<span class="cstat-no" title="statement not covered" > return labelOverrides.filtersApplied((parsedFilterData?.numberOfFilters ?? 0));</span>
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
362
|
-
labelOverrides.filtersApplied ??
|
|
363
|
-
<FormattedMessage
|
|
364
|
-
id="stripes-kint-components.customProperty.filtersApplied"
|
|
365
|
-
values={{ count: (parsedFilterData?.numberOfFilters ?? 0) }}
|
|
366
|
-
/>
|
|
367
|
-
);
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
<span class="cstat-no" title="statement not covered" > if (isLoading) {</span>
|
|
387
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (isLoading) {
|
|
371
388
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
372
389
|
<Accordion
|
|
373
390
|
closedByDefault
|
|
374
391
|
header={FilterAccordionHeader}
|
|
375
392
|
id="clickable-custprop-filter"
|
|
376
393
|
label={
|
|
377
|
-
|
|
378
|
-
|
|
394
|
+
kintIntl.formatKintMessage({
|
|
395
|
+
id: 'customProperties',
|
|
396
|
+
overrideValue: labelOverrides.customProperties,
|
|
397
|
+
})
|
|
379
398
|
}
|
|
380
399
|
separator={false}
|
|
381
400
|
>
|
|
@@ -384,14 +403,25 @@ const CustomPropertiesFilter = ({
|
|
|
384
403
|
);
|
|
385
404
|
}
|
|
386
405
|
|
|
387
|
-
const handleSubmit = <span class="
|
|
406
|
+
const handleSubmit = <span class="fstat-no" title="function not covered" >va</span>lues => {
|
|
388
407
|
const { filters = <span class="branch-0 cbranch-no" title="branch not covered" >[] </span>} = <span class="cstat-no" title="statement not covered" >values;</span>
|
|
389
408
|
|
|
390
409
|
const filterStrings = <span class="cstat-no" title="statement not covered" >filters</span>
|
|
391
410
|
.filter(<span class="fstat-no" title="function not covered" >fi</span>lter => <span class="cstat-no" title="statement not covered" >filter.rules)</span>
|
|
392
|
-
.map(<span class="fstat-no" title="function not covered" >fi</span>lter =>
|
|
393
|
-
|
|
394
|
-
|
|
411
|
+
.map(<span class="fstat-no" title="function not covered" >fi</span>lter => {
|
|
412
|
+
const relevantCustomProperty = <span class="cstat-no" title="statement not covered" >custprops?.filter(<span class="fstat-no" title="function not covered" >cp</span> => <span class="cstat-no" title="statement not covered" >cp.name === filter.customProperty)</span>?.[0] ?? {};</span>
|
|
413
|
+
|
|
414
|
+
const filterByValueId = (
|
|
415
|
+
<span class="cstat-no" title="statement not covered" > relevantCustomProperty?.type === MULTI_REFDATA_CLASS_NAME ||</span>
|
|
416
|
+
relevantCustomProperty?.type === REFDATA_CLASS_NAME
|
|
417
|
+
);
|
|
418
|
+
|
|
419
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
420
|
+
filter.rules
|
|
421
|
+
.map(<span class="fstat-no" title="function not covered" >ru</span>le => <span class="cstat-no" title="statement not covered" >`customProperties.${filter.customProperty}.value${filterByValueId ? '.id' : ''}${rule.operator}${rule.value ?? ''}`)</span>
|
|
422
|
+
.join('||')
|
|
423
|
+
);
|
|
424
|
+
});
|
|
395
425
|
|
|
396
426
|
<span class="cstat-no" title="statement not covered" > filterHandlers.state({ ...restOfFilters, customProperties: filterStrings });</span>
|
|
397
427
|
<span class="cstat-no" title="statement not covered" > setEditingFilters(false);</span>
|
|
@@ -399,21 +429,28 @@ const CustomPropertiesFilter = ({
|
|
|
399
429
|
<span class="cstat-no" title="statement not covered" > return Promise.resolve();</span>
|
|
400
430
|
};
|
|
401
431
|
|
|
402
|
-
|
|
432
|
+
return (
|
|
403
433
|
<Accordion
|
|
404
434
|
closedByDefault
|
|
405
|
-
displayClearButton={(parsedFilterData?.numberOfFilters ?? 0) > 0}
|
|
435
|
+
displayClearButton={(parsedFilterData?.numberOfFilters ?? <span class="branch-1 cbranch-no" title="branch not covered" >0)</span> > 0}
|
|
406
436
|
header={FilterAccordionHeader}
|
|
407
437
|
id="clickable-custprop-filter"
|
|
408
438
|
label={
|
|
409
|
-
|
|
410
|
-
|
|
439
|
+
kintIntl.formatKintMessage({
|
|
440
|
+
id: 'customProperties',
|
|
441
|
+
overrideValue: labelOverrides.customProperties,
|
|
442
|
+
})
|
|
411
443
|
}
|
|
412
444
|
onClearFilter={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >filterHandlers.state({ ...restOfFilters, customProperties: [] })}</span>
|
|
413
445
|
separator={false}
|
|
414
446
|
>
|
|
415
447
|
<Layout className="padding-bottom-gutter">
|
|
416
|
-
{
|
|
448
|
+
{
|
|
449
|
+
kintIntl.formatKintMessage({
|
|
450
|
+
id: 'customProperty.filtersApplied',
|
|
451
|
+
overrideValue: labelOverrides.filtersApplied,
|
|
452
|
+
}, { count: (parsedFilterData?.numberOfFilters ?? <span class="branch-1 cbranch-no" title="branch not covered" >0)</span> })
|
|
453
|
+
}
|
|
417
454
|
</Layout>
|
|
418
455
|
<CustomPropertiesFilterForm
|
|
419
456
|
customProperties={custprops}
|
|
@@ -434,6 +471,8 @@ CustomPropertiesFilter.propTypes = {
|
|
|
434
471
|
activeFilters: PropTypes.object,
|
|
435
472
|
customPropertiesEndpoint: PropTypes.string,
|
|
436
473
|
filterHandlers: PropTypes.object,
|
|
474
|
+
intlKey: PropTypes.string,
|
|
475
|
+
intlNS: PropTypes.string,
|
|
437
476
|
labelOverrides: PropTypes.object
|
|
438
477
|
};
|
|
439
478
|
|
|
@@ -445,7 +484,7 @@ export default CustomPropertiesFilter;
|
|
|
445
484
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
446
485
|
Code coverage generated by
|
|
447
486
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
448
|
-
at
|
|
487
|
+
at 2022-09-16T13:23:25.290Z
|
|
449
488
|
</div>
|
|
450
489
|
<script src="../../prettify.js"></script>
|
|
451
490
|
<script>
|