@unifiedsoftware/react-components 1.0.9 → 1.0.11
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/dist/index.d.mts +91 -1
- package/dist/index.d.ts +91 -1
- package/dist/index.js +1165 -91
- package/dist/index.mjs +1150 -67
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
9
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
10
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value2) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop2 in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop2))
|
|
16
|
+
__defNormalProp(a, prop2, b[prop2]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop2 of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop2))
|
|
20
|
+
__defNormalProp(a, prop2, b[prop2]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
8
25
|
var __export = (target, all) => {
|
|
9
26
|
for (var name in all)
|
|
10
27
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -51,8 +68,10 @@ __export(src_exports, {
|
|
|
51
68
|
MenuItems: () => MenuItem,
|
|
52
69
|
MenuOptions: () => MenuOptions,
|
|
53
70
|
MenuTitle: () => MenuTitle,
|
|
71
|
+
MultiSelect: () => MultiSelect_default,
|
|
54
72
|
NavOptions: () => NavOptions,
|
|
55
73
|
Navbar: () => Navbar,
|
|
74
|
+
Select: () => Select_default,
|
|
56
75
|
SidebarMainContext: () => SidebarMainContext,
|
|
57
76
|
SidebarMainContextProvider: () => SidebarMainContextProvider,
|
|
58
77
|
SidebarNavigation: () => SidebarNavigation,
|
|
@@ -60,10 +79,1063 @@ __export(src_exports, {
|
|
|
60
79
|
});
|
|
61
80
|
module.exports = __toCommonJS(src_exports);
|
|
62
81
|
|
|
63
|
-
//
|
|
82
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/utils.js
|
|
83
|
+
var isPresent = function(value2) {
|
|
84
|
+
return value2 !== null && value2 !== void 0;
|
|
85
|
+
};
|
|
86
|
+
var isBlank = function(value2) {
|
|
87
|
+
return value2 === null || value2 === void 0;
|
|
88
|
+
};
|
|
89
|
+
var isArray = function(value2) {
|
|
90
|
+
return Array.isArray(value2);
|
|
91
|
+
};
|
|
92
|
+
var isFunction = function(value2) {
|
|
93
|
+
return typeof value2 === "function";
|
|
94
|
+
};
|
|
95
|
+
var isString = function(value2) {
|
|
96
|
+
return typeof value2 === "string";
|
|
97
|
+
};
|
|
98
|
+
var isNullOrEmptyString = function(value2) {
|
|
99
|
+
return isBlank(value2) || value2.trim().length === 0;
|
|
100
|
+
};
|
|
101
|
+
var isNotNullOrEmptyString = function(value2) {
|
|
102
|
+
return !isNullOrEmptyString(value2);
|
|
103
|
+
};
|
|
104
|
+
var isNumeric = function(value2) {
|
|
105
|
+
return !isNaN(value2 - parseFloat(value2));
|
|
106
|
+
};
|
|
107
|
+
var isDate = function(value2) {
|
|
108
|
+
return value2 && value2.getTime;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/filtering/filter-descriptor.interface.js
|
|
112
|
+
var isCompositeFilterDescriptor = function(source) {
|
|
113
|
+
return isPresent(source.filters);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/funcs.js
|
|
117
|
+
var ifElse = function(predicate, right, left) {
|
|
118
|
+
return function(value2) {
|
|
119
|
+
return predicate(value2) ? right(value2) : left(value2);
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
var compose = function() {
|
|
123
|
+
var args = [];
|
|
124
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
125
|
+
args[_i] = arguments[_i];
|
|
126
|
+
}
|
|
127
|
+
return function(data) {
|
|
128
|
+
return args.reduceRight(function(acc, curr) {
|
|
129
|
+
return curr(acc);
|
|
130
|
+
}, data);
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
var constant = function(x) {
|
|
134
|
+
return function() {
|
|
135
|
+
return x;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/filter-serialization.common.js
|
|
140
|
+
var toUTC = function(date) {
|
|
141
|
+
return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
142
|
+
};
|
|
143
|
+
var isDateValue = function(x) {
|
|
144
|
+
return isDate(x.value);
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/filtering/filter.operators.js
|
|
148
|
+
var operatorMap = function(key) {
|
|
149
|
+
return {
|
|
150
|
+
"!=": "neq",
|
|
151
|
+
"<": "lt",
|
|
152
|
+
"<=": "lte",
|
|
153
|
+
"==": "eq",
|
|
154
|
+
">": "gt",
|
|
155
|
+
">=": "gte",
|
|
156
|
+
equal: "eq",
|
|
157
|
+
equals: "eq",
|
|
158
|
+
equalto: "eq",
|
|
159
|
+
ge: "gte",
|
|
160
|
+
greater: "gt",
|
|
161
|
+
greaterthan: "gt",
|
|
162
|
+
greaterthanequal: "gte",
|
|
163
|
+
isempty: "isempty",
|
|
164
|
+
isequalto: "eq",
|
|
165
|
+
isgreaterthan: "gt",
|
|
166
|
+
isgreaterthanorequalto: "gte",
|
|
167
|
+
islessthan: "lt",
|
|
168
|
+
islessthanorequalto: "lte",
|
|
169
|
+
isnotempty: "isnotempty",
|
|
170
|
+
isnotequalto: "neq",
|
|
171
|
+
isnull: "isnull",
|
|
172
|
+
le: "lte",
|
|
173
|
+
less: "lt",
|
|
174
|
+
lessthan: "lt",
|
|
175
|
+
lessthanequal: "lte",
|
|
176
|
+
ne: "neq",
|
|
177
|
+
notequal: "neq",
|
|
178
|
+
notequals: "neq",
|
|
179
|
+
notequalto: "neq",
|
|
180
|
+
notsubstringof: "doesnotcontain"
|
|
181
|
+
}[key.toLowerCase()] || key;
|
|
182
|
+
};
|
|
183
|
+
var normalizeOperator = function(descriptor) {
|
|
184
|
+
if (descriptor.filters) {
|
|
185
|
+
descriptor.filters = descriptor.filters.map(function(filter2) {
|
|
186
|
+
var result = Object.assign({}, filter2);
|
|
187
|
+
if (!isCompositeFilterDescriptor(filter2) && isString(filter2.operator)) {
|
|
188
|
+
result.operator = operatorMap(filter2.operator);
|
|
189
|
+
}
|
|
190
|
+
if (isCompositeFilterDescriptor(filter2)) {
|
|
191
|
+
normalizeOperator(result);
|
|
192
|
+
}
|
|
193
|
+
return result;
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
var normalizeDescriptor = function(descriptor) {
|
|
198
|
+
if (!isCompositeFilterDescriptor(descriptor)) {
|
|
199
|
+
return {
|
|
200
|
+
filters: isArray(descriptor) ? descriptor : [descriptor],
|
|
201
|
+
logic: "and"
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
return Object.assign({}, descriptor);
|
|
205
|
+
};
|
|
206
|
+
var normalizeFilters = function(descriptor) {
|
|
207
|
+
if (isPresent(descriptor)) {
|
|
208
|
+
descriptor = normalizeDescriptor(descriptor);
|
|
209
|
+
normalizeOperator(descriptor);
|
|
210
|
+
}
|
|
211
|
+
return descriptor;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/odata.operators.js
|
|
215
|
+
var emptyString = constant("");
|
|
216
|
+
|
|
217
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/accessor.js
|
|
218
|
+
var getterCache = {};
|
|
219
|
+
var FIELD_REGEX = /\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;
|
|
220
|
+
getterCache["undefined"] = function(obj) {
|
|
221
|
+
return obj;
|
|
222
|
+
};
|
|
223
|
+
var getter = function(field, safe) {
|
|
224
|
+
var key = field + safe;
|
|
225
|
+
if (getterCache[key]) {
|
|
226
|
+
return getterCache[key];
|
|
227
|
+
}
|
|
228
|
+
var fields = [];
|
|
229
|
+
field.replace(FIELD_REGEX, function(_, index, indexAccessor, field2) {
|
|
230
|
+
fields.push(isPresent(index) ? index : indexAccessor || field2);
|
|
231
|
+
return void 0;
|
|
232
|
+
});
|
|
233
|
+
getterCache[key] = function(obj) {
|
|
234
|
+
var result = obj;
|
|
235
|
+
for (var idx = 0; idx < fields.length; idx++) {
|
|
236
|
+
result = result[fields[idx]];
|
|
237
|
+
if (!isPresent(result) && safe) {
|
|
238
|
+
return result;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return result;
|
|
242
|
+
};
|
|
243
|
+
return getterCache[key];
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/mvc/operators.js
|
|
247
|
+
var pairwise = function(key) {
|
|
248
|
+
return function(value2) {
|
|
249
|
+
return [key, value2];
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
var empty = function() {
|
|
253
|
+
return null;
|
|
254
|
+
};
|
|
255
|
+
var isNotEmptyArray = function(value2) {
|
|
256
|
+
return isPresent(value2) && isArray(value2) && value2.length > 0;
|
|
257
|
+
};
|
|
258
|
+
var has = function(accessor) {
|
|
259
|
+
return function(value2) {
|
|
260
|
+
return isPresent(accessor(value2));
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
var isNotEmpty = function(accessor) {
|
|
264
|
+
return function(value2) {
|
|
265
|
+
return isNotEmptyArray(accessor(value2));
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
var runOrEmpty = function(predicate, fn) {
|
|
269
|
+
return ifElse(predicate, fn, empty);
|
|
270
|
+
};
|
|
271
|
+
var calcPage = function(_a) {
|
|
272
|
+
var skip3 = _a.skip, take3 = _a.take;
|
|
273
|
+
return Math.floor((skip3 || 0) / take3) + 1;
|
|
274
|
+
};
|
|
275
|
+
var formatDescriptors = function(accessor, formatter) {
|
|
276
|
+
return function(state) {
|
|
277
|
+
return accessor(state).map(formatter).join("~");
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
var removeAfter = function(what) {
|
|
281
|
+
return function(str) {
|
|
282
|
+
return str.slice(0, str.indexOf(what));
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
var replace = function(patterns) {
|
|
286
|
+
return compose.apply(void 0, patterns.map(function(_a) {
|
|
287
|
+
var left = _a[0], right = _a[1];
|
|
288
|
+
return function(s) {
|
|
289
|
+
return s.replace(new RegExp(left, "g"), right);
|
|
290
|
+
};
|
|
291
|
+
}));
|
|
292
|
+
};
|
|
293
|
+
var sanitizeDateLiterals = replace([['"', ""], [":", "-"]]);
|
|
294
|
+
var removeAfterDot = removeAfter(".");
|
|
295
|
+
var directionFormatter = function(_a) {
|
|
296
|
+
var field = _a.field, _b = _a.dir, dir = _b === void 0 ? "asc" : _b;
|
|
297
|
+
return field + "-" + dir;
|
|
298
|
+
};
|
|
299
|
+
var aggregateFormatter = function(_a) {
|
|
300
|
+
var field = _a.field, aggregate = _a.aggregate;
|
|
301
|
+
return field + "-" + aggregate;
|
|
302
|
+
};
|
|
303
|
+
var take = getter("take");
|
|
304
|
+
var aggregates = getter("aggregates");
|
|
305
|
+
var skip = getter("skip");
|
|
306
|
+
var group = getter("group");
|
|
307
|
+
var sort = getter("sort", true);
|
|
308
|
+
var formatSort = formatDescriptors(sort, directionFormatter);
|
|
309
|
+
var formatGroup = formatDescriptors(group, directionFormatter);
|
|
310
|
+
var formatAggregates = formatDescriptors(aggregates, aggregateFormatter);
|
|
311
|
+
var prefixDateValue = function(value2) {
|
|
312
|
+
return "datetime'" + value2 + "'";
|
|
313
|
+
};
|
|
314
|
+
var formatDateValue = compose(prefixDateValue, removeAfterDot, sanitizeDateLiterals, JSON.stringify, toUTC);
|
|
315
|
+
var formatDate = function(_a) {
|
|
316
|
+
var field = _a.field, value2 = _a.value, ignoreCase = _a.ignoreCase, operator = _a.operator;
|
|
317
|
+
return {
|
|
318
|
+
value: formatDateValue(value2),
|
|
319
|
+
field,
|
|
320
|
+
ignoreCase,
|
|
321
|
+
operator
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
var normalizeSort = function(state) {
|
|
325
|
+
return Object.assign({}, state, {
|
|
326
|
+
sort: (sort(state) || []).filter(function(_a) {
|
|
327
|
+
var dir = _a.dir;
|
|
328
|
+
return isNotNullOrEmptyString(dir);
|
|
329
|
+
})
|
|
330
|
+
});
|
|
331
|
+
};
|
|
332
|
+
var transformSkip = compose(pairwise("page"), calcPage);
|
|
333
|
+
var transformTake = compose(pairwise("pageSize"), take);
|
|
334
|
+
var transformGroup = compose(pairwise("group"), formatGroup);
|
|
335
|
+
var transformSort = compose(pairwise("sort"), formatSort);
|
|
336
|
+
var transformAggregates = compose(pairwise("aggregate"), formatAggregates);
|
|
337
|
+
var serializePage = runOrEmpty(has(skip), transformSkip);
|
|
338
|
+
var serializePageSize = runOrEmpty(has(take), transformTake);
|
|
339
|
+
var serializeGroup = runOrEmpty(isNotEmpty(group), transformGroup);
|
|
340
|
+
var serializeAggregates = runOrEmpty(has(aggregates), transformAggregates);
|
|
341
|
+
var serializeSort = compose(runOrEmpty(isNotEmpty(sort), transformSort), normalizeSort);
|
|
342
|
+
var filterFormatter = function(_a) {
|
|
343
|
+
var field = _a.field, operator = _a.operator, value2 = _a.value;
|
|
344
|
+
return field + "~" + operator + "~" + value2;
|
|
345
|
+
};
|
|
346
|
+
var dateFormatter = ifElse(isDateValue, compose(filterFormatter, formatDate), filterFormatter);
|
|
347
|
+
|
|
348
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/mvc/deserialization.js
|
|
349
|
+
var set = function(field, target, value2) {
|
|
350
|
+
target[field] = value2;
|
|
351
|
+
return target;
|
|
352
|
+
};
|
|
353
|
+
var toCamelCase = function(str) {
|
|
354
|
+
return str.replace(/(^[A-Z])/g, function(_, g1) {
|
|
355
|
+
return g1.toLowerCase();
|
|
356
|
+
});
|
|
357
|
+
};
|
|
358
|
+
var prop = function(fieldName) {
|
|
359
|
+
return function(obj) {
|
|
360
|
+
var value2 = obj[fieldName];
|
|
361
|
+
if (isPresent(value2)) {
|
|
362
|
+
return value2;
|
|
363
|
+
}
|
|
364
|
+
return obj[toCamelCase(fieldName)];
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
var member = prop("Member");
|
|
368
|
+
var aggregateMethodName = prop("AggregateMethodName");
|
|
369
|
+
var value = prop("Value");
|
|
370
|
+
var convert = function(mapper) {
|
|
371
|
+
return function(values) {
|
|
372
|
+
return Object.keys(values).reduce(mapper.bind(null, values), {});
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
var translateAggregate = convert(function(source, acc, field) {
|
|
376
|
+
return set(field.toLowerCase(), acc, source[field]);
|
|
377
|
+
});
|
|
378
|
+
var translateAggregates = convert(function(source, acc, field) {
|
|
379
|
+
return set(field, acc, translateAggregate(source[field]));
|
|
380
|
+
});
|
|
381
|
+
var valueOrDefault = function(value2, defaultValue) {
|
|
382
|
+
return isPresent(value2) ? value2 : defaultValue;
|
|
383
|
+
};
|
|
384
|
+
var normalizeGroup = function(group2) {
|
|
385
|
+
return {
|
|
386
|
+
aggregates: group2.Aggregates || group2.aggregates,
|
|
387
|
+
field: group2.Member || group2.member || group2.field,
|
|
388
|
+
hasSubgroups: group2.HasSubgroups || group2.hasSubgroups || false,
|
|
389
|
+
items: group2.Items || group2.items,
|
|
390
|
+
value: valueOrDefault(group2.Key, valueOrDefault(group2.key, group2.value))
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
var translateGroup = compose(function(_a) {
|
|
394
|
+
var field = _a.field, hasSubgroups = _a.hasSubgroups, value2 = _a.value, aggregates2 = _a.aggregates, items = _a.items;
|
|
395
|
+
return {
|
|
396
|
+
aggregates: translateAggregates(aggregates2),
|
|
397
|
+
field,
|
|
398
|
+
items: hasSubgroups ? items.map(translateGroup) : items,
|
|
399
|
+
value: value2
|
|
400
|
+
};
|
|
401
|
+
}, normalizeGroup);
|
|
402
|
+
|
|
403
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/transducers.js
|
|
404
|
+
var map = function(transform) {
|
|
405
|
+
return function(reduce) {
|
|
406
|
+
return function(acc, curr, index) {
|
|
407
|
+
return reduce(acc, transform(curr, index));
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/grouping/aggregate.operators.js
|
|
413
|
+
var identity2 = map(function(x) {
|
|
414
|
+
return x;
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/filtering/filter-no-eval.js
|
|
418
|
+
var logic = {
|
|
419
|
+
"or": {
|
|
420
|
+
concat: function(acc, fn) {
|
|
421
|
+
return function(a) {
|
|
422
|
+
return acc(a) || fn(a);
|
|
423
|
+
};
|
|
424
|
+
},
|
|
425
|
+
identity: function() {
|
|
426
|
+
return false;
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"and": {
|
|
430
|
+
concat: function(acc, fn) {
|
|
431
|
+
return function(a) {
|
|
432
|
+
return acc(a) && fn(a);
|
|
433
|
+
};
|
|
434
|
+
},
|
|
435
|
+
identity: function() {
|
|
436
|
+
return true;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
var operatorsMap = {
|
|
441
|
+
contains: function(a, b) {
|
|
442
|
+
return (a || "").indexOf(b) >= 0;
|
|
443
|
+
},
|
|
444
|
+
doesnotcontain: function(a, b) {
|
|
445
|
+
return (a || "").indexOf(b) === -1;
|
|
446
|
+
},
|
|
447
|
+
doesnotendwith: function(a, b) {
|
|
448
|
+
return (a || "").indexOf(b, (a || "").length - (b || "").length) < 0;
|
|
449
|
+
},
|
|
450
|
+
doesnotstartwith: function(a, b) {
|
|
451
|
+
return (a || "").lastIndexOf(b, 0) === -1;
|
|
452
|
+
},
|
|
453
|
+
endswith: function(a, b) {
|
|
454
|
+
return (a || "").indexOf(b, (a || "").length - (b || "").length) >= 0;
|
|
455
|
+
},
|
|
456
|
+
eq: function(a, b) {
|
|
457
|
+
return a === b;
|
|
458
|
+
},
|
|
459
|
+
gt: function(a, b) {
|
|
460
|
+
return a > b;
|
|
461
|
+
},
|
|
462
|
+
gte: function(a, b) {
|
|
463
|
+
return a >= b;
|
|
464
|
+
},
|
|
465
|
+
isempty: function(a) {
|
|
466
|
+
return a === "";
|
|
467
|
+
},
|
|
468
|
+
isnotempty: function(a) {
|
|
469
|
+
return a !== "";
|
|
470
|
+
},
|
|
471
|
+
isnotnull: function(a) {
|
|
472
|
+
return isPresent(a);
|
|
473
|
+
},
|
|
474
|
+
isnull: function(a) {
|
|
475
|
+
return isBlank(a);
|
|
476
|
+
},
|
|
477
|
+
lt: function(a, b) {
|
|
478
|
+
return a < b;
|
|
479
|
+
},
|
|
480
|
+
lte: function(a, b) {
|
|
481
|
+
return a <= b;
|
|
482
|
+
},
|
|
483
|
+
neq: function(a, b) {
|
|
484
|
+
return a != b;
|
|
485
|
+
},
|
|
486
|
+
startswith: function(a, b) {
|
|
487
|
+
return (a || "").lastIndexOf(b, 0) === 0;
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
var dateRegExp = /^\/Date\((.*?)\)\/$/;
|
|
491
|
+
var convertValue = function(value2, ignoreCase) {
|
|
492
|
+
if (value2 != null && isString(value2)) {
|
|
493
|
+
var date = dateRegExp.exec(value2);
|
|
494
|
+
if (date) {
|
|
495
|
+
return (/* @__PURE__ */ new Date(+date[1])).getTime();
|
|
496
|
+
} else if (ignoreCase) {
|
|
497
|
+
return value2.toLowerCase();
|
|
498
|
+
}
|
|
499
|
+
} else if (value2 != null && isDate(value2)) {
|
|
500
|
+
return value2.getTime();
|
|
501
|
+
}
|
|
502
|
+
return value2;
|
|
503
|
+
};
|
|
504
|
+
var typedGetter = function(prop2, value2, ignoreCase) {
|
|
505
|
+
if (!isPresent(value2)) {
|
|
506
|
+
return prop2;
|
|
507
|
+
}
|
|
508
|
+
var acc = prop2;
|
|
509
|
+
if (isString(value2)) {
|
|
510
|
+
var date = dateRegExp.exec(value2);
|
|
511
|
+
if (date) {
|
|
512
|
+
value2 = /* @__PURE__ */ new Date(+date[1]);
|
|
513
|
+
} else {
|
|
514
|
+
acc = function(a) {
|
|
515
|
+
var x = prop2(a);
|
|
516
|
+
if (typeof x === "string" && ignoreCase) {
|
|
517
|
+
return x.toLowerCase();
|
|
518
|
+
} else {
|
|
519
|
+
return isNumeric(x) ? x + "" : x;
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
if (isDate(value2)) {
|
|
525
|
+
return function(a) {
|
|
526
|
+
var x = acc(a);
|
|
527
|
+
return isDate(x) ? x.getTime() : x;
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
return acc;
|
|
531
|
+
};
|
|
532
|
+
var transformFilter = function(_a) {
|
|
533
|
+
var field = _a.field, ignoreCase = _a.ignoreCase, value2 = _a.value, operator = _a.operator;
|
|
534
|
+
field = !isPresent(field) ? function(a) {
|
|
535
|
+
return a;
|
|
536
|
+
} : field;
|
|
537
|
+
ignoreCase = isPresent(ignoreCase) ? ignoreCase : true;
|
|
538
|
+
var itemProp = typedGetter(isFunction(field) ? field : getter(field, true), value2, ignoreCase);
|
|
539
|
+
value2 = convertValue(value2, ignoreCase);
|
|
540
|
+
var op = isFunction(operator) ? operator : operatorsMap[operator];
|
|
541
|
+
return function(a) {
|
|
542
|
+
return op(itemProp(a), value2, ignoreCase);
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
var transformCompositeFilter = function(filter2) {
|
|
546
|
+
var combiner = logic[filter2.logic];
|
|
547
|
+
return filter2.filters.filter(isPresent).map(function(x) {
|
|
548
|
+
return isCompositeFilterDescriptor(x) ? transformCompositeFilter(x) : transformFilter(x);
|
|
549
|
+
}).reduce(combiner.concat, combiner.identity);
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/filtering/filter-expression.factory.js
|
|
553
|
+
var compileFilter = function(descriptor) {
|
|
554
|
+
if (!descriptor || descriptor.filters.length === 0) {
|
|
555
|
+
return function() {
|
|
556
|
+
return true;
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
return transformCompositeFilter(descriptor);
|
|
560
|
+
};
|
|
561
|
+
var filterBy = function(data, descriptor) {
|
|
562
|
+
if (!isPresent(descriptor) || isCompositeFilterDescriptor(descriptor) && descriptor.filters.length === 0) {
|
|
563
|
+
return data;
|
|
564
|
+
}
|
|
565
|
+
return data.filter(compileFilter(normalizeFilters(descriptor)));
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/grouping/group.operators.js
|
|
569
|
+
var identity3 = map(function(x) {
|
|
570
|
+
return x;
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
// ../../../node_modules/@progress/kendo-data-query/dist/es/filtering/operators.enum.js
|
|
574
|
+
var FilterOperator;
|
|
575
|
+
(function(FilterOperator2) {
|
|
576
|
+
FilterOperator2["Contains"] = "contains";
|
|
577
|
+
FilterOperator2["DoesNotContain"] = "doesnotcontain";
|
|
578
|
+
FilterOperator2["DoesNotEndWith"] = "doesnotendwith";
|
|
579
|
+
FilterOperator2["DoesNotStartWith"] = "doesnotstartwith";
|
|
580
|
+
FilterOperator2["EndsWith"] = "endswith";
|
|
581
|
+
FilterOperator2["EqualTo"] = "eq";
|
|
582
|
+
FilterOperator2["GreaterThan"] = "gt";
|
|
583
|
+
FilterOperator2["GreaterThanOrEqual"] = "gte";
|
|
584
|
+
FilterOperator2["IsEmpty"] = "isempty";
|
|
585
|
+
FilterOperator2["IsNotEmpty"] = "isnotempty";
|
|
586
|
+
FilterOperator2["IsNotNull"] = "isnotnull";
|
|
587
|
+
FilterOperator2["IsNull"] = "isnull";
|
|
588
|
+
FilterOperator2["LessThan"] = "lt";
|
|
589
|
+
FilterOperator2["LessThanOrEqual"] = "lte";
|
|
590
|
+
FilterOperator2["NotEqualTo"] = "neq";
|
|
591
|
+
FilterOperator2["StartsWith"] = "startswith";
|
|
592
|
+
})(FilterOperator || (FilterOperator = {}));
|
|
593
|
+
|
|
594
|
+
// src/components/Select/SelectClient.tsx
|
|
64
595
|
var import_kendo_react_dropdowns = require("@progress/kendo-react-dropdowns");
|
|
65
596
|
var import_react = require("react");
|
|
66
597
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
598
|
+
var SelectClient = ({
|
|
599
|
+
value: valueProp,
|
|
600
|
+
data: propData,
|
|
601
|
+
filter: filterProp,
|
|
602
|
+
keyField: keyField2 = "key",
|
|
603
|
+
textField: textField3 = "text",
|
|
604
|
+
placeholder,
|
|
605
|
+
virtual,
|
|
606
|
+
filterable,
|
|
607
|
+
disabled,
|
|
608
|
+
loading,
|
|
609
|
+
className,
|
|
610
|
+
onChange,
|
|
611
|
+
onFilterChange
|
|
612
|
+
}) => {
|
|
613
|
+
const [value2, setValue] = (0, import_react.useState)(valueProp);
|
|
614
|
+
const [filter2, setFilter] = (0, import_react.useState)(filterProp);
|
|
615
|
+
const handleChange = (event) => {
|
|
616
|
+
const value3 = event.target.value || null;
|
|
617
|
+
if (valueProp !== void 0) {
|
|
618
|
+
onChange(value3);
|
|
619
|
+
} else {
|
|
620
|
+
setValue(value3);
|
|
621
|
+
}
|
|
622
|
+
};
|
|
623
|
+
const pageSize3 = virtual == null ? void 0 : virtual.pageSize;
|
|
624
|
+
const filteredData = (0, import_react.useRef)([]);
|
|
625
|
+
const [state, setState] = (0, import_react.useState)({
|
|
626
|
+
skip: 0,
|
|
627
|
+
total: propData.total,
|
|
628
|
+
subsetData: propData.items.slice(0, pageSize3)
|
|
629
|
+
});
|
|
630
|
+
const handleFilterChange = (event) => {
|
|
631
|
+
if (pageSize3) {
|
|
632
|
+
filteredData.current = filterBy(propData.items.slice(), event.filter);
|
|
633
|
+
const data = filteredData.current.slice(0, pageSize3);
|
|
634
|
+
setState({
|
|
635
|
+
subsetData: data,
|
|
636
|
+
skip: 0,
|
|
637
|
+
total: filteredData.current.length
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
const filter3 = event.filter.value;
|
|
641
|
+
if (filterProp !== void 0) {
|
|
642
|
+
onFilterChange == null ? void 0 : onFilterChange(filter3);
|
|
643
|
+
} else {
|
|
644
|
+
setFilter(filter3);
|
|
645
|
+
}
|
|
646
|
+
};
|
|
647
|
+
const handlePageChange = (event) => {
|
|
648
|
+
if (pageSize3) {
|
|
649
|
+
const skip3 = event.page.skip;
|
|
650
|
+
const take3 = event.page.take;
|
|
651
|
+
const newSubsetData = filteredData.current.slice(skip3, skip3 + take3);
|
|
652
|
+
setState(__spreadProps(__spreadValues({}, state), { subsetData: newSubsetData, skip: skip3 }));
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
(0, import_react.useEffect)(() => {
|
|
656
|
+
if (valueProp !== void 0) {
|
|
657
|
+
setValue(valueProp);
|
|
658
|
+
}
|
|
659
|
+
}, [valueProp]);
|
|
660
|
+
(0, import_react.useEffect)(() => {
|
|
661
|
+
setFilter(filterProp);
|
|
662
|
+
}, [filterProp]);
|
|
663
|
+
(0, import_react.useEffect)(() => {
|
|
664
|
+
if (pageSize3) {
|
|
665
|
+
filteredData.current = propData.items.slice();
|
|
666
|
+
}
|
|
667
|
+
}, [propData]);
|
|
668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
669
|
+
import_kendo_react_dropdowns.ComboBox,
|
|
670
|
+
{
|
|
671
|
+
value: value2,
|
|
672
|
+
data: pageSize3 ? state.subsetData : propData.items,
|
|
673
|
+
placeholder,
|
|
674
|
+
dataItemKey: keyField2,
|
|
675
|
+
textField: textField3,
|
|
676
|
+
filterable,
|
|
677
|
+
filter: filter2,
|
|
678
|
+
virtual: pageSize3 ? {
|
|
679
|
+
total: state.total,
|
|
680
|
+
pageSize: pageSize3,
|
|
681
|
+
skip: state.skip
|
|
682
|
+
} : void 0,
|
|
683
|
+
disabled,
|
|
684
|
+
loading,
|
|
685
|
+
className,
|
|
686
|
+
onChange: handleChange,
|
|
687
|
+
onFilterChange: handleFilterChange,
|
|
688
|
+
onPageChange: handlePageChange
|
|
689
|
+
}
|
|
690
|
+
);
|
|
691
|
+
};
|
|
692
|
+
var SelectClient_default = SelectClient;
|
|
693
|
+
|
|
694
|
+
// src/components/Select/SelectServer.tsx
|
|
695
|
+
var import_kendo_react_dropdowns2 = require("@progress/kendo-react-dropdowns");
|
|
696
|
+
var import_react2 = require("react");
|
|
697
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
698
|
+
var textField = "ContactName";
|
|
699
|
+
var emptyItem = { [textField]: "loading ...", CustomerID: 0 };
|
|
700
|
+
var pageSize = 10;
|
|
701
|
+
var loadingData = [];
|
|
702
|
+
while (loadingData.length < pageSize) {
|
|
703
|
+
loadingData.push(__spreadValues({}, emptyItem));
|
|
704
|
+
}
|
|
705
|
+
var SelectServer = ({
|
|
706
|
+
data: dataProp,
|
|
707
|
+
value: valueProp,
|
|
708
|
+
keyField: keyField2 = "key",
|
|
709
|
+
textField: textField3 = "text",
|
|
710
|
+
placeholder,
|
|
711
|
+
virtual,
|
|
712
|
+
filterable,
|
|
713
|
+
filter: filterProp = "",
|
|
714
|
+
disabled,
|
|
715
|
+
loading,
|
|
716
|
+
className,
|
|
717
|
+
onChange,
|
|
718
|
+
onDataChange,
|
|
719
|
+
onFilterChange,
|
|
720
|
+
getData,
|
|
721
|
+
renderItem
|
|
722
|
+
}) => {
|
|
723
|
+
var _a;
|
|
724
|
+
const dataCaching = (0, import_react2.useRef)([]);
|
|
725
|
+
const pendingRequest = (0, import_react2.useRef)();
|
|
726
|
+
const requestStarted = (0, import_react2.useRef)(false);
|
|
727
|
+
const emptyItem3 = { [keyField2]: 0, [textField3]: "loading ..." };
|
|
728
|
+
const [loadingData3, setLoadingData] = (0, import_react2.useState)([]);
|
|
729
|
+
const [data, setData] = (0, import_react2.useState)(dataProp.items);
|
|
730
|
+
const [total, setTotal] = (0, import_react2.useState)(0);
|
|
731
|
+
const [value2, setValue] = (0, import_react2.useState)(valueProp);
|
|
732
|
+
const [filter2, setFilter] = (0, import_react2.useState)(filterProp);
|
|
733
|
+
const pageSize3 = (_a = virtual == null ? void 0 : virtual.pageSize) != null ? _a : 10;
|
|
734
|
+
const skipRef = (0, import_react2.useRef)(0);
|
|
735
|
+
const resetCach = () => {
|
|
736
|
+
dataCaching.current.length = 0;
|
|
737
|
+
};
|
|
738
|
+
const requestData = (0, import_react2.useCallback)((state) => {
|
|
739
|
+
const { skip: skip3 } = state;
|
|
740
|
+
if (requestStarted.current) {
|
|
741
|
+
clearTimeout(pendingRequest.current);
|
|
742
|
+
pendingRequest.current = setTimeout(() => {
|
|
743
|
+
requestData(state);
|
|
744
|
+
}, 50);
|
|
745
|
+
return;
|
|
746
|
+
}
|
|
747
|
+
requestStarted.current = true;
|
|
748
|
+
getData(state).then(({ items, total: total2 }) => {
|
|
749
|
+
items.forEach((item, index) => {
|
|
750
|
+
dataCaching.current[index + skip3] = item;
|
|
751
|
+
});
|
|
752
|
+
if (skip3 === skipRef.current) {
|
|
753
|
+
setData(items);
|
|
754
|
+
setTotal(total2);
|
|
755
|
+
onDataChange == null ? void 0 : onDataChange({ items, total: total2 });
|
|
756
|
+
}
|
|
757
|
+
requestStarted.current = false;
|
|
758
|
+
}).catch(() => {
|
|
759
|
+
requestStarted.current = false;
|
|
760
|
+
});
|
|
761
|
+
}, []);
|
|
762
|
+
const handleFilterChange = (0, import_react2.useCallback)((event) => {
|
|
763
|
+
const filter3 = event.filter.value;
|
|
764
|
+
if (filterProp !== void 0) {
|
|
765
|
+
onFilterChange == null ? void 0 : onFilterChange(filter3);
|
|
766
|
+
} else {
|
|
767
|
+
setFilter(filter3);
|
|
768
|
+
}
|
|
769
|
+
resetCach();
|
|
770
|
+
requestData({ skip: 0, filter: filter3 });
|
|
771
|
+
setData(loadingData3);
|
|
772
|
+
skipRef.current = 0;
|
|
773
|
+
}, []);
|
|
774
|
+
const shouldRequestData = (0, import_react2.useCallback)((skip3) => {
|
|
775
|
+
for (let i = 0; i < pageSize3; i++) {
|
|
776
|
+
if (!dataCaching.current[skip3 + i]) {
|
|
777
|
+
return true;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
return false;
|
|
781
|
+
}, []);
|
|
782
|
+
const getCachedData = (0, import_react2.useCallback)((skip3) => {
|
|
783
|
+
const data2 = [];
|
|
784
|
+
for (let i = 0; i < pageSize3; i++) {
|
|
785
|
+
data2.push(dataCaching.current[i + skip3] || emptyItem3);
|
|
786
|
+
}
|
|
787
|
+
return data2;
|
|
788
|
+
}, []);
|
|
789
|
+
const pageChange = (0, import_react2.useCallback)(
|
|
790
|
+
(event) => {
|
|
791
|
+
if (filter2 !== void 0) {
|
|
792
|
+
const newSkip = event.page.skip;
|
|
793
|
+
if (shouldRequestData(newSkip)) {
|
|
794
|
+
requestData({ skip: newSkip, filter: filter2 });
|
|
795
|
+
}
|
|
796
|
+
const data2 = getCachedData(newSkip);
|
|
797
|
+
setData(data2);
|
|
798
|
+
skipRef.current = newSkip;
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
[getCachedData, requestData, shouldRequestData, filter2]
|
|
802
|
+
);
|
|
803
|
+
const handleChange = (0, import_react2.useCallback)((event) => {
|
|
804
|
+
const value3 = event.target.value;
|
|
805
|
+
if (value3 && value3[textField3] === emptyItem3[textField3]) {
|
|
806
|
+
return;
|
|
807
|
+
}
|
|
808
|
+
if (valueProp !== void 0) {
|
|
809
|
+
onChange(value3);
|
|
810
|
+
} else {
|
|
811
|
+
setValue(value3);
|
|
812
|
+
}
|
|
813
|
+
}, []);
|
|
814
|
+
const handleItemRender = (li, itemProps) => {
|
|
815
|
+
const itemChildren = renderItem == null ? void 0 : renderItem(itemProps.dataItem);
|
|
816
|
+
if (!itemChildren)
|
|
817
|
+
return (0, import_react2.cloneElement)(li, li.props);
|
|
818
|
+
return (0, import_react2.cloneElement)(li, li.props, itemChildren);
|
|
819
|
+
};
|
|
820
|
+
(0, import_react2.useEffect)(() => {
|
|
821
|
+
const pageSize4 = 10;
|
|
822
|
+
const loadingData4 = [];
|
|
823
|
+
while (loadingData4.length < pageSize4) {
|
|
824
|
+
loadingData4.push(emptyItem3);
|
|
825
|
+
}
|
|
826
|
+
setLoadingData(loadingData4);
|
|
827
|
+
}, []);
|
|
828
|
+
(0, import_react2.useEffect)(() => {
|
|
829
|
+
if (valueProp !== void 0) {
|
|
830
|
+
setValue(valueProp);
|
|
831
|
+
}
|
|
832
|
+
}, [valueProp]);
|
|
833
|
+
(0, import_react2.useEffect)(() => {
|
|
834
|
+
if (filterProp !== void 0) {
|
|
835
|
+
setFilter(filterProp);
|
|
836
|
+
}
|
|
837
|
+
}, [filterProp]);
|
|
838
|
+
(0, import_react2.useEffect)(() => {
|
|
839
|
+
requestData({ skip: 0, filter: filter2 });
|
|
840
|
+
return () => {
|
|
841
|
+
resetCach();
|
|
842
|
+
};
|
|
843
|
+
}, [filter2, requestData]);
|
|
844
|
+
(0, import_react2.useEffect)(() => {
|
|
845
|
+
setData(dataProp.items);
|
|
846
|
+
}, [dataProp]);
|
|
847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
848
|
+
import_kendo_react_dropdowns2.ComboBox,
|
|
849
|
+
{
|
|
850
|
+
data,
|
|
851
|
+
value: value2,
|
|
852
|
+
placeholder,
|
|
853
|
+
dataItemKey: keyField2,
|
|
854
|
+
textField: textField3,
|
|
855
|
+
filterable,
|
|
856
|
+
onFilterChange: handleFilterChange,
|
|
857
|
+
virtual: {
|
|
858
|
+
pageSize: pageSize3,
|
|
859
|
+
skip: skipRef.current,
|
|
860
|
+
total
|
|
861
|
+
},
|
|
862
|
+
disabled,
|
|
863
|
+
loading,
|
|
864
|
+
className,
|
|
865
|
+
onChange: handleChange,
|
|
866
|
+
onPageChange: pageChange,
|
|
867
|
+
itemRender: handleItemRender
|
|
868
|
+
}
|
|
869
|
+
);
|
|
870
|
+
};
|
|
871
|
+
var SelectServer_default = SelectServer;
|
|
872
|
+
|
|
873
|
+
// src/components/Select/Select.tsx
|
|
874
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
875
|
+
var Select = (props) => {
|
|
876
|
+
return props.filterMode === "client" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectClient_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectServer_default, __spreadValues({}, props));
|
|
877
|
+
};
|
|
878
|
+
var Select_default = Select;
|
|
879
|
+
|
|
880
|
+
// src/components/MultiSelect/MultiSelectClient.tsx
|
|
881
|
+
var import_kendo_react_dropdowns3 = require("@progress/kendo-react-dropdowns");
|
|
882
|
+
var import_react3 = require("react");
|
|
883
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
884
|
+
var textField2 = "text";
|
|
885
|
+
var keyField = "key";
|
|
886
|
+
var emptyItem2 = { [textField2]: "loading ...", [keyField]: 0 };
|
|
887
|
+
var pageSize2 = 10;
|
|
888
|
+
var loadingData2 = [];
|
|
889
|
+
while (loadingData2.length < pageSize2) {
|
|
890
|
+
loadingData2.push(__spreadValues({}, emptyItem2));
|
|
891
|
+
}
|
|
892
|
+
var SelectClient2 = ({
|
|
893
|
+
data: dataProp,
|
|
894
|
+
value: valueProp,
|
|
895
|
+
keyField: keyField2 = "key",
|
|
896
|
+
textField: textField3 = "text",
|
|
897
|
+
placeholder,
|
|
898
|
+
virtual,
|
|
899
|
+
filterable,
|
|
900
|
+
filter: filterProp,
|
|
901
|
+
disabled,
|
|
902
|
+
loading,
|
|
903
|
+
className,
|
|
904
|
+
onChange,
|
|
905
|
+
onFilterChange
|
|
906
|
+
}) => {
|
|
907
|
+
const [value2, setValue] = (0, import_react3.useState)(valueProp);
|
|
908
|
+
const [filter2, setFilter] = (0, import_react3.useState)(filterProp);
|
|
909
|
+
const handleChange = (event) => {
|
|
910
|
+
onChange(event.target.value);
|
|
911
|
+
};
|
|
912
|
+
const pageSize3 = virtual == null ? void 0 : virtual.pageSize;
|
|
913
|
+
const filteredData = (0, import_react3.useRef)([]);
|
|
914
|
+
const [state, setState] = (0, import_react3.useState)({
|
|
915
|
+
skip: 0,
|
|
916
|
+
total: dataProp.total,
|
|
917
|
+
subsetData: dataProp.items.slice(0, pageSize3)
|
|
918
|
+
});
|
|
919
|
+
const handleFilterChange = (event) => {
|
|
920
|
+
if (pageSize3) {
|
|
921
|
+
filteredData.current = filterBy(dataProp.items.slice(), event.filter);
|
|
922
|
+
const data = filteredData.current.slice(0, pageSize3);
|
|
923
|
+
setState({
|
|
924
|
+
subsetData: data,
|
|
925
|
+
skip: 0,
|
|
926
|
+
total: filteredData.current.length
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
onFilterChange == null ? void 0 : onFilterChange(event.filter.value);
|
|
930
|
+
};
|
|
931
|
+
const pageChange = (event) => {
|
|
932
|
+
if (pageSize3) {
|
|
933
|
+
const skip3 = event.page.skip;
|
|
934
|
+
const take3 = event.page.take;
|
|
935
|
+
const newSubsetData = filteredData.current.slice(skip3, skip3 + take3);
|
|
936
|
+
setState(__spreadProps(__spreadValues({}, state), { subsetData: newSubsetData, skip: skip3 }));
|
|
937
|
+
}
|
|
938
|
+
};
|
|
939
|
+
(0, import_react3.useEffect)(() => {
|
|
940
|
+
setValue(valueProp);
|
|
941
|
+
}, [valueProp]);
|
|
942
|
+
(0, import_react3.useEffect)(() => {
|
|
943
|
+
setFilter(filterProp);
|
|
944
|
+
}, [filterProp]);
|
|
945
|
+
(0, import_react3.useEffect)(() => {
|
|
946
|
+
if (pageSize3) {
|
|
947
|
+
filteredData.current = dataProp.items.slice();
|
|
948
|
+
}
|
|
949
|
+
}, [dataProp]);
|
|
950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
951
|
+
import_kendo_react_dropdowns3.MultiSelect,
|
|
952
|
+
{
|
|
953
|
+
value: value2,
|
|
954
|
+
data: pageSize3 ? state.subsetData : dataProp.items,
|
|
955
|
+
placeholder,
|
|
956
|
+
dataItemKey: keyField2,
|
|
957
|
+
textField: textField3,
|
|
958
|
+
filterable,
|
|
959
|
+
filter: filter2,
|
|
960
|
+
virtual: pageSize3 ? {
|
|
961
|
+
total: state.total,
|
|
962
|
+
pageSize: pageSize3,
|
|
963
|
+
skip: state.skip
|
|
964
|
+
} : void 0,
|
|
965
|
+
disabled,
|
|
966
|
+
loading,
|
|
967
|
+
className,
|
|
968
|
+
onChange: handleChange,
|
|
969
|
+
onFilterChange: handleFilterChange,
|
|
970
|
+
onPageChange: pageChange
|
|
971
|
+
}
|
|
972
|
+
);
|
|
973
|
+
};
|
|
974
|
+
var MultiSelectClient_default = SelectClient2;
|
|
975
|
+
|
|
976
|
+
// src/components/MultiSelect/MultiSelectServer.tsx
|
|
977
|
+
var import_kendo_react_dropdowns4 = require("@progress/kendo-react-dropdowns");
|
|
978
|
+
var import_react4 = require("react");
|
|
979
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
980
|
+
var MultiSelectServer = ({
|
|
981
|
+
data: dataProp,
|
|
982
|
+
value: valueProp,
|
|
983
|
+
keyField: keyField2 = "key",
|
|
984
|
+
textField: textField3 = "text",
|
|
985
|
+
placeholder,
|
|
986
|
+
virtual,
|
|
987
|
+
filterable,
|
|
988
|
+
filter: filterProp = "",
|
|
989
|
+
disabled,
|
|
990
|
+
loading,
|
|
991
|
+
className,
|
|
992
|
+
onDataChange,
|
|
993
|
+
onChange,
|
|
994
|
+
onFilterChange,
|
|
995
|
+
getData
|
|
996
|
+
}) => {
|
|
997
|
+
var _a;
|
|
998
|
+
const dataCaching = (0, import_react4.useRef)([]);
|
|
999
|
+
const pendingRequest = (0, import_react4.useRef)();
|
|
1000
|
+
const requestStarted = (0, import_react4.useRef)(false);
|
|
1001
|
+
const emptyItem3 = { [keyField2]: 0, [textField3]: "loading ..." };
|
|
1002
|
+
const [loadingData3, setLoadingData] = (0, import_react4.useState)([]);
|
|
1003
|
+
const [data, setData] = (0, import_react4.useState)(dataProp.items);
|
|
1004
|
+
const [total, setTotal] = (0, import_react4.useState)(0);
|
|
1005
|
+
const [value2, setValue] = (0, import_react4.useState)(valueProp);
|
|
1006
|
+
const [filter2, setFilter] = (0, import_react4.useState)(filterProp);
|
|
1007
|
+
const pageSize3 = (_a = virtual == null ? void 0 : virtual.pageSize) != null ? _a : 10;
|
|
1008
|
+
const skipRef = (0, import_react4.useRef)(0);
|
|
1009
|
+
const resetCach = () => {
|
|
1010
|
+
dataCaching.current.length = 0;
|
|
1011
|
+
};
|
|
1012
|
+
const requestData = (0, import_react4.useCallback)((state) => {
|
|
1013
|
+
if (requestStarted.current) {
|
|
1014
|
+
clearTimeout(pendingRequest.current);
|
|
1015
|
+
pendingRequest.current = setTimeout(() => {
|
|
1016
|
+
requestData(state);
|
|
1017
|
+
}, 50);
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
requestStarted.current = true;
|
|
1021
|
+
getData(state).then(({ items, total: total2 }) => {
|
|
1022
|
+
const { skip: skip3 } = state;
|
|
1023
|
+
items.forEach((item, index) => {
|
|
1024
|
+
dataCaching.current[index + skip3] = item;
|
|
1025
|
+
});
|
|
1026
|
+
if (skip3 === skipRef.current) {
|
|
1027
|
+
setData(items);
|
|
1028
|
+
setTotal(total2);
|
|
1029
|
+
onDataChange == null ? void 0 : onDataChange({ items, total: total2 });
|
|
1030
|
+
}
|
|
1031
|
+
requestStarted.current = false;
|
|
1032
|
+
}).catch(() => {
|
|
1033
|
+
requestStarted.current = false;
|
|
1034
|
+
});
|
|
1035
|
+
}, []);
|
|
1036
|
+
const handleFilterChange = (0, import_react4.useCallback)((event) => {
|
|
1037
|
+
const filter3 = event.filter.value;
|
|
1038
|
+
resetCach();
|
|
1039
|
+
requestData({ skip: 0, filter: filter3 });
|
|
1040
|
+
setData(loadingData3);
|
|
1041
|
+
skipRef.current = 0;
|
|
1042
|
+
setFilter(filter3);
|
|
1043
|
+
onFilterChange == null ? void 0 : onFilterChange(filter3);
|
|
1044
|
+
}, []);
|
|
1045
|
+
const shouldRequestData = (0, import_react4.useCallback)((skip3) => {
|
|
1046
|
+
for (let i = 0; i < pageSize3; i++) {
|
|
1047
|
+
if (!dataCaching.current[skip3 + i]) {
|
|
1048
|
+
return true;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
return false;
|
|
1052
|
+
}, []);
|
|
1053
|
+
const getCachedData = (0, import_react4.useCallback)((skip3) => {
|
|
1054
|
+
const data2 = [];
|
|
1055
|
+
for (let i = 0; i < pageSize3; i++) {
|
|
1056
|
+
data2.push(dataCaching.current[i + skip3] || emptyItem3);
|
|
1057
|
+
}
|
|
1058
|
+
return data2;
|
|
1059
|
+
}, []);
|
|
1060
|
+
const pageChange = (0, import_react4.useCallback)(
|
|
1061
|
+
(event) => {
|
|
1062
|
+
const newSkip = event.page.skip;
|
|
1063
|
+
if (shouldRequestData(newSkip)) {
|
|
1064
|
+
requestData({ skip: newSkip, filter: filter2 });
|
|
1065
|
+
}
|
|
1066
|
+
const data2 = getCachedData(newSkip);
|
|
1067
|
+
setData(data2);
|
|
1068
|
+
skipRef.current = newSkip;
|
|
1069
|
+
},
|
|
1070
|
+
[getCachedData, requestData, shouldRequestData, filter2]
|
|
1071
|
+
);
|
|
1072
|
+
const handleChange = (0, import_react4.useCallback)((event) => {
|
|
1073
|
+
const value3 = event.target.value;
|
|
1074
|
+
if (value3 && value3[textField3] === emptyItem3[textField3]) {
|
|
1075
|
+
return;
|
|
1076
|
+
}
|
|
1077
|
+
setValue(value3);
|
|
1078
|
+
onChange(value3);
|
|
1079
|
+
}, []);
|
|
1080
|
+
(0, import_react4.useEffect)(() => {
|
|
1081
|
+
const pageSize4 = 10;
|
|
1082
|
+
const loadingData4 = [];
|
|
1083
|
+
while (loadingData4.length < pageSize4) {
|
|
1084
|
+
loadingData4.push(emptyItem3);
|
|
1085
|
+
}
|
|
1086
|
+
setLoadingData(loadingData4);
|
|
1087
|
+
}, []);
|
|
1088
|
+
(0, import_react4.useEffect)(() => {
|
|
1089
|
+
setData(dataProp.items);
|
|
1090
|
+
}, [dataProp]);
|
|
1091
|
+
(0, import_react4.useEffect)(() => {
|
|
1092
|
+
setValue(valueProp);
|
|
1093
|
+
}, [valueProp]);
|
|
1094
|
+
(0, import_react4.useEffect)(() => {
|
|
1095
|
+
setFilter(filterProp);
|
|
1096
|
+
}, [filterProp]);
|
|
1097
|
+
(0, import_react4.useEffect)(() => {
|
|
1098
|
+
requestData({ skip: 0, filter: filter2 });
|
|
1099
|
+
return () => {
|
|
1100
|
+
resetCach();
|
|
1101
|
+
};
|
|
1102
|
+
}, [filter2, requestData]);
|
|
1103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1104
|
+
import_kendo_react_dropdowns4.MultiSelect,
|
|
1105
|
+
{
|
|
1106
|
+
data,
|
|
1107
|
+
value: value2,
|
|
1108
|
+
placeholder,
|
|
1109
|
+
dataItemKey: keyField2,
|
|
1110
|
+
textField: textField3,
|
|
1111
|
+
filterable,
|
|
1112
|
+
onFilterChange: handleFilterChange,
|
|
1113
|
+
virtual: {
|
|
1114
|
+
pageSize: pageSize3,
|
|
1115
|
+
skip: skipRef.current,
|
|
1116
|
+
total
|
|
1117
|
+
},
|
|
1118
|
+
disabled,
|
|
1119
|
+
loading,
|
|
1120
|
+
className,
|
|
1121
|
+
onChange: handleChange,
|
|
1122
|
+
onPageChange: pageChange
|
|
1123
|
+
}
|
|
1124
|
+
);
|
|
1125
|
+
};
|
|
1126
|
+
var MultiSelectServer_default = MultiSelectServer;
|
|
1127
|
+
|
|
1128
|
+
// src/components/MultiSelect/MultiSelect.tsx
|
|
1129
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1130
|
+
var MultiSelect3 = (props) => {
|
|
1131
|
+
return props.filterMode === "client" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MultiSelectClient_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MultiSelectServer_default, __spreadValues({}, props));
|
|
1132
|
+
};
|
|
1133
|
+
var MultiSelect_default = MultiSelect3;
|
|
1134
|
+
|
|
1135
|
+
// src/components/DropdownEnumList.tsx
|
|
1136
|
+
var import_kendo_react_dropdowns5 = require("@progress/kendo-react-dropdowns");
|
|
1137
|
+
var import_react5 = require("react");
|
|
1138
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
67
1139
|
function parsearDataForComboBox(array, key, text, itemAll = false) {
|
|
68
1140
|
const dataForComboBox = [];
|
|
69
1141
|
if (itemAll)
|
|
@@ -98,16 +1170,16 @@ function EnumToArray(typeEnum, replaceGuionForSpace = true, description) {
|
|
|
98
1170
|
return values;
|
|
99
1171
|
}
|
|
100
1172
|
var DropEnumList = ({ dataEnum, description, onChange, width, defaultValue }) => {
|
|
101
|
-
const [
|
|
102
|
-
const [data, setData] = (0,
|
|
103
|
-
(0,
|
|
1173
|
+
const [value2, setValue] = (0, import_react5.useState)("");
|
|
1174
|
+
const [data, setData] = (0, import_react5.useState)([]);
|
|
1175
|
+
(0, import_react5.useEffect)(() => {
|
|
104
1176
|
setData(
|
|
105
1177
|
parsearDataForComboBox(EnumToArray(dataEnum, true, description), "value", "label", false).sort(
|
|
106
1178
|
(a, b) => Number(a.key) - Number(b.key)
|
|
107
1179
|
)
|
|
108
1180
|
);
|
|
109
1181
|
}, []);
|
|
110
|
-
(0,
|
|
1182
|
+
(0, import_react5.useEffect)(() => {
|
|
111
1183
|
if (data.length > 0) {
|
|
112
1184
|
setValue(data.filter((x) => x.key == defaultValue)[0]);
|
|
113
1185
|
}
|
|
@@ -116,8 +1188,8 @@ var DropEnumList = ({ dataEnum, description, onChange, width, defaultValue }) =>
|
|
|
116
1188
|
onChange(e);
|
|
117
1189
|
setValue(e);
|
|
118
1190
|
};
|
|
119
|
-
return /* @__PURE__ */ (0,
|
|
120
|
-
|
|
1191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1192
|
+
import_kendo_react_dropdowns5.DropDownList,
|
|
121
1193
|
{
|
|
122
1194
|
className: "d-inline-block align-middle mr-2",
|
|
123
1195
|
data,
|
|
@@ -131,23 +1203,23 @@ var DropEnumList = ({ dataEnum, description, onChange, width, defaultValue }) =>
|
|
|
131
1203
|
style: {
|
|
132
1204
|
width: `${width}px`
|
|
133
1205
|
},
|
|
134
|
-
defaultValue:
|
|
1206
|
+
defaultValue: value2
|
|
135
1207
|
}
|
|
136
1208
|
) });
|
|
137
1209
|
};
|
|
138
1210
|
|
|
139
1211
|
// src/contexts/BreadCrumbContext.tsx
|
|
140
1212
|
var import_react_ui = require("@unifiedsoftware/react-ui");
|
|
141
|
-
var
|
|
142
|
-
var
|
|
143
|
-
var BreadCrumbContext = (0,
|
|
1213
|
+
var import_react6 = require("react");
|
|
1214
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1215
|
+
var BreadCrumbContext = (0, import_react6.createContext)({});
|
|
144
1216
|
var BreadCrumbContextProvider = ({ children }) => {
|
|
145
1217
|
const [active, setActive] = (0, import_react_ui.useLocalStorage)("@active", "");
|
|
146
1218
|
const [path, setPath] = (0, import_react_ui.useLocalStorage)("@path", "/");
|
|
147
1219
|
const [goBack, setGoBack] = (0, import_react_ui.useLocalStorage)("@goBack", false);
|
|
148
1220
|
const [pathChild, setPathChild] = (0, import_react_ui.useLocalStorage)("@pathChild", "");
|
|
149
|
-
const [routes, setRoutes] = (0,
|
|
150
|
-
return /* @__PURE__ */ (0,
|
|
1221
|
+
const [routes, setRoutes] = (0, import_react6.useState)([]);
|
|
1222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
151
1223
|
BreadCrumbContext.Provider,
|
|
152
1224
|
{
|
|
153
1225
|
value: {
|
|
@@ -168,51 +1240,51 @@ var BreadCrumbContextProvider = ({ children }) => {
|
|
|
168
1240
|
};
|
|
169
1241
|
|
|
170
1242
|
// src/contexts/DrawerContext.tsx
|
|
171
|
-
var
|
|
172
|
-
var
|
|
173
|
-
var DrawerContext = (0,
|
|
1243
|
+
var import_react7 = require("react");
|
|
1244
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1245
|
+
var DrawerContext = (0, import_react7.createContext)({});
|
|
174
1246
|
var DrawerContextProvider = ({ children }) => {
|
|
175
|
-
const [active, setActive] = (0,
|
|
176
|
-
return /* @__PURE__ */ (0,
|
|
1247
|
+
const [active, setActive] = (0, import_react7.useState)(false);
|
|
1248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DrawerContext.Provider, { value: { active, setActive }, children });
|
|
177
1249
|
};
|
|
178
1250
|
|
|
179
1251
|
// src/contexts/HistoryContext.tsx
|
|
180
1252
|
var import_react_ui2 = require("@unifiedsoftware/react-ui");
|
|
181
|
-
var
|
|
182
|
-
var
|
|
183
|
-
var HistoryContext = (0,
|
|
1253
|
+
var import_react8 = require("react");
|
|
1254
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1255
|
+
var HistoryContext = (0, import_react8.createContext)({});
|
|
184
1256
|
var HistoryContextProvider = ({ children }) => {
|
|
185
1257
|
const [list, setList] = (0, import_react_ui2.useLocalStorage)("@list_paths", []);
|
|
186
|
-
const updateList = (
|
|
1258
|
+
const updateList = (value2) => {
|
|
187
1259
|
setList(
|
|
188
1260
|
(prev) => prev.concat({
|
|
189
|
-
path:
|
|
190
|
-
name:
|
|
1261
|
+
path: value2.path,
|
|
1262
|
+
name: value2.name,
|
|
191
1263
|
date: /* @__PURE__ */ new Date()
|
|
192
1264
|
})
|
|
193
1265
|
);
|
|
194
1266
|
};
|
|
195
|
-
return /* @__PURE__ */ (0,
|
|
1267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(HistoryContext.Provider, { value: { list, updateList }, children });
|
|
196
1268
|
};
|
|
197
1269
|
|
|
198
1270
|
// src/contexts/SidebarMainContext.tsx
|
|
199
|
-
var
|
|
200
|
-
var
|
|
201
|
-
var SidebarMainContext = (0,
|
|
1271
|
+
var import_react9 = require("react");
|
|
1272
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1273
|
+
var SidebarMainContext = (0, import_react9.createContext)({});
|
|
202
1274
|
var SidebarMainContextProvider = ({ children }) => {
|
|
203
|
-
const [open, setOpen] = (0,
|
|
204
|
-
return /* @__PURE__ */ (0,
|
|
1275
|
+
const [open, setOpen] = (0, import_react9.useState)(true);
|
|
1276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SidebarMainContext.Provider, { value: { open, setOpen }, children });
|
|
205
1277
|
};
|
|
206
1278
|
|
|
207
1279
|
// src/contexts/GlobalProvider.tsx
|
|
208
|
-
var
|
|
1280
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
209
1281
|
function GlobalProvider({ children }) {
|
|
210
|
-
return /* @__PURE__ */ (0,
|
|
1282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HistoryContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BreadCrumbContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidebarMainContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DrawerContextProvider, { children }) }) }) });
|
|
211
1283
|
}
|
|
212
1284
|
|
|
213
1285
|
// src/layout/AppBreadcrumb.tsx
|
|
214
1286
|
var import_react_router3 = require("@unifiedsoftware/react-router");
|
|
215
|
-
var
|
|
1287
|
+
var import_react10 = require("react");
|
|
216
1288
|
var import_md = require("react-icons/md");
|
|
217
1289
|
var import_vsc = require("react-icons/vsc");
|
|
218
1290
|
|
|
@@ -639,46 +1711,46 @@ var CloseIcon = import_styled_components6.default.button`
|
|
|
639
1711
|
`;
|
|
640
1712
|
|
|
641
1713
|
// src/layout/AppBreadcrumb.tsx
|
|
642
|
-
var
|
|
1714
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
643
1715
|
var AppBreadCrumb = ({ title, paths }) => {
|
|
644
|
-
const { setRoutes } = (0,
|
|
645
|
-
(0,
|
|
1716
|
+
const { setRoutes } = (0, import_react10.useContext)(BreadCrumbContext);
|
|
1717
|
+
(0, import_react10.useEffect)(() => {
|
|
646
1718
|
if (!(paths == null ? void 0 : paths.length))
|
|
647
1719
|
return;
|
|
648
1720
|
setRoutes(paths != null ? paths : []);
|
|
649
1721
|
}, []);
|
|
650
|
-
return /* @__PURE__ */ (0,
|
|
1722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(BreadCrumbTitle, { children: title != null ? title : "Home" });
|
|
651
1723
|
};
|
|
652
1724
|
var AppBreadCrumbNav = ({ paths }) => {
|
|
653
1725
|
const router = (0, import_react_router3.useRouter)();
|
|
654
|
-
const { active, path, routes, setRoutes } = (0,
|
|
655
|
-
const { updateList } = (0,
|
|
656
|
-
(0,
|
|
1726
|
+
const { active, path, routes, setRoutes } = (0, import_react10.useContext)(BreadCrumbContext);
|
|
1727
|
+
const { updateList } = (0, import_react10.useContext)(HistoryContext);
|
|
1728
|
+
(0, import_react10.useEffect)(() => {
|
|
657
1729
|
updateList({ name: active, path });
|
|
658
1730
|
}, [path, active]);
|
|
659
|
-
(0,
|
|
1731
|
+
(0, import_react10.useEffect)(() => {
|
|
660
1732
|
setRoutes(paths != null ? paths : []);
|
|
661
1733
|
}, [paths]);
|
|
662
|
-
return /* @__PURE__ */ (0,
|
|
663
|
-
/* @__PURE__ */ (0,
|
|
664
|
-
/* @__PURE__ */ (0,
|
|
665
|
-
routes.length > 0 && /* @__PURE__ */ (0,
|
|
1734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Breadcrumb, { children: [
|
|
1735
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "d-flex align-items-center", children: [
|
|
1736
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_router3.Link, { href: "/", className: "link", children: "HOME" }),
|
|
1737
|
+
routes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_vsc.VscChevronRight, { color: "black" }),
|
|
666
1738
|
routes.length > 0 ? routes.map((i, idx, arr) => {
|
|
667
1739
|
if (i.route === -1) {
|
|
668
|
-
return /* @__PURE__ */ (0,
|
|
1740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "link", onClick: () => router.back(), children: [
|
|
669
1741
|
i.title,
|
|
670
1742
|
" ",
|
|
671
|
-
idx + 1 === arr.length ? "" : /* @__PURE__ */ (0,
|
|
1743
|
+
idx + 1 === arr.length ? "" : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_vsc.VscChevronRight, { color: "black" })
|
|
672
1744
|
] }, idx);
|
|
673
1745
|
}
|
|
674
|
-
return /* @__PURE__ */ (0,
|
|
1746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_router3.Link, { href: i.route, className: "link", children: [
|
|
675
1747
|
i.title,
|
|
676
1748
|
" ",
|
|
677
|
-
idx + 1 === arr.length ? "" : /* @__PURE__ */ (0,
|
|
1749
|
+
idx + 1 === arr.length ? "" : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_vsc.VscChevronRight, { color: "black" })
|
|
678
1750
|
] }, idx);
|
|
679
1751
|
}) : ""
|
|
680
1752
|
] }),
|
|
681
|
-
/* @__PURE__ */ (0,
|
|
1753
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
682
1754
|
CloseIcon,
|
|
683
1755
|
{
|
|
684
1756
|
onClick: () => {
|
|
@@ -689,21 +1761,21 @@ var AppBreadCrumbNav = ({ paths }) => {
|
|
|
689
1761
|
}
|
|
690
1762
|
router.push(`${routes && routes[(routes == null ? void 0 : routes.length) - 2].route}`);
|
|
691
1763
|
},
|
|
692
|
-
children: /* @__PURE__ */ (0,
|
|
1764
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_md.MdClose, { fontSize: 20 })
|
|
693
1765
|
}
|
|
694
1766
|
)
|
|
695
1767
|
] });
|
|
696
1768
|
};
|
|
697
1769
|
|
|
698
1770
|
// src/layout/AppLoader.tsx
|
|
699
|
-
var
|
|
1771
|
+
var import_react11 = require("react");
|
|
700
1772
|
var import_react_dom = __toESM(require("react-dom"));
|
|
701
|
-
var
|
|
1773
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
702
1774
|
var LoaderGrid = () => {
|
|
703
|
-
const Loader = /* @__PURE__ */ (0,
|
|
704
|
-
/* @__PURE__ */ (0,
|
|
705
|
-
/* @__PURE__ */ (0,
|
|
706
|
-
/* @__PURE__ */ (0,
|
|
1775
|
+
const Loader = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "k-loading-mask", children: [
|
|
1776
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "k-loading-text", children: "Loading" }),
|
|
1777
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "k-loading-image" }),
|
|
1778
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "k-loading-color" })
|
|
707
1779
|
] });
|
|
708
1780
|
const gridContent = document && document.querySelector(".k-grid-content");
|
|
709
1781
|
const reportContent = document && document.querySelector(".loading-report");
|
|
@@ -712,12 +1784,12 @@ var LoaderGrid = () => {
|
|
|
712
1784
|
var AppLoader = (props) => {
|
|
713
1785
|
const { type = "grid", parent, minDuration } = props;
|
|
714
1786
|
const parentEl = type === "grid" ? document.querySelector(parent != null ? parent : ".k-grid-container") : parent ? document.querySelector(parent) : null;
|
|
715
|
-
const Loading = /* @__PURE__ */ (0,
|
|
716
|
-
/* @__PURE__ */ (0,
|
|
717
|
-
/* @__PURE__ */ (0,
|
|
718
|
-
/* @__PURE__ */ (0,
|
|
1787
|
+
const Loading = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: `${type}-loading k-loading-mask`, children: [
|
|
1788
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "k-loading-text", children: "Loading" }),
|
|
1789
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "k-loading-image" }),
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "k-loading-color" })
|
|
719
1791
|
] });
|
|
720
|
-
(0,
|
|
1792
|
+
(0, import_react11.useEffect)(() => {
|
|
721
1793
|
if (type === "button") {
|
|
722
1794
|
const loadingEl = document.createElement("div");
|
|
723
1795
|
loadingEl.className = "icon button-loading k-loading-mask";
|
|
@@ -756,7 +1828,7 @@ var AppLoader = (props) => {
|
|
|
756
1828
|
var import_react_bootstrap = require("react-bootstrap");
|
|
757
1829
|
var import_bs = require("react-icons/bs");
|
|
758
1830
|
var import_fi = require("react-icons/fi");
|
|
759
|
-
var
|
|
1831
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
760
1832
|
var NavOptions = ({
|
|
761
1833
|
exportExcel,
|
|
762
1834
|
customButtons,
|
|
@@ -766,27 +1838,27 @@ var NavOptions = ({
|
|
|
766
1838
|
onClear,
|
|
767
1839
|
onExpandScreen
|
|
768
1840
|
}) => {
|
|
769
|
-
return /* @__PURE__ */ (0,
|
|
770
|
-
onCreate && /* @__PURE__ */ (0,
|
|
771
|
-
/* @__PURE__ */ (0,
|
|
1841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(MenuOptions, { children: [
|
|
1842
|
+
onCreate && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { className: "button-option", onClick: onCreate, children: [
|
|
1843
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_fi.FiPlusSquare, { className: "icon" }),
|
|
772
1844
|
" ",
|
|
773
|
-
/* @__PURE__ */ (0,
|
|
1845
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text", children: "New" })
|
|
774
1846
|
] }),
|
|
775
|
-
onRefresh && /* @__PURE__ */ (0,
|
|
776
|
-
/* @__PURE__ */ (0,
|
|
1847
|
+
onRefresh && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { className: "button-option", onClick: onRefresh, children: [
|
|
1848
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_fi.FiRefreshCcw, { className: "icon" }),
|
|
777
1849
|
" ",
|
|
778
|
-
/* @__PURE__ */ (0,
|
|
1850
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text", children: "Refresh" })
|
|
779
1851
|
] }),
|
|
780
|
-
exportExcel && exportExcel.length > 0 && /* @__PURE__ */ (0,
|
|
781
|
-
/* @__PURE__ */ (0,
|
|
1852
|
+
exportExcel && exportExcel.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_bootstrap.Dropdown, { className: "button-option", children: [
|
|
1853
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
782
1854
|
import_react_bootstrap.Dropdown.Toggle,
|
|
783
1855
|
{
|
|
784
1856
|
id: "btnExport",
|
|
785
1857
|
className: "p-2 bg-light text-dark border-0 font-weight-bold",
|
|
786
1858
|
title: "Export to Excel",
|
|
787
1859
|
children: [
|
|
788
|
-
/* @__PURE__ */ (0,
|
|
789
|
-
/* @__PURE__ */ (0,
|
|
1860
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_fi.FiSave, { className: "icon" }),
|
|
1861
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
790
1862
|
"span",
|
|
791
1863
|
{
|
|
792
1864
|
style: {
|
|
@@ -800,45 +1872,45 @@ var NavOptions = ({
|
|
|
800
1872
|
]
|
|
801
1873
|
}
|
|
802
1874
|
),
|
|
803
|
-
/* @__PURE__ */ (0,
|
|
804
|
-
return /* @__PURE__ */ (0,
|
|
805
|
-
/* @__PURE__ */ (0,
|
|
1875
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_bootstrap.Dropdown.Menu, { children: exportExcel.map((item, index) => {
|
|
1876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_bootstrap.Dropdown.Item, { onClick: item.onAction, children: [
|
|
1877
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", { className: `${item.classNameIcon} mr-2` }),
|
|
806
1878
|
" ",
|
|
807
1879
|
item.title
|
|
808
1880
|
] }, index);
|
|
809
1881
|
}) })
|
|
810
1882
|
] }),
|
|
811
|
-
onSelect && /* @__PURE__ */ (0,
|
|
812
|
-
/* @__PURE__ */ (0,
|
|
1883
|
+
onSelect && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { className: "button-option", onClick: onSelect, children: [
|
|
1884
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_fi.FiCheckCircle, { className: "icon" }),
|
|
813
1885
|
" ",
|
|
814
|
-
/* @__PURE__ */ (0,
|
|
1886
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text", children: "Select All" })
|
|
815
1887
|
] }),
|
|
816
|
-
onClear && /* @__PURE__ */ (0,
|
|
817
|
-
/* @__PURE__ */ (0,
|
|
1888
|
+
onClear && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { className: "button-option", onClick: onClear, children: [
|
|
1889
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_fi.FiFilter, { className: "icon" }),
|
|
818
1890
|
" ",
|
|
819
|
-
/* @__PURE__ */ (0,
|
|
1891
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text", children: "Clear Filters" })
|
|
820
1892
|
] }),
|
|
821
|
-
onExpandScreen && /* @__PURE__ */ (0,
|
|
822
|
-
/* @__PURE__ */ (0,
|
|
1893
|
+
onExpandScreen && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { className: "button-option", onClick: onExpandScreen, children: [
|
|
1894
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_bs.BsArrowsFullscreen, { className: "icon" }),
|
|
823
1895
|
" ",
|
|
824
|
-
/* @__PURE__ */ (0,
|
|
1896
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text", children: "Full Page" })
|
|
825
1897
|
] }),
|
|
826
1898
|
customButtons == null ? void 0 : customButtons.map((custom, index) => {
|
|
827
1899
|
if (custom.render) {
|
|
828
1900
|
return custom.render;
|
|
829
1901
|
}
|
|
830
|
-
return /* @__PURE__ */ (0,
|
|
831
|
-
custom.Icon !== void 0 && /* @__PURE__ */ (0,
|
|
832
|
-
/* @__PURE__ */ (0,
|
|
1902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { className: "button-option", onClick: custom.onAction, children: [
|
|
1903
|
+
custom.Icon !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(custom.Icon, { className: "icon" }),
|
|
1904
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text", children: custom.title })
|
|
833
1905
|
] }, index);
|
|
834
1906
|
})
|
|
835
1907
|
] });
|
|
836
1908
|
};
|
|
837
1909
|
|
|
838
1910
|
// src/layout/title.tsx
|
|
839
|
-
var
|
|
1911
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
840
1912
|
var Title = ({ title }) => {
|
|
841
|
-
return /* @__PURE__ */ (0,
|
|
1913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TitlePage, { children: title != null ? title : "Home" });
|
|
842
1914
|
};
|
|
843
1915
|
// Annotate the CommonJS export names for ESM import in node:
|
|
844
1916
|
0 && (module.exports = {
|
|
@@ -863,8 +1935,10 @@ var Title = ({ title }) => {
|
|
|
863
1935
|
MenuItems,
|
|
864
1936
|
MenuOptions,
|
|
865
1937
|
MenuTitle,
|
|
1938
|
+
MultiSelect,
|
|
866
1939
|
NavOptions,
|
|
867
1940
|
Navbar,
|
|
1941
|
+
Select,
|
|
868
1942
|
SidebarMainContext,
|
|
869
1943
|
SidebarMainContextProvider,
|
|
870
1944
|
SidebarNavigation,
|