@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,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>0/27</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>0/26</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
<a name='L64'></a><a href='#L64'>64</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
130
130
|
<span class="cline-any cline-neutral"> </span>
|
|
131
131
|
<span class="cline-any cline-neutral"> </span>
|
|
132
|
-
<span class="cline-any cline-
|
|
132
|
+
<span class="cline-any cline-no"> </span>
|
|
133
133
|
<span class="cline-any cline-no"> </span>
|
|
134
134
|
<span class="cline-any cline-no"> </span>
|
|
135
135
|
<span class="cline-any cline-no"> </span>
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { useEffect, useState } from 'react';
|
|
193
193
|
import { useFieldArray } from 'react-final-form-arrays';
|
|
194
194
|
|
|
195
|
-
const useKiwtFieldArray = <span class="fstat-no" title="function not covered" >(n</span>ame, submitWholeDeletedObject = <span class="branch-0 cbranch-no" title="branch not covered" >false)</span> => {
|
|
195
|
+
const useKiwtFieldArray = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(n</span>ame, submitWholeDeletedObject = <span class="branch-0 cbranch-no" title="branch not covered" >false)</span> => {</span>
|
|
196
196
|
const { fields } = <span class="cstat-no" title="statement not covered" >useFieldArray(name);</span>
|
|
197
197
|
const { value: values = <span class="branch-0 cbranch-no" title="branch not covered" >[] </span>} = <span class="cstat-no" title="statement not covered" >fields;</span>
|
|
198
198
|
const [endOfList, setEndOfList] = <span class="cstat-no" title="statement not covered" >useState(0);</span>
|
|
@@ -259,7 +259,7 @@ export default useKiwtFieldArray;
|
|
|
259
259
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
260
260
|
Code coverage generated by
|
|
261
261
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
262
|
-
at
|
|
262
|
+
at 2022-09-16T13:23:25.290Z
|
|
263
263
|
</div>
|
|
264
264
|
<script src="../prettify.js"></script>
|
|
265
265
|
<script>
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>0/18</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>0/17</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
<span class="cline-any cline-neutral"> </span>
|
|
107
107
|
<span class="cline-any cline-neutral"> </span>
|
|
108
108
|
<span class="cline-any cline-neutral"> </span>
|
|
109
|
-
<span class="cline-any cline-
|
|
109
|
+
<span class="cline-any cline-no"> </span>
|
|
110
110
|
<span class="cline-any cline-no"> </span>
|
|
111
111
|
<span class="cline-any cline-no"> </span>
|
|
112
112
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
<span class="cline-any cline-neutral"> </span>
|
|
118
118
|
<span class="cline-any cline-neutral"> </span>
|
|
119
119
|
<span class="cline-any cline-neutral"> </span>
|
|
120
|
-
<span class="cline-any cline-
|
|
120
|
+
<span class="cline-any cline-no"> </span>
|
|
121
121
|
<span class="cline-any cline-no"> </span>
|
|
122
122
|
<span class="cline-any cline-no"> </span>
|
|
123
123
|
<span class="cline-any cline-no"> </span>
|
|
@@ -143,7 +143,7 @@ import { useLocation, useHistory } from 'react-router-dom';
|
|
|
143
143
|
import buildUrl from '../utils/buildUrl';
|
|
144
144
|
import useQindex from './useQIndex';
|
|
145
145
|
|
|
146
|
-
const locationQuerySetter = <span class="fstat-no" title="function not covered" >({</span> location, history, nsValues }) => {
|
|
146
|
+
const locationQuerySetter = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span> location, history, nsValues }) => {</span>
|
|
147
147
|
const { pathname, search } = <span class="cstat-no" title="statement not covered" >location;</span>
|
|
148
148
|
const url = <span class="cstat-no" title="statement not covered" >buildUrl(location, nsValues);</span>
|
|
149
149
|
|
|
@@ -154,7 +154,7 @@ const locationQuerySetter = <span class="fstat-no" title="function not covered"
|
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
156
|
|
|
157
|
-
const useKiwtSASQuery = <span class="fstat-no" title="function not covered" >()</span> => {
|
|
157
|
+
const useKiwtSASQuery = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
158
158
|
const history = <span class="cstat-no" title="statement not covered" >useHistory();</span>
|
|
159
159
|
const location = <span class="cstat-no" title="statement not covered" >useLocation();</span>
|
|
160
160
|
const [query, setQuery] = <span class="cstat-no" title="statement not covered" >useState({});</span>
|
|
@@ -181,7 +181,7 @@ export default useKiwtSASQuery;
|
|
|
181
181
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
182
182
|
Code coverage generated by
|
|
183
183
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
184
|
-
at
|
|
184
|
+
at 2022-09-16T13:23:25.290Z
|
|
185
185
|
</div>
|
|
186
186
|
<script src="../prettify.js"></script>
|
|
187
187
|
<script>
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>0/7</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>0/7</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
<span class="cline-any cline-neutral"> </span>
|
|
85
85
|
<span class="cline-any cline-neutral"> </span>
|
|
86
86
|
<span class="cline-any cline-neutral"> </span>
|
|
87
|
-
<span class="cline-any cline-
|
|
87
|
+
<span class="cline-any cline-no"> </span>
|
|
88
88
|
<span class="cline-any cline-no"> </span>
|
|
89
89
|
<span class="cline-any cline-no"> </span>
|
|
90
90
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
import { useLocalStorage, writeStorage } from '@rehooks/local-storage';
|
|
102
102
|
|
|
103
103
|
|
|
104
|
-
const useLocalStorageState = <span class="fstat-no" title="function not covered" >(k</span>ey, defaultValue) => {
|
|
104
|
+
const useLocalStorageState = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(k</span>ey, defaultValue) => {</span>
|
|
105
105
|
const [local] = <span class="cstat-no" title="statement not covered" >useLocalStorage(key, defaultValue);</span>
|
|
106
106
|
const [localState, setLocalState] = <span class="cstat-no" title="statement not covered" >useState(local);</span>
|
|
107
107
|
|
|
@@ -121,7 +121,7 @@ export default useLocalStorageState;
|
|
|
121
121
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
122
122
|
Code coverage generated by
|
|
123
123
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
124
|
-
at
|
|
124
|
+
at 2022-09-16T13:23:25.290Z
|
|
125
125
|
</div>
|
|
126
126
|
<script src="../prettify.js"></script>
|
|
127
127
|
<script>
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>0/19</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>0/19</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -125,11 +125,16 @@
|
|
|
125
125
|
<a name='L60'></a><a href='#L60'>60</a>
|
|
126
126
|
<a name='L61'></a><a href='#L61'>61</a>
|
|
127
127
|
<a name='L62'></a><a href='#L62'>62</a>
|
|
128
|
-
<a name='L63'></a><a href='#L63'>63</a
|
|
128
|
+
<a name='L63'></a><a href='#L63'>63</a>
|
|
129
|
+
<a name='L64'></a><a href='#L64'>64</a>
|
|
130
|
+
<a name='L65'></a><a href='#L65'>65</a>
|
|
131
|
+
<a name='L66'></a><a href='#L66'>66</a>
|
|
132
|
+
<a name='L67'></a><a href='#L67'>67</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
129
133
|
<span class="cline-any cline-neutral"> </span>
|
|
130
134
|
<span class="cline-any cline-neutral"> </span>
|
|
131
135
|
<span class="cline-any cline-neutral"> </span>
|
|
132
|
-
<span class="cline-any cline-
|
|
136
|
+
<span class="cline-any cline-no"> </span>
|
|
137
|
+
<span class="cline-any cline-neutral"> </span>
|
|
133
138
|
<span class="cline-any cline-neutral"> </span>
|
|
134
139
|
<span class="cline-any cline-neutral"> </span>
|
|
135
140
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -151,6 +156,7 @@
|
|
|
151
156
|
<span class="cline-any cline-neutral"> </span>
|
|
152
157
|
<span class="cline-any cline-neutral"> </span>
|
|
153
158
|
<span class="cline-any cline-neutral"> </span>
|
|
159
|
+
<span class="cline-any cline-neutral"> </span>
|
|
154
160
|
<span class="cline-any cline-no"> </span>
|
|
155
161
|
<span class="cline-any cline-neutral"> </span>
|
|
156
162
|
<span class="cline-any cline-no"> </span>
|
|
@@ -158,6 +164,7 @@
|
|
|
158
164
|
<span class="cline-any cline-neutral"> </span>
|
|
159
165
|
<span class="cline-any cline-neutral"> </span>
|
|
160
166
|
<span class="cline-any cline-neutral"> </span>
|
|
167
|
+
<span class="cline-any cline-neutral"> </span>
|
|
161
168
|
<span class="cline-any cline-no"> </span>
|
|
162
169
|
<span class="cline-any cline-neutral"> </span>
|
|
163
170
|
<span class="cline-any cline-no"> </span>
|
|
@@ -165,6 +172,7 @@
|
|
|
165
172
|
<span class="cline-any cline-neutral"> </span>
|
|
166
173
|
<span class="cline-any cline-neutral"> </span>
|
|
167
174
|
<span class="cline-any cline-neutral"> </span>
|
|
175
|
+
<span class="cline-any cline-neutral"> </span>
|
|
168
176
|
<span class="cline-any cline-no"> </span>
|
|
169
177
|
<span class="cline-any cline-no"> </span>
|
|
170
178
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -191,8 +199,9 @@
|
|
|
191
199
|
|
|
192
200
|
import { useOkapiKy } from '@folio/stripes/core';
|
|
193
201
|
|
|
194
|
-
const useMutateCustomProperties = <span class="fstat-no" title="function not covered" >({</span>
|
|
202
|
+
const useMutateCustomProperties = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span></span>
|
|
195
203
|
afterQueryCalls,
|
|
204
|
+
catchQueryCalls,
|
|
196
205
|
endpoint,
|
|
197
206
|
id,
|
|
198
207
|
queryParams,
|
|
@@ -209,21 +218,24 @@ const useMutateCustomProperties = <span class="fstat-no" title="function not cov
|
|
|
209
218
|
const deleteQueryObject = <span class="cstat-no" title="statement not covered" >useMutation(</span>
|
|
210
219
|
['stripes-kint-components', 'useMutateCustomProperties', 'delete', id],
|
|
211
220
|
<span class="fstat-no" title="function not covered" > as</span>ync () => <span class="cstat-no" title="statement not covered" >ky.delete(`${endpoint}/${id}`).json()</span>
|
|
212
|
-
.then(afterQueryCalls?.delete)
|
|
221
|
+
.then(afterQueryCalls?.delete)
|
|
222
|
+
.catch(catchQueryCalls?.delete),
|
|
213
223
|
queryParams?.delete
|
|
214
224
|
);
|
|
215
225
|
|
|
216
226
|
const putQueryObject = <span class="cstat-no" title="statement not covered" >useMutation(</span>
|
|
217
227
|
['stripes-kint-components', 'useMutateCustomProperties', 'put', id],
|
|
218
228
|
<span class="fstat-no" title="function not covered" > as</span>ync (data) => <span class="cstat-no" title="statement not covered" >ky.put(`${endpoint}/${id}`, { json: data }).json()</span>
|
|
219
|
-
.then(afterQueryCalls?.put)
|
|
229
|
+
.then(afterQueryCalls?.put)
|
|
230
|
+
.catch(catchQueryCalls?.put),
|
|
220
231
|
queryParams?.put
|
|
221
232
|
);
|
|
222
233
|
|
|
223
234
|
const postQueryObject = <span class="cstat-no" title="statement not covered" >useMutation(</span>
|
|
224
235
|
['stripes-kint-components', 'useMutateCustomProperties', 'post'],
|
|
225
236
|
<span class="fstat-no" title="function not covered" > as</span>ync (data) => <span class="cstat-no" title="statement not covered" >ky.post(`${endpoint}`, { json: data }).json()</span>
|
|
226
|
-
.then(afterQueryCalls?.post)
|
|
237
|
+
.then(afterQueryCalls?.post)
|
|
238
|
+
.catch(catchQueryCalls?.post),
|
|
227
239
|
queryParams?.post
|
|
228
240
|
);
|
|
229
241
|
|
|
@@ -256,7 +268,7 @@ export default useMutateCustomProperties;
|
|
|
256
268
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
257
269
|
Code coverage generated by
|
|
258
270
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
259
|
-
at
|
|
271
|
+
at 2022-09-16T13:23:25.290Z
|
|
260
272
|
</div>
|
|
261
273
|
<script src="../prettify.js"></script>
|
|
262
274
|
<script>
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for hooks/useMutateRefdataCategory.js</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
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
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../index.html">All files</a> / <a href="index.html">hooks</a> useMutateRefdataCategory.js</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">0% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>0/17</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>0/5</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>0/5</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>0/17</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line low'></div>
|
|
65
|
+
<pre><table class="coverage">
|
|
66
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
+
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
+
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
+
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
+
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
+
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
+
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
+
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
+
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
+
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
+
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
+
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
+
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
+
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
+
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
+
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
+
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
+
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
+
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
+
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
+
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
+
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
+
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
+
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
+
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
+
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
+
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
+
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
+
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
+
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
+
<a name='L42'></a><a href='#L42'>42</a>
|
|
108
|
+
<a name='L43'></a><a href='#L43'>43</a>
|
|
109
|
+
<a name='L44'></a><a href='#L44'>44</a>
|
|
110
|
+
<a name='L45'></a><a href='#L45'>45</a>
|
|
111
|
+
<a name='L46'></a><a href='#L46'>46</a>
|
|
112
|
+
<a name='L47'></a><a href='#L47'>47</a>
|
|
113
|
+
<a name='L48'></a><a href='#L48'>48</a>
|
|
114
|
+
<a name='L49'></a><a href='#L49'>49</a>
|
|
115
|
+
<a name='L50'></a><a href='#L50'>50</a>
|
|
116
|
+
<a name='L51'></a><a href='#L51'>51</a>
|
|
117
|
+
<a name='L52'></a><a href='#L52'>52</a>
|
|
118
|
+
<a name='L53'></a><a href='#L53'>53</a>
|
|
119
|
+
<a name='L54'></a><a href='#L54'>54</a>
|
|
120
|
+
<a name='L55'></a><a href='#L55'>55</a>
|
|
121
|
+
<a name='L56'></a><a href='#L56'>56</a>
|
|
122
|
+
<a name='L57'></a><a href='#L57'>57</a>
|
|
123
|
+
<a name='L58'></a><a href='#L58'>58</a>
|
|
124
|
+
<a name='L59'></a><a href='#L59'>59</a>
|
|
125
|
+
<a name='L60'></a><a href='#L60'>60</a>
|
|
126
|
+
<a name='L61'></a><a href='#L61'>61</a>
|
|
127
|
+
<a name='L62'></a><a href='#L62'>62</a>
|
|
128
|
+
<a name='L63'></a><a href='#L63'>63</a>
|
|
129
|
+
<a name='L64'></a><a href='#L64'>64</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
130
|
+
<span class="cline-any cline-neutral"> </span>
|
|
131
|
+
<span class="cline-any cline-neutral"> </span>
|
|
132
|
+
<span class="cline-any cline-neutral"> </span>
|
|
133
|
+
<span class="cline-any cline-neutral"> </span>
|
|
134
|
+
<span class="cline-any cline-neutral"> </span>
|
|
135
|
+
<span class="cline-any cline-no"> </span>
|
|
136
|
+
<span class="cline-any cline-neutral"> </span>
|
|
137
|
+
<span class="cline-any cline-neutral"> </span>
|
|
138
|
+
<span class="cline-any cline-neutral"> </span>
|
|
139
|
+
<span class="cline-any cline-neutral"> </span>
|
|
140
|
+
<span class="cline-any cline-neutral"> </span>
|
|
141
|
+
<span class="cline-any cline-neutral"> </span>
|
|
142
|
+
<span class="cline-any cline-neutral"> </span>
|
|
143
|
+
<span class="cline-any cline-neutral"> </span>
|
|
144
|
+
<span class="cline-any cline-neutral"> </span>
|
|
145
|
+
<span class="cline-any cline-no"> </span>
|
|
146
|
+
<span class="cline-any cline-neutral"> </span>
|
|
147
|
+
<span class="cline-any cline-no"> </span>
|
|
148
|
+
<span class="cline-any cline-no"> </span>
|
|
149
|
+
<span class="cline-any cline-neutral"> </span>
|
|
150
|
+
<span class="cline-any cline-no"> </span>
|
|
151
|
+
<span class="cline-any cline-neutral"> </span>
|
|
152
|
+
<span class="cline-any cline-no"> </span>
|
|
153
|
+
<span class="cline-any cline-neutral"> </span>
|
|
154
|
+
<span class="cline-any cline-neutral"> </span>
|
|
155
|
+
<span class="cline-any cline-neutral"> </span>
|
|
156
|
+
<span class="cline-any cline-no"> </span>
|
|
157
|
+
<span class="cline-any cline-neutral"> </span>
|
|
158
|
+
<span class="cline-any cline-neutral"> </span>
|
|
159
|
+
<span class="cline-any cline-neutral"> </span>
|
|
160
|
+
<span class="cline-any cline-neutral"> </span>
|
|
161
|
+
<span class="cline-any cline-no"> </span>
|
|
162
|
+
<span class="cline-any cline-neutral"> </span>
|
|
163
|
+
<span class="cline-any cline-no"> </span>
|
|
164
|
+
<span class="cline-any cline-neutral"> </span>
|
|
165
|
+
<span class="cline-any cline-neutral"> </span>
|
|
166
|
+
<span class="cline-any cline-neutral"> </span>
|
|
167
|
+
<span class="cline-any cline-neutral"> </span>
|
|
168
|
+
<span class="cline-any cline-neutral"> </span>
|
|
169
|
+
<span class="cline-any cline-neutral"> </span>
|
|
170
|
+
<span class="cline-any cline-neutral"> </span>
|
|
171
|
+
<span class="cline-any cline-no"> </span>
|
|
172
|
+
<span class="cline-any cline-neutral"> </span>
|
|
173
|
+
<span class="cline-any cline-neutral"> </span>
|
|
174
|
+
<span class="cline-any cline-neutral"> </span>
|
|
175
|
+
<span class="cline-any cline-neutral"> </span>
|
|
176
|
+
<span class="cline-any cline-no"> </span>
|
|
177
|
+
<span class="cline-any cline-no"> </span>
|
|
178
|
+
<span class="cline-any cline-neutral"> </span>
|
|
179
|
+
<span class="cline-any cline-no"> </span>
|
|
180
|
+
<span class="cline-any cline-neutral"> </span>
|
|
181
|
+
<span class="cline-any cline-neutral"> </span>
|
|
182
|
+
<span class="cline-any cline-no"> </span>
|
|
183
|
+
<span class="cline-any cline-no"> </span>
|
|
184
|
+
<span class="cline-any cline-neutral"> </span>
|
|
185
|
+
<span class="cline-any cline-no"> </span>
|
|
186
|
+
<span class="cline-any cline-neutral"> </span>
|
|
187
|
+
<span class="cline-any cline-neutral"> </span>
|
|
188
|
+
<span class="cline-any cline-no"> </span>
|
|
189
|
+
<span class="cline-any cline-neutral"> </span>
|
|
190
|
+
<span class="cline-any cline-neutral"> </span>
|
|
191
|
+
<span class="cline-any cline-neutral"> </span>
|
|
192
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { useMutation } from 'react-query';
|
|
193
|
+
|
|
194
|
+
import { useOkapiKy } from '@folio/stripes/core';
|
|
195
|
+
|
|
196
|
+
import useInvalidateRefdata from './useInvalidateRefdata';
|
|
197
|
+
|
|
198
|
+
const useMutateRefdataCategory = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span></span>
|
|
199
|
+
afterQueryCalls,
|
|
200
|
+
catchQueryCalls,
|
|
201
|
+
endpoint,
|
|
202
|
+
queryParams,
|
|
203
|
+
returnQueryObject = <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
204
|
+
post: false,
|
|
205
|
+
delete: false
|
|
206
|
+
}
|
|
207
|
+
}) => {
|
|
208
|
+
const returnObj = <span class="cstat-no" title="statement not covered" >{};</span>
|
|
209
|
+
|
|
210
|
+
const ky = <span class="cstat-no" title="statement not covered" >useOkapiKy();</span>
|
|
211
|
+
const invalidateRefdata = <span class="cstat-no" title="statement not covered" >useInvalidateRefdata();</span>
|
|
212
|
+
|
|
213
|
+
const deleteQueryObject = <span class="cstat-no" title="statement not covered" >useMutation(</span>
|
|
214
|
+
['stripes-kint-components', 'useMutateRefdataCategory', 'delete'],
|
|
215
|
+
<span class="fstat-no" title="function not covered" > as</span>ync (id) => <span class="cstat-no" title="statement not covered" >ky.delete(</span>
|
|
216
|
+
`${endpoint}/${id}`
|
|
217
|
+
).json()
|
|
218
|
+
.then(afterQueryCalls?.delete)
|
|
219
|
+
.then(<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >invalidateRefdata())</span>
|
|
220
|
+
.catch(catchQueryCalls?.delete),
|
|
221
|
+
queryParams?.delete
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
const postQueryObject = <span class="cstat-no" title="statement not covered" >useMutation(</span>
|
|
225
|
+
['stripes-kint-components', 'useMutateRefdataCategory', 'post'],
|
|
226
|
+
<span class="fstat-no" title="function not covered" > as</span>ync (payload) => <span class="cstat-no" title="statement not covered" >ky.post(endpoint,</span>
|
|
227
|
+
{
|
|
228
|
+
json: {
|
|
229
|
+
...payload,
|
|
230
|
+
values: []
|
|
231
|
+
}
|
|
232
|
+
}).json()
|
|
233
|
+
.then(afterQueryCalls?.post)
|
|
234
|
+
.then(<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >invalidateRefdata())</span>
|
|
235
|
+
.catch(catchQueryCalls?.post),
|
|
236
|
+
queryParams?.post
|
|
237
|
+
);
|
|
238
|
+
|
|
239
|
+
<span class="cstat-no" title="statement not covered" > if (returnQueryObject?.delete) {</span>
|
|
240
|
+
<span class="cstat-no" title="statement not covered" > returnObj.delete = deleteQueryObject;</span>
|
|
241
|
+
} else {
|
|
242
|
+
<span class="cstat-no" title="statement not covered" > returnObj.delete = deleteQueryObject.mutateAsync;</span>
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
<span class="cstat-no" title="statement not covered" > if (returnQueryObject?.post) {</span>
|
|
246
|
+
<span class="cstat-no" title="statement not covered" > returnObj.post = postQueryObject;</span>
|
|
247
|
+
} else {
|
|
248
|
+
<span class="cstat-no" title="statement not covered" > returnObj.post = postQueryObject.mutateAsync;</span>
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
<span class="cstat-no" title="statement not covered" > return returnObj;</span>
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
export default useMutateRefdataCategory;
|
|
255
|
+
</pre></td></tr></table></pre>
|
|
256
|
+
|
|
257
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
258
|
+
</div><!-- /wrapper -->
|
|
259
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
260
|
+
Code coverage generated by
|
|
261
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
262
|
+
at 2022-09-16T13:23:25.290Z
|
|
263
|
+
</div>
|
|
264
|
+
<script src="../prettify.js"></script>
|
|
265
|
+
<script>
|
|
266
|
+
window.onload = function () {
|
|
267
|
+
prettyPrint();
|
|
268
|
+
};
|
|
269
|
+
</script>
|
|
270
|
+
<script src="../sorter.js"></script>
|
|
271
|
+
<script src="../block-navigation.js"></script>
|
|
272
|
+
</body>
|
|
273
|
+
</html>
|
|
274
|
+
|