@k-int/stripes-kint-components 2.8.4 → 2.8.5
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/junit.xml +146 -146
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +23 -5
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +282 -48
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +171 -39
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +271 -52
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +293 -74
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +126 -54
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +41 -56
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +23 -5
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +54 -42
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +213 -54
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +260 -41
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +41 -68
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +53 -53
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +62 -3065
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +45 -45
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +103 -64
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +54 -63
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +49 -16
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +69 -18
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +81 -81
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +33 -786
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +45 -45
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +6 -6
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +43 -28
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +20 -2
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +52 -46
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +53 -74
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +25 -25
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +86 -32
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +109 -37
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +41 -14
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +45 -6
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +47 -11
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +65 -14
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +154 -31
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +26 -26
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +18 -18
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +35 -17
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +15 -15
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +67 -34
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +49 -7
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +24 -81
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +146 -14
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +31 -4
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +53 -8
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +65 -11
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +24 -27
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +47 -17
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +22 -22
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +151 -106
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +12 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +25 -25
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +61 -22
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +37 -37
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/index.html +167 -137
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +16 -16
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +116 -74
- 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 +41 -56
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +33 -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 +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +124 -76
- package/src/artifacts/coverage-jest/lcov.info +2535 -2369
- package/translations/stripes-kint-components/de.json +41 -41
- package/translations/stripes-kint-components/ja.json +43 -43
- package/translations/stripes-kint-components/ko.json +49 -49
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">81.81% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>9/11</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">77.77% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>7/9</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>2/2</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">81.81% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>9/11</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 high'></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>
|
|
@@ -148,8 +148,11 @@
|
|
|
148
148
|
<a name='L83'></a><a href='#L83'>83</a>
|
|
149
149
|
<a name='L84'></a><a href='#L84'>84</a>
|
|
150
150
|
<a name='L85'></a><a href='#L85'>85</a>
|
|
151
|
-
<a name='L86'></a><a href='#L86'>86</a
|
|
152
|
-
<
|
|
151
|
+
<a name='L86'></a><a href='#L86'>86</a>
|
|
152
|
+
<a name='L87'></a><a href='#L87'>87</a>
|
|
153
|
+
<a name='L88'></a><a href='#L88'>88</a>
|
|
154
|
+
<a name='L89'></a><a href='#L89'>89</a>
|
|
155
|
+
<a name='L90'></a><a href='#L90'>90</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
153
156
|
<span class="cline-any cline-neutral"> </span>
|
|
154
157
|
<span class="cline-any cline-neutral"> </span>
|
|
155
158
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -163,9 +166,13 @@
|
|
|
163
166
|
<span class="cline-any cline-neutral"> </span>
|
|
164
167
|
<span class="cline-any cline-neutral"> </span>
|
|
165
168
|
<span class="cline-any cline-neutral"> </span>
|
|
169
|
+
<span class="cline-any cline-neutral"> </span>
|
|
166
170
|
<span class="cline-any cline-yes">1x</span>
|
|
167
171
|
<span class="cline-any cline-neutral"> </span>
|
|
168
|
-
<span class="cline-any cline-
|
|
172
|
+
<span class="cline-any cline-neutral"> </span>
|
|
173
|
+
<span class="cline-any cline-yes">1x</span>
|
|
174
|
+
<span class="cline-any cline-neutral"> </span>
|
|
175
|
+
<span class="cline-any cline-yes">1x</span>
|
|
169
176
|
<span class="cline-any cline-no"> </span>
|
|
170
177
|
<span class="cline-any cline-neutral"> </span>
|
|
171
178
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -173,19 +180,16 @@
|
|
|
173
180
|
<span class="cline-any cline-neutral"> </span>
|
|
174
181
|
<span class="cline-any cline-neutral"> </span>
|
|
175
182
|
<span class="cline-any cline-neutral"> </span>
|
|
176
|
-
<span class="cline-any cline-no"> </span>
|
|
177
|
-
<span class="cline-any cline-no"> </span>
|
|
178
183
|
<span class="cline-any cline-neutral"> </span>
|
|
179
184
|
<span class="cline-any cline-neutral"> </span>
|
|
180
185
|
<span class="cline-any cline-neutral"> </span>
|
|
181
|
-
<span class="cline-any cline-
|
|
182
|
-
<span class="cline-any cline-
|
|
186
|
+
<span class="cline-any cline-yes">1x</span>
|
|
187
|
+
<span class="cline-any cline-neutral"> </span>
|
|
183
188
|
<span class="cline-any cline-neutral"> </span>
|
|
184
189
|
<span class="cline-any cline-neutral"> </span>
|
|
185
190
|
<span class="cline-any cline-neutral"> </span>
|
|
186
191
|
<span class="cline-any cline-neutral"> </span>
|
|
187
192
|
<span class="cline-any cline-neutral"> </span>
|
|
188
|
-
<span class="cline-any cline-no"> </span>
|
|
189
193
|
<span class="cline-any cline-neutral"> </span>
|
|
190
194
|
<span class="cline-any cline-neutral"> </span>
|
|
191
195
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -224,6 +228,8 @@
|
|
|
224
228
|
<span class="cline-any cline-neutral"> </span>
|
|
225
229
|
<span class="cline-any cline-neutral"> </span>
|
|
226
230
|
<span class="cline-any cline-neutral"> </span>
|
|
231
|
+
<span class="cline-any cline-neutral"> </span>
|
|
232
|
+
<span class="cline-any cline-neutral"> </span>
|
|
227
233
|
<span class="cline-any cline-yes">1x</span>
|
|
228
234
|
<span class="cline-any cline-neutral"> </span>
|
|
229
235
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -233,46 +239,48 @@
|
|
|
233
239
|
<span class="cline-any cline-neutral"> </span>
|
|
234
240
|
<span class="cline-any cline-neutral"> </span>
|
|
235
241
|
<span class="cline-any cline-neutral"> </span>
|
|
242
|
+
<span class="cline-any cline-neutral"> </span>
|
|
243
|
+
<span class="cline-any cline-neutral"> </span>
|
|
236
244
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import PropTypes from 'prop-types';
|
|
237
|
-
import { FormattedMessage } from 'react-intl';
|
|
238
245
|
import { Accordion } from '@folio/stripes/components';
|
|
239
246
|
|
|
240
247
|
import CustomPropertiesListField from './CustomPropertiesListField';
|
|
241
|
-
import { useCustomProperties } from '../../hooks';
|
|
248
|
+
import { useCustomProperties, useKintIntl } from '../../hooks';
|
|
242
249
|
|
|
243
250
|
const CustomPropertiesEditCtx = ({
|
|
244
251
|
ctx,
|
|
245
252
|
customPropertiesEndpoint,
|
|
246
253
|
id,
|
|
247
|
-
|
|
254
|
+
intlKey: passedIntlKey,
|
|
255
|
+
intlNS: passedIntlNS,
|
|
256
|
+
labelOverrides = {},
|
|
248
257
|
nameOverride
|
|
249
258
|
}) => {
|
|
259
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
260
|
+
|
|
250
261
|
// Deal with all the possible label override options
|
|
251
|
-
const getAccordionLabel =
|
|
262
|
+
const getAccordionLabel = () => {
|
|
252
263
|
// Special case for null context
|
|
253
|
-
<span class="
|
|
254
|
-
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
255
|
-
labelOverrides.noContext ??
|
|
256
|
-
<FormattedMessage id="stripes-kint-components.customProperties" />
|
|
257
|
-
);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
// Label overrides for specific contexts
|
|
261
|
-
<span class="cstat-no" title="statement not covered" > if (labelOverrides[ctx]) {</span>
|
|
262
|
-
<span class="cstat-no" title="statement not covered" > return labelOverrides[ctx];</span>
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
// Label override for default title, taking ctx into account
|
|
266
|
-
<span class="cstat-no" title="statement not covered" > if (labelOverrides.defaultTitle && typeof labelOverrides.defaultTitle === 'function') {</span>
|
|
264
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (ctx === 'isNull') {
|
|
267
265
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
268
|
-
|
|
266
|
+
kintIntl.formatKintMessage({
|
|
267
|
+
id: 'customProperties',
|
|
268
|
+
overrideValue: labelOverrides.noContext
|
|
269
|
+
})
|
|
269
270
|
);
|
|
270
271
|
}
|
|
271
272
|
|
|
272
|
-
//
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
// Chain formatKintMessages together using provided fallbackMessage to
|
|
274
|
+
// allow for "If override or translation exists, use it, else use default"
|
|
275
|
+
return (
|
|
276
|
+
kintIntl.formatKintMessage({
|
|
277
|
+
id: `customProperties.ctx.${ctx}`,
|
|
278
|
+
overrideValue: labelOverrides[ctx],
|
|
279
|
+
fallbackMessage: kintIntl.formatKintMessage({
|
|
280
|
+
id: 'customProperties.defaultTitle',
|
|
281
|
+
overrideValue: labelOverrides.defaultTitle
|
|
282
|
+
}, { ctx })
|
|
283
|
+
}, { ctx })
|
|
276
284
|
);
|
|
277
285
|
};
|
|
278
286
|
|
|
@@ -295,13 +303,15 @@ const CustomPropertiesEditCtx = ({
|
|
|
295
303
|
|
|
296
304
|
return (
|
|
297
305
|
custprops.length > 0 &&
|
|
298
|
-
|
|
306
|
+
<Accordion
|
|
299
307
|
id={`${id}-accordion-${ctx}`}
|
|
300
308
|
label={getAccordionLabel()}
|
|
301
309
|
>
|
|
302
310
|
<CustomPropertiesListField
|
|
303
311
|
ctx={ctx}
|
|
304
312
|
customProperties={custprops}
|
|
313
|
+
intlKey={passedIntlKey}
|
|
314
|
+
intlNS={passedIntlNS}
|
|
305
315
|
labelOverrides={labelOverrides}
|
|
306
316
|
name={nameOverride ?? 'customProperties'}
|
|
307
317
|
/>
|
|
@@ -313,6 +323,8 @@ CustomPropertiesEditCtx.propTypes = {
|
|
|
313
323
|
ctx: PropTypes.string,
|
|
314
324
|
customPropertiesEndpoint: PropTypes.string,
|
|
315
325
|
id: PropTypes.string,
|
|
326
|
+
intlKey: PropTypes.string,
|
|
327
|
+
intlNS: PropTypes.string,
|
|
316
328
|
labelOverrides: PropTypes.object,
|
|
317
329
|
nameOverride: PropTypes.string
|
|
318
330
|
};
|
|
@@ -325,7 +337,7 @@ export default CustomPropertiesEditCtx;
|
|
|
325
337
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
326
338
|
Code coverage generated by
|
|
327
339
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
328
|
-
at 2022-11-
|
|
340
|
+
at 2022-11-22T10:07:38.260Z
|
|
329
341
|
</div>
|
|
330
342
|
<script src="../../prettify.js"></script>
|
|
331
343
|
<script>
|