@unifiedsoftware/react-components 1.0.11 → 1.0.13
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 +1929 -102
- package/dist/index.d.ts +1929 -102
- package/dist/index.js +91 -1165
- package/dist/index.mjs +67 -1150
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
7
|
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));
|
|
25
8
|
var __export = (target, all) => {
|
|
26
9
|
for (var name in all)
|
|
27
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -68,10 +51,8 @@ __export(src_exports, {
|
|
|
68
51
|
MenuItems: () => MenuItem,
|
|
69
52
|
MenuOptions: () => MenuOptions,
|
|
70
53
|
MenuTitle: () => MenuTitle,
|
|
71
|
-
MultiSelect: () => MultiSelect_default,
|
|
72
54
|
NavOptions: () => NavOptions,
|
|
73
55
|
Navbar: () => Navbar,
|
|
74
|
-
Select: () => Select_default,
|
|
75
56
|
SidebarMainContext: () => SidebarMainContext,
|
|
76
57
|
SidebarMainContextProvider: () => SidebarMainContextProvider,
|
|
77
58
|
SidebarNavigation: () => SidebarNavigation,
|
|
@@ -79,1063 +60,10 @@ __export(src_exports, {
|
|
|
79
60
|
});
|
|
80
61
|
module.exports = __toCommonJS(src_exports);
|
|
81
62
|
|
|
82
|
-
//
|
|
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
|
|
63
|
+
// src/components/DropdownEnumList.tsx
|
|
595
64
|
var import_kendo_react_dropdowns = require("@progress/kendo-react-dropdowns");
|
|
596
65
|
var import_react = require("react");
|
|
597
66
|
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");
|
|
1139
67
|
function parsearDataForComboBox(array, key, text, itemAll = false) {
|
|
1140
68
|
const dataForComboBox = [];
|
|
1141
69
|
if (itemAll)
|
|
@@ -1170,16 +98,16 @@ function EnumToArray(typeEnum, replaceGuionForSpace = true, description) {
|
|
|
1170
98
|
return values;
|
|
1171
99
|
}
|
|
1172
100
|
var DropEnumList = ({ dataEnum, description, onChange, width, defaultValue }) => {
|
|
1173
|
-
const [
|
|
1174
|
-
const [data, setData] = (0,
|
|
1175
|
-
(0,
|
|
101
|
+
const [value, setValue] = (0, import_react.useState)("");
|
|
102
|
+
const [data, setData] = (0, import_react.useState)([]);
|
|
103
|
+
(0, import_react.useEffect)(() => {
|
|
1176
104
|
setData(
|
|
1177
105
|
parsearDataForComboBox(EnumToArray(dataEnum, true, description), "value", "label", false).sort(
|
|
1178
106
|
(a, b) => Number(a.key) - Number(b.key)
|
|
1179
107
|
)
|
|
1180
108
|
);
|
|
1181
109
|
}, []);
|
|
1182
|
-
(0,
|
|
110
|
+
(0, import_react.useEffect)(() => {
|
|
1183
111
|
if (data.length > 0) {
|
|
1184
112
|
setValue(data.filter((x) => x.key == defaultValue)[0]);
|
|
1185
113
|
}
|
|
@@ -1188,8 +116,8 @@ var DropEnumList = ({ dataEnum, description, onChange, width, defaultValue }) =>
|
|
|
1188
116
|
onChange(e);
|
|
1189
117
|
setValue(e);
|
|
1190
118
|
};
|
|
1191
|
-
return /* @__PURE__ */ (0,
|
|
1192
|
-
|
|
119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
120
|
+
import_kendo_react_dropdowns.DropDownList,
|
|
1193
121
|
{
|
|
1194
122
|
className: "d-inline-block align-middle mr-2",
|
|
1195
123
|
data,
|
|
@@ -1203,23 +131,23 @@ var DropEnumList = ({ dataEnum, description, onChange, width, defaultValue }) =>
|
|
|
1203
131
|
style: {
|
|
1204
132
|
width: `${width}px`
|
|
1205
133
|
},
|
|
1206
|
-
defaultValue:
|
|
134
|
+
defaultValue: value
|
|
1207
135
|
}
|
|
1208
136
|
) });
|
|
1209
137
|
};
|
|
1210
138
|
|
|
1211
139
|
// src/contexts/BreadCrumbContext.tsx
|
|
1212
140
|
var import_react_ui = require("@unifiedsoftware/react-ui");
|
|
1213
|
-
var
|
|
1214
|
-
var
|
|
1215
|
-
var BreadCrumbContext = (0,
|
|
141
|
+
var import_react2 = require("react");
|
|
142
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
143
|
+
var BreadCrumbContext = (0, import_react2.createContext)({});
|
|
1216
144
|
var BreadCrumbContextProvider = ({ children }) => {
|
|
1217
145
|
const [active, setActive] = (0, import_react_ui.useLocalStorage)("@active", "");
|
|
1218
146
|
const [path, setPath] = (0, import_react_ui.useLocalStorage)("@path", "/");
|
|
1219
147
|
const [goBack, setGoBack] = (0, import_react_ui.useLocalStorage)("@goBack", false);
|
|
1220
148
|
const [pathChild, setPathChild] = (0, import_react_ui.useLocalStorage)("@pathChild", "");
|
|
1221
|
-
const [routes, setRoutes] = (0,
|
|
1222
|
-
return /* @__PURE__ */ (0,
|
|
149
|
+
const [routes, setRoutes] = (0, import_react2.useState)([]);
|
|
150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1223
151
|
BreadCrumbContext.Provider,
|
|
1224
152
|
{
|
|
1225
153
|
value: {
|
|
@@ -1240,51 +168,51 @@ var BreadCrumbContextProvider = ({ children }) => {
|
|
|
1240
168
|
};
|
|
1241
169
|
|
|
1242
170
|
// src/contexts/DrawerContext.tsx
|
|
1243
|
-
var
|
|
1244
|
-
var
|
|
1245
|
-
var DrawerContext = (0,
|
|
171
|
+
var import_react3 = require("react");
|
|
172
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
173
|
+
var DrawerContext = (0, import_react3.createContext)({});
|
|
1246
174
|
var DrawerContextProvider = ({ children }) => {
|
|
1247
|
-
const [active, setActive] = (0,
|
|
1248
|
-
return /* @__PURE__ */ (0,
|
|
175
|
+
const [active, setActive] = (0, import_react3.useState)(false);
|
|
176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DrawerContext.Provider, { value: { active, setActive }, children });
|
|
1249
177
|
};
|
|
1250
178
|
|
|
1251
179
|
// src/contexts/HistoryContext.tsx
|
|
1252
180
|
var import_react_ui2 = require("@unifiedsoftware/react-ui");
|
|
1253
|
-
var
|
|
1254
|
-
var
|
|
1255
|
-
var HistoryContext = (0,
|
|
181
|
+
var import_react4 = require("react");
|
|
182
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
183
|
+
var HistoryContext = (0, import_react4.createContext)({});
|
|
1256
184
|
var HistoryContextProvider = ({ children }) => {
|
|
1257
185
|
const [list, setList] = (0, import_react_ui2.useLocalStorage)("@list_paths", []);
|
|
1258
|
-
const updateList = (
|
|
186
|
+
const updateList = (value) => {
|
|
1259
187
|
setList(
|
|
1260
188
|
(prev) => prev.concat({
|
|
1261
|
-
path:
|
|
1262
|
-
name:
|
|
189
|
+
path: value.path,
|
|
190
|
+
name: value.name,
|
|
1263
191
|
date: /* @__PURE__ */ new Date()
|
|
1264
192
|
})
|
|
1265
193
|
);
|
|
1266
194
|
};
|
|
1267
|
-
return /* @__PURE__ */ (0,
|
|
195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(HistoryContext.Provider, { value: { list, updateList }, children });
|
|
1268
196
|
};
|
|
1269
197
|
|
|
1270
198
|
// src/contexts/SidebarMainContext.tsx
|
|
1271
|
-
var
|
|
1272
|
-
var
|
|
1273
|
-
var SidebarMainContext = (0,
|
|
199
|
+
var import_react5 = require("react");
|
|
200
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
201
|
+
var SidebarMainContext = (0, import_react5.createContext)({});
|
|
1274
202
|
var SidebarMainContextProvider = ({ children }) => {
|
|
1275
|
-
const [open, setOpen] = (0,
|
|
1276
|
-
return /* @__PURE__ */ (0,
|
|
203
|
+
const [open, setOpen] = (0, import_react5.useState)(true);
|
|
204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SidebarMainContext.Provider, { value: { open, setOpen }, children });
|
|
1277
205
|
};
|
|
1278
206
|
|
|
1279
207
|
// src/contexts/GlobalProvider.tsx
|
|
1280
|
-
var
|
|
208
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1281
209
|
function GlobalProvider({ children }) {
|
|
1282
|
-
return /* @__PURE__ */ (0,
|
|
210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(HistoryContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(BreadCrumbContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SidebarMainContextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DrawerContextProvider, { children }) }) }) });
|
|
1283
211
|
}
|
|
1284
212
|
|
|
1285
213
|
// src/layout/AppBreadcrumb.tsx
|
|
1286
214
|
var import_react_router3 = require("@unifiedsoftware/react-router");
|
|
1287
|
-
var
|
|
215
|
+
var import_react6 = require("react");
|
|
1288
216
|
var import_md = require("react-icons/md");
|
|
1289
217
|
var import_vsc = require("react-icons/vsc");
|
|
1290
218
|
|
|
@@ -1711,46 +639,46 @@ var CloseIcon = import_styled_components6.default.button`
|
|
|
1711
639
|
`;
|
|
1712
640
|
|
|
1713
641
|
// src/layout/AppBreadcrumb.tsx
|
|
1714
|
-
var
|
|
642
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1715
643
|
var AppBreadCrumb = ({ title, paths }) => {
|
|
1716
|
-
const { setRoutes } = (0,
|
|
1717
|
-
(0,
|
|
644
|
+
const { setRoutes } = (0, import_react6.useContext)(BreadCrumbContext);
|
|
645
|
+
(0, import_react6.useEffect)(() => {
|
|
1718
646
|
if (!(paths == null ? void 0 : paths.length))
|
|
1719
647
|
return;
|
|
1720
648
|
setRoutes(paths != null ? paths : []);
|
|
1721
649
|
}, []);
|
|
1722
|
-
return /* @__PURE__ */ (0,
|
|
650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(BreadCrumbTitle, { children: title != null ? title : "Home" });
|
|
1723
651
|
};
|
|
1724
652
|
var AppBreadCrumbNav = ({ paths }) => {
|
|
1725
653
|
const router = (0, import_react_router3.useRouter)();
|
|
1726
|
-
const { active, path, routes, setRoutes } = (0,
|
|
1727
|
-
const { updateList } = (0,
|
|
1728
|
-
(0,
|
|
654
|
+
const { active, path, routes, setRoutes } = (0, import_react6.useContext)(BreadCrumbContext);
|
|
655
|
+
const { updateList } = (0, import_react6.useContext)(HistoryContext);
|
|
656
|
+
(0, import_react6.useEffect)(() => {
|
|
1729
657
|
updateList({ name: active, path });
|
|
1730
658
|
}, [path, active]);
|
|
1731
|
-
(0,
|
|
659
|
+
(0, import_react6.useEffect)(() => {
|
|
1732
660
|
setRoutes(paths != null ? paths : []);
|
|
1733
661
|
}, [paths]);
|
|
1734
|
-
return /* @__PURE__ */ (0,
|
|
1735
|
-
/* @__PURE__ */ (0,
|
|
1736
|
-
/* @__PURE__ */ (0,
|
|
1737
|
-
routes.length > 0 && /* @__PURE__ */ (0,
|
|
662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Breadcrumb, { children: [
|
|
663
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "d-flex align-items-center", children: [
|
|
664
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_router3.Link, { href: "/", className: "link", children: "HOME" }),
|
|
665
|
+
routes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_vsc.VscChevronRight, { color: "black" }),
|
|
1738
666
|
routes.length > 0 ? routes.map((i, idx, arr) => {
|
|
1739
667
|
if (i.route === -1) {
|
|
1740
|
-
return /* @__PURE__ */ (0,
|
|
668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "link", onClick: () => router.back(), children: [
|
|
1741
669
|
i.title,
|
|
1742
670
|
" ",
|
|
1743
|
-
idx + 1 === arr.length ? "" : /* @__PURE__ */ (0,
|
|
671
|
+
idx + 1 === arr.length ? "" : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_vsc.VscChevronRight, { color: "black" })
|
|
1744
672
|
] }, idx);
|
|
1745
673
|
}
|
|
1746
|
-
return /* @__PURE__ */ (0,
|
|
674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_router3.Link, { href: i.route, className: "link", children: [
|
|
1747
675
|
i.title,
|
|
1748
676
|
" ",
|
|
1749
|
-
idx + 1 === arr.length ? "" : /* @__PURE__ */ (0,
|
|
677
|
+
idx + 1 === arr.length ? "" : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_vsc.VscChevronRight, { color: "black" })
|
|
1750
678
|
] }, idx);
|
|
1751
679
|
}) : ""
|
|
1752
680
|
] }),
|
|
1753
|
-
/* @__PURE__ */ (0,
|
|
681
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1754
682
|
CloseIcon,
|
|
1755
683
|
{
|
|
1756
684
|
onClick: () => {
|
|
@@ -1761,21 +689,21 @@ var AppBreadCrumbNav = ({ paths }) => {
|
|
|
1761
689
|
}
|
|
1762
690
|
router.push(`${routes && routes[(routes == null ? void 0 : routes.length) - 2].route}`);
|
|
1763
691
|
},
|
|
1764
|
-
children: /* @__PURE__ */ (0,
|
|
692
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_md.MdClose, { fontSize: 20 })
|
|
1765
693
|
}
|
|
1766
694
|
)
|
|
1767
695
|
] });
|
|
1768
696
|
};
|
|
1769
697
|
|
|
1770
698
|
// src/layout/AppLoader.tsx
|
|
1771
|
-
var
|
|
699
|
+
var import_react7 = require("react");
|
|
1772
700
|
var import_react_dom = __toESM(require("react-dom"));
|
|
1773
|
-
var
|
|
701
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1774
702
|
var LoaderGrid = () => {
|
|
1775
|
-
const Loader = /* @__PURE__ */ (0,
|
|
1776
|
-
/* @__PURE__ */ (0,
|
|
1777
|
-
/* @__PURE__ */ (0,
|
|
1778
|
-
/* @__PURE__ */ (0,
|
|
703
|
+
const Loader = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "k-loading-mask", children: [
|
|
704
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "k-loading-text", children: "Loading" }),
|
|
705
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "k-loading-image" }),
|
|
706
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "k-loading-color" })
|
|
1779
707
|
] });
|
|
1780
708
|
const gridContent = document && document.querySelector(".k-grid-content");
|
|
1781
709
|
const reportContent = document && document.querySelector(".loading-report");
|
|
@@ -1784,12 +712,12 @@ var LoaderGrid = () => {
|
|
|
1784
712
|
var AppLoader = (props) => {
|
|
1785
713
|
const { type = "grid", parent, minDuration } = props;
|
|
1786
714
|
const parentEl = type === "grid" ? document.querySelector(parent != null ? parent : ".k-grid-container") : parent ? document.querySelector(parent) : null;
|
|
1787
|
-
const Loading = /* @__PURE__ */ (0,
|
|
1788
|
-
/* @__PURE__ */ (0,
|
|
1789
|
-
/* @__PURE__ */ (0,
|
|
1790
|
-
/* @__PURE__ */ (0,
|
|
715
|
+
const Loading = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: `${type}-loading k-loading-mask`, children: [
|
|
716
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "k-loading-text", children: "Loading" }),
|
|
717
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "k-loading-image" }),
|
|
718
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "k-loading-color" })
|
|
1791
719
|
] });
|
|
1792
|
-
(0,
|
|
720
|
+
(0, import_react7.useEffect)(() => {
|
|
1793
721
|
if (type === "button") {
|
|
1794
722
|
const loadingEl = document.createElement("div");
|
|
1795
723
|
loadingEl.className = "icon button-loading k-loading-mask";
|
|
@@ -1828,7 +756,7 @@ var AppLoader = (props) => {
|
|
|
1828
756
|
var import_react_bootstrap = require("react-bootstrap");
|
|
1829
757
|
var import_bs = require("react-icons/bs");
|
|
1830
758
|
var import_fi = require("react-icons/fi");
|
|
1831
|
-
var
|
|
759
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1832
760
|
var NavOptions = ({
|
|
1833
761
|
exportExcel,
|
|
1834
762
|
customButtons,
|
|
@@ -1838,27 +766,27 @@ var NavOptions = ({
|
|
|
1838
766
|
onClear,
|
|
1839
767
|
onExpandScreen
|
|
1840
768
|
}) => {
|
|
1841
|
-
return /* @__PURE__ */ (0,
|
|
1842
|
-
onCreate && /* @__PURE__ */ (0,
|
|
1843
|
-
/* @__PURE__ */ (0,
|
|
769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(MenuOptions, { children: [
|
|
770
|
+
onCreate && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "button-option", onClick: onCreate, children: [
|
|
771
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_fi.FiPlusSquare, { className: "icon" }),
|
|
1844
772
|
" ",
|
|
1845
|
-
/* @__PURE__ */ (0,
|
|
773
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text", children: "New" })
|
|
1846
774
|
] }),
|
|
1847
|
-
onRefresh && /* @__PURE__ */ (0,
|
|
1848
|
-
/* @__PURE__ */ (0,
|
|
775
|
+
onRefresh && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "button-option", onClick: onRefresh, children: [
|
|
776
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_fi.FiRefreshCcw, { className: "icon" }),
|
|
1849
777
|
" ",
|
|
1850
|
-
/* @__PURE__ */ (0,
|
|
778
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text", children: "Refresh" })
|
|
1851
779
|
] }),
|
|
1852
|
-
exportExcel && exportExcel.length > 0 && /* @__PURE__ */ (0,
|
|
1853
|
-
/* @__PURE__ */ (0,
|
|
780
|
+
exportExcel && exportExcel.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_bootstrap.Dropdown, { className: "button-option", children: [
|
|
781
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1854
782
|
import_react_bootstrap.Dropdown.Toggle,
|
|
1855
783
|
{
|
|
1856
784
|
id: "btnExport",
|
|
1857
785
|
className: "p-2 bg-light text-dark border-0 font-weight-bold",
|
|
1858
786
|
title: "Export to Excel",
|
|
1859
787
|
children: [
|
|
1860
|
-
/* @__PURE__ */ (0,
|
|
1861
|
-
/* @__PURE__ */ (0,
|
|
788
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_fi.FiSave, { className: "icon" }),
|
|
789
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1862
790
|
"span",
|
|
1863
791
|
{
|
|
1864
792
|
style: {
|
|
@@ -1872,45 +800,45 @@ var NavOptions = ({
|
|
|
1872
800
|
]
|
|
1873
801
|
}
|
|
1874
802
|
),
|
|
1875
|
-
/* @__PURE__ */ (0,
|
|
1876
|
-
return /* @__PURE__ */ (0,
|
|
1877
|
-
/* @__PURE__ */ (0,
|
|
803
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_bootstrap.Dropdown.Menu, { children: exportExcel.map((item, index) => {
|
|
804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_bootstrap.Dropdown.Item, { onClick: item.onAction, children: [
|
|
805
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("i", { className: `${item.classNameIcon} mr-2` }),
|
|
1878
806
|
" ",
|
|
1879
807
|
item.title
|
|
1880
808
|
] }, index);
|
|
1881
809
|
}) })
|
|
1882
810
|
] }),
|
|
1883
|
-
onSelect && /* @__PURE__ */ (0,
|
|
1884
|
-
/* @__PURE__ */ (0,
|
|
811
|
+
onSelect && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "button-option", onClick: onSelect, children: [
|
|
812
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_fi.FiCheckCircle, { className: "icon" }),
|
|
1885
813
|
" ",
|
|
1886
|
-
/* @__PURE__ */ (0,
|
|
814
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text", children: "Select All" })
|
|
1887
815
|
] }),
|
|
1888
|
-
onClear && /* @__PURE__ */ (0,
|
|
1889
|
-
/* @__PURE__ */ (0,
|
|
816
|
+
onClear && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "button-option", onClick: onClear, children: [
|
|
817
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_fi.FiFilter, { className: "icon" }),
|
|
1890
818
|
" ",
|
|
1891
|
-
/* @__PURE__ */ (0,
|
|
819
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text", children: "Clear Filters" })
|
|
1892
820
|
] }),
|
|
1893
|
-
onExpandScreen && /* @__PURE__ */ (0,
|
|
1894
|
-
/* @__PURE__ */ (0,
|
|
821
|
+
onExpandScreen && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "button-option", onClick: onExpandScreen, children: [
|
|
822
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_bs.BsArrowsFullscreen, { className: "icon" }),
|
|
1895
823
|
" ",
|
|
1896
|
-
/* @__PURE__ */ (0,
|
|
824
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text", children: "Full Page" })
|
|
1897
825
|
] }),
|
|
1898
826
|
customButtons == null ? void 0 : customButtons.map((custom, index) => {
|
|
1899
827
|
if (custom.render) {
|
|
1900
828
|
return custom.render;
|
|
1901
829
|
}
|
|
1902
|
-
return /* @__PURE__ */ (0,
|
|
1903
|
-
custom.Icon !== void 0 && /* @__PURE__ */ (0,
|
|
1904
|
-
/* @__PURE__ */ (0,
|
|
830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("button", { className: "button-option", onClick: custom.onAction, children: [
|
|
831
|
+
custom.Icon !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(custom.Icon, { className: "icon" }),
|
|
832
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text", children: custom.title })
|
|
1905
833
|
] }, index);
|
|
1906
834
|
})
|
|
1907
835
|
] });
|
|
1908
836
|
};
|
|
1909
837
|
|
|
1910
838
|
// src/layout/title.tsx
|
|
1911
|
-
var
|
|
839
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1912
840
|
var Title = ({ title }) => {
|
|
1913
|
-
return /* @__PURE__ */ (0,
|
|
841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TitlePage, { children: title != null ? title : "Home" });
|
|
1914
842
|
};
|
|
1915
843
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1916
844
|
0 && (module.exports = {
|
|
@@ -1935,10 +863,8 @@ var Title = ({ title }) => {
|
|
|
1935
863
|
MenuItems,
|
|
1936
864
|
MenuOptions,
|
|
1937
865
|
MenuTitle,
|
|
1938
|
-
MultiSelect,
|
|
1939
866
|
NavOptions,
|
|
1940
867
|
Navbar,
|
|
1941
|
-
Select,
|
|
1942
868
|
SidebarMainContext,
|
|
1943
869
|
SidebarMainContextProvider,
|
|
1944
870
|
SidebarNavigation,
|