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