@k-int/stripes-kint-components 2.4.0 → 2.5.1
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 +13 -0
- package/README.md +14 -1
- package/es/lib/ActionList/ActionList.js +20 -7
- package/es/lib/ActionList/ActionListFieldArray.js +86 -85
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +1 -3
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +2 -2
- package/es/lib/EditableRefdataList/EditableRefdataList.js +3 -0
- package/es/lib/EditableSettingsList/EditableSettingsList.js +4 -1
- package/es/lib/FormModal/FormModal.js +10 -1
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +3 -2
- package/es/lib/Typedown/Typedown.js +5 -7
- package/es/lib/hooks/settingsHooks/useSettingSection.js +16 -3
- package/es/lib/hooks/settingsHooks/useSettings.js +14 -7
- package/es/lib/hooks/useKiwtSASQuery.js +8 -2
- package/es/lib/utils/generateKiwtQueryParams.js +21 -4
- package/junit.xml +37 -37
- package/package.json +1 -2
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +42 -12
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +222 -93
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +12 -12
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +20 -17
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +601 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +15 -15
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +190 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +340 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +667 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +982 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +478 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +191 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +100 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +460 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +529 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +424 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +307 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +451 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +236 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +103 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +250 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +190 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +220 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +193 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +436 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +616 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +161 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +94 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +116 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +175 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +33 -18
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +5 -5
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +8 -2
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +102 -24
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +14 -8
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +60 -153
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +373 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +6 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +2 -2
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +7 -25
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +7 -4
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +5 -5
- 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 +39 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +8 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +5 -5
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +57 -6
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +29 -8
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +7 -7
- 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 +26 -8
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +205 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +118 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +21 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +6 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/index.html +126 -51
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +36 -9
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +124 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +211 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +95 -20
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +29 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +127 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +112 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +112 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +126 -6
- package/src/artifacts/coverage-jest/lcov.info +2043 -718
- package/src/lib/ActionList/ActionList.js +12 -5
- package/src/lib/ActionList/ActionListFieldArray.js +86 -65
- package/src/lib/ActionList/README.md +19 -0
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +1 -3
- package/src/lib/CustomProperties/View/CustomPropertyCard.js +2 -2
- package/src/lib/EditableRefdataList/EditableRefdataList.js +3 -1
- package/src/lib/EditableSettingsList/EditableSettingsList.js +8 -1
- package/src/lib/FormModal/FormModal.js +6 -2
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +7 -0
- package/src/lib/Typedown/Typedown.js +4 -10
- package/src/lib/hooks/settingsHooks/useSettingSection.js +19 -2
- package/src/lib/hooks/settingsHooks/useSettings.js +12 -5
- package/src/lib/hooks/useKiwtSASQuery.js +7 -1
- package/src/lib/utils/generateKiwtQueryParams.js +10 -1
- package/src/lib/utils/matchString.js +1 -1
- package/styles/ActionListFieldArray.css +10 -2
|
@@ -76,7 +76,7 @@ export { default as useSettingSection } from './useSettingSection';
|
|
|
76
76
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
77
77
|
Code coverage generated by
|
|
78
78
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
79
|
-
at
|
|
79
|
+
at Thu May 19 2022 10:55:24 GMT+0100 (British Summer Time)
|
|
80
80
|
</div>
|
|
81
81
|
<script src="../../prettify.js"></script>
|
|
82
82
|
<script>
|
package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/8</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/8</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -89,7 +89,25 @@
|
|
|
89
89
|
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
90
|
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
91
|
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
-
<a name='L27'></a><a href='#L27'>27</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></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
110
|
+
<span class="cline-any cline-neutral"> </span>
|
|
93
111
|
<span class="cline-any cline-neutral"> </span>
|
|
94
112
|
<span class="cline-any cline-neutral"> </span>
|
|
95
113
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -100,6 +118,22 @@
|
|
|
100
118
|
<span class="cline-any cline-no"> </span>
|
|
101
119
|
<span class="cline-any cline-no"> </span>
|
|
102
120
|
<span class="cline-any cline-neutral"> </span>
|
|
121
|
+
<span class="cline-any cline-neutral"> </span>
|
|
122
|
+
<span class="cline-any cline-neutral"> </span>
|
|
123
|
+
<span class="cline-any cline-neutral"> </span>
|
|
124
|
+
<span class="cline-any cline-neutral"> </span>
|
|
125
|
+
<span class="cline-any cline-neutral"> </span>
|
|
126
|
+
<span class="cline-any cline-neutral"> </span>
|
|
127
|
+
<span class="cline-any cline-neutral"> </span>
|
|
128
|
+
<span class="cline-any cline-neutral"> </span>
|
|
129
|
+
<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>
|
|
103
137
|
<span class="cline-any cline-no"> </span>
|
|
104
138
|
<span class="cline-any cline-neutral"> </span>
|
|
105
139
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -118,15 +152,32 @@
|
|
|
118
152
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React from 'react';
|
|
119
153
|
import { useMutation, useQuery } from 'react-query';
|
|
120
154
|
import { useOkapiKy } from '@folio/stripes/core';
|
|
155
|
+
import { generateKiwtQueryParams } from '../../utils';
|
|
121
156
|
|
|
122
157
|
const useSettingSection = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span></span>
|
|
123
158
|
sectionName,
|
|
124
159
|
settingEndpoint
|
|
125
160
|
}) => {
|
|
126
161
|
const ky = <span class="cstat-no" title="statement not covered" >useOkapiKy();</span>
|
|
162
|
+
const queryParams = <span class="cstat-no" title="statement not covered" >generateKiwtQueryParams({</span>
|
|
163
|
+
filters: [
|
|
164
|
+
{
|
|
165
|
+
path: 'section',
|
|
166
|
+
value: sectionName
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
sort: [
|
|
170
|
+
{
|
|
171
|
+
path: 'key'
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
perPage: 100,
|
|
175
|
+
stats: false
|
|
176
|
+
}, {});
|
|
177
|
+
|
|
127
178
|
const { data: settings = <span class="branch-0 cbranch-no" title="branch not covered" >[] </span>} = <span class="cstat-no" title="statement not covered" >useQuery(</span>
|
|
128
|
-
['stripes-kint-components', 'useSetting', 'appSettings', sectionName],
|
|
129
|
-
<span class="fstat-no" title="function not covered" > ()</span> => <span class="cstat-no" title="statement not covered" >ky(`${settingEndpoint}
|
|
179
|
+
['stripes-kint-components', 'useSetting', 'appSettings', queryParams, sectionName],
|
|
180
|
+
<span class="fstat-no" title="function not covered" > ()</span> => <span class="cstat-no" title="statement not covered" >ky(`${settingEndpoint}?${queryParams?.join('&')}`).json()</span>
|
|
130
181
|
);
|
|
131
182
|
|
|
132
183
|
const { mutateAsync: putSetting } = <span class="cstat-no" title="statement not covered" >useMutation(</span>
|
|
@@ -148,7 +199,7 @@ export default useSettingSection;
|
|
|
148
199
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
149
200
|
Code coverage generated by
|
|
150
201
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
151
|
-
at
|
|
202
|
+
at Thu May 19 2022 10:55:24 GMT+0100 (British Summer Time)
|
|
152
203
|
</div>
|
|
153
204
|
<script src="../../prettify.js"></script>
|
|
154
205
|
<script>
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/22</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -169,7 +169,14 @@
|
|
|
169
169
|
<a name='L104'></a><a href='#L104'>104</a>
|
|
170
170
|
<a name='L105'></a><a href='#L105'>105</a>
|
|
171
171
|
<a name='L106'></a><a href='#L106'>106</a>
|
|
172
|
-
<a name='L107'></a><a href='#L107'>107</a
|
|
172
|
+
<a name='L107'></a><a href='#L107'>107</a>
|
|
173
|
+
<a name='L108'></a><a href='#L108'>108</a>
|
|
174
|
+
<a name='L109'></a><a href='#L109'>109</a>
|
|
175
|
+
<a name='L110'></a><a href='#L110'>110</a>
|
|
176
|
+
<a name='L111'></a><a href='#L111'>111</a>
|
|
177
|
+
<a name='L112'></a><a href='#L112'>112</a>
|
|
178
|
+
<a name='L113'></a><a href='#L113'>113</a>
|
|
179
|
+
<a name='L114'></a><a href='#L114'>114</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
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>
|
|
@@ -196,6 +203,13 @@
|
|
|
196
203
|
<span class="cline-any cline-no"> </span>
|
|
197
204
|
<span class="cline-any cline-no"> </span>
|
|
198
205
|
<span class="cline-any cline-neutral"> </span>
|
|
206
|
+
<span class="cline-any cline-neutral"> </span>
|
|
207
|
+
<span class="cline-any cline-neutral"> </span>
|
|
208
|
+
<span class="cline-any cline-neutral"> </span>
|
|
209
|
+
<span class="cline-any cline-neutral"> </span>
|
|
210
|
+
<span class="cline-any cline-neutral"> </span>
|
|
211
|
+
<span class="cline-any cline-neutral"> </span>
|
|
212
|
+
<span class="cline-any cline-neutral"> </span>
|
|
199
213
|
<span class="cline-any cline-no"> </span>
|
|
200
214
|
<span class="cline-any cline-neutral"> </span>
|
|
201
215
|
<span class="cline-any cline-no"> </span>
|
|
@@ -287,7 +301,7 @@ import { Settings } from '@folio/stripes/smart-components';
|
|
|
287
301
|
import { SettingPage, SettingPagePane } from '../../SettingPage';
|
|
288
302
|
import { SettingsContext } from '../../contexts';
|
|
289
303
|
|
|
290
|
-
import { sortByLabel, toCamelCase } from '../../utils';
|
|
304
|
+
import { generateKiwtQueryParams, sortByLabel, toCamelCase } from '../../utils';
|
|
291
305
|
|
|
292
306
|
const useSettings = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span></span>
|
|
293
307
|
dynamicPageExclusions,
|
|
@@ -299,12 +313,19 @@ const useSettings = <span class="cstat-no" title="statement not covered" ><span
|
|
|
299
313
|
}) => {
|
|
300
314
|
const ky = <span class="cstat-no" title="statement not covered" >useOkapiKy();</span>
|
|
301
315
|
const intl = <span class="cstat-no" title="statement not covered" >useIntl();</span>
|
|
302
|
-
const
|
|
303
|
-
<span class="cstat-no" title="statement not covered" >
|
|
316
|
+
const queryParams = <span class="cstat-no" title="statement not covered" >generateKiwtQueryParams({</span>
|
|
317
|
+
filters: dynamicPageExclusions?.map(<span class="fstat-no" title="function not covered" >dp</span>e => (<span class="cstat-no" title="statement not covered" >{</span>
|
|
318
|
+
path: 'section',
|
|
319
|
+
comparator: '!=',
|
|
320
|
+
value: dpe
|
|
321
|
+
})),
|
|
322
|
+
perPage: 100,
|
|
323
|
+
stats: false
|
|
324
|
+
}, {});
|
|
304
325
|
|
|
305
326
|
const { data: appSettings = <span class="branch-0 cbranch-no" title="branch not covered" >[],</span> isLoading } = <span class="cstat-no" title="statement not covered" >useQuery(</span>
|
|
306
|
-
['stripes-kint-components', 'useSettings', 'appSettings', settingEndpoint],
|
|
307
|
-
<span class="fstat-no" title="function not covered" > ()</span> => <span class="cstat-no" title="statement not covered" >ky(`${settingEndpoint}?${
|
|
327
|
+
['stripes-kint-components', 'useSettings', 'appSettings', settingEndpoint, queryParams],
|
|
328
|
+
<span class="fstat-no" title="function not covered" > ()</span> => <span class="cstat-no" title="statement not covered" >ky(`${settingEndpoint}?${queryParams?.join('&')}`).json()</span>
|
|
308
329
|
);
|
|
309
330
|
|
|
310
331
|
const sections = <span class="cstat-no" title="statement not covered" >[...new Set(appSettings.map(<span class="fstat-no" title="function not covered" >s </span>=> <span class="cstat-no" title="statement not covered" >s.section)</span>)];</span>
|
|
@@ -388,7 +409,7 @@ export default useSettings;
|
|
|
388
409
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
389
410
|
Code coverage generated by
|
|
390
411
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
391
|
-
at
|
|
412
|
+
at Thu May 19 2022 10:55:24 GMT+0100 (British Summer Time)
|
|
392
413
|
</div>
|
|
393
414
|
<script src="../../prettify.js"></script>
|
|
394
415
|
<script>
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/78</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/50</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/77</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -114,13 +114,13 @@
|
|
|
114
114
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
115
115
|
</td>
|
|
116
116
|
<td data-value="0" class="pct low">0%</td>
|
|
117
|
-
<td data-value="
|
|
117
|
+
<td data-value="12" class="abs low">0/12</td>
|
|
118
118
|
<td data-value="0" class="pct low">0%</td>
|
|
119
|
-
<td data-value="
|
|
119
|
+
<td data-value="4" class="abs low">0/4</td>
|
|
120
120
|
<td data-value="0" class="pct low">0%</td>
|
|
121
121
|
<td data-value="3" class="abs low">0/3</td>
|
|
122
122
|
<td data-value="0" class="pct low">0%</td>
|
|
123
|
-
<td data-value="
|
|
123
|
+
<td data-value="12" class="abs low">0/12</td>
|
|
124
124
|
</tr>
|
|
125
125
|
|
|
126
126
|
<tr>
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
147
147
|
Code coverage generated by
|
|
148
148
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
149
|
-
at
|
|
149
|
+
at Thu May 19 2022 10:55:24 GMT+0100 (British Summer Time)
|
|
150
150
|
</div>
|
|
151
151
|
<script src="../../prettify.js"></script>
|
|
152
152
|
<script>
|
|
@@ -79,7 +79,7 @@ export { default as useTypedownData } from './useTypedownData';
|
|
|
79
79
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
80
80
|
Code coverage generated by
|
|
81
81
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
82
|
-
at
|
|
82
|
+
at Thu May 19 2022 10:55:24 GMT+0100 (British Summer Time)
|
|
83
83
|
</div>
|
|
84
84
|
<script src="../../prettify.js"></script>
|
|
85
85
|
<script>
|
|
@@ -505,7 +505,7 @@ export default useTypedown;
|
|
|
505
505
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
506
506
|
Code coverage generated by
|
|
507
507
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
508
|
-
at
|
|
508
|
+
at Thu May 19 2022 10:55:24 GMT+0100 (British Summer Time)
|
|
509
509
|
</div>
|
|
510
510
|
<script src="../../prettify.js"></script>
|
|
511
511
|
<script>
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/12</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/4</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/12</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -89,7 +89,15 @@
|
|
|
89
89
|
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
90
|
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
91
|
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
-
<a name='L27'></a><a href='#L27'>27</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></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
99
|
+
<span class="cline-any cline-neutral"> </span>
|
|
100
|
+
<span class="cline-any cline-neutral"> </span>
|
|
93
101
|
<span class="cline-any cline-neutral"> </span>
|
|
94
102
|
<span class="cline-any cline-neutral"> </span>
|
|
95
103
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -97,11 +105,15 @@
|
|
|
97
105
|
<span class="cline-any cline-no"> </span>
|
|
98
106
|
<span class="cline-any cline-neutral"> </span>
|
|
99
107
|
<span class="cline-any cline-no"> </span>
|
|
108
|
+
<span class="cline-any cline-no"> </span>
|
|
109
|
+
<span class="cline-any cline-no"> </span>
|
|
100
110
|
<span class="cline-any cline-neutral"> </span>
|
|
101
111
|
<span class="cline-any cline-neutral"> </span>
|
|
102
112
|
<span class="cline-any cline-no"> </span>
|
|
103
113
|
<span class="cline-any cline-neutral"> </span>
|
|
104
114
|
<span class="cline-any cline-neutral"> </span>
|
|
115
|
+
<span class="cline-any cline-no"> </span>
|
|
116
|
+
<span class="cline-any cline-neutral"> </span>
|
|
105
117
|
<span class="cline-any cline-neutral"> </span>
|
|
106
118
|
<span class="cline-any cline-neutral"> </span>
|
|
107
119
|
<span class="cline-any cline-no"> </span>
|
|
@@ -119,15 +131,21 @@
|
|
|
119
131
|
import { useQuery } from 'react-query';
|
|
120
132
|
import { useOkapiKy } from '@folio/stripes/core';
|
|
121
133
|
|
|
122
|
-
|
|
134
|
+
import { typedownQueryKey } from '../../utils';
|
|
135
|
+
|
|
136
|
+
const useTypedownData = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(p</span>ath, callPath) => {</span>
|
|
123
137
|
const ky = <span class="cstat-no" title="statement not covered" >useOkapiKy();</span>
|
|
138
|
+
|
|
139
|
+
const queryKey = <span class="cstat-no" title="statement not covered" >typedownQueryKey(path);</span>
|
|
140
|
+
<span class="cstat-no" title="statement not covered" > if (callPath) {</span>
|
|
141
|
+
<span class="cstat-no" title="statement not covered" > queryKey.push(callPath);</span>
|
|
142
|
+
}
|
|
124
143
|
|
|
125
144
|
const { data, isLoading } = <span class="cstat-no" title="statement not covered" >useQuery(</span>
|
|
126
145
|
// Ensure when multiple apps are using this function that each one gets memoized individually
|
|
127
|
-
|
|
146
|
+
queryKey,
|
|
128
147
|
<span class="fstat-no" title="function not covered" > ()</span> => <span class="cstat-no" title="statement not covered" >ky(callPath).json()</span>
|
|
129
148
|
);
|
|
130
|
-
|
|
131
149
|
|
|
132
150
|
// Smooth out transitions while data changes by only displaying once call has been loaded.
|
|
133
151
|
const [contentData, setContentData] = <span class="cstat-no" title="statement not covered" >useState();</span>
|
|
@@ -148,7 +166,7 @@ export default useTypedownData;
|
|
|
148
166
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
149
167
|
Code coverage generated by
|
|
150
168
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
151
|
-
at
|
|
169
|
+
at Thu May 19 2022 10:55:24 GMT+0100 (British Summer Time)
|
|
152
170
|
</div>
|
|
153
171
|
<script src="../../prettify.js"></script>
|
|
154
172
|
<script>
|
package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html
CHANGED
|
@@ -148,7 +148,7 @@ export default useTypedownToggle;
|
|
|
148
148
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
149
149
|
Code coverage generated by
|
|
150
150
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
151
|
-
at
|
|
151
|
+
at Thu May 19 2022 10:55:24 GMT+0100 (British Summer Time)
|
|
152
152
|
</div>
|
|
153
153
|
<script src="../../prettify.js"></script>
|
|
154
154
|
<script>
|
|
@@ -142,7 +142,7 @@ export default useActiveElement;
|
|
|
142
142
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
143
143
|
Code coverage generated by
|
|
144
144
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
145
|
-
at
|
|
145
|
+
at Thu May 19 2022 10:55:24 GMT+0100 (British Summer Time)
|
|
146
146
|
</div>
|
|
147
147
|
<script src="../prettify.js"></script>
|
|
148
148
|
<script>
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for hooks/useAvailableCustomProperties.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> useAvailableCustomProperties.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/11</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/3</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/11</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></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
107
|
+
<span class="cline-any cline-neutral"> </span>
|
|
108
|
+
<span class="cline-any cline-neutral"> </span>
|
|
109
|
+
<span class="cline-any cline-no"> </span>
|
|
110
|
+
<span class="cline-any cline-no"> </span>
|
|
111
|
+
<span class="cline-any cline-no"> </span>
|
|
112
|
+
<span class="cline-any cline-neutral"> </span>
|
|
113
|
+
<span class="cline-any cline-no"> </span>
|
|
114
|
+
<span class="cline-any cline-no"> </span>
|
|
115
|
+
<span class="cline-any cline-no"> </span>
|
|
116
|
+
<span class="cline-any cline-no"> </span>
|
|
117
|
+
<span class="cline-any cline-no"> </span>
|
|
118
|
+
<span class="cline-any cline-no"> </span>
|
|
119
|
+
<span class="cline-any cline-neutral"> </span>
|
|
120
|
+
<span class="cline-any cline-neutral"> </span>
|
|
121
|
+
<span class="cline-any cline-neutral"> </span>
|
|
122
|
+
<span class="cline-any cline-neutral"> </span>
|
|
123
|
+
<span class="cline-any cline-neutral"> </span>
|
|
124
|
+
<span class="cline-any cline-neutral"> </span>
|
|
125
|
+
<span class="cline-any cline-neutral"> </span>
|
|
126
|
+
<span class="cline-any cline-neutral"> </span>
|
|
127
|
+
<span class="cline-any cline-neutral"> </span>
|
|
128
|
+
<span class="cline-any cline-neutral"> </span>
|
|
129
|
+
<span class="cline-any cline-no"> </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-neutral"> </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-no"> </span>
|
|
143
|
+
<span class="cline-any cline-neutral"> </span>
|
|
144
|
+
<span class="cline-any cline-neutral"> </span>
|
|
145
|
+
<span class="cline-any cline-neutral"> </span>
|
|
146
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { useEffect, useState } from 'react';
|
|
147
|
+
import { useIntl } from 'react-intl';
|
|
148
|
+
|
|
149
|
+
const useAvailableCustomProperties = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(c</span>ustomProperties = <span class="branch-0 cbranch-no" title="branch not covered" >[])</span> => {</span>
|
|
150
|
+
const intl = <span class="cstat-no" title="statement not covered" >useIntl();</span>
|
|
151
|
+
const [custProps, setCustProps] = <span class="cstat-no" title="statement not covered" >useState([]);</span>
|
|
152
|
+
|
|
153
|
+
<span class="cstat-no" title="statement not covered" > useEffect(<span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
154
|
+
<span class="cstat-no" title="statement not covered" > if (customProperties.length !== custProps.length) {</span>
|
|
155
|
+
<span class="cstat-no" title="statement not covered" > setCustProps(customProperties.map(<span class="fstat-no" title="function not covered" >cu</span>stomProperty => {</span>
|
|
156
|
+
let options = <span class="cstat-no" title="statement not covered" >customProperty?.category?.values;</span>
|
|
157
|
+
<span class="cstat-no" title="statement not covered" > if (options) {</span>
|
|
158
|
+
<span class="cstat-no" title="statement not covered" > options = [</span>
|
|
159
|
+
{
|
|
160
|
+
label: intl.formatMessage({
|
|
161
|
+
id: 'stripes-kint-components.notSet',
|
|
162
|
+
}),
|
|
163
|
+
value: '',
|
|
164
|
+
},
|
|
165
|
+
...options,
|
|
166
|
+
];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
<span class="cstat-no" title="statement not covered" > return {</span>
|
|
170
|
+
description: customProperty.description,
|
|
171
|
+
label: customProperty.label,
|
|
172
|
+
primary: customProperty.primary,
|
|
173
|
+
type: customProperty.type,
|
|
174
|
+
options,
|
|
175
|
+
value: customProperty.name,
|
|
176
|
+
defaultInternal: customProperty.defaultInternal,
|
|
177
|
+
};
|
|
178
|
+
}));
|
|
179
|
+
}
|
|
180
|
+
}, [custProps, customProperties, intl]);
|
|
181
|
+
|
|
182
|
+
<span class="cstat-no" title="statement not covered" > return custProps;</span>
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
export default useAvailableCustomProperties;
|
|
186
|
+
</pre></td></tr></table></pre>
|
|
187
|
+
|
|
188
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
189
|
+
</div><!-- /wrapper -->
|
|
190
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
191
|
+
Code coverage generated by
|
|
192
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
193
|
+
at Thu May 19 2022 10:55:24 GMT+0100 (British Summer Time)
|
|
194
|
+
</div>
|
|
195
|
+
<script src="../prettify.js"></script>
|
|
196
|
+
<script>
|
|
197
|
+
window.onload = function () {
|
|
198
|
+
prettyPrint();
|
|
199
|
+
};
|
|
200
|
+
</script>
|
|
201
|
+
<script src="../sorter.js"></script>
|
|
202
|
+
<script src="../block-navigation.js"></script>
|
|
203
|
+
</body>
|
|
204
|
+
</html>
|
|
205
|
+
|
|
@@ -298,7 +298,7 @@ export default useCustomProperties;
|
|
|
298
298
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
299
299
|
Code coverage generated by
|
|
300
300
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
301
|
-
at
|
|
301
|
+
at Thu May 19 2022 10:55:24 GMT+0100 (British Summer Time)
|
|
302
302
|
</div>
|
|
303
303
|
<script src="../prettify.js"></script>
|
|
304
304
|
<script>
|
|
@@ -268,7 +268,7 @@ export default useHelperApp;
|
|
|
268
268
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
269
269
|
Code coverage generated by
|
|
270
270
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
271
|
-
at
|
|
271
|
+
at Thu May 19 2022 10:55:24 GMT+0100 (British Summer Time)
|
|
272
272
|
</div>
|
|
273
273
|
<script src="../prettify.js"></script>
|
|
274
274
|
<script>
|