@ldmjs/ui 1.0.20 → 1.0.21
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.ts +12 -0
- package/dist/index.js +638 -194
- package/dist/scss/_pager.scss +20 -0
- package/dist/scss/_variables.scss +2 -0
- package/dist/scss/index.scss +1 -0
- package/dist/types/options.d.ts +4 -0
- package/dist/types/pager.d.ts +10 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -44,6 +44,14 @@ export declare function deepValueGetter(obj: Record<string, unknown>, path: stri
|
|
|
44
44
|
*/
|
|
45
45
|
export declare function isObjectEmpty(obj: Record<string, unknown>): boolean;
|
|
46
46
|
|
|
47
|
+
export declare function pluralizeNoun(
|
|
48
|
+
num: string | number,
|
|
49
|
+
one: string,
|
|
50
|
+
two: string,
|
|
51
|
+
five: string,
|
|
52
|
+
printNum: boolean
|
|
53
|
+
): string;
|
|
54
|
+
|
|
47
55
|
declare module '@vue/runtime-core' {
|
|
48
56
|
export interface ComponentCustomProperties {
|
|
49
57
|
$utils: {
|
|
@@ -53,6 +61,7 @@ declare module '@vue/runtime-core' {
|
|
|
53
61
|
delay: typeof delay;
|
|
54
62
|
deepValueGetter: typeof deepValueGetter;
|
|
55
63
|
isObjectEmpty: typeof isObjectEmpty;
|
|
64
|
+
pluralizeNoun: typeof pluralizeNoun;
|
|
56
65
|
};
|
|
57
66
|
$ldmui: {
|
|
58
67
|
options: ldmuiOptions;
|
|
@@ -102,3 +111,6 @@ export {
|
|
|
102
111
|
IIteratorRemovedItem,
|
|
103
112
|
IIteratorSortField
|
|
104
113
|
} from './types/iterator';
|
|
114
|
+
export {
|
|
115
|
+
IPagerOptions
|
|
116
|
+
} from './types/pager';
|
package/dist/index.js
CHANGED
|
@@ -253,7 +253,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
253
253
|
ValidateMixin: () => (/* reexport */ ValidateMixin),
|
|
254
254
|
ValidateMixinOptions: () => (/* reexport */ ValidateMixinOptions),
|
|
255
255
|
awaiting: () => (/* reexport */ awaiting),
|
|
256
|
-
datetime: () => (/* reexport */ datetime),
|
|
257
256
|
deepValueGetter: () => (/* reexport */ deepValueGetter),
|
|
258
257
|
"default": () => (/* binding */ src),
|
|
259
258
|
defaults: () => (/* reexport */ defaults),
|
|
@@ -261,6 +260,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
261
260
|
getAliases: () => (/* reexport */ getAliases),
|
|
262
261
|
isDefined: () => (/* reexport */ isDefined),
|
|
263
262
|
isObjectEmpty: () => (/* reexport */ isObjectEmpty),
|
|
263
|
+
pluralizeNoun: () => (/* reexport */ pluralizeNoun),
|
|
264
264
|
uidGen: () => (/* reexport */ uidGen),
|
|
265
265
|
urlRegexp: () => (/* reexport */ urlRegexp)
|
|
266
266
|
});
|
|
@@ -270,11 +270,11 @@ var src_utils_namespaceObject = {};
|
|
|
270
270
|
__webpack_require__.r(src_utils_namespaceObject);
|
|
271
271
|
__webpack_require__.d(src_utils_namespaceObject, {
|
|
272
272
|
awaiting: () => (awaiting),
|
|
273
|
-
datetime: () => (datetime),
|
|
274
273
|
deepValueGetter: () => (deepValueGetter),
|
|
275
274
|
delay: () => (delay),
|
|
276
275
|
isDefined: () => (isDefined),
|
|
277
276
|
isObjectEmpty: () => (isObjectEmpty),
|
|
277
|
+
pluralizeNoun: () => (pluralizeNoun),
|
|
278
278
|
uidGen: () => (uidGen),
|
|
279
279
|
urlRegexp: () => (urlRegexp)
|
|
280
280
|
});
|
|
@@ -368,7 +368,7 @@ var ld_iconvue_type_script_lang_js_external_metadata = (undefined && undefined._
|
|
|
368
368
|
|
|
369
369
|
|
|
370
370
|
|
|
371
|
-
let
|
|
371
|
+
let IconComponent = class IconComponent extends external_vue_class_component_.Vue {
|
|
372
372
|
constructor() {
|
|
373
373
|
super(...arguments);
|
|
374
374
|
this.current = '';
|
|
@@ -412,41 +412,41 @@ let IconButtonComponent = class IconButtonComponent extends external_vue_class_c
|
|
|
412
412
|
ld_iconvue_type_script_lang_js_external_decorate([
|
|
413
413
|
(0,external_vue_property_decorator_.Prop)({ default: () => ({ icons: [] }) }),
|
|
414
414
|
ld_iconvue_type_script_lang_js_external_metadata("design:type", Object)
|
|
415
|
-
],
|
|
415
|
+
], IconComponent.prototype, "map", void 0);
|
|
416
416
|
ld_iconvue_type_script_lang_js_external_decorate([
|
|
417
417
|
(0,external_vue_property_decorator_.Prop)({ default: 'icons' }),
|
|
418
418
|
ld_iconvue_type_script_lang_js_external_metadata("design:type", String)
|
|
419
|
-
],
|
|
419
|
+
], IconComponent.prototype, "path", void 0);
|
|
420
420
|
ld_iconvue_type_script_lang_js_external_decorate([
|
|
421
421
|
(0,external_vue_property_decorator_.Prop)(),
|
|
422
422
|
ld_iconvue_type_script_lang_js_external_metadata("design:type", String)
|
|
423
|
-
],
|
|
423
|
+
], IconComponent.prototype, "icon", void 0);
|
|
424
424
|
ld_iconvue_type_script_lang_js_external_decorate([
|
|
425
425
|
(0,external_vue_property_decorator_.Prop)(),
|
|
426
426
|
ld_iconvue_type_script_lang_js_external_metadata("design:type", String)
|
|
427
|
-
],
|
|
427
|
+
], IconComponent.prototype, "color", void 0);
|
|
428
428
|
ld_iconvue_type_script_lang_js_external_decorate([
|
|
429
429
|
(0,external_vue_property_decorator_.Prop)({ default: '24' }),
|
|
430
430
|
ld_iconvue_type_script_lang_js_external_metadata("design:type", String)
|
|
431
|
-
],
|
|
431
|
+
], IconComponent.prototype, "width", void 0);
|
|
432
432
|
ld_iconvue_type_script_lang_js_external_decorate([
|
|
433
433
|
(0,external_vue_property_decorator_.Prop)({ default: '24' }),
|
|
434
434
|
ld_iconvue_type_script_lang_js_external_metadata("design:type", String)
|
|
435
|
-
],
|
|
435
|
+
], IconComponent.prototype, "height", void 0);
|
|
436
436
|
ld_iconvue_type_script_lang_js_external_decorate([
|
|
437
437
|
(0,external_vue_property_decorator_.Watch)('icon'),
|
|
438
438
|
ld_iconvue_type_script_lang_js_external_metadata("design:type", Function),
|
|
439
439
|
ld_iconvue_type_script_lang_js_external_metadata("design:paramtypes", []),
|
|
440
440
|
ld_iconvue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
441
|
-
],
|
|
442
|
-
|
|
441
|
+
], IconComponent.prototype, "onIconChange", null);
|
|
442
|
+
IconComponent = ld_iconvue_type_script_lang_js_external_decorate([
|
|
443
443
|
(0,external_vue_class_component_.Options)({
|
|
444
444
|
components: {
|
|
445
445
|
'svg-icon': svg_icon,
|
|
446
446
|
},
|
|
447
447
|
})
|
|
448
|
-
],
|
|
449
|
-
/* harmony default export */ const ld_iconvue_type_script_lang_js_external = (
|
|
448
|
+
], IconComponent);
|
|
449
|
+
/* harmony default export */ const ld_iconvue_type_script_lang_js_external = (IconComponent);
|
|
450
450
|
|
|
451
451
|
;// CONCATENATED MODULE: ./src/ld-icon/ld-icon.ts?vue&type=script&lang=js&external
|
|
452
452
|
|
|
@@ -7366,6 +7366,85 @@ try {
|
|
|
7366
7366
|
// EXTERNAL MODULE: external "./calendar.js"
|
|
7367
7367
|
var external_calendar_js_ = __webpack_require__(4634);
|
|
7368
7368
|
var external_calendar_js_default = /*#__PURE__*/__webpack_require__.n(external_calendar_js_);
|
|
7369
|
+
;// CONCATENATED MODULE: ./src/utils/datetime.ts
|
|
7370
|
+
function dateLocalToISO(value) {
|
|
7371
|
+
const parsed = /^(\d\d?).(\d\d?).(\d\d\d?\d?)$/.exec(value);
|
|
7372
|
+
let year = '';
|
|
7373
|
+
let month = '';
|
|
7374
|
+
let day = '';
|
|
7375
|
+
if (parsed[1]) {
|
|
7376
|
+
day = parsed[1].length === 1 ? '0' + parsed[1] : parsed[1];
|
|
7377
|
+
}
|
|
7378
|
+
if (parsed[2]) {
|
|
7379
|
+
month = parsed[2].length === 1 ? '0' + parsed[2] : parsed[2];
|
|
7380
|
+
}
|
|
7381
|
+
if (parsed[3]) {
|
|
7382
|
+
year = parsed[3];
|
|
7383
|
+
}
|
|
7384
|
+
if (day && month && year) {
|
|
7385
|
+
return `${year}-${month}-${day}`;
|
|
7386
|
+
}
|
|
7387
|
+
return '';
|
|
7388
|
+
}
|
|
7389
|
+
/**
|
|
7390
|
+
* Преобразует дату к формату yyyy-MM-ddThh:mm:ss+hh:mm (например, 2020-11-24T12:47:45+03:00)
|
|
7391
|
+
* @param dt Date
|
|
7392
|
+
*/
|
|
7393
|
+
function toServerString(dt) {
|
|
7394
|
+
if (!dt) {
|
|
7395
|
+
return null;
|
|
7396
|
+
}
|
|
7397
|
+
const tzo = -dt.getTimezoneOffset();
|
|
7398
|
+
const dif = tzo >= 0 ? '+' : '-';
|
|
7399
|
+
const pad = function (num) {
|
|
7400
|
+
const norm = Math.abs(Math.floor(num));
|
|
7401
|
+
return (norm < 10 ? '0' : '') + norm;
|
|
7402
|
+
};
|
|
7403
|
+
return `${dt.getFullYear()}-${pad(dt.getMonth() + 1)}-${pad(dt.getDate())}T${pad(dt.getHours())}:${pad(dt.getMinutes())}:${pad(dt.getSeconds())}${dif}${pad(tzo / 60)}:${pad(tzo % 60)}`;
|
|
7404
|
+
}
|
|
7405
|
+
function convert(d) {
|
|
7406
|
+
// Converts the date in d to a date-object. The input can be:
|
|
7407
|
+
// a date object : returned without modification
|
|
7408
|
+
// an array : Interpreted as [year,month,day]. NOTE: month is 0-11.
|
|
7409
|
+
// a number : Interpreted as number of milliseconds
|
|
7410
|
+
// since 1 Jan 1970 (a timestamp)
|
|
7411
|
+
// a string : Any format supported by the javascript engine, like
|
|
7412
|
+
// "YYYY/MM/DD", "MM/DD/YYYY", "Jan 31 2009" etc.
|
|
7413
|
+
// an object : Interpreted as an object with year, month and date
|
|
7414
|
+
// attributes. **NOTE** month is 0-11.
|
|
7415
|
+
if (d instanceof Date) {
|
|
7416
|
+
return d;
|
|
7417
|
+
}
|
|
7418
|
+
if (Array.isArray(d)) {
|
|
7419
|
+
return new Date(d[0], d[1], d[2]);
|
|
7420
|
+
}
|
|
7421
|
+
if (typeof d === 'number' || typeof d === 'string') {
|
|
7422
|
+
return new Date(d);
|
|
7423
|
+
}
|
|
7424
|
+
if (typeof d === 'object' && 'year' in d && 'month' in d && 'date' in d) {
|
|
7425
|
+
return new Date(d.year, d.month, d.date, d.hours, d.minutes, d.seconds, d.ms);
|
|
7426
|
+
}
|
|
7427
|
+
return d;
|
|
7428
|
+
}
|
|
7429
|
+
function compare(a, b) {
|
|
7430
|
+
// Compare two dates (could be of any type supported by the convert
|
|
7431
|
+
// function above) and returns:
|
|
7432
|
+
// -1 : if a < b
|
|
7433
|
+
// 0 : if a = b
|
|
7434
|
+
// 1 : if a > b
|
|
7435
|
+
// NaN : if a or b is an illegal date
|
|
7436
|
+
// NOTE: The code inside isFinite does an assignment (=).
|
|
7437
|
+
const a1 = a ? convert(a).valueOf() : 0;
|
|
7438
|
+
const b1 = b ? convert(b).valueOf() : 0;
|
|
7439
|
+
return isFinite(a1) && isFinite(b1) ? Number(a1 > b1) - Number(a1 < b1) : NaN;
|
|
7440
|
+
}
|
|
7441
|
+
const datetime = {
|
|
7442
|
+
dateLocalToISO,
|
|
7443
|
+
toServerString,
|
|
7444
|
+
compare
|
|
7445
|
+
};
|
|
7446
|
+
|
|
7447
|
+
|
|
7369
7448
|
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-datepicker/ld-datepicker.ts?vue&type=script&lang=js&external
|
|
7370
7449
|
var ld_datepickervue_type_script_lang_js_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
7371
7450
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -7386,6 +7465,7 @@ var ld_datepickervue_type_script_lang_js_external_a, ld_datepickervue_type_scrip
|
|
|
7386
7465
|
|
|
7387
7466
|
|
|
7388
7467
|
|
|
7468
|
+
|
|
7389
7469
|
/**
|
|
7390
7470
|
* @displayName ld-datepicker
|
|
7391
7471
|
*/
|
|
@@ -7429,7 +7509,7 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7429
7509
|
}
|
|
7430
7510
|
else {
|
|
7431
7511
|
this.date = new Date(newVal);
|
|
7432
|
-
this.dateString =
|
|
7512
|
+
this.dateString = datetime.dateLocalToISO(this.date.toLocaleDateString(this.locale));
|
|
7433
7513
|
}
|
|
7434
7514
|
if (this.date) {
|
|
7435
7515
|
const inputEl = this.$refs.inputDate;
|
|
@@ -7663,7 +7743,7 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7663
7743
|
if (this.timeString) {
|
|
7664
7744
|
d = this.addTimeToDate(d);
|
|
7665
7745
|
}
|
|
7666
|
-
const dt =
|
|
7746
|
+
const dt = datetime.dateLocalToISO(d.toLocaleDateString(this.locale));
|
|
7667
7747
|
this.onSelectDate(dt);
|
|
7668
7748
|
}
|
|
7669
7749
|
}
|
|
@@ -7740,7 +7820,7 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7740
7820
|
* dateString сбросим к текущей дате, чтобы календарь переключился на нее
|
|
7741
7821
|
* date ставим null, чтобы обнулить модель
|
|
7742
7822
|
*/
|
|
7743
|
-
this.dateString =
|
|
7823
|
+
this.dateString = datetime.dateLocalToISO(new Date().toLocaleDateString(this.locale));
|
|
7744
7824
|
this.date = null;
|
|
7745
7825
|
this.emitUpdateModelValue(null);
|
|
7746
7826
|
this.validate();
|
|
@@ -7841,7 +7921,7 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
7841
7921
|
this.emitUpdateModelValue(value);
|
|
7842
7922
|
}
|
|
7843
7923
|
else {
|
|
7844
|
-
this.emitUpdateModelValue(
|
|
7924
|
+
this.emitUpdateModelValue(datetime.toServerString(value));
|
|
7845
7925
|
}
|
|
7846
7926
|
}
|
|
7847
7927
|
}
|
|
@@ -11575,11 +11655,14 @@ function ld_select_list_box_reg(vue, options) {
|
|
|
11575
11655
|
}
|
|
11576
11656
|
/* harmony default export */ const src_ld_select_list_box = (ld_select_list_box_reg);
|
|
11577
11657
|
|
|
11578
|
-
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-checkbox/ld-checkbox.vue?vue&type=template&id=
|
|
11658
|
+
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-checkbox/ld-checkbox.vue?vue&type=template&id=068cc5f6&ts=true
|
|
11579
11659
|
|
|
11580
|
-
const
|
|
11581
|
-
|
|
11582
|
-
|
|
11660
|
+
const ld_checkboxvue_type_template_id_068cc5f6_ts_true_hoisted_1 = {
|
|
11661
|
+
class: "d-flex align-center",
|
|
11662
|
+
style: { "position": "relative" }
|
|
11663
|
+
};
|
|
11664
|
+
const ld_checkboxvue_type_template_id_068cc5f6_ts_true_hoisted_2 = ["checked", "data-testid", "tabindex", "disabled"];
|
|
11665
|
+
const ld_checkboxvue_type_template_id_068cc5f6_ts_true_hoisted_3 = /*#__PURE__*/ (0,external_vue_.createElementVNode)("i", { class: "v-icon" }, [
|
|
11583
11666
|
/*#__PURE__*/ (0,external_vue_.createElementVNode)("svg", {
|
|
11584
11667
|
width: "14",
|
|
11585
11668
|
height: "15",
|
|
@@ -11596,7 +11679,7 @@ const ld_checkboxvue_type_template_id_3c187dcd_ts_true_hoisted_3 = /*#__PURE__*/
|
|
|
11596
11679
|
})
|
|
11597
11680
|
])
|
|
11598
11681
|
], -1);
|
|
11599
|
-
function
|
|
11682
|
+
function ld_checkboxvue_type_template_id_068cc5f6_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11600
11683
|
const _component_v_tooltip = (0,external_vue_.resolveComponent)("v-tooltip");
|
|
11601
11684
|
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", {
|
|
11602
11685
|
class: (0,external_vue_.normalizeClass)(["ld-checkbox", { 'ld-checkbox--focused': _ctx.isFocused }])
|
|
@@ -11631,7 +11714,7 @@ function ld_checkboxvue_type_template_id_3c187dcd_ts_true_render(_ctx, _cache, $
|
|
|
11631
11714
|
]))
|
|
11632
11715
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
11633
11716
|
(0,external_vue_.createTextVNode)(),
|
|
11634
|
-
(0,external_vue_.createElementVNode)("label",
|
|
11717
|
+
(0,external_vue_.createElementVNode)("label", ld_checkboxvue_type_template_id_068cc5f6_ts_true_hoisted_1, [
|
|
11635
11718
|
(0,external_vue_.createElementVNode)("input", {
|
|
11636
11719
|
ref: "checkbox",
|
|
11637
11720
|
type: "checkbox",
|
|
@@ -11648,9 +11731,9 @@ function ld_checkboxvue_type_template_id_3c187dcd_ts_true_render(_ctx, _cache, $
|
|
|
11648
11731
|
onInput: _cache[3] || (_cache[3] =
|
|
11649
11732
|
//@ts-ignore
|
|
11650
11733
|
(...args) => (_ctx.onChange && _ctx.onChange(...args)))
|
|
11651
|
-
}, null, 40,
|
|
11734
|
+
}, null, 40, ld_checkboxvue_type_template_id_068cc5f6_ts_true_hoisted_2),
|
|
11652
11735
|
(0,external_vue_.createTextVNode)(),
|
|
11653
|
-
|
|
11736
|
+
ld_checkboxvue_type_template_id_068cc5f6_ts_true_hoisted_3
|
|
11654
11737
|
]),
|
|
11655
11738
|
(0,external_vue_.createTextVNode)(),
|
|
11656
11739
|
(_ctx.label && !_ctx.labelOnLeft)
|
|
@@ -11686,7 +11769,7 @@ function ld_checkboxvue_type_template_id_3c187dcd_ts_true_render(_ctx, _cache, $
|
|
|
11686
11769
|
], 2));
|
|
11687
11770
|
}
|
|
11688
11771
|
|
|
11689
|
-
;// CONCATENATED MODULE: ./src/ld-checkbox/ld-checkbox.vue?vue&type=template&id=
|
|
11772
|
+
;// CONCATENATED MODULE: ./src/ld-checkbox/ld-checkbox.vue?vue&type=template&id=068cc5f6&ts=true
|
|
11690
11773
|
|
|
11691
11774
|
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-checkbox/ld-checkbox.ts?vue&type=script&lang=ts&external
|
|
11692
11775
|
var ld_checkboxvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -11859,7 +11942,7 @@ ld_checkboxvue_type_script_lang_ts_external_decorate([
|
|
|
11859
11942
|
;
|
|
11860
11943
|
|
|
11861
11944
|
|
|
11862
|
-
const ld_checkbox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(CheckboxComponent, [['render',
|
|
11945
|
+
const ld_checkbox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(CheckboxComponent, [['render',ld_checkboxvue_type_template_id_068cc5f6_ts_true_render]])
|
|
11863
11946
|
|
|
11864
11947
|
/* harmony default export */ const ld_checkbox = (ld_checkbox_exports_);
|
|
11865
11948
|
;// CONCATENATED MODULE: ./src/ld-checkbox/index.ts
|
|
@@ -15261,166 +15344,6 @@ function ld_dialogvue_type_template_id_184339ee_ts_true_render(_ctx, _cache, $pr
|
|
|
15261
15344
|
|
|
15262
15345
|
// EXTERNAL MODULE: ./node_modules/@ldmjs/core/dist/index.js
|
|
15263
15346
|
var dist = __webpack_require__(634);
|
|
15264
|
-
;// CONCATENATED MODULE: ./src/utils/awaiting.ts
|
|
15265
|
-
async function awaiting(callback) {
|
|
15266
|
-
let resolveFunc = null;
|
|
15267
|
-
const counter = 0;
|
|
15268
|
-
let timer = null;
|
|
15269
|
-
const promise = new Promise(resolve => {
|
|
15270
|
-
resolveFunc = resolve;
|
|
15271
|
-
});
|
|
15272
|
-
timer = setInterval(() => {
|
|
15273
|
-
const a = callback();
|
|
15274
|
-
if (counter > 100 || Boolean(a)) {
|
|
15275
|
-
clearInterval(timer);
|
|
15276
|
-
resolveFunc(a ?? true);
|
|
15277
|
-
}
|
|
15278
|
-
}, 100);
|
|
15279
|
-
await promise;
|
|
15280
|
-
}
|
|
15281
|
-
|
|
15282
|
-
;// CONCATENATED MODULE: ./src/utils/datetime.ts
|
|
15283
|
-
function dateLocalToISO(value) {
|
|
15284
|
-
const parsed = /^(\d\d?).(\d\d?).(\d\d\d?\d?)$/.exec(value);
|
|
15285
|
-
let year = '';
|
|
15286
|
-
let month = '';
|
|
15287
|
-
let day = '';
|
|
15288
|
-
if (parsed[1]) {
|
|
15289
|
-
day = parsed[1].length === 1 ? '0' + parsed[1] : parsed[1];
|
|
15290
|
-
}
|
|
15291
|
-
if (parsed[2]) {
|
|
15292
|
-
month = parsed[2].length === 1 ? '0' + parsed[2] : parsed[2];
|
|
15293
|
-
}
|
|
15294
|
-
if (parsed[3]) {
|
|
15295
|
-
year = parsed[3];
|
|
15296
|
-
}
|
|
15297
|
-
if (day && month && year) {
|
|
15298
|
-
return `${year}-${month}-${day}`;
|
|
15299
|
-
}
|
|
15300
|
-
return '';
|
|
15301
|
-
}
|
|
15302
|
-
/**
|
|
15303
|
-
* Преобразует дату к формату yyyy-MM-ddThh:mm:ss+hh:mm (например, 2020-11-24T12:47:45+03:00)
|
|
15304
|
-
* @param dt Date
|
|
15305
|
-
*/
|
|
15306
|
-
function toServerString(dt) {
|
|
15307
|
-
if (!dt) {
|
|
15308
|
-
return null;
|
|
15309
|
-
}
|
|
15310
|
-
const tzo = -dt.getTimezoneOffset();
|
|
15311
|
-
const dif = tzo >= 0 ? '+' : '-';
|
|
15312
|
-
const pad = function (num) {
|
|
15313
|
-
const norm = Math.abs(Math.floor(num));
|
|
15314
|
-
return (norm < 10 ? '0' : '') + norm;
|
|
15315
|
-
};
|
|
15316
|
-
return `${dt.getFullYear()}-${pad(dt.getMonth() + 1)}-${pad(dt.getDate())}T${pad(dt.getHours())}:${pad(dt.getMinutes())}:${pad(dt.getSeconds())}${dif}${pad(tzo / 60)}:${pad(tzo % 60)}`;
|
|
15317
|
-
}
|
|
15318
|
-
function convert(d) {
|
|
15319
|
-
// Converts the date in d to a date-object. The input can be:
|
|
15320
|
-
// a date object : returned without modification
|
|
15321
|
-
// an array : Interpreted as [year,month,day]. NOTE: month is 0-11.
|
|
15322
|
-
// a number : Interpreted as number of milliseconds
|
|
15323
|
-
// since 1 Jan 1970 (a timestamp)
|
|
15324
|
-
// a string : Any format supported by the javascript engine, like
|
|
15325
|
-
// "YYYY/MM/DD", "MM/DD/YYYY", "Jan 31 2009" etc.
|
|
15326
|
-
// an object : Interpreted as an object with year, month and date
|
|
15327
|
-
// attributes. **NOTE** month is 0-11.
|
|
15328
|
-
if (d instanceof Date) {
|
|
15329
|
-
return d;
|
|
15330
|
-
}
|
|
15331
|
-
if (Array.isArray(d)) {
|
|
15332
|
-
return new Date(d[0], d[1], d[2]);
|
|
15333
|
-
}
|
|
15334
|
-
if (typeof d === 'number' || typeof d === 'string') {
|
|
15335
|
-
return new Date(d);
|
|
15336
|
-
}
|
|
15337
|
-
if (typeof d === 'object' && 'year' in d && 'month' in d && 'date' in d) {
|
|
15338
|
-
return new Date(d.year, d.month, d.date, d.hours, d.minutes, d.seconds, d.ms);
|
|
15339
|
-
}
|
|
15340
|
-
return d;
|
|
15341
|
-
}
|
|
15342
|
-
function compare(a, b) {
|
|
15343
|
-
// Compare two dates (could be of any type supported by the convert
|
|
15344
|
-
// function above) and returns:
|
|
15345
|
-
// -1 : if a < b
|
|
15346
|
-
// 0 : if a = b
|
|
15347
|
-
// 1 : if a > b
|
|
15348
|
-
// NaN : if a or b is an illegal date
|
|
15349
|
-
// NOTE: The code inside isFinite does an assignment (=).
|
|
15350
|
-
const a1 = a ? convert(a).valueOf() : 0;
|
|
15351
|
-
const b1 = b ? convert(b).valueOf() : 0;
|
|
15352
|
-
return isFinite(a1) && isFinite(b1) ? Number(a1 > b1) - Number(a1 < b1) : NaN;
|
|
15353
|
-
}
|
|
15354
|
-
const datetime = {
|
|
15355
|
-
dateLocalToISO,
|
|
15356
|
-
toServerString,
|
|
15357
|
-
compare
|
|
15358
|
-
};
|
|
15359
|
-
|
|
15360
|
-
|
|
15361
|
-
;// CONCATENATED MODULE: ./src/utils/deepValueGetter.ts
|
|
15362
|
-
/**
|
|
15363
|
-
* Returns a deep object given a string. zoo['animal.type']
|
|
15364
|
-
* @param {object} obj
|
|
15365
|
-
* @param {string} path
|
|
15366
|
-
*/
|
|
15367
|
-
function deepValueGetter(obj, path) {
|
|
15368
|
-
if (obj === null) {
|
|
15369
|
-
return '';
|
|
15370
|
-
}
|
|
15371
|
-
if (!obj || !path) {
|
|
15372
|
-
return obj;
|
|
15373
|
-
}
|
|
15374
|
-
// check if path matches a root-level field
|
|
15375
|
-
// { "a.b.c": 123 }
|
|
15376
|
-
const value = obj[path];
|
|
15377
|
-
// eslint-disable-next-line no-undefined
|
|
15378
|
-
if (value !== undefined) {
|
|
15379
|
-
return value;
|
|
15380
|
-
}
|
|
15381
|
-
let current = obj;
|
|
15382
|
-
const split = path.split('.');
|
|
15383
|
-
if (split.length) {
|
|
15384
|
-
for (const key of split) {
|
|
15385
|
-
current = current[key];
|
|
15386
|
-
// if found undefined, return empty string
|
|
15387
|
-
// eslint-disable-next-line no-undefined
|
|
15388
|
-
if (current === undefined || current === null) {
|
|
15389
|
-
return '';
|
|
15390
|
-
}
|
|
15391
|
-
}
|
|
15392
|
-
}
|
|
15393
|
-
return current;
|
|
15394
|
-
}
|
|
15395
|
-
|
|
15396
|
-
;// CONCATENATED MODULE: ./src/utils/delay.ts
|
|
15397
|
-
async function delay(timeout) {
|
|
15398
|
-
return new Promise(resolve => setTimeout(() => resolve(), timeout));
|
|
15399
|
-
}
|
|
15400
|
-
|
|
15401
|
-
;// CONCATENATED MODULE: ./src/utils/isObjectEmpty.ts
|
|
15402
|
-
function isObjectEmpty(obj) {
|
|
15403
|
-
for (const _i in obj) {
|
|
15404
|
-
return false;
|
|
15405
|
-
}
|
|
15406
|
-
return true;
|
|
15407
|
-
}
|
|
15408
|
-
|
|
15409
|
-
;// CONCATENATED MODULE: ./src/utils/urlRegexp.ts
|
|
15410
|
-
const urlRegexp =
|
|
15411
|
-
// eslint-disable-next-line optimize-regex/optimize-regex
|
|
15412
|
-
/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\\[\]{};:'".,<>?«»“”‘’]))/i;
|
|
15413
|
-
|
|
15414
|
-
;// CONCATENATED MODULE: ./src/utils/index.ts
|
|
15415
|
-
|
|
15416
|
-
|
|
15417
|
-
|
|
15418
|
-
|
|
15419
|
-
|
|
15420
|
-
|
|
15421
|
-
|
|
15422
|
-
|
|
15423
|
-
|
|
15424
15347
|
;// CONCATENATED MODULE: ./src/ld-dialog/dialog.manager.ts
|
|
15425
15348
|
|
|
15426
15349
|
|
|
@@ -18114,9 +18037,522 @@ function ld_data_iterator_reg(vue, options) {
|
|
|
18114
18037
|
}
|
|
18115
18038
|
/* harmony default export */ const src_ld_data_iterator = (ld_data_iterator_reg);
|
|
18116
18039
|
|
|
18040
|
+
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-pager/ld-pager.vue?vue&type=template&id=03c82e7a
|
|
18041
|
+
|
|
18042
|
+
|
|
18043
|
+
const ld_pagervue_type_template_id_03c82e7a_hoisted_1 = /*#__PURE__*/(0,external_vue_.createElementVNode)("svg", {
|
|
18044
|
+
width: "24",
|
|
18045
|
+
height: "24",
|
|
18046
|
+
viewBox: "0 0 24 24",
|
|
18047
|
+
fill: "none",
|
|
18048
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
18049
|
+
}, [
|
|
18050
|
+
/*#__PURE__*/(0,external_vue_.createElementVNode)("path", {
|
|
18051
|
+
"fill-rule": "evenodd",
|
|
18052
|
+
"clip-rule": "evenodd",
|
|
18053
|
+
d: "M8 6C7.44771 6 7 6.44772 7 7V17C7 17.5523 7.44771 18 8 18C8.55228 18 9 17.5523 9 17V7C9 6.44772 8.55228 6 8 6ZM17.7071 16.2929C18.0976 16.6834 18.0976 17.3166 17.7071 17.7071C17.3166 18.0976 16.6834 18.0976 16.2929 17.7071L11.3431 12.7574C10.9526 12.3668 10.9526 11.7337 11.3431 11.3431L16.2929 6.3934C16.6834 6.00287 17.3166 6.00287 17.7071 6.3934C18.0976 6.78392 18.0976 7.41709 17.7071 7.80761L13.4645 12.0503L17.7071 16.2929Z",
|
|
18054
|
+
fill: "currentColor"
|
|
18055
|
+
})
|
|
18056
|
+
], -1)
|
|
18057
|
+
const ld_pagervue_type_template_id_03c82e7a_hoisted_2 = /*#__PURE__*/(0,external_vue_.createElementVNode)("svg", {
|
|
18058
|
+
width: "24",
|
|
18059
|
+
height: "24",
|
|
18060
|
+
viewBox: "0 0 24 24",
|
|
18061
|
+
fill: "none",
|
|
18062
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
18063
|
+
}, [
|
|
18064
|
+
/*#__PURE__*/(0,external_vue_.createElementVNode)("path", {
|
|
18065
|
+
"fill-rule": "evenodd",
|
|
18066
|
+
"clip-rule": "evenodd",
|
|
18067
|
+
d: "M18.4246 13C18.9769 13 19.4246 12.5523 19.4246 12C19.4246 11.4477 18.9769 11 18.4246 11L7.83886 11L11.1317 7.70711C11.5223 7.31658 11.5223 6.68342 11.1317 6.29289C10.7412 5.90237 10.108 5.90237 9.71752 6.29289L4.76777 11.2426C4.37725 11.6332 4.37725 12.2663 4.76777 12.6569L9.71752 17.6066C10.108 17.9971 10.7412 17.9971 11.1317 17.6066C11.5223 17.2161 11.5223 16.5829 11.1317 16.1924L7.93933 13L18.4246 13Z",
|
|
18068
|
+
fill: "currentColor"
|
|
18069
|
+
})
|
|
18070
|
+
], -1)
|
|
18071
|
+
const ld_pagervue_type_template_id_03c82e7a_hoisted_3 = /*#__PURE__*/(0,external_vue_.createElementVNode)("div", null, null, -1)
|
|
18072
|
+
const ld_pagervue_type_template_id_03c82e7a_hoisted_4 = /*#__PURE__*/(0,external_vue_.createElementVNode)("svg", {
|
|
18073
|
+
width: "24",
|
|
18074
|
+
height: "24",
|
|
18075
|
+
viewBox: "0 0 24 24",
|
|
18076
|
+
fill: "none",
|
|
18077
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
18078
|
+
}, [
|
|
18079
|
+
/*#__PURE__*/(0,external_vue_.createElementVNode)("path", {
|
|
18080
|
+
"fill-rule": "evenodd",
|
|
18081
|
+
"clip-rule": "evenodd",
|
|
18082
|
+
d: "M18.4246 13C18.9769 13 19.4246 12.5523 19.4246 12C19.4246 11.4477 18.9769 11 18.4246 11L7.83886 11L11.1317 7.70711C11.5223 7.31658 11.5223 6.68342 11.1317 6.29289C10.7412 5.90237 10.108 5.90237 9.71752 6.29289L4.76777 11.2426C4.37725 11.6332 4.37725 12.2663 4.76777 12.6569L9.71752 17.6066C10.108 17.9971 10.7412 17.9971 11.1317 17.6066C11.5223 17.2161 11.5223 16.5829 11.1317 16.1924L7.93933 13L18.4246 13Z",
|
|
18083
|
+
fill: "currentColor"
|
|
18084
|
+
})
|
|
18085
|
+
], -1)
|
|
18086
|
+
const ld_pagervue_type_template_id_03c82e7a_hoisted_5 = /*#__PURE__*/(0,external_vue_.createElementVNode)("svg", {
|
|
18087
|
+
width: "24",
|
|
18088
|
+
height: "24",
|
|
18089
|
+
viewBox: "0 0 24 24",
|
|
18090
|
+
fill: "none",
|
|
18091
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
18092
|
+
}, [
|
|
18093
|
+
/*#__PURE__*/(0,external_vue_.createElementVNode)("path", {
|
|
18094
|
+
"fill-rule": "evenodd",
|
|
18095
|
+
"clip-rule": "evenodd",
|
|
18096
|
+
d: "M8 6C7.44771 6 7 6.44772 7 7V17C7 17.5523 7.44771 18 8 18C8.55228 18 9 17.5523 9 17V7C9 6.44772 8.55228 6 8 6ZM17.7071 16.2929C18.0976 16.6834 18.0976 17.3166 17.7071 17.7071C17.3166 18.0976 16.6834 18.0976 16.2929 17.7071L11.3431 12.7574C10.9526 12.3668 10.9526 11.7337 11.3431 11.3431L16.2929 6.3934C16.6834 6.00287 17.3166 6.00287 17.7071 6.3934C18.0976 6.78392 18.0976 7.41709 17.7071 7.80761L13.4645 12.0503L17.7071 16.2929Z",
|
|
18097
|
+
fill: "currentColor"
|
|
18098
|
+
})
|
|
18099
|
+
], -1)
|
|
18100
|
+
const ld_pagervue_type_template_id_03c82e7a_hoisted_6 = {
|
|
18101
|
+
key: 2,
|
|
18102
|
+
id: "pager-total-count"
|
|
18103
|
+
}
|
|
18104
|
+
const ld_pagervue_type_template_id_03c82e7a_hoisted_7 = { class: "grey--text" }
|
|
18105
|
+
|
|
18106
|
+
function ld_pagervue_type_template_id_03c82e7a_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
18107
|
+
const _component_square_button = (0,external_vue_.resolveComponent)("square-button")
|
|
18108
|
+
const _component_v_spacer = (0,external_vue_.resolveComponent)("v-spacer")
|
|
18109
|
+
const _directive_active = (0,external_vue_.resolveDirective)("active")
|
|
18110
|
+
|
|
18111
|
+
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", {
|
|
18112
|
+
class: (0,external_vue_.normalizeClass)(["pager", { 'flex-column': _ctx.isMobileGlobal, 'pager--border-top': _ctx.bordered }])
|
|
18113
|
+
}, [
|
|
18114
|
+
(_ctx.toFirst)
|
|
18115
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
18116
|
+
key: 0,
|
|
18117
|
+
icon: "",
|
|
18118
|
+
disabled: !_ctx.canPrevious,
|
|
18119
|
+
onClick: _cache[0] || (_cache[0] = $event => (_ctx.selectPage(1)))
|
|
18120
|
+
}, {
|
|
18121
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
18122
|
+
ld_pagervue_type_template_id_03c82e7a_hoisted_1
|
|
18123
|
+
]),
|
|
18124
|
+
_: 1
|
|
18125
|
+
}, 8, ["disabled"]))
|
|
18126
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
18127
|
+
(0,external_vue_.createTextVNode)(),
|
|
18128
|
+
(0,external_vue_.createVNode)(_component_square_button, {
|
|
18129
|
+
icon: "",
|
|
18130
|
+
disabled: !_ctx.canPrevious,
|
|
18131
|
+
class: (0,external_vue_.normalizeClass)({ 'ml-1': _ctx.toFirst }),
|
|
18132
|
+
onClick: _ctx.prevPage
|
|
18133
|
+
}, {
|
|
18134
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
18135
|
+
ld_pagervue_type_template_id_03c82e7a_hoisted_2
|
|
18136
|
+
]),
|
|
18137
|
+
_: 1
|
|
18138
|
+
}, 8, ["disabled", "class", "onClick"]),
|
|
18139
|
+
(0,external_vue_.createTextVNode)(),
|
|
18140
|
+
((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, (0,external_vue_.renderList)(_ctx.pages, (p) => {
|
|
18141
|
+
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, [
|
|
18142
|
+
(0,external_vue_.withDirectives)(((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
18143
|
+
disabled: _ctx.pageDisabled(p.number),
|
|
18144
|
+
class: "ml-1",
|
|
18145
|
+
onClick: $event => (_ctx.selectPage(p.number))
|
|
18146
|
+
}, {
|
|
18147
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
18148
|
+
(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(p.text), 1)
|
|
18149
|
+
]),
|
|
18150
|
+
_: 2
|
|
18151
|
+
}, 1032, ["disabled", "onClick"])), [
|
|
18152
|
+
[_directive_active, p.number === _ctx.page]
|
|
18153
|
+
]),
|
|
18154
|
+
(0,external_vue_.createTextVNode)(),
|
|
18155
|
+
ld_pagervue_type_template_id_03c82e7a_hoisted_3
|
|
18156
|
+
], 64))
|
|
18157
|
+
}), 256)),
|
|
18158
|
+
(0,external_vue_.createTextVNode)(),
|
|
18159
|
+
(0,external_vue_.createVNode)(_component_square_button, {
|
|
18160
|
+
icon: "",
|
|
18161
|
+
disabled: !_ctx.canNext,
|
|
18162
|
+
class: "ml-1",
|
|
18163
|
+
style: {"transform":"rotate(180deg)"},
|
|
18164
|
+
onClick: _ctx.nextPage
|
|
18165
|
+
}, {
|
|
18166
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
18167
|
+
ld_pagervue_type_template_id_03c82e7a_hoisted_4
|
|
18168
|
+
]),
|
|
18169
|
+
_: 1
|
|
18170
|
+
}, 8, ["disabled", "onClick"]),
|
|
18171
|
+
(0,external_vue_.createTextVNode)(),
|
|
18172
|
+
(_ctx.toLast)
|
|
18173
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
18174
|
+
key: 1,
|
|
18175
|
+
icon: "",
|
|
18176
|
+
disabled: !_ctx.canLast,
|
|
18177
|
+
class: "ml-1",
|
|
18178
|
+
style: {"transform":"rotate(180deg)"},
|
|
18179
|
+
onClick: _cache[1] || (_cache[1] = $event => (_ctx.selectPage(_ctx.totalPages, true)))
|
|
18180
|
+
}, {
|
|
18181
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
18182
|
+
ld_pagervue_type_template_id_03c82e7a_hoisted_5
|
|
18183
|
+
]),
|
|
18184
|
+
_: 1
|
|
18185
|
+
}, 8, ["disabled"]))
|
|
18186
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
18187
|
+
(0,external_vue_.createTextVNode)(),
|
|
18188
|
+
(0,external_vue_.createVNode)(_component_v_spacer),
|
|
18189
|
+
(0,external_vue_.createTextVNode)(),
|
|
18190
|
+
(_ctx.showOnlyTotal)
|
|
18191
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_pagervue_type_template_id_03c82e7a_hoisted_6, [
|
|
18192
|
+
(0,external_vue_.createElementVNode)("span", ld_pagervue_type_template_id_03c82e7a_hoisted_7, (0,external_vue_.toDisplayString)(`Всего ${_ctx._entityName}`), 1)
|
|
18193
|
+
]))
|
|
18194
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
18195
|
+
], 2))
|
|
18196
|
+
}
|
|
18197
|
+
;// CONCATENATED MODULE: ./src/ld-pager/ld-pager.vue?vue&type=template&id=03c82e7a
|
|
18198
|
+
|
|
18199
|
+
;// CONCATENATED MODULE: ./src/utils/pluralizeNoun.ts
|
|
18200
|
+
function pluralizeNoun(num, one, two, five, printNum = true) {
|
|
18201
|
+
if (!num) {
|
|
18202
|
+
return '';
|
|
18203
|
+
}
|
|
18204
|
+
let n;
|
|
18205
|
+
if (typeof num === 'string') {
|
|
18206
|
+
n = Number(num.match(/\d+\.?\d*/g));
|
|
18207
|
+
}
|
|
18208
|
+
else {
|
|
18209
|
+
n = Math.abs(num);
|
|
18210
|
+
}
|
|
18211
|
+
n %= 100;
|
|
18212
|
+
if (n >= 5 && n <= 20) {
|
|
18213
|
+
return printNum ? `${num} ${five}` : `${five}`;
|
|
18214
|
+
}
|
|
18215
|
+
n %= 10;
|
|
18216
|
+
if (n === 1) {
|
|
18217
|
+
return printNum ? `${num} ${one}` : `${one}`;
|
|
18218
|
+
}
|
|
18219
|
+
if (n >= 2 && n <= 4) {
|
|
18220
|
+
return printNum ? `${num} ${two}` : `${two}`;
|
|
18221
|
+
}
|
|
18222
|
+
return printNum ? `${num} ${five}` : `${five}`;
|
|
18223
|
+
}
|
|
18224
|
+
|
|
18225
|
+
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-pager/ld-pager.ts?vue&type=script&lang=js&external
|
|
18226
|
+
var ld_pagervue_type_script_lang_js_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
18227
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
18228
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
18229
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18230
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
18231
|
+
};
|
|
18232
|
+
var ld_pagervue_type_script_lang_js_external_metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
18233
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
18234
|
+
};
|
|
18235
|
+
var ld_pagervue_type_script_lang_js_external_a, ld_pagervue_type_script_lang_js_external_b;
|
|
18236
|
+
|
|
18237
|
+
|
|
18238
|
+
|
|
18239
|
+
|
|
18240
|
+
class PagerComponent extends (0,external_vue_property_decorator_.mixins)(ViewportMixin) {
|
|
18241
|
+
constructor() {
|
|
18242
|
+
super(...arguments);
|
|
18243
|
+
this.pages = [];
|
|
18244
|
+
this.page = 0;
|
|
18245
|
+
this.count = 0;
|
|
18246
|
+
this.size = 10;
|
|
18247
|
+
this.from = 1;
|
|
18248
|
+
this.to = 10;
|
|
18249
|
+
}
|
|
18250
|
+
emitChange(value) {
|
|
18251
|
+
return value;
|
|
18252
|
+
}
|
|
18253
|
+
onLastPageUnknownChanged() {
|
|
18254
|
+
this.pages = this.calcPages();
|
|
18255
|
+
}
|
|
18256
|
+
onOptionsChanged() {
|
|
18257
|
+
let calc = false;
|
|
18258
|
+
if (this.count !== this.options.total) {
|
|
18259
|
+
this.count = this.options.total;
|
|
18260
|
+
calc = true;
|
|
18261
|
+
}
|
|
18262
|
+
if (this.size !== this.options.pageSize) {
|
|
18263
|
+
this.size = this.options.pageSize ? this.options.pageSize : 10;
|
|
18264
|
+
calc = true;
|
|
18265
|
+
}
|
|
18266
|
+
if (this.page !== this.options.page) {
|
|
18267
|
+
if (this.options.page >= this.totalPages + 1) {
|
|
18268
|
+
this.page = this.totalPages;
|
|
18269
|
+
}
|
|
18270
|
+
else {
|
|
18271
|
+
this.page = this.options.page ? this.options.page : 1;
|
|
18272
|
+
calc = true;
|
|
18273
|
+
}
|
|
18274
|
+
}
|
|
18275
|
+
if (calc) {
|
|
18276
|
+
this.pages = this.calcPages();
|
|
18277
|
+
}
|
|
18278
|
+
}
|
|
18279
|
+
updateToFrom(page) {
|
|
18280
|
+
const current = this.pages.find(p => p.number === page);
|
|
18281
|
+
if (!current) {
|
|
18282
|
+
this.from = 0;
|
|
18283
|
+
this.to = 0;
|
|
18284
|
+
return;
|
|
18285
|
+
}
|
|
18286
|
+
this.from = (current.number - 1) * this.size;
|
|
18287
|
+
this.from = this.from ? this.from + 1 : 1;
|
|
18288
|
+
this.to = this.from + this.size - 1;
|
|
18289
|
+
this.to = this.to < this.count ? this.to : this.count;
|
|
18290
|
+
if (!this.to) {
|
|
18291
|
+
this.from = 0;
|
|
18292
|
+
}
|
|
18293
|
+
}
|
|
18294
|
+
prevPage() {
|
|
18295
|
+
this.selectPage(this.page - 1);
|
|
18296
|
+
}
|
|
18297
|
+
nextPage() {
|
|
18298
|
+
this.selectPage(this.page + 1);
|
|
18299
|
+
}
|
|
18300
|
+
onPageSizeChange(size) {
|
|
18301
|
+
setTimeout(() => this.emitChange({ page: this.page, size }), 100);
|
|
18302
|
+
}
|
|
18303
|
+
selectPage(page, toLast = false) {
|
|
18304
|
+
if (this.pageDisabled(page)) {
|
|
18305
|
+
return;
|
|
18306
|
+
}
|
|
18307
|
+
if (page > 0 && page <= this.totalPages && page !== this.page) {
|
|
18308
|
+
this.page = page;
|
|
18309
|
+
this.pages = this.calcPages(page);
|
|
18310
|
+
this.updateToFrom(page);
|
|
18311
|
+
this.emitChange({ page, size: this.size, toLast });
|
|
18312
|
+
}
|
|
18313
|
+
}
|
|
18314
|
+
calcPages(page) {
|
|
18315
|
+
const pages = [];
|
|
18316
|
+
let startPage = 1;
|
|
18317
|
+
const pagesCount = this.totalPages;
|
|
18318
|
+
let endPage = pagesCount;
|
|
18319
|
+
const maxSize = 5;
|
|
18320
|
+
const isMaxSized = maxSize < this.totalPages;
|
|
18321
|
+
page = page || this.page;
|
|
18322
|
+
if (isMaxSized) {
|
|
18323
|
+
startPage = page - Math.floor(maxSize / 2);
|
|
18324
|
+
endPage = page + Math.floor(maxSize / 2);
|
|
18325
|
+
if (startPage < 1) {
|
|
18326
|
+
startPage = 1;
|
|
18327
|
+
endPage = Math.min(startPage + maxSize - 1, pagesCount);
|
|
18328
|
+
}
|
|
18329
|
+
else if (endPage > pagesCount) {
|
|
18330
|
+
startPage = Math.max(pagesCount - maxSize + 1, 1);
|
|
18331
|
+
endPage = pagesCount;
|
|
18332
|
+
}
|
|
18333
|
+
}
|
|
18334
|
+
for (let num = startPage; num <= endPage; num++) {
|
|
18335
|
+
pages.push({
|
|
18336
|
+
number: num,
|
|
18337
|
+
text: num.toString(),
|
|
18338
|
+
});
|
|
18339
|
+
}
|
|
18340
|
+
if (this.lastPageUnknown) {
|
|
18341
|
+
pages.push({
|
|
18342
|
+
number: endPage + 1,
|
|
18343
|
+
text: '...',
|
|
18344
|
+
});
|
|
18345
|
+
}
|
|
18346
|
+
return pages;
|
|
18347
|
+
}
|
|
18348
|
+
pageDisabled(page) {
|
|
18349
|
+
if (Array.isArray(this.enabledPages) && this.enabledPages.length) {
|
|
18350
|
+
return !this.enabledPages[page - 1];
|
|
18351
|
+
}
|
|
18352
|
+
}
|
|
18353
|
+
get totalPages() {
|
|
18354
|
+
const count = this.size < 1 || this.size === 0 ? 1 : Math.ceil(this.count / this.size);
|
|
18355
|
+
return Math.max(count || 0, 1);
|
|
18356
|
+
}
|
|
18357
|
+
get canPrevious() {
|
|
18358
|
+
return this.page > 1;
|
|
18359
|
+
}
|
|
18360
|
+
get canNext() {
|
|
18361
|
+
return this.page < this.totalPages;
|
|
18362
|
+
}
|
|
18363
|
+
get canLast() {
|
|
18364
|
+
if (Array.isArray(this.enabledPages) && this.enabledPages.length >= this.totalPages) {
|
|
18365
|
+
return this.enabledPages[this.totalPages] && this.page < this.totalPages;
|
|
18366
|
+
}
|
|
18367
|
+
return this.page < this.totalPages;
|
|
18368
|
+
}
|
|
18369
|
+
get showFromTo() {
|
|
18370
|
+
return !this.isMobileGlobal && this.firstVisible && this.lastVisible;
|
|
18371
|
+
}
|
|
18372
|
+
get showOnlyTotal() {
|
|
18373
|
+
return !this.isMobileGlobal && this.count;
|
|
18374
|
+
}
|
|
18375
|
+
get first() {
|
|
18376
|
+
return this.firstVisible ?? this.from;
|
|
18377
|
+
}
|
|
18378
|
+
get last() {
|
|
18379
|
+
return this.lastVisible ?? this.to;
|
|
18380
|
+
}
|
|
18381
|
+
get _entityName() {
|
|
18382
|
+
if (this.entityName instanceof Function) {
|
|
18383
|
+
return this.entityName(this.contentType, this.options.total);
|
|
18384
|
+
}
|
|
18385
|
+
if (this.ldPagerOptions && this.ldPagerOptions.entityName instanceof Function) {
|
|
18386
|
+
return Function.prototype.apply.call(this.ldPagerOptions.entityName, this, [this.contentType, this.options.total]);
|
|
18387
|
+
}
|
|
18388
|
+
return pluralizeNoun(this.options.total, 'элемент', 'элемента', 'элементов', true);
|
|
18389
|
+
}
|
|
18390
|
+
}
|
|
18391
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18392
|
+
(0,external_vue_property_decorator_.Prop)(),
|
|
18393
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", typeof (ld_pagervue_type_script_lang_js_external_a = typeof TOptions !== "undefined" && TOptions) === "function" ? ld_pagervue_type_script_lang_js_external_a : Object)
|
|
18394
|
+
], PagerComponent.prototype, "options", void 0);
|
|
18395
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18396
|
+
(0,external_vue_property_decorator_.Prop)({ type: Boolean, default: true }),
|
|
18397
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", Boolean)
|
|
18398
|
+
], PagerComponent.prototype, "toFirst", void 0);
|
|
18399
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18400
|
+
(0,external_vue_property_decorator_.Prop)({ type: Boolean, default: true }),
|
|
18401
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", Boolean)
|
|
18402
|
+
], PagerComponent.prototype, "toLast", void 0);
|
|
18403
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18404
|
+
(0,external_vue_property_decorator_.Prop)({ default: false }),
|
|
18405
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", Boolean)
|
|
18406
|
+
], PagerComponent.prototype, "lastPageUnknown", void 0);
|
|
18407
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18408
|
+
(0,external_vue_property_decorator_.Prop)(),
|
|
18409
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", typeof (ld_pagervue_type_script_lang_js_external_b = typeof Array !== "undefined" && Array) === "function" ? ld_pagervue_type_script_lang_js_external_b : Object)
|
|
18410
|
+
], PagerComponent.prototype, "enabledPages", void 0);
|
|
18411
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18412
|
+
(0,external_vue_property_decorator_.Prop)(),
|
|
18413
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", Number)
|
|
18414
|
+
], PagerComponent.prototype, "firstVisible", void 0);
|
|
18415
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18416
|
+
(0,external_vue_property_decorator_.Prop)(),
|
|
18417
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", Number)
|
|
18418
|
+
], PagerComponent.prototype, "lastVisible", void 0);
|
|
18419
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18420
|
+
(0,external_vue_property_decorator_.Prop)({ type: Boolean, default: true }),
|
|
18421
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", Boolean)
|
|
18422
|
+
], PagerComponent.prototype, "bordered", void 0);
|
|
18423
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18424
|
+
(0,external_vue_property_decorator_.Prop)(),
|
|
18425
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", Object)
|
|
18426
|
+
], PagerComponent.prototype, "contentType", void 0);
|
|
18427
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18428
|
+
(0,external_vue_property_decorator_.Prop)(),
|
|
18429
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", Function)
|
|
18430
|
+
], PagerComponent.prototype, "entityName", void 0);
|
|
18431
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18432
|
+
(0,external_vue_property_decorator_.Inject)(),
|
|
18433
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", Object)
|
|
18434
|
+
], PagerComponent.prototype, "ldPagerOptions", void 0);
|
|
18435
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18436
|
+
Emit('change'),
|
|
18437
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", Function),
|
|
18438
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:paramtypes", [Object]),
|
|
18439
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
18440
|
+
], PagerComponent.prototype, "emitChange", null);
|
|
18441
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18442
|
+
(0,external_vue_property_decorator_.Watch)('lastPageUnknown'),
|
|
18443
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", Function),
|
|
18444
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:paramtypes", []),
|
|
18445
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
18446
|
+
], PagerComponent.prototype, "onLastPageUnknownChanged", null);
|
|
18447
|
+
ld_pagervue_type_script_lang_js_external_decorate([
|
|
18448
|
+
(0,external_vue_property_decorator_.Watch)('options', { immediate: true, deep: true }),
|
|
18449
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:type", Function),
|
|
18450
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:paramtypes", []),
|
|
18451
|
+
ld_pagervue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
18452
|
+
], PagerComponent.prototype, "onOptionsChanged", null);
|
|
18453
|
+
|
|
18454
|
+
;// CONCATENATED MODULE: ./src/ld-pager/ld-pager.ts?vue&type=script&lang=js&external
|
|
18455
|
+
|
|
18456
|
+
;// CONCATENATED MODULE: ./src/ld-pager/ld-pager.vue
|
|
18457
|
+
|
|
18458
|
+
|
|
18459
|
+
|
|
18460
|
+
|
|
18461
|
+
;
|
|
18462
|
+
const ld_pager_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(PagerComponent, [['render',ld_pagervue_type_template_id_03c82e7a_render]])
|
|
18463
|
+
|
|
18464
|
+
/* harmony default export */ const ld_pager = (ld_pager_exports_);
|
|
18465
|
+
;// CONCATENATED MODULE: ./src/ld-pager/index.ts
|
|
18466
|
+
|
|
18467
|
+
function ld_pager_reg(vue, options) {
|
|
18468
|
+
vue.component(options.aliases['ld-pager'], ld_pager);
|
|
18469
|
+
}
|
|
18470
|
+
/* harmony default export */ const src_ld_pager = (ld_pager_reg);
|
|
18471
|
+
|
|
18117
18472
|
// EXTERNAL MODULE: external "vue-toastification"
|
|
18118
18473
|
var external_vue_toastification_ = __webpack_require__(7982);
|
|
18119
18474
|
var external_vue_toastification_default = /*#__PURE__*/__webpack_require__.n(external_vue_toastification_);
|
|
18475
|
+
;// CONCATENATED MODULE: ./src/utils/awaiting.ts
|
|
18476
|
+
async function awaiting(callback) {
|
|
18477
|
+
let resolveFunc = null;
|
|
18478
|
+
const counter = 0;
|
|
18479
|
+
let timer = null;
|
|
18480
|
+
const promise = new Promise(resolve => {
|
|
18481
|
+
resolveFunc = resolve;
|
|
18482
|
+
});
|
|
18483
|
+
timer = setInterval(() => {
|
|
18484
|
+
const a = callback();
|
|
18485
|
+
if (counter > 100 || Boolean(a)) {
|
|
18486
|
+
clearInterval(timer);
|
|
18487
|
+
resolveFunc(a ?? true);
|
|
18488
|
+
}
|
|
18489
|
+
}, 100);
|
|
18490
|
+
await promise;
|
|
18491
|
+
}
|
|
18492
|
+
|
|
18493
|
+
;// CONCATENATED MODULE: ./src/utils/deepValueGetter.ts
|
|
18494
|
+
/**
|
|
18495
|
+
* Returns a deep object given a string. zoo['animal.type']
|
|
18496
|
+
* @param {object} obj
|
|
18497
|
+
* @param {string} path
|
|
18498
|
+
*/
|
|
18499
|
+
function deepValueGetter(obj, path) {
|
|
18500
|
+
if (obj === null) {
|
|
18501
|
+
return '';
|
|
18502
|
+
}
|
|
18503
|
+
if (!obj || !path) {
|
|
18504
|
+
return obj;
|
|
18505
|
+
}
|
|
18506
|
+
// check if path matches a root-level field
|
|
18507
|
+
// { "a.b.c": 123 }
|
|
18508
|
+
const value = obj[path];
|
|
18509
|
+
// eslint-disable-next-line no-undefined
|
|
18510
|
+
if (value !== undefined) {
|
|
18511
|
+
return value;
|
|
18512
|
+
}
|
|
18513
|
+
let current = obj;
|
|
18514
|
+
const split = path.split('.');
|
|
18515
|
+
if (split.length) {
|
|
18516
|
+
for (const key of split) {
|
|
18517
|
+
current = current[key];
|
|
18518
|
+
// if found undefined, return empty string
|
|
18519
|
+
// eslint-disable-next-line no-undefined
|
|
18520
|
+
if (current === undefined || current === null) {
|
|
18521
|
+
return '';
|
|
18522
|
+
}
|
|
18523
|
+
}
|
|
18524
|
+
}
|
|
18525
|
+
return current;
|
|
18526
|
+
}
|
|
18527
|
+
|
|
18528
|
+
;// CONCATENATED MODULE: ./src/utils/delay.ts
|
|
18529
|
+
async function delay(timeout) {
|
|
18530
|
+
return new Promise(resolve => setTimeout(() => resolve(), timeout));
|
|
18531
|
+
}
|
|
18532
|
+
|
|
18533
|
+
;// CONCATENATED MODULE: ./src/utils/isObjectEmpty.ts
|
|
18534
|
+
function isObjectEmpty(obj) {
|
|
18535
|
+
for (const _i in obj) {
|
|
18536
|
+
return false;
|
|
18537
|
+
}
|
|
18538
|
+
return true;
|
|
18539
|
+
}
|
|
18540
|
+
|
|
18541
|
+
;// CONCATENATED MODULE: ./src/utils/urlRegexp.ts
|
|
18542
|
+
const urlRegexp =
|
|
18543
|
+
// eslint-disable-next-line optimize-regex/optimize-regex
|
|
18544
|
+
/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\\[\]{};:'".,<>?«»“”‘’]))/i;
|
|
18545
|
+
|
|
18546
|
+
;// CONCATENATED MODULE: ./src/utils/index.ts
|
|
18547
|
+
|
|
18548
|
+
|
|
18549
|
+
|
|
18550
|
+
|
|
18551
|
+
|
|
18552
|
+
|
|
18553
|
+
|
|
18554
|
+
|
|
18555
|
+
|
|
18120
18556
|
;// CONCATENATED MODULE: ./src/vuetify.ts
|
|
18121
18557
|
const aliases = {
|
|
18122
18558
|
SmallButton: 'VBtn',
|
|
@@ -18434,6 +18870,7 @@ const ValidateMixinOptions = mixin;
|
|
|
18434
18870
|
|
|
18435
18871
|
|
|
18436
18872
|
|
|
18873
|
+
|
|
18437
18874
|
|
|
18438
18875
|
|
|
18439
18876
|
const ldmuiPlugin = {
|
|
@@ -18468,19 +18905,25 @@ const ldmuiPlugin = {
|
|
|
18468
18905
|
'ld-switch': options.aliases?.['ld-switch'] ?? 'ld-switch',
|
|
18469
18906
|
'ld-dialog': options.aliases?.['ld-dialog'] ?? 'ld-dialog',
|
|
18470
18907
|
'ld-data-iterator': options.aliases?.['ld-data-iterator'] ?? 'ld-data-iterator',
|
|
18908
|
+
'ld-pager': options.aliases?.['ld-pager'] ?? 'ld-pager',
|
|
18471
18909
|
};
|
|
18472
18910
|
vue.config.globalProperties.$utils = {
|
|
18473
18911
|
...src_utils_namespaceObject,
|
|
18474
18912
|
};
|
|
18913
|
+
if (options.LdPager?.entityName instanceof Function) {
|
|
18914
|
+
vue.provide('ldPagerOptions', {
|
|
18915
|
+
entityName: options.LdPager?.entityName
|
|
18916
|
+
});
|
|
18917
|
+
}
|
|
18475
18918
|
vue.config.globalProperties.$ldmui = {
|
|
18476
18919
|
options: (0,external_vue_.reactive)(options),
|
|
18477
|
-
setup: async function () {
|
|
18478
|
-
|
|
18479
|
-
|
|
18480
|
-
|
|
18481
|
-
|
|
18482
|
-
|
|
18483
|
-
}
|
|
18920
|
+
// setup: async function () {
|
|
18921
|
+
// const options = await this.$ldmui.options.callback();
|
|
18922
|
+
// this.$ldmui.options = {
|
|
18923
|
+
// ...this.$ldmui.options,
|
|
18924
|
+
// ...options
|
|
18925
|
+
// }
|
|
18926
|
+
// }
|
|
18484
18927
|
};
|
|
18485
18928
|
vue.directive('active', ActiveDirectiveOptions);
|
|
18486
18929
|
const toastedOptions = {
|
|
@@ -18520,6 +18963,7 @@ const ldmuiPlugin = {
|
|
|
18520
18963
|
src_ld_switch(vue, options);
|
|
18521
18964
|
src_ld_dialog(vue, options);
|
|
18522
18965
|
src_ld_data_iterator(vue, options);
|
|
18966
|
+
src_ld_pager(vue, options);
|
|
18523
18967
|
},
|
|
18524
18968
|
};
|
|
18525
18969
|
/* harmony default export */ const src = (ldmuiPlugin);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.pager {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: var(--pager-height);
|
|
6
|
+
padding: 2px 12px !important;
|
|
7
|
+
background-color: var(--white);
|
|
8
|
+
font-size: var(--font-size);
|
|
9
|
+
|
|
10
|
+
&--border-top {
|
|
11
|
+
border-top: 1px solid var(--grey-l-5);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.v-btn {
|
|
15
|
+
&.--active {
|
|
16
|
+
font-weight: 700 !important;
|
|
17
|
+
color: var(--primary) !important;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -4,6 +4,7 @@ $border-radius: 4px !default; // радиус скругления атомар
|
|
|
4
4
|
$chip-height: 20px !default; // высота элемента chip
|
|
5
5
|
$toolbar-height: 44px !default; // высота тулбара
|
|
6
6
|
$toolbar-border-radius: 8px !default; // радиус скругления тулбара
|
|
7
|
+
$pager-height: 32px !default;
|
|
7
8
|
|
|
8
9
|
$ld-tab-height: $input-height + 10px; // высота элемента ld-tab
|
|
9
10
|
|
|
@@ -22,6 +23,7 @@ $shadow-4: 0px 16px 20px 0px rgba(0, 0, 0, 0.20);
|
|
|
22
23
|
--ld-tab-height: #{$ld-tab-height};
|
|
23
24
|
--toolbar-height: #{$toolbar-height};
|
|
24
25
|
--toolbar-border-radius: #{$toolbar-border-radius};
|
|
26
|
+
--pager-height: #{$pager-height};
|
|
25
27
|
--shadow-1: #{$shadow-1};
|
|
26
28
|
--shadow-2: #{$shadow-2};
|
|
27
29
|
--shadow-3: #{$shadow-3};
|
package/dist/scss/index.scss
CHANGED
package/dist/types/options.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export interface ldmuiOptions {
|
|
|
25
25
|
'ld-switch'?: string;
|
|
26
26
|
'ld-dialog'?: string;
|
|
27
27
|
'ld-data-iterator'?: string;
|
|
28
|
+
'ld-pager'?: string;
|
|
28
29
|
},
|
|
29
30
|
viewport?: {
|
|
30
31
|
isMobile: string;
|
|
@@ -47,4 +48,7 @@ export interface ldmuiOptions {
|
|
|
47
48
|
LdTabs?: {
|
|
48
49
|
header: string;
|
|
49
50
|
}
|
|
51
|
+
LdPager?: {
|
|
52
|
+
entityName: (contentType: unknown, count: number) => string;
|
|
53
|
+
}
|
|
50
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ldmjs/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"description": "ldm ui",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@babel/preset-typescript": "7.23.3",
|
|
45
45
|
"@floating-ui/dom": "^1.6.3",
|
|
46
46
|
"@ldmjs/core": "1.0.0",
|
|
47
|
-
"@ldmjs/datatable": "1.0.
|
|
47
|
+
"@ldmjs/datatable": "1.0.7",
|
|
48
48
|
"@popperjs/core": "^2.11.8",
|
|
49
49
|
"@types/babel__core": "^7",
|
|
50
50
|
"@types/babel__plugin-transform-runtime": "^7",
|