@nocios/crudify-components 2.0.32 → 2.0.38
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/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/components/CrudiaAutoGenerate.tsx.html +583 -0
- package/coverage/components/CrudiaFileField/CrudiaFileField.tsx.html +1276 -0
- package/coverage/components/CrudiaFileField/components/DeleteConfirmationDialog.tsx.html +355 -0
- package/coverage/components/CrudiaFileField/components/DropZone.tsx.html +433 -0
- package/coverage/components/CrudiaFileField/components/FileItemRow.tsx.html +751 -0
- package/coverage/components/CrudiaFileField/components/FileThumbnail.tsx.html +1195 -0
- package/coverage/components/CrudiaFileField/components/index.html +176 -0
- package/coverage/components/CrudiaFileField/components/index.ts.html +115 -0
- package/coverage/components/CrudiaFileField/hooks/index.html +146 -0
- package/coverage/components/CrudiaFileField/hooks/index.ts.html +112 -0
- package/coverage/components/CrudiaFileField/hooks/useDeleteConfirmation.ts.html +421 -0
- package/coverage/components/CrudiaFileField/hooks/useDragDrop.ts.html +403 -0
- package/coverage/components/CrudiaFileField/index.html +131 -0
- package/coverage/components/CrudiaFileField/index.ts.html +112 -0
- package/coverage/components/CrudiaFileField/utils/formatters.ts.html +163 -0
- package/coverage/components/CrudiaFileField/utils/icons.tsx.html +253 -0
- package/coverage/components/CrudiaFileField/utils/index.html +131 -0
- package/coverage/components/CrudiaMarkdownField.tsx.html +619 -0
- package/coverage/components/CrudifyLogin/Forms/CheckCodeForm.tsx.html +586 -0
- package/coverage/components/CrudifyLogin/Forms/ForgotPasswordForm.tsx.html +694 -0
- package/coverage/components/CrudifyLogin/Forms/LoginForm.tsx.html +835 -0
- package/coverage/components/CrudifyLogin/Forms/ResetPasswordForm.tsx.html +1180 -0
- package/coverage/components/CrudifyLogin/Forms/components/CodeInput.tsx.html +283 -0
- package/coverage/components/CrudifyLogin/Forms/components/FormAlert.tsx.html +202 -0
- package/coverage/components/CrudifyLogin/Forms/components/PasswordInput.tsx.html +340 -0
- package/coverage/components/CrudifyLogin/Forms/components/index.html +161 -0
- package/coverage/components/CrudifyLogin/Forms/components/index.ts.html +106 -0
- package/coverage/components/CrudifyLogin/Forms/index.html +161 -0
- package/coverage/components/CrudifyLogin/Forms/utils/errorTranslation.ts.html +268 -0
- package/coverage/components/CrudifyLogin/Forms/utils/index.html +161 -0
- package/coverage/components/CrudifyLogin/Forms/utils/index.ts.html +106 -0
- package/coverage/components/CrudifyLogin/Forms/utils/paramUtils.ts.html +478 -0
- package/coverage/components/CrudifyLogin/Forms/utils/validation.ts.html +289 -0
- package/coverage/components/CrudifyLogin/components/CrudifyInitializer.tsx.html +262 -0
- package/coverage/components/CrudifyLogin/components/index.html +116 -0
- package/coverage/components/CrudifyLogin/context/CrudifyProvider.tsx.html +382 -0
- package/coverage/components/CrudifyLogin/context/I18nProvider.tsx.html +397 -0
- package/coverage/components/CrudifyLogin/context/LoginStateProvider.tsx.html +1249 -0
- package/coverage/components/CrudifyLogin/context/index.html +146 -0
- package/coverage/components/CrudifyLogin/hooks/index.html +116 -0
- package/coverage/components/CrudifyLogin/hooks/useTranslationsFromUrl.ts.html +292 -0
- package/coverage/components/CrudifyLogin/index.html +116 -0
- package/coverage/components/CrudifyLogin/index.tsx.html +475 -0
- package/coverage/components/GlobalNotificationProvider.tsx.html +781 -0
- package/coverage/components/LoginComponent.tsx.html +727 -0
- package/coverage/components/PasswordRequirements/index.html +116 -0
- package/coverage/components/PasswordRequirements/index.tsx.html +226 -0
- package/coverage/components/PublicPolicies/FieldSelector/FieldSelector.tsx.html +982 -0
- package/coverage/components/PublicPolicies/FieldSelector/index.html +131 -0
- package/coverage/components/PublicPolicies/FieldSelector/index.ts.html +85 -0
- package/coverage/components/PublicPolicies/Policies.tsx.html +610 -0
- package/coverage/components/PublicPolicies/PolicyItem/PolicyItem.tsx.html +856 -0
- package/coverage/components/PublicPolicies/PolicyItem/index.html +131 -0
- package/coverage/components/PublicPolicies/PolicyItem/index.ts.html +85 -0
- package/coverage/components/PublicPolicies/constants.ts.html +127 -0
- package/coverage/components/PublicPolicies/index.html +131 -0
- package/coverage/components/SessionTimeIndicator/index.html +116 -0
- package/coverage/components/SessionTimeIndicator/index.tsx.html +505 -0
- package/coverage/components/UserProfile/UserProfileDisplay.tsx.html +826 -0
- package/coverage/components/UserProfile/index.html +131 -0
- package/coverage/components/UserProfile/index.ts.html +85 -0
- package/coverage/components/index.html +176 -0
- package/coverage/components/index.ts.html +160 -0
- package/coverage/core/CrossTabSyncManager.ts.html +814 -0
- package/coverage/core/CrudifyInitializationManager.ts.html +1132 -0
- package/coverage/core/SessionManager.ts.html +2764 -0
- package/coverage/core/index.html +146 -0
- package/coverage/coverage-final.json +87 -0
- package/coverage/favicon.png +0 -0
- package/coverage/hooks/index.html +131 -0
- package/coverage/hooks/useAutoGenerate.ts.html +562 -0
- package/coverage/hooks/useFileUpload/index.html +131 -0
- package/coverage/hooks/useFileUpload/index.ts.html +112 -0
- package/coverage/hooks/useFileUpload/services/index.html +116 -0
- package/coverage/hooks/useFileUpload/services/uploadService.ts.html +610 -0
- package/coverage/hooks/useFileUpload/useFileUpload.ts.html +1870 -0
- package/coverage/hooks/useFileUpload/utils/fileUtils.ts.html +271 -0
- package/coverage/hooks/useFileUpload/utils/index.html +146 -0
- package/coverage/hooks/useFileUpload/utils/mimeTypes.ts.html +235 -0
- package/coverage/hooks/useFileUpload/utils/validation.ts.html +379 -0
- package/coverage/hooks/useSession/constants.ts.html +217 -0
- package/coverage/hooks/useSession/hooks/index.html +176 -0
- package/coverage/hooks/useSession/hooks/useAuthEventSubscriber.ts.html +331 -0
- package/coverage/hooks/useSession/hooks/useCrossTabSync.ts.html +433 -0
- package/coverage/hooks/useSession/hooks/useSessionActions.ts.html +664 -0
- package/coverage/hooks/useSession/hooks/useSessionState.ts.html +295 -0
- package/coverage/hooks/useSession/hooks/useTokenRefreshScheduler.ts.html +490 -0
- package/coverage/hooks/useSession/index.html +161 -0
- package/coverage/hooks/useSession/index.ts.html +127 -0
- package/coverage/hooks/useSession/types.ts.html +427 -0
- package/coverage/hooks/useSession/useSession.ts.html +526 -0
- package/coverage/hooks/useSession/utils/index.html +131 -0
- package/coverage/hooks/useSession/utils/initializeSession.ts.html +424 -0
- package/coverage/hooks/useSession/utils/tokenUtils.ts.html +280 -0
- package/coverage/hooks/useUserProfile.ts.html +658 -0
- package/coverage/index.html +566 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/providers/SessionProvider.tsx.html +1150 -0
- package/coverage/providers/TranslationsProvider.tsx.html +1450 -0
- package/coverage/providers/index.html +131 -0
- package/coverage/services/credentialsEventBus.ts.html +310 -0
- package/coverage/services/index.html +131 -0
- package/coverage/services/translationService.ts.html +1318 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -0
- package/coverage/translations/critical.ts.html +1195 -0
- package/coverage/translations/index.html +116 -0
- package/coverage/types/index.html +116 -0
- package/coverage/types/password.ts.html +178 -0
- package/coverage/utils/authEventBus.ts.html +454 -0
- package/coverage/utils/configResolver.ts.html +460 -0
- package/coverage/utils/cookieSync.ts.html +580 -0
- package/coverage/utils/errorHandler.ts.html +1264 -0
- package/coverage/utils/errorTranslation.ts.html +862 -0
- package/coverage/utils/index.html +296 -0
- package/coverage/utils/jwtUtils.ts.html +301 -0
- package/coverage/utils/logger.ts.html +901 -0
- package/coverage/utils/navigationTracker.ts.html +565 -0
- package/coverage/utils/passwordValidation.ts.html +259 -0
- package/coverage/utils/redirectSecurity.ts.html +715 -0
- package/coverage/utils/tenantConfig.ts.html +700 -0
- package/coverage/utils/tokenStorage.ts.html +1768 -0
- package/coverage/utils/webCrypto.ts.html +472 -0
- package/dist/{CrudiaMarkdownField-C54-A_J3.d.mts → CrudiaMarkdownField-BvJn2GL8.d.mts} +17 -7
- package/dist/{CrudiaMarkdownField-C8HQh7s5.d.ts → CrudiaMarkdownField-CggOpcBM.d.ts} +17 -7
- package/dist/chunk-44VU4TSP.mjs +1 -0
- package/dist/chunk-4LMFQECS.js +1 -0
- package/dist/chunk-77UKXG5L.mjs +1 -0
- package/dist/{chunk-4VN5YRYZ.js → chunk-BXFEQ6KP.js} +1 -1
- package/dist/{chunk-6ONAT4QU.js → chunk-H6XXWDUT.js} +1 -1
- package/dist/chunk-NIRLP2TC.js +1 -0
- package/dist/chunk-O4FUHIQG.mjs +1 -0
- package/dist/chunk-SYHNHKFA.mjs +1 -0
- package/dist/chunk-W4ZYKPOK.js +1 -0
- package/dist/{chunk-RJBX4MWF.mjs → chunk-WMLIOPUC.mjs} +1 -1
- package/dist/components.d.mts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +1 -1
- package/dist/components.mjs +1 -1
- package/dist/errorTranslation-D-Y7uNN_.d.mts +141 -0
- package/dist/errorTranslation-DDlAXpMl.d.ts +141 -0
- package/dist/hooks.d.mts +2 -2
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/{index-DY90WVQQ.d.mts → index-U--xRr8A.d.mts} +225 -191
- package/dist/{index-d1vE803G.d.ts → index-dXVRVcEB.d.ts} +225 -191
- package/dist/index.d.mts +179 -6
- package/dist/index.d.ts +179 -6
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{errorTranslation-By5Av0tL.d.ts → tenantConfig-DqJqQkoR.d.mts} +116 -139
- package/dist/{errorTranslation-DeeDj7Vt.d.mts → tenantConfig-DqJqQkoR.d.ts} +116 -139
- package/dist/utils.d.mts +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +1 -1
- package/package.json +1 -1
- package/coverage/.tmp/coverage-102.json +0 -1
- package/coverage/.tmp/coverage-103.json +0 -1
- package/coverage/.tmp/coverage-104.json +0 -1
- package/coverage/.tmp/coverage-105.json +0 -1
- package/coverage/.tmp/coverage-106.json +0 -1
- package/coverage/.tmp/coverage-107.json +0 -1
- package/dist/api-B4uXiHF0.d.mts +0 -118
- package/dist/api-B4uXiHF0.d.ts +0 -118
- package/dist/chunk-4ILUXVPW.mjs +0 -1
- package/dist/chunk-5XBTRBE5.js +0 -1
- package/dist/chunk-CR5KJUST.js +0 -1
- package/dist/chunk-H5M2Q6PB.mjs +0 -1
- package/dist/chunk-JAPL7EZJ.mjs +0 -1
- package/dist/chunk-L7GKP6XY.mjs +0 -1
- package/dist/chunk-NSV6ECYO.js +0 -1
- package/dist/chunk-PTUSZGL4.mjs +0 -1
- package/dist/chunk-T6R65ROU.js +0 -1
|
Binary file
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var addSorting = (function() {
|
|
3
|
+
'use strict';
|
|
4
|
+
var cols,
|
|
5
|
+
currentSort = {
|
|
6
|
+
index: 0,
|
|
7
|
+
desc: false
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
// returns the summary table element
|
|
11
|
+
function getTable() {
|
|
12
|
+
return document.querySelector('.coverage-summary');
|
|
13
|
+
}
|
|
14
|
+
// returns the thead element of the summary table
|
|
15
|
+
function getTableHeader() {
|
|
16
|
+
return getTable().querySelector('thead tr');
|
|
17
|
+
}
|
|
18
|
+
// returns the tbody element of the summary table
|
|
19
|
+
function getTableBody() {
|
|
20
|
+
return getTable().querySelector('tbody');
|
|
21
|
+
}
|
|
22
|
+
// returns the th element for nth column
|
|
23
|
+
function getNthColumn(n) {
|
|
24
|
+
return getTableHeader().querySelectorAll('th')[n];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function onFilterInput() {
|
|
28
|
+
const searchValue = document.getElementById('fileSearch').value;
|
|
29
|
+
const rows = document.getElementsByTagName('tbody')[0].children;
|
|
30
|
+
|
|
31
|
+
// Try to create a RegExp from the searchValue. If it fails (invalid regex),
|
|
32
|
+
// it will be treated as a plain text search
|
|
33
|
+
let searchRegex;
|
|
34
|
+
try {
|
|
35
|
+
searchRegex = new RegExp(searchValue, 'i'); // 'i' for case-insensitive
|
|
36
|
+
} catch (error) {
|
|
37
|
+
searchRegex = null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
for (let i = 0; i < rows.length; i++) {
|
|
41
|
+
const row = rows[i];
|
|
42
|
+
let isMatch = false;
|
|
43
|
+
|
|
44
|
+
if (searchRegex) {
|
|
45
|
+
// If a valid regex was created, use it for matching
|
|
46
|
+
isMatch = searchRegex.test(row.textContent);
|
|
47
|
+
} else {
|
|
48
|
+
// Otherwise, fall back to the original plain text search
|
|
49
|
+
isMatch = row.textContent
|
|
50
|
+
.toLowerCase()
|
|
51
|
+
.includes(searchValue.toLowerCase());
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
row.style.display = isMatch ? '' : 'none';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// loads the search box
|
|
59
|
+
function addSearchBox() {
|
|
60
|
+
var template = document.getElementById('filterTemplate');
|
|
61
|
+
var templateClone = template.content.cloneNode(true);
|
|
62
|
+
templateClone.getElementById('fileSearch').oninput = onFilterInput;
|
|
63
|
+
template.parentElement.appendChild(templateClone);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// loads all columns
|
|
67
|
+
function loadColumns() {
|
|
68
|
+
var colNodes = getTableHeader().querySelectorAll('th'),
|
|
69
|
+
colNode,
|
|
70
|
+
cols = [],
|
|
71
|
+
col,
|
|
72
|
+
i;
|
|
73
|
+
|
|
74
|
+
for (i = 0; i < colNodes.length; i += 1) {
|
|
75
|
+
colNode = colNodes[i];
|
|
76
|
+
col = {
|
|
77
|
+
key: colNode.getAttribute('data-col'),
|
|
78
|
+
sortable: !colNode.getAttribute('data-nosort'),
|
|
79
|
+
type: colNode.getAttribute('data-type') || 'string'
|
|
80
|
+
};
|
|
81
|
+
cols.push(col);
|
|
82
|
+
if (col.sortable) {
|
|
83
|
+
col.defaultDescSort = col.type === 'number';
|
|
84
|
+
colNode.innerHTML =
|
|
85
|
+
colNode.innerHTML + '<span class="sorter"></span>';
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return cols;
|
|
89
|
+
}
|
|
90
|
+
// attaches a data attribute to every tr element with an object
|
|
91
|
+
// of data values keyed by column name
|
|
92
|
+
function loadRowData(tableRow) {
|
|
93
|
+
var tableCols = tableRow.querySelectorAll('td'),
|
|
94
|
+
colNode,
|
|
95
|
+
col,
|
|
96
|
+
data = {},
|
|
97
|
+
i,
|
|
98
|
+
val;
|
|
99
|
+
for (i = 0; i < tableCols.length; i += 1) {
|
|
100
|
+
colNode = tableCols[i];
|
|
101
|
+
col = cols[i];
|
|
102
|
+
val = colNode.getAttribute('data-value');
|
|
103
|
+
if (col.type === 'number') {
|
|
104
|
+
val = Number(val);
|
|
105
|
+
}
|
|
106
|
+
data[col.key] = val;
|
|
107
|
+
}
|
|
108
|
+
return data;
|
|
109
|
+
}
|
|
110
|
+
// loads all row data
|
|
111
|
+
function loadData() {
|
|
112
|
+
var rows = getTableBody().querySelectorAll('tr'),
|
|
113
|
+
i;
|
|
114
|
+
|
|
115
|
+
for (i = 0; i < rows.length; i += 1) {
|
|
116
|
+
rows[i].data = loadRowData(rows[i]);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// sorts the table using the data for the ith column
|
|
120
|
+
function sortByIndex(index, desc) {
|
|
121
|
+
var key = cols[index].key,
|
|
122
|
+
sorter = function(a, b) {
|
|
123
|
+
a = a.data[key];
|
|
124
|
+
b = b.data[key];
|
|
125
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
126
|
+
},
|
|
127
|
+
finalSorter = sorter,
|
|
128
|
+
tableBody = document.querySelector('.coverage-summary tbody'),
|
|
129
|
+
rowNodes = tableBody.querySelectorAll('tr'),
|
|
130
|
+
rows = [],
|
|
131
|
+
i;
|
|
132
|
+
|
|
133
|
+
if (desc) {
|
|
134
|
+
finalSorter = function(a, b) {
|
|
135
|
+
return -1 * sorter(a, b);
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
for (i = 0; i < rowNodes.length; i += 1) {
|
|
140
|
+
rows.push(rowNodes[i]);
|
|
141
|
+
tableBody.removeChild(rowNodes[i]);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
rows.sort(finalSorter);
|
|
145
|
+
|
|
146
|
+
for (i = 0; i < rows.length; i += 1) {
|
|
147
|
+
tableBody.appendChild(rows[i]);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// removes sort indicators for current column being sorted
|
|
151
|
+
function removeSortIndicators() {
|
|
152
|
+
var col = getNthColumn(currentSort.index),
|
|
153
|
+
cls = col.className;
|
|
154
|
+
|
|
155
|
+
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
|
156
|
+
col.className = cls;
|
|
157
|
+
}
|
|
158
|
+
// adds sort indicators for current column being sorted
|
|
159
|
+
function addSortIndicators() {
|
|
160
|
+
getNthColumn(currentSort.index).className += currentSort.desc
|
|
161
|
+
? ' sorted-desc'
|
|
162
|
+
: ' sorted';
|
|
163
|
+
}
|
|
164
|
+
// adds event listeners for all sorter widgets
|
|
165
|
+
function enableUI() {
|
|
166
|
+
var i,
|
|
167
|
+
el,
|
|
168
|
+
ithSorter = function ithSorter(i) {
|
|
169
|
+
var col = cols[i];
|
|
170
|
+
|
|
171
|
+
return function() {
|
|
172
|
+
var desc = col.defaultDescSort;
|
|
173
|
+
|
|
174
|
+
if (currentSort.index === i) {
|
|
175
|
+
desc = !currentSort.desc;
|
|
176
|
+
}
|
|
177
|
+
sortByIndex(i, desc);
|
|
178
|
+
removeSortIndicators();
|
|
179
|
+
currentSort.index = i;
|
|
180
|
+
currentSort.desc = desc;
|
|
181
|
+
addSortIndicators();
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
for (i = 0; i < cols.length; i += 1) {
|
|
185
|
+
if (cols[i].sortable) {
|
|
186
|
+
// add the click event handler on the th so users
|
|
187
|
+
// dont have to click on those tiny arrows
|
|
188
|
+
el = getNthColumn(i).querySelector('.sorter').parentElement;
|
|
189
|
+
if (el.addEventListener) {
|
|
190
|
+
el.addEventListener('click', ithSorter(i));
|
|
191
|
+
} else {
|
|
192
|
+
el.attachEvent('onclick', ithSorter(i));
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
// adds sorting functionality to the UI
|
|
198
|
+
return function() {
|
|
199
|
+
if (!getTable()) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
cols = loadColumns();
|
|
203
|
+
loadData();
|
|
204
|
+
addSearchBox();
|
|
205
|
+
addSortIndicators();
|
|
206
|
+
enableUI();
|
|
207
|
+
};
|
|
208
|
+
})();
|
|
209
|
+
|
|
210
|
+
window.addEventListener('load', addSorting);
|