@k-int/stripes-kint-components 2.0.0 → 2.0.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 +8 -0
- package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +109 -0
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +998 -0
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +238 -0
- package/es/lib/ActionList/ActionListFieldArray.js +5 -1
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +6 -1
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +3 -0
- package/es/lib/EditableRefdataList/EditableRefdataList.js +0 -1
- package/junit.xml +79 -0
- package/package.json +2 -2
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +277 -0
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +913 -0
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +146 -0
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +418 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +805 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesView.js.html +535 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +973 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +176 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +97 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +373 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +223 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +211 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +376 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +262 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +436 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +161 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +94 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +146 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +94 -0
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +298 -0
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +319 -0
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +184 -0
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +370 -0
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +949 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +274 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +250 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +214 -0
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +211 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +178 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +146 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +91 -0
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +916 -0
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/base.css +224 -0
- package/src/artifacts/coverage-jest/lcov-report/block-navigation.js +87 -0
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +112 -0
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +94 -0
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +97 -0
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +91 -0
- package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +281 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +121 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +146 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +91 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +163 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +403 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +161 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +94 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +520 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +163 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +163 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +157 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +304 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +283 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +274 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +178 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +136 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +271 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +301 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +208 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +268 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +166 -0
- package/src/artifacts/coverage-jest/lcov-report/index.html +416 -0
- package/src/artifacts/coverage-jest/lcov-report/prettify.css +1 -0
- package/src/artifacts/coverage-jest/lcov-report/prettify.js +2 -0
- package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/sorter.js +196 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +193 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +109 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +286 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +236 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +121 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +106 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +166 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +103 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +130 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +127 -0
- package/src/artifacts/coverage-jest/lcov.info +2445 -0
- package/src/lib/ActionList/ActionListFieldArray.js +5 -1
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +4 -1
- package/src/lib/CustomProperties/Config/CustomPropertyForm.js +1 -0
- package/src/lib/EditableRefdataList/EditableRefdataList.js +0 -1
- package/translations/stripes-kint-components/en.json +2 -0
- package/yarn-error.log +0 -14118
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
(function () {
|
|
4
|
+
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
5
|
+
enterModule && enterModule(module);
|
|
6
|
+
})();
|
|
7
|
+
|
|
8
|
+
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
9
|
+
return a;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/* eslint-disable */
|
|
13
|
+
var addSorting = function () {
|
|
14
|
+
'use strict';
|
|
15
|
+
|
|
16
|
+
var cols,
|
|
17
|
+
currentSort = {
|
|
18
|
+
index: 0,
|
|
19
|
+
desc: false
|
|
20
|
+
}; // returns the summary table element
|
|
21
|
+
|
|
22
|
+
function getTable() {
|
|
23
|
+
return document.querySelector('.coverage-summary');
|
|
24
|
+
} // returns the thead element of the summary table
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
function getTableHeader() {
|
|
28
|
+
return getTable().querySelector('thead tr');
|
|
29
|
+
} // returns the tbody element of the summary table
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
function getTableBody() {
|
|
33
|
+
return getTable().querySelector('tbody');
|
|
34
|
+
} // returns the th element for nth column
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
function getNthColumn(n) {
|
|
38
|
+
return getTableHeader().querySelectorAll('th')[n];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function onFilterInput() {
|
|
42
|
+
var searchValue = document.getElementById('fileSearch').value;
|
|
43
|
+
var rows = document.getElementsByTagName('tbody')[0].children;
|
|
44
|
+
|
|
45
|
+
for (var i = 0; i < rows.length; i++) {
|
|
46
|
+
var row = rows[i];
|
|
47
|
+
|
|
48
|
+
if (row.textContent.toLowerCase().includes(searchValue.toLowerCase())) {
|
|
49
|
+
row.style.display = '';
|
|
50
|
+
} else {
|
|
51
|
+
row.style.display = 'none';
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
} // loads the search box
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
function addSearchBox() {
|
|
58
|
+
var template = document.getElementById('filterTemplate');
|
|
59
|
+
var templateClone = template.content.cloneNode(true);
|
|
60
|
+
templateClone.getElementById('fileSearch').oninput = onFilterInput;
|
|
61
|
+
template.parentElement.appendChild(templateClone);
|
|
62
|
+
} // loads all columns
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
function loadColumns() {
|
|
66
|
+
var colNodes = getTableHeader().querySelectorAll('th'),
|
|
67
|
+
colNode,
|
|
68
|
+
cols = [],
|
|
69
|
+
col,
|
|
70
|
+
i;
|
|
71
|
+
|
|
72
|
+
for (i = 0; i < colNodes.length; i += 1) {
|
|
73
|
+
colNode = colNodes[i];
|
|
74
|
+
col = {
|
|
75
|
+
key: colNode.getAttribute('data-col'),
|
|
76
|
+
sortable: !colNode.getAttribute('data-nosort'),
|
|
77
|
+
type: colNode.getAttribute('data-type') || 'string'
|
|
78
|
+
};
|
|
79
|
+
cols.push(col);
|
|
80
|
+
|
|
81
|
+
if (col.sortable) {
|
|
82
|
+
col.defaultDescSort = col.type === 'number';
|
|
83
|
+
colNode.innerHTML = colNode.innerHTML + '<span class="sorter"></span>';
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return cols;
|
|
88
|
+
} // attaches a data attribute to every tr element with an object
|
|
89
|
+
// of data values keyed by column name
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
function loadRowData(tableRow) {
|
|
93
|
+
var tableCols = tableRow.querySelectorAll('td'),
|
|
94
|
+
colNode,
|
|
95
|
+
col,
|
|
96
|
+
data = {},
|
|
97
|
+
i,
|
|
98
|
+
val;
|
|
99
|
+
|
|
100
|
+
for (i = 0; i < tableCols.length; i += 1) {
|
|
101
|
+
colNode = tableCols[i];
|
|
102
|
+
col = cols[i];
|
|
103
|
+
val = colNode.getAttribute('data-value');
|
|
104
|
+
|
|
105
|
+
if (col.type === 'number') {
|
|
106
|
+
val = Number(val);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
data[col.key] = val;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return data;
|
|
113
|
+
} // loads all row data
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
function loadData() {
|
|
117
|
+
var rows = getTableBody().querySelectorAll('tr'),
|
|
118
|
+
i;
|
|
119
|
+
|
|
120
|
+
for (i = 0; i < rows.length; i += 1) {
|
|
121
|
+
rows[i].data = loadRowData(rows[i]);
|
|
122
|
+
}
|
|
123
|
+
} // sorts the table using the data for the ith column
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
function sortByIndex(index, desc) {
|
|
127
|
+
var key = cols[index].key,
|
|
128
|
+
sorter = function sorter(a, b) {
|
|
129
|
+
a = a.data[key];
|
|
130
|
+
b = b.data[key];
|
|
131
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
132
|
+
},
|
|
133
|
+
finalSorter = sorter,
|
|
134
|
+
tableBody = document.querySelector('.coverage-summary tbody'),
|
|
135
|
+
rowNodes = tableBody.querySelectorAll('tr'),
|
|
136
|
+
rows = [],
|
|
137
|
+
i;
|
|
138
|
+
|
|
139
|
+
if (desc) {
|
|
140
|
+
finalSorter = function finalSorter(a, b) {
|
|
141
|
+
return -1 * sorter(a, b);
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
for (i = 0; i < rowNodes.length; i += 1) {
|
|
146
|
+
rows.push(rowNodes[i]);
|
|
147
|
+
tableBody.removeChild(rowNodes[i]);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
rows.sort(finalSorter);
|
|
151
|
+
|
|
152
|
+
for (i = 0; i < rows.length; i += 1) {
|
|
153
|
+
tableBody.appendChild(rows[i]);
|
|
154
|
+
}
|
|
155
|
+
} // removes sort indicators for current column being sorted
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
function removeSortIndicators() {
|
|
159
|
+
var col = getNthColumn(currentSort.index),
|
|
160
|
+
cls = col.className;
|
|
161
|
+
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
|
162
|
+
col.className = cls;
|
|
163
|
+
} // adds sort indicators for current column being sorted
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
function addSortIndicators() {
|
|
167
|
+
getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted';
|
|
168
|
+
} // adds event listeners for all sorter widgets
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
function enableUI() {
|
|
172
|
+
var i,
|
|
173
|
+
el,
|
|
174
|
+
ithSorter = function ithSorter(i) {
|
|
175
|
+
var col = cols[i];
|
|
176
|
+
return function () {
|
|
177
|
+
var desc = col.defaultDescSort;
|
|
178
|
+
|
|
179
|
+
if (currentSort.index === i) {
|
|
180
|
+
desc = !currentSort.desc;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
sortByIndex(i, desc);
|
|
184
|
+
removeSortIndicators();
|
|
185
|
+
currentSort.index = i;
|
|
186
|
+
currentSort.desc = desc;
|
|
187
|
+
addSortIndicators();
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
for (i = 0; i < cols.length; i += 1) {
|
|
192
|
+
if (cols[i].sortable) {
|
|
193
|
+
// add the click event handler on the th so users
|
|
194
|
+
// dont have to click on those tiny arrows
|
|
195
|
+
el = getNthColumn(i).querySelector('.sorter').parentElement;
|
|
196
|
+
|
|
197
|
+
if (el.addEventListener) {
|
|
198
|
+
el.addEventListener('click', ithSorter(i));
|
|
199
|
+
} else {
|
|
200
|
+
el.attachEvent('onclick', ithSorter(i));
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
} // adds sorting functionality to the UI
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
return function () {
|
|
208
|
+
if (!getTable()) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
cols = loadColumns();
|
|
213
|
+
loadData();
|
|
214
|
+
addSearchBox();
|
|
215
|
+
addSortIndicators();
|
|
216
|
+
enableUI();
|
|
217
|
+
};
|
|
218
|
+
}();
|
|
219
|
+
|
|
220
|
+
window.addEventListener('load', addSorting);
|
|
221
|
+
;
|
|
222
|
+
|
|
223
|
+
(function () {
|
|
224
|
+
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
225
|
+
|
|
226
|
+
if (!reactHotLoader) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
reactHotLoader.register(addSorting, "addSorting", "/home/ethan/FolioModules/stripes-kint-components/src/artifacts/coverage-jest/lcov-report/sorter.js");
|
|
231
|
+
})();
|
|
232
|
+
|
|
233
|
+
;
|
|
234
|
+
|
|
235
|
+
(function () {
|
|
236
|
+
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
237
|
+
leaveModule && leaveModule(module);
|
|
238
|
+
})();
|
|
@@ -172,6 +172,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
172
172
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
173
173
|
buttonStyle: "primary",
|
|
174
174
|
disabled: submitting || pristine,
|
|
175
|
+
marginBottom0: true,
|
|
175
176
|
onClick: function onClick() {
|
|
176
177
|
if (!data.id && editing === 'NEW_ROW') {
|
|
177
178
|
handleCreate(data.rowIndex);
|
|
@@ -186,6 +187,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
186
187
|
})
|
|
187
188
|
}, "save[".concat(data.rowIndex, "]")), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
188
189
|
"data-type-button": "cancel",
|
|
190
|
+
marginBottom0: true,
|
|
189
191
|
onClick: function onClick() {
|
|
190
192
|
if (!data.id && editing === 'NEW_ROW') {
|
|
191
193
|
fields.remove(data.rowIndex);
|
|
@@ -222,6 +224,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
222
224
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.IconButton, {
|
|
223
225
|
disabled: editing,
|
|
224
226
|
icon: action.icon,
|
|
227
|
+
marginBottom0: true,
|
|
225
228
|
onClick: actionFunction
|
|
226
229
|
}, "action-".concat(action.name, "[").concat(data.rowIndex, "]"));
|
|
227
230
|
} // Else return a button with the label, or failing that the name of the action
|
|
@@ -229,6 +232,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
229
232
|
|
|
230
233
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
231
234
|
disabled: editing,
|
|
235
|
+
marginBottom0: true,
|
|
232
236
|
onClick: actionFunction,
|
|
233
237
|
children: (_action$label = action.label) !== null && _action$label !== void 0 ? _action$label : action.name
|
|
234
238
|
}, "action-".concat(action.name, "[").concat(data.rowIndex, "]"));
|
|
@@ -313,7 +317,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
313
317
|
|
|
314
318
|
var returnValue = cd[key];
|
|
315
319
|
|
|
316
|
-
if (!editingRow && formatter[key]) {
|
|
320
|
+
if (!editingRow && formatter !== null && formatter !== void 0 && formatter[key]) {
|
|
317
321
|
returnValue = formatter[key](cd);
|
|
318
322
|
}
|
|
319
323
|
|
|
@@ -231,7 +231,12 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
231
231
|
weight: 0,
|
|
232
232
|
primary: true,
|
|
233
233
|
defaultInternal: true
|
|
234
|
-
} : customProperty,
|
|
234
|
+
} : _objectSpread(_objectSpread({}, customProperty), {}, {
|
|
235
|
+
ctx: customProperty !== null && customProperty !== void 0 && customProperty.ctx ? [{
|
|
236
|
+
value: customProperty.ctx,
|
|
237
|
+
label: customProperty.ctx
|
|
238
|
+
}] : null
|
|
239
|
+
}),
|
|
235
240
|
modalProps: {
|
|
236
241
|
dismissible: true,
|
|
237
242
|
onClose: function onClose() {
|
|
@@ -243,6 +243,9 @@ var CustomPropertyForm = function CustomPropertyForm(_ref) {
|
|
|
243
243
|
}],
|
|
244
244
|
component: _components.MultiSelection,
|
|
245
245
|
dataOptions: contextOptions,
|
|
246
|
+
emptyMessage: intl.formatMessage({
|
|
247
|
+
id: 'stripes-kint-components.customProperties.noCtxFound'
|
|
248
|
+
}),
|
|
246
249
|
label: (_labelOverrides$ctx = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.ctx) !== null && _labelOverrides$ctx !== void 0 ? _labelOverrides$ctx : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
247
250
|
id: "stripes-kint-components.customProperties.ctx"
|
|
248
251
|
}),
|
|
@@ -115,7 +115,6 @@ var EditableRefdataList = function EditableRefdataList(_ref) {
|
|
|
115
115
|
if (isRefdataLoading) {
|
|
116
116
|
return 'loading';
|
|
117
117
|
} // This is the function which will take a row in the table and assign the relevant actions to it
|
|
118
|
-
// TODO make these 'labels' into ARIA labels
|
|
119
118
|
|
|
120
119
|
|
|
121
120
|
var actionAssigner = function actionAssigner() {
|
package/junit.xml
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuites name="jest tests" tests="34" failures="0" errors="0" time="18.817">
|
|
3
|
+
<testsuite name="RenderSettingValue" errors="0" failures="0" skipped="0" timestamp="2022-03-08T11:38:31" time="12.657" tests="12">
|
|
4
|
+
<testcase classname="RenderSettingValue render string settings render a string setting renders the value" name="RenderSettingValue render string settings render a string setting renders the value" time="0.038">
|
|
5
|
+
</testcase>
|
|
6
|
+
<testcase classname="RenderSettingValue render string settings render a string setting without a value renders the default value" name="RenderSettingValue render string settings render a string setting without a value renders the default value" time="0.004">
|
|
7
|
+
</testcase>
|
|
8
|
+
<testcase classname="RenderSettingValue render string settings render a string setting without a value or default renders the empty message" name="RenderSettingValue render string settings render a string setting without a value or default renders the empty message" time="0.005">
|
|
9
|
+
</testcase>
|
|
10
|
+
<testcase classname="RenderSettingValue render refdata settings render a refdata setting renders the value" name="RenderSettingValue render refdata settings render a refdata setting renders the value" time="0.004">
|
|
11
|
+
</testcase>
|
|
12
|
+
<testcase classname="RenderSettingValue render refdata settings render a refdata setting without a value renders the default value" name="RenderSettingValue render refdata settings render a refdata setting without a value renders the default value" time="0.004">
|
|
13
|
+
</testcase>
|
|
14
|
+
<testcase classname="RenderSettingValue render refdata settings render a refdata setting without a value or default renders the empty message" name="RenderSettingValue render refdata settings render a refdata setting without a value or default renders the empty message" time="0.002">
|
|
15
|
+
</testcase>
|
|
16
|
+
<testcase classname="RenderSettingValue render password settings render a password setting renders the value" name="RenderSettingValue render password settings render a password setting renders the value" time="0.004">
|
|
17
|
+
</testcase>
|
|
18
|
+
<testcase classname="RenderSettingValue render password settings render a password setting without a value renders the default value" name="RenderSettingValue render password settings render a password setting without a value renders the default value" time="0.004">
|
|
19
|
+
</testcase>
|
|
20
|
+
<testcase classname="RenderSettingValue render password settings render a password setting without a value or default renders the empty message" name="RenderSettingValue render password settings render a password setting without a value or default renders the empty message" time="0.003">
|
|
21
|
+
</testcase>
|
|
22
|
+
<testcase classname="RenderSettingValue render template settings render a template setting renders the value" name="RenderSettingValue render template settings render a template setting renders the value" time="0.003">
|
|
23
|
+
</testcase>
|
|
24
|
+
<testcase classname="RenderSettingValue render template settings render a template setting without a value renders the default value" name="RenderSettingValue render template settings render a template setting without a value renders the default value" time="0.003">
|
|
25
|
+
</testcase>
|
|
26
|
+
<testcase classname="RenderSettingValue render template settings render a template setting without a value or default renders the empty message" name="RenderSettingValue render template settings render a template setting without a value or default renders the empty message" time="0.004">
|
|
27
|
+
</testcase>
|
|
28
|
+
</testsuite>
|
|
29
|
+
<testsuite name="EditableSettingsListFieldArray" errors="0" failures="0" skipped="0" timestamp="2022-03-08T11:38:31" time="13.026" tests="3">
|
|
30
|
+
<testcase classname="EditableSettingsListFieldArray with empty initial values renders empty field" name="EditableSettingsListFieldArray with empty initial values renders empty field" time="0.052">
|
|
31
|
+
</testcase>
|
|
32
|
+
<testcase classname="EditableSettingsListFieldArray with initial value set renders the SettingField component" name="EditableSettingsListFieldArray with initial value set renders the SettingField component" time="0.012">
|
|
33
|
+
</testcase>
|
|
34
|
+
<testcase classname="EditableSettingsListFieldArray with multiple initial values set renders the correct number of SettingField components" name="EditableSettingsListFieldArray with multiple initial values set renders the correct number of SettingField components" time="0.01">
|
|
35
|
+
</testcase>
|
|
36
|
+
</testsuite>
|
|
37
|
+
<testsuite name="EditSettingValue" errors="0" failures="0" skipped="0" timestamp="2022-03-08T11:38:31" time="14.589" tests="16">
|
|
38
|
+
<testcase classname="EditSettingValue edit string setting with no initial value renders the edit field" name="EditSettingValue edit string setting with no initial value renders the edit field" time="0.109">
|
|
39
|
+
</testcase>
|
|
40
|
+
<testcase classname="EditSettingValue edit string setting with initial value renders the expected value in the edit field" name="EditSettingValue edit string setting with initial value renders the expected value in the edit field" time="0.03">
|
|
41
|
+
</testcase>
|
|
42
|
+
<testcase classname="EditSettingValue edit refdata setting with no initial value for refdata with <4 options renders the expected radio buttons" name="EditSettingValue edit refdata setting with no initial value for refdata with <4 options renders the expected radio buttons" time="0.174">
|
|
43
|
+
</testcase>
|
|
44
|
+
<testcase classname="EditSettingValue edit refdata setting with no initial value for refdata with <4 options no radio buttons are checked" name="EditSettingValue edit refdata setting with no initial value for refdata with <4 options no radio buttons are checked" time="0.173">
|
|
45
|
+
</testcase>
|
|
46
|
+
<testcase classname="EditSettingValue edit refdata setting with initial value for refdata with <4 options renders the expected radio buttons" name="EditSettingValue edit refdata setting with initial value for refdata with <4 options renders the expected radio buttons" time="0.124">
|
|
47
|
+
</testcase>
|
|
48
|
+
<testcase classname="EditSettingValue edit refdata setting with initial value for refdata with <4 options the correct radio button is checked" name="EditSettingValue edit refdata setting with initial value for refdata with <4 options the correct radio button is checked" time="0.137">
|
|
49
|
+
</testcase>
|
|
50
|
+
<testcase classname="EditSettingValue edit refdata setting with no initial value for refdata with >4 options renders the expected select field" name="EditSettingValue edit refdata setting with no initial value for refdata with >4 options renders the expected select field" time="0.025">
|
|
51
|
+
</testcase>
|
|
52
|
+
<testcase classname="EditSettingValue edit refdata setting with no initial value for refdata with >4 options renders the expected refdata options" name="EditSettingValue edit refdata setting with no initial value for refdata with >4 options renders the expected refdata options" time="0.232">
|
|
53
|
+
</testcase>
|
|
54
|
+
<testcase classname="EditSettingValue edit refdata setting with initial value for refdata with >4 options renders the expected refdata options" name="EditSettingValue edit refdata setting with initial value for refdata with >4 options renders the expected refdata options" time="0.239">
|
|
55
|
+
</testcase>
|
|
56
|
+
<testcase classname="EditSettingValue edit refdata setting with initial value for refdata with >4 options renders the expected value in the refdata dropdown" name="EditSettingValue edit refdata setting with initial value for refdata with >4 options renders the expected value in the refdata dropdown" time="0.022">
|
|
57
|
+
</testcase>
|
|
58
|
+
<testcase classname="EditSettingValue edit template setting with no initial value renders the edit field" name="EditSettingValue edit template setting with no initial value renders the edit field" time="0.023">
|
|
59
|
+
</testcase>
|
|
60
|
+
<testcase classname="EditSettingValue edit template setting with no initial value renders the expected template options" name="EditSettingValue edit template setting with no initial value renders the expected template options" time="0.075">
|
|
61
|
+
</testcase>
|
|
62
|
+
<testcase classname="EditSettingValue edit template setting with no initial value renders expected display item in template dropdown" name="EditSettingValue edit template setting with no initial value renders expected display item in template dropdown" time="0.017">
|
|
63
|
+
</testcase>
|
|
64
|
+
<testcase classname="EditSettingValue edit template setting with initial value renders the edit field" name="EditSettingValue edit template setting with initial value renders the edit field" time="0.021">
|
|
65
|
+
</testcase>
|
|
66
|
+
<testcase classname="EditSettingValue edit template setting with initial value renders the expected template options" name="EditSettingValue edit template setting with initial value renders the expected template options" time="0.082">
|
|
67
|
+
</testcase>
|
|
68
|
+
<testcase classname="EditSettingValue edit template setting with initial value renders expected display item in template dropdown" name="EditSettingValue edit template setting with initial value renders expected display item in template dropdown" time="0.022">
|
|
69
|
+
</testcase>
|
|
70
|
+
</testsuite>
|
|
71
|
+
<testsuite name="SettingField" errors="0" failures="0" skipped="0" timestamp="2022-03-08T11:38:31" time="14.765" tests="3">
|
|
72
|
+
<testcase classname="SettingField renders RenderSettingValue" name="SettingField renders RenderSettingValue" time="0.05">
|
|
73
|
+
</testcase>
|
|
74
|
+
<testcase classname="SettingField renders the edit button" name="SettingField renders the edit button" time="0.008">
|
|
75
|
+
</testcase>
|
|
76
|
+
<testcase classname="SettingField clicking edit/save works as expected" name="SettingField clicking edit/save works as expected" time="0.138">
|
|
77
|
+
</testcase>
|
|
78
|
+
</testsuite>
|
|
79
|
+
</testsuites>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k-int/stripes-kint-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Stripes Component library for K-Int specific applications",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"react": "^16.6.3",
|
|
63
63
|
"react-dom": "^16.6.3",
|
|
64
64
|
"react-router-dom": "^5.2.0",
|
|
65
|
-
"@folio/stripes": "
|
|
65
|
+
"@folio/stripes": "^7.0.3",
|
|
66
66
|
"react-intl": ">=5.8.1",
|
|
67
67
|
"regenerator-runtime": "^0.13.9"
|
|
68
68
|
},
|