@ldmjs/ui 1.0.18 → 1.0.20

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.js CHANGED
@@ -607,10 +607,42 @@ function ld_loader_reg(vue, options) {
607
607
  }
608
608
  /* harmony default export */ const src_ld_loader = (ld_loader_reg);
609
609
 
610
- ;// 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-chip/ld-chip.vue?vue&type=template&id=24b3eb7f&ts=true
610
+ ;// 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-chip/ld-chip.vue?vue&type=template&id=4722b6ca&ts=true
611
611
 
612
- function ld_chipvue_type_template_id_24b3eb7f_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
613
- const _component_ld_icon = (0,external_vue_.resolveComponent)("ld-icon");
612
+ const ld_chipvue_type_template_id_4722b6ca_ts_true_hoisted_1 = /*#__PURE__*/ (0,external_vue_.createElementVNode)("svg", {
613
+ width: "18",
614
+ height: "18",
615
+ viewBox: "0 0 18 18",
616
+ fill: "none",
617
+ id: "close_18",
618
+ version: "1.1",
619
+ xmlns: "http://www.w3.org/2000/svg"
620
+ }, [
621
+ /*#__PURE__*/ (0,external_vue_.createElementVNode)("rect", {
622
+ style: { "fill": "currentColor", "stroke-width": "1.5" },
623
+ id: "rect1",
624
+ width: "1.1693057",
625
+ height: "13.973204",
626
+ x: "11.941731",
627
+ y: "-7.1519666",
628
+ rx: "0.85917288",
629
+ ry: "0.65454429",
630
+ transform: "rotate(45)"
631
+ }),
632
+ /*#__PURE__*/ (0,external_vue_.createTextVNode)(),
633
+ /*#__PURE__*/ (0,external_vue_.createElementVNode)("rect", {
634
+ style: { "fill": "currentColor", "stroke-width": "1.5" },
635
+ id: "rect1-1",
636
+ width: "1.1693057",
637
+ height: "13.973204",
638
+ x: "-0.76293743",
639
+ y: "5.5370965",
640
+ rx: "0.85917288",
641
+ ry: "0.65454429",
642
+ transform: "matrix(-0.70710678,0.70710678,0.70710678,0.70710678,0,0)"
643
+ })
644
+ ], -1);
645
+ function ld_chipvue_type_template_id_4722b6ca_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
614
646
  const _component_v_btn = (0,external_vue_.resolveComponent)("v-btn");
615
647
  const _component_v_chip = (0,external_vue_.resolveComponent)("v-chip");
616
648
  return ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_chip, {
@@ -624,18 +656,14 @@ function ld_chipvue_type_template_id_24b3eb7f_ts_true_render(_ctx, _cache, $prop
624
656
  ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_btn, {
625
657
  key: 0,
626
658
  id: "btn-close",
659
+ variant: "text",
627
660
  icon: "",
628
661
  width: "18",
629
662
  height: "18",
630
- elevation: "0",
631
663
  onClick: _cache[0] || (_cache[0] = ($event) => (_ctx.$emit('click:close')))
632
664
  }, {
633
665
  default: (0,external_vue_.withCtx)(() => [
634
- (0,external_vue_.createVNode)(_component_ld_icon, {
635
- width: "18",
636
- height: "18",
637
- icon: "close_sm"
638
- })
666
+ ld_chipvue_type_template_id_4722b6ca_ts_true_hoisted_1
639
667
  ]),
640
668
  _: 1
641
669
  }))
@@ -649,7 +677,7 @@ function ld_chipvue_type_template_id_24b3eb7f_ts_true_render(_ctx, _cache, $prop
649
677
  }, 8, ["color"]));
650
678
  }
651
679
 
652
- ;// CONCATENATED MODULE: ./src/ld-chip/ld-chip.vue?vue&type=template&id=24b3eb7f&ts=true
680
+ ;// CONCATENATED MODULE: ./src/ld-chip/ld-chip.vue?vue&type=template&id=4722b6ca&ts=true
653
681
 
654
682
  ;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-chip/ld-chip.ts?vue&type=script&lang=ts&external
655
683
  var ld_chipvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -692,7 +720,7 @@ ChipComponent = ld_chipvue_type_script_lang_ts_external_decorate([
692
720
 
693
721
 
694
722
  ;
695
- const ld_chip_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_chipvue_type_script_lang_ts_external, [['render',ld_chipvue_type_template_id_24b3eb7f_ts_true_render]])
723
+ const ld_chip_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_chipvue_type_script_lang_ts_external, [['render',ld_chipvue_type_template_id_4722b6ca_ts_true_render]])
696
724
 
697
725
  /* harmony default export */ const ld_chip = (ld_chip_exports_);
698
726
  ;// CONCATENATED MODULE: ./src/ld-chip/index.ts
@@ -11547,13 +11575,29 @@ function ld_select_list_box_reg(vue, options) {
11547
11575
  }
11548
11576
  /* harmony default export */ const src_ld_select_list_box = (ld_select_list_box_reg);
11549
11577
 
11550
- ;// 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=26c765c2&ts=true
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=3c187dcd&ts=true
11551
11579
 
11552
- const ld_checkboxvue_type_template_id_26c765c2_ts_true_hoisted_1 = { class: "d-flex align-center" };
11553
- const ld_checkboxvue_type_template_id_26c765c2_ts_true_hoisted_2 = ["checked", "data-testid", "tabindex", "disabled"];
11554
- function ld_checkboxvue_type_template_id_26c765c2_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
11580
+ const ld_checkboxvue_type_template_id_3c187dcd_ts_true_hoisted_1 = { class: "d-flex align-center" };
11581
+ const ld_checkboxvue_type_template_id_3c187dcd_ts_true_hoisted_2 = ["checked", "data-testid", "tabindex", "disabled"];
11582
+ const ld_checkboxvue_type_template_id_3c187dcd_ts_true_hoisted_3 = /*#__PURE__*/ (0,external_vue_.createElementVNode)("i", { class: "v-icon" }, [
11583
+ /*#__PURE__*/ (0,external_vue_.createElementVNode)("svg", {
11584
+ width: "14",
11585
+ height: "15",
11586
+ viewBox: "0 0 14 15",
11587
+ fill: "none",
11588
+ id: "done_outline_24",
11589
+ version: "1.1",
11590
+ xmlns: "http://www.w3.org/2000/svg"
11591
+ }, [
11592
+ /*#__PURE__*/ (0,external_vue_.createElementVNode)("path", {
11593
+ d: "M 5.2991701,9.7649048 2.4198478,6.8856204 c -0.1480901,-0.1481205 -0.3881923,-0.1481205 -0.5362898,0 L 1.6235017,7.1456842 c -0.1480902,0.1480445 -0.1480902,0.3881619 0,0.5362822 l 3.4075197,3.4075266 c 0.1480976,0.148046 0.3881999,0.148046 0.5362596,0 l 7.047968,-7.047989 c 0.14812,-0.1480976 0.14812,-0.3881999 0,-0.5362899 L 12.355185,3.245158 c -0.148045,-0.1480978 -0.388162,-0.1480978 -0.536283,0 z",
11594
+ fill: "#fff",
11595
+ style: { "stroke": "#fff", "stroke-width": "1", "stroke-opacity": "1" }
11596
+ })
11597
+ ])
11598
+ ], -1);
11599
+ function ld_checkboxvue_type_template_id_3c187dcd_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
11555
11600
  const _component_v_tooltip = (0,external_vue_.resolveComponent)("v-tooltip");
11556
- const _component_v_icon = (0,external_vue_.resolveComponent)("v-icon");
11557
11601
  return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", {
11558
11602
  class: (0,external_vue_.normalizeClass)(["ld-checkbox", { 'ld-checkbox--focused': _ctx.isFocused }])
11559
11603
  }, [
@@ -11587,7 +11631,7 @@ function ld_checkboxvue_type_template_id_26c765c2_ts_true_render(_ctx, _cache, $
11587
11631
  ]))
11588
11632
  : (0,external_vue_.createCommentVNode)("", true),
11589
11633
  (0,external_vue_.createTextVNode)(),
11590
- (0,external_vue_.createElementVNode)("label", ld_checkboxvue_type_template_id_26c765c2_ts_true_hoisted_1, [
11634
+ (0,external_vue_.createElementVNode)("label", ld_checkboxvue_type_template_id_3c187dcd_ts_true_hoisted_1, [
11591
11635
  (0,external_vue_.createElementVNode)("input", {
11592
11636
  ref: "checkbox",
11593
11637
  type: "checkbox",
@@ -11604,9 +11648,9 @@ function ld_checkboxvue_type_template_id_26c765c2_ts_true_render(_ctx, _cache, $
11604
11648
  onInput: _cache[3] || (_cache[3] =
11605
11649
  //@ts-ignore
11606
11650
  (...args) => (_ctx.onChange && _ctx.onChange(...args)))
11607
- }, null, 40, ld_checkboxvue_type_template_id_26c765c2_ts_true_hoisted_2),
11651
+ }, null, 40, ld_checkboxvue_type_template_id_3c187dcd_ts_true_hoisted_2),
11608
11652
  (0,external_vue_.createTextVNode)(),
11609
- (0,external_vue_.createVNode)(_component_v_icon, { icon: "check" })
11653
+ ld_checkboxvue_type_template_id_3c187dcd_ts_true_hoisted_3
11610
11654
  ]),
11611
11655
  (0,external_vue_.createTextVNode)(),
11612
11656
  (_ctx.label && !_ctx.labelOnLeft)
@@ -11642,7 +11686,7 @@ function ld_checkboxvue_type_template_id_26c765c2_ts_true_render(_ctx, _cache, $
11642
11686
  ], 2));
11643
11687
  }
11644
11688
 
11645
- ;// CONCATENATED MODULE: ./src/ld-checkbox/ld-checkbox.vue?vue&type=template&id=26c765c2&ts=true
11689
+ ;// CONCATENATED MODULE: ./src/ld-checkbox/ld-checkbox.vue?vue&type=template&id=3c187dcd&ts=true
11646
11690
 
11647
11691
  ;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-checkbox/ld-checkbox.ts?vue&type=script&lang=ts&external
11648
11692
  var ld_checkboxvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -11799,7 +11843,7 @@ ld_checkboxvue_type_script_lang_ts_external_decorate([
11799
11843
  ld_checkboxvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
11800
11844
  ], CheckboxComponent.prototype, "emitUpdateModelValue", null);
11801
11845
  ld_checkboxvue_type_script_lang_ts_external_decorate([
11802
- (0,external_vue_property_decorator_.Watch)('modelValue'),
11846
+ (0,external_vue_property_decorator_.Watch)('modelValue', { deep: true }),
11803
11847
  ld_checkboxvue_type_script_lang_ts_external_metadata("design:type", Function),
11804
11848
  ld_checkboxvue_type_script_lang_ts_external_metadata("design:paramtypes", []),
11805
11849
  ld_checkboxvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
@@ -11815,7 +11859,7 @@ ld_checkboxvue_type_script_lang_ts_external_decorate([
11815
11859
  ;
11816
11860
 
11817
11861
 
11818
- const ld_checkbox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(CheckboxComponent, [['render',ld_checkboxvue_type_template_id_26c765c2_ts_true_render]])
11862
+ const ld_checkbox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(CheckboxComponent, [['render',ld_checkboxvue_type_template_id_3c187dcd_ts_true_render]])
11819
11863
 
11820
11864
  /* harmony default export */ const ld_checkbox = (ld_checkbox_exports_);
11821
11865
  ;// CONCATENATED MODULE: ./src/ld-checkbox/index.ts
@@ -15271,9 +15315,46 @@ function toServerString(dt) {
15271
15315
  };
15272
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)}`;
15273
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
+ }
15274
15354
  const datetime = {
15275
15355
  dateLocalToISO,
15276
- toServerString
15356
+ toServerString,
15357
+ compare
15277
15358
  };
15278
15359
 
15279
15360
 
@@ -16670,6 +16751,1369 @@ function ld_dialog_reg(vue, options) {
16670
16751
  }
16671
16752
  /* harmony default export */ const src_ld_dialog = (ld_dialog_reg);
16672
16753
 
16754
+ ;// 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-data-iterator/ld-data-iterator.vue?vue&type=template&id=7f1ec2b2&ts=true
16755
+
16756
+ const ld_data_iteratorvue_type_template_id_7f1ec2b2_ts_true_hoisted_1 = { class: "ld-data-iterator" };
16757
+ const ld_data_iteratorvue_type_template_id_7f1ec2b2_ts_true_hoisted_2 = {
16758
+ key: 0,
16759
+ class: "top-fixed-item-wrapper"
16760
+ };
16761
+ function ld_data_iteratorvue_type_template_id_7f1ec2b2_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
16762
+ const _component_iterator_item = (0,external_vue_.resolveComponent)("iterator-item");
16763
+ return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_data_iteratorvue_type_template_id_7f1ec2b2_ts_true_hoisted_1, [
16764
+ (_ctx.fixedTopContext)
16765
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_data_iteratorvue_type_template_id_7f1ec2b2_ts_true_hoisted_2, [
16766
+ (0,external_vue_.createVNode)(_component_iterator_item, {
16767
+ id: 'idx' + _ctx.fixedTopContext.rowIndex,
16768
+ class: "top-fixed-item",
16769
+ "data-uid": _ctx.id(_ctx.fixedTopContext.row),
16770
+ "data-test-id": "topFixedIeratorItem",
16771
+ onClick: _cache[0] || (_cache[0] = ($event) => (_ctx.onClick(_ctx.fixedTopContext))),
16772
+ onDblclick: _cache[1] || (_cache[1] = ($event) => (_ctx.onClick(_ctx.fixedTopContext))),
16773
+ onUpdateHeight: _ctx.onUpdateFixedTopHeight
16774
+ }, {
16775
+ default: (0,external_vue_.withCtx)(() => [
16776
+ (0,external_vue_.renderSlot)(_ctx.$slots, "default", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: _ctx.fixedTopContext.row })), () => [
16777
+ (0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.entityFromItem(_ctx.fixedTopContext.row)[_ctx.keyProp]), 1)
16778
+ ])
16779
+ ]),
16780
+ _: 3
16781
+ }, 8, ["id", "data-uid", "onUpdateHeight"])
16782
+ ]))
16783
+ : (0,external_vue_.createCommentVNode)("", true),
16784
+ (0,external_vue_.createTextVNode)(),
16785
+ (0,external_vue_.createElementVNode)("div", {
16786
+ ref: "list",
16787
+ id: "iterator-list",
16788
+ class: "iterator-list",
16789
+ style: (0,external_vue_.normalizeStyle)(_ctx.listStyles)
16790
+ }, [
16791
+ (0,external_vue_.createElementVNode)("div", {
16792
+ ref: "scroller",
16793
+ class: (0,external_vue_.normalizeClass)(["scroller", { mobile: _ctx.isMobileGlobal }]),
16794
+ style: (0,external_vue_.normalizeStyle)(_ctx.scrollerStyles)
16795
+ }, [
16796
+ ((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, (0,external_vue_.renderList)(_ctx.visibleItems, (item) => {
16797
+ return ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_iterator_item, {
16798
+ id: 'idx' + item.rowIndex,
16799
+ class: (0,external_vue_.normalizeClass)(["item", { 'active-list-item': _ctx.isItemActive(item), mobile: _ctx.isMobileGlobal, blink: _ctx.isItemRemoving(item) }]),
16800
+ key: _ctx.id(item.row),
16801
+ "data-uid": _ctx.id(item.row),
16802
+ style: (0,external_vue_.normalizeStyle)(_ctx.itemStyles(item)),
16803
+ "refresh-counter": _ctx.refreshCounter,
16804
+ "data-test-id": "iteratorItem",
16805
+ onClick: ($event) => (_ctx.onClick(item)),
16806
+ onDblclick: ($event) => (_ctx.onClick(item)),
16807
+ onUpdateHeight: ($event) => (_ctx.onUpdateItemHeight(item, $event))
16808
+ }, {
16809
+ default: (0,external_vue_.withCtx)(() => [
16810
+ (0,external_vue_.renderSlot)(_ctx.$slots, "default", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: item.row, itemContext: { index: item.rowIndex } })), () => [
16811
+ (0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.entityFromItem(item.row) ? _ctx.entityFromItem(item.row)[_ctx.keyProp] : 'empty item'), 1)
16812
+ ])
16813
+ ]),
16814
+ _: 2
16815
+ }, 1032, ["id", "class", "data-uid", "style", "refresh-counter", "onClick", "onDblclick", "onUpdateHeight"]));
16816
+ }), 128))
16817
+ ], 6)
16818
+ ], 4)
16819
+ ]));
16820
+ }
16821
+
16822
+ ;// CONCATENATED MODULE: ./src/ld-data-iterator/ld-data-iterator.vue?vue&type=template&id=7f1ec2b2&ts=true
16823
+
16824
+ ;// CONCATENATED MODULE: ./src/ld-data-iterator/iteratorItem.ts
16825
+ var iteratorItem_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
16826
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16827
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
16828
+ 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;
16829
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
16830
+ };
16831
+ var iteratorItem_metadata = (undefined && undefined.__metadata) || function (k, v) {
16832
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
16833
+ };
16834
+ var IteratorItemComponent_1;
16835
+
16836
+
16837
+ let IteratorItemComponent = IteratorItemComponent_1 = class IteratorItemComponent extends external_vue_property_decorator_.Vue {
16838
+ constructor() {
16839
+ super(...arguments);
16840
+ this.height = 0;
16841
+ this.width = 0;
16842
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16843
+ this.resizeObserver = null;
16844
+ this.elem = null;
16845
+ }
16846
+ emitUpdateHeight(value) {
16847
+ return value;
16848
+ }
16849
+ emitRefreshCounterChanged() {
16850
+ this.emitUpdateHeight(this.$el.clientHeight);
16851
+ }
16852
+ mounted() {
16853
+ this.setupResizeObserver();
16854
+ this.elem = this.$el;
16855
+ this.resizeObserver.observe(this.$el);
16856
+ }
16857
+ beforeUpdate() {
16858
+ if (this.elem !== this.$el) {
16859
+ if (this.resizeObserver) {
16860
+ this.resizeObserver.unobserve(this.elem);
16861
+ }
16862
+ this.setupResizeObserver();
16863
+ this.resizeObserver.observe(this.$el);
16864
+ }
16865
+ }
16866
+ beforeUnmount() {
16867
+ this.resizeObserver.unobserve(this.$el);
16868
+ }
16869
+ setupResizeObserver() {
16870
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
16871
+ const vm = this;
16872
+ this.resizeObserver = new window.ResizeObserver(entries => {
16873
+ let height = 0;
16874
+ if (entries.length && entries[0].contentRect) {
16875
+ height = entries[0].contentRect.height;
16876
+ vm.width = entries[0].contentRect.width;
16877
+ }
16878
+ else {
16879
+ height = vm.$el.clientHeight;
16880
+ vm.width = vm.$el.clientWidth;
16881
+ }
16882
+ if (height > IteratorItemComponent_1.MIN_HEIGHT_EMTPY_ITEM && height !== vm.height) {
16883
+ vm.height = height;
16884
+ vm.emitUpdateHeight(vm.height);
16885
+ }
16886
+ });
16887
+ }
16888
+ };
16889
+ IteratorItemComponent.MIN_HEIGHT_EMTPY_ITEM = 20;
16890
+ iteratorItem_decorate([
16891
+ (0,external_vue_property_decorator_.Prop)(),
16892
+ iteratorItem_metadata("design:type", Number)
16893
+ ], IteratorItemComponent.prototype, "refreshCounter", void 0);
16894
+ iteratorItem_decorate([
16895
+ Emit('update-height'),
16896
+ iteratorItem_metadata("design:type", Function),
16897
+ iteratorItem_metadata("design:paramtypes", [Number]),
16898
+ iteratorItem_metadata("design:returntype", void 0)
16899
+ ], IteratorItemComponent.prototype, "emitUpdateHeight", null);
16900
+ iteratorItem_decorate([
16901
+ (0,external_vue_property_decorator_.Watch)('refreshCounter'),
16902
+ iteratorItem_metadata("design:type", Function),
16903
+ iteratorItem_metadata("design:paramtypes", []),
16904
+ iteratorItem_metadata("design:returntype", void 0)
16905
+ ], IteratorItemComponent.prototype, "emitRefreshCounterChanged", null);
16906
+ IteratorItemComponent = IteratorItemComponent_1 = iteratorItem_decorate([
16907
+ (0,external_vue_property_decorator_.Options)({
16908
+ name: 'IteratorItem',
16909
+ template: `
16910
+ <div @click="$emit('click', $event)" @dblclick="$emit('dblclick', $event)">
16911
+ <slot></slot>
16912
+ </div>
16913
+ `,
16914
+ emits: ['click', 'dblclick'],
16915
+ })
16916
+ ], IteratorItemComponent);
16917
+ /* harmony default export */ const iteratorItem = (IteratorItemComponent);
16918
+
16919
+ ;// CONCATENATED MODULE: ./src/utils/strings.ts
16920
+ function camelCase(str) {
16921
+ // Replace special characters with a space
16922
+ str = str.replace(/[^\d A-Za-z]/g, ' ');
16923
+ // put a space before an uppercase letter
16924
+ str = str.replace(/([a-z](?=[A-Z]))/g, '$1 ');
16925
+ // Lower case first character and some other stuff
16926
+ str = str
16927
+ .replace(/([^\d A-Za-z])|^\d+/g, '')
16928
+ .trim()
16929
+ .toLowerCase();
16930
+ // uppercase characters preceded by a space or number
16931
+ str = str.replace(/([\d ]+)([A-Za-z])/g, (a, b, c) => b.trim() + c.toUpperCase());
16932
+ return str;
16933
+ }
16934
+ const strings = {
16935
+ camelCase
16936
+ };
16937
+
16938
+
16939
+ ;// CONCATENATED MODULE: ./src/ld-data-iterator/prefixes.ts
16940
+ /* eslint-disable no-undefined */
16941
+
16942
+ const cache = {};
16943
+ const testStyle = typeof document !== 'undefined' ? document.createElement('div').style : undefined;
16944
+ // Get Prefix
16945
+ // http://davidwalsh.name/vendor-prefix
16946
+ const prefix = (function () {
16947
+ const styles = typeof window !== 'undefined' ? window.getComputedStyle(document.documentElement, '') : undefined;
16948
+ const match = typeof styles !== 'undefined'
16949
+ ? Array.prototype.slice
16950
+ .call(styles)
16951
+ .join('')
16952
+ .match(/-(moz|webkit|ms)-/)
16953
+ : null;
16954
+ const pre = match !== null ? match[1] : undefined;
16955
+ // eslint-disable-next-line @typescript-eslint/prefer-regexp-exec
16956
+ const dom = typeof pre !== 'undefined' ? 'WebKit|Moz|MS|O'.match(new RegExp('(' + pre + ')', 'i'))[1] : undefined;
16957
+ return dom
16958
+ ? {
16959
+ dom,
16960
+ lowercase: pre,
16961
+ css: `-${pre}-`,
16962
+ js: pre[0].toUpperCase() + pre.substr(1),
16963
+ }
16964
+ : undefined;
16965
+ })();
16966
+ function getVendorPrefixedName(property) {
16967
+ const name = strings.camelCase(property);
16968
+ if (!cache[name]) {
16969
+ if (prefix !== undefined && testStyle[(prefix.css + property)] !== undefined) {
16970
+ cache[name] = prefix.css + property;
16971
+ }
16972
+ else if (testStyle[property] !== undefined) {
16973
+ cache[name] = property;
16974
+ }
16975
+ }
16976
+ return cache[name];
16977
+ }
16978
+
16979
+ ;// CONCATENATED MODULE: ./src/ld-data-iterator/translate.ts
16980
+
16981
+
16982
+ // browser detection and prefixing tools
16983
+ const transform = typeof window !== 'undefined' ? getVendorPrefixedName('transform') : undefined;
16984
+ const backfaceVisibility = typeof window !== 'undefined' ? getVendorPrefixedName('backfaceVisibility') : undefined;
16985
+ const hasCSSTransforms = typeof window !== 'undefined' ? Boolean(getVendorPrefixedName('transform')) : undefined;
16986
+ const hasCSS3DTransforms = typeof window !== 'undefined' ? Boolean(getVendorPrefixedName('perspective')) : undefined;
16987
+ const ua = typeof window !== 'undefined' ? window.navigator.userAgent : 'Chrome';
16988
+ const isSafari = ua.includes('Safari/') && !ua.includes('Chrome/');
16989
+ function translateXY(styles, x, y) {
16990
+ if (typeof transform !== 'undefined' && hasCSSTransforms) {
16991
+ if (!isSafari && hasCSS3DTransforms) {
16992
+ styles[transform] = `translate3d(${x}px, ${y}px, 0)`;
16993
+ styles[backfaceVisibility] = 'hidden';
16994
+ }
16995
+ else {
16996
+ styles[strings.camelCase(transform)] = `translate(${x}px, ${y}px)`;
16997
+ }
16998
+ }
16999
+ else {
17000
+ styles.top = `${y}px`;
17001
+ styles.left = `${x}px`;
17002
+ }
17003
+ }
17004
+
17005
+ ;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-data-iterator/ld-data-iterator.ts?vue&type=script&lang=ts&external
17006
+ var ld_data_iteratorvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
17007
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
17008
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17009
+ 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;
17010
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
17011
+ };
17012
+ var ld_data_iteratorvue_type_script_lang_ts_external_metadata = (undefined && undefined.__metadata) || function (k, v) {
17013
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
17014
+ };
17015
+ var DataIteratorComponent_1;
17016
+ var ld_data_iteratorvue_type_script_lang_ts_external_a, ld_data_iteratorvue_type_script_lang_ts_external_b, ld_data_iteratorvue_type_script_lang_ts_external_c, ld_data_iteratorvue_type_script_lang_ts_external_d, ld_data_iteratorvue_type_script_lang_ts_external_e, ld_data_iteratorvue_type_script_lang_ts_external_f, ld_data_iteratorvue_type_script_lang_ts_external_g, ld_data_iteratorvue_type_script_lang_ts_external_h, ld_data_iteratorvue_type_script_lang_ts_external_j, _k, _l, _m;
17017
+
17018
+
17019
+
17020
+
17021
+
17022
+
17023
+ var ScrollTo;
17024
+ (function (ScrollTo) {
17025
+ ScrollTo[ScrollTo["None"] = 0] = "None";
17026
+ ScrollTo[ScrollTo["Page"] = 1] = "Page";
17027
+ ScrollTo[ScrollTo["ActiveRow"] = 2] = "ActiveRow";
17028
+ ScrollTo[ScrollTo["DoubleCheck"] = 3] = "DoubleCheck";
17029
+ })(ScrollTo || (ScrollTo = {}));
17030
+ let DataIteratorComponent = DataIteratorComponent_1 = class DataIteratorComponent extends (0,external_vue_property_decorator_.mixins)(ViewportMixin) {
17031
+ constructor() {
17032
+ super(...arguments);
17033
+ this.clicks = 0;
17034
+ this.scrollbarV = true;
17035
+ this.innerWidth = 0;
17036
+ this.bodyHeight = 0;
17037
+ this.offsetY = 0;
17038
+ this.currentPage = 0;
17039
+ this.activeRowIndex = -1;
17040
+ this.oldRowCount = 0;
17041
+ this.rowContexts = [];
17042
+ this.visibleItems = [];
17043
+ this.afterEmptyItems = [];
17044
+ this.beforeEmptyItems = [];
17045
+ this.rowHeightsUpdate = [];
17046
+ this.lastRowOffsetY = 0;
17047
+ this.enabledPages = null;
17048
+ this.itemsWaitingHeight = new Set();
17049
+ this.refreshCounter = 0;
17050
+ this.fixedTopContext = null;
17051
+ this.firstVisible = 0;
17052
+ this.lastVisible = 0;
17053
+ this.loading = false;
17054
+ this.scrollTo = ScrollTo.None;
17055
+ this.removingIndex = -1;
17056
+ this.changedItemsPromise = Promise.resolve();
17057
+ }
17058
+ emitUpdateLoading(value) {
17059
+ return value;
17060
+ }
17061
+ emitUpdateTotalPages(value) {
17062
+ return value;
17063
+ }
17064
+ emitUpdatePage(value) {
17065
+ return value;
17066
+ }
17067
+ emitUpdateSelect(row, index) {
17068
+ //
17069
+ }
17070
+ emitClick(row, index) {
17071
+ //
17072
+ }
17073
+ emitDblclick(row, index) {
17074
+ //
17075
+ }
17076
+ emitLoadingChanged() {
17077
+ this.emitUpdateLoading(this.loading);
17078
+ }
17079
+ async onItemsChanged(newVal, oldVal) {
17080
+ if (newVal === oldVal) {
17081
+ // дождемся обработки предыдущего изменения (т.к. удаление работает с задержкой на анимацию)
17082
+ await this.changedItemsPromise;
17083
+ let changeReason = 'updated';
17084
+ if (newVal.length < this.oldRowCount) {
17085
+ changeReason = 'removed';
17086
+ }
17087
+ else if (newVal.length > this.oldRowCount) {
17088
+ changeReason = 'added';
17089
+ }
17090
+ if (changeReason === 'removed' && this.removedItem) {
17091
+ this.changedItemsPromise = this.removeItem();
17092
+ await this.changedItemsPromise;
17093
+ this.removingIndex = -1;
17094
+ }
17095
+ this.rowContexts.forEach((rc, i) => {
17096
+ if (newVal[rc.index]) {
17097
+ rc.row = newVal[rc.index];
17098
+ }
17099
+ });
17100
+ if (changeReason === 'added') {
17101
+ const diff = newVal.length - this.oldRowCount;
17102
+ for (let i = 0; i < diff; i++) {
17103
+ const rc = this.rowContexts[this.oldRowCount - 1 + i];
17104
+ this.rowContexts.push({
17105
+ index: this.oldRowCount + i,
17106
+ rowIndex: this.oldRowCount + i,
17107
+ offsetY: rc ? rc.offsetY + this.approximateRowHeight : 0,
17108
+ row: newVal[this.oldRowCount + i],
17109
+ rowHeight: this.approximateRowHeight,
17110
+ });
17111
+ }
17112
+ this.sort();
17113
+ this.updateRows(true);
17114
+ }
17115
+ this.oldRowCount = this.rowContexts.length;
17116
+ return;
17117
+ }
17118
+ this.visibleItems = [];
17119
+ this.rowContexts = [];
17120
+ if (newVal !== oldVal) {
17121
+ await this.$nextTick();
17122
+ }
17123
+ this.rowsChanged = true;
17124
+ this.init();
17125
+ this.sort();
17126
+ this.oldRowCount = this.rowContexts.length;
17127
+ this.offsetY = -1;
17128
+ this.currentPage = -1;
17129
+ this.totalPages = this.rowCount && this.page >= 0 ? this.page + 1 : 1;
17130
+ this.emitUpdateTotalPages(this.totalPages);
17131
+ this.listEl.scrollTop = 0;
17132
+ if (newVal !== oldVal) {
17133
+ this.listEl.style['visibility'] = 'hidden';
17134
+ }
17135
+ this.waitingForFirstPageRendered = true;
17136
+ DataIteratorComponent_1.CNT = 0;
17137
+ DataIteratorComponent_1.COUNTER = 0;
17138
+ if (!this.rowContexts.length) {
17139
+ this.renderPromise = Promise.resolve();
17140
+ }
17141
+ else {
17142
+ this.renderPromise = new Promise(resolve => {
17143
+ this.renderResolve = resolve;
17144
+ });
17145
+ }
17146
+ try {
17147
+ await this.renderPromise;
17148
+ if (!this.selectedIndices.length) {
17149
+ this.setSelected(0);
17150
+ }
17151
+ }
17152
+ finally {
17153
+ if (this.listEl) {
17154
+ this.listEl.style['visibility'] = 'unset';
17155
+ }
17156
+ this.waitingForFirstPageRendered = false;
17157
+ if (this.rowContexts.length) {
17158
+ this.onPageChanged();
17159
+ }
17160
+ }
17161
+ }
17162
+ onScrollHeightChanged() {
17163
+ this.calcTotalPages();
17164
+ }
17165
+ async onFixTopActiveItemChanged() {
17166
+ if (!this.activeItem && !this.fixTopActiveItem) {
17167
+ return;
17168
+ }
17169
+ if (this.fixTopActiveItem) {
17170
+ this.fixedTopContext = this.excludeItem(this.activeItem);
17171
+ }
17172
+ else {
17173
+ this.includeItem(this.fixedTopContext);
17174
+ this.fixedTopContext = null;
17175
+ }
17176
+ await this.$nextTick();
17177
+ if (this.listEl) {
17178
+ const dims = this.listEl.getBoundingClientRect();
17179
+ this.innerWidth = Math.floor(dims.width);
17180
+ this.bodyHeight = dims.height;
17181
+ }
17182
+ this.updateRows(true);
17183
+ this.updatePage();
17184
+ await this.$nextTick();
17185
+ this.calcTotalPages();
17186
+ }
17187
+ onMinRowHeightChanged() {
17188
+ this.onItemsChanged(this.items, null);
17189
+ }
17190
+ onPageChanged() {
17191
+ if (this.page === this.currentPage ||
17192
+ this.waitingForFirstPageRendered ||
17193
+ // eslint-disable-next-line no-undefined
17194
+ this.waitingForFirstPageRendered === undefined) {
17195
+ return;
17196
+ }
17197
+ DataIteratorComponent_1.COUNTER = 0;
17198
+ if ((this.rowCount && !this.visibleItems.length) || !this.listEl) {
17199
+ this.callOnPageChanged = true;
17200
+ this.startCheckAllRowsIsRendered();
17201
+ return;
17202
+ }
17203
+ // установить offsetY начала страницы
17204
+ let offsetY = (this.page - 1) * this.bodyHeight;
17205
+ offsetY += 1;
17206
+ const pageDiff = Math.abs(this.currentPage - this.page);
17207
+ let first = this.getRowIndex(offsetY);
17208
+ this.firstRowForPage = first;
17209
+ this.scrollTo = ScrollTo.Page;
17210
+ const last = Math.min(first + this.visibleItems.length - 1, this.rowHeightsUpdate.length - 1);
17211
+ if ((pageDiff > 1 || (this.toLastPage && !this.scrollToActiveItem)) &&
17212
+ (!this.rowHeightsUpdate[first] || !this.rowHeightsUpdate[last])) {
17213
+ this.loading = true;
17214
+ // найдем 1-й элемент по средней высоте элемента
17215
+ first = this.getRowIndexByAverage(offsetY);
17216
+ if (first >= this.items.length - 1) {
17217
+ first = this.items.length - 10;
17218
+ }
17219
+ this.firstRowForPage = first;
17220
+ }
17221
+ const rowContext = this.rowContexts[first];
17222
+ this.fromPager = true;
17223
+ if (this.scrollToActiveItem && this.currentPage < 0) {
17224
+ // для режима превью и первой загрузки списка перейдем к активному элементу (т.е., возможно, изменим страницу)
17225
+ this.scrollTo = ScrollTo.ActiveRow;
17226
+ this.firstRowForPage = null;
17227
+ }
17228
+ this.currentPage = this.page;
17229
+ if (rowContext) {
17230
+ this.listEl.scrollTop = rowContext.offsetY;
17231
+ if (this.shouldSetActiveRow) {
17232
+ this.shouldSetActiveRow = false;
17233
+ this.setSelected(first);
17234
+ }
17235
+ }
17236
+ this.startCheckAllRowsIsRendered();
17237
+ }
17238
+ onSortFieldChanged(newVal, oldVal) {
17239
+ if (newVal?.prop !== oldVal?.prop || newVal?.direction !== oldVal?.direction) {
17240
+ this.sort();
17241
+ this.updateRows(true);
17242
+ }
17243
+ }
17244
+ onSelectedIndicesChanged() {
17245
+ if (Array.isArray(this.selectedIndices) && this.selectedIndices.length) {
17246
+ const index = this.selectedIndices[0];
17247
+ const i = this.rowContexts.findIndex(r => r.index === index);
17248
+ if (i >= 0) {
17249
+ this.activeRowIndex = i;
17250
+ }
17251
+ }
17252
+ else {
17253
+ this.activeRowIndex = -1;
17254
+ }
17255
+ }
17256
+ async onFirstItemSelectCounterChanged() {
17257
+ await this.renderPromise;
17258
+ this.setSelected(0);
17259
+ }
17260
+ onNextItemSelectCounterChanged() {
17261
+ if (this.activeRowIndex + 1 < this.rowContexts.length) {
17262
+ this.setSelected(this.activeRowIndex + 1);
17263
+ }
17264
+ }
17265
+ async onInnerWidthChanged(newVal, oldVal) {
17266
+ if (!oldVal) {
17267
+ return;
17268
+ }
17269
+ this.updateRowOffsetsCache(0, true);
17270
+ this.updateRows(true);
17271
+ this.updatePage();
17272
+ await this.$nextTick();
17273
+ this.calcTotalPages();
17274
+ }
17275
+ created() {
17276
+ this.onItemsChanged(this.items, null);
17277
+ }
17278
+ mounted() {
17279
+ if (window.ResizeObserver) {
17280
+ this.resizeObserver = new window.ResizeObserver(entries => {
17281
+ if (entries.length && entries[0].contentRect) {
17282
+ this.bodyHeight = entries[0].contentRect.height;
17283
+ this.innerWidth = entries[0].contentRect.width;
17284
+ }
17285
+ else {
17286
+ this.bodyHeight = this.$el.clientHeight;
17287
+ this.innerWidth = this.$el.clientWidth;
17288
+ }
17289
+ });
17290
+ this.resizeObserver.observe(this.$el);
17291
+ }
17292
+ this.listEl = this.$el.querySelector('#iterator-list');
17293
+ const dims = this.listEl.getBoundingClientRect();
17294
+ this.innerWidth = Math.floor(dims.width);
17295
+ this.bodyHeight = dims.height;
17296
+ this.init();
17297
+ this.offsetY = 0;
17298
+ this.currentPage = -1;
17299
+ this.totalPages = 1;
17300
+ this.onKeyDownHandler = this.onKeyDown.bind(this);
17301
+ document.addEventListener('keydown', this.onKeyDownHandler);
17302
+ this.tick();
17303
+ }
17304
+ beforeUnmount() {
17305
+ this.stopTick = true;
17306
+ document.removeEventListener('keydown', this.onKeyDownHandler);
17307
+ if (this.resizeObserver) {
17308
+ this.resizeObserver.unobserve(this.$el);
17309
+ }
17310
+ }
17311
+ tick(force = false) {
17312
+ if (this.stopTick) {
17313
+ return;
17314
+ }
17315
+ requestAnimationFrame(() => this.tick());
17316
+ this.loading = this.waitingForFirstPageRendered || Boolean(this.scrollTo !== ScrollTo.None);
17317
+ if (this.scrollbarV) {
17318
+ if (!this.listEl) {
17319
+ return;
17320
+ }
17321
+ const scrollTop = this.listEl.scrollTop;
17322
+ if (!force && this.offsetY === scrollTop) {
17323
+ return;
17324
+ }
17325
+ this.offsetY = scrollTop;
17326
+ clearTimeout(this.updatePageTimeoutId);
17327
+ if (this.scrollTo === ScrollTo.Page) {
17328
+ // чтобы был виден лоадер нужно вызвать через setTimeout
17329
+ setTimeout(() => this.updateRows(), 10);
17330
+ }
17331
+ else {
17332
+ this.updateRows();
17333
+ }
17334
+ this.updatePageTimeoutId = setTimeout(() => this.updatePage(), 100);
17335
+ }
17336
+ }
17337
+ isItemActive(item) {
17338
+ return item.row === this.activeItem;
17339
+ }
17340
+ isItemRemoving(rc) {
17341
+ return rc.rowIndex === this.removingIndex;
17342
+ }
17343
+ onClick(rc) {
17344
+ this.clicks++;
17345
+ if (this.clicks === 1) {
17346
+ this.timerId = setTimeout(() => {
17347
+ this.emitClick(rc.row, rc.index);
17348
+ this.clicks = 0;
17349
+ }, 200);
17350
+ }
17351
+ else {
17352
+ clearTimeout(this.timerId);
17353
+ this.emitDblclick(rc.row, rc.index);
17354
+ this.clicks = 0;
17355
+ }
17356
+ this.setSelected(rc.rowIndex);
17357
+ }
17358
+ onFocus() {
17359
+ this.isFocused = true;
17360
+ }
17361
+ onBlur() {
17362
+ this.isFocused = false;
17363
+ }
17364
+ onUpdateFixedTopHeight(height) {
17365
+ if (!this.fixedTopContext) {
17366
+ return;
17367
+ }
17368
+ this.fixedTopContext.rowHeight = height;
17369
+ }
17370
+ onUpdateItemHeight(rowContext, height) {
17371
+ try {
17372
+ height += this.itemGap;
17373
+ if (this.rowHeightsUpdate[rowContext.rowIndex] && rowContext.rowHeight === height) {
17374
+ return;
17375
+ }
17376
+ rowContext.rowHeight = height;
17377
+ this.itemsWaitingHeight.delete(rowContext.rowIndex);
17378
+ if (rowContext.rowIndex === 0) {
17379
+ rowContext.offsetY = 0;
17380
+ }
17381
+ clearTimeout(this.waitForAllRowsUpdatedTimer);
17382
+ this.waitForAllRowsUpdatedTimer = setTimeout(() => {
17383
+ if (this.itemsWaitingHeight.size && DataIteratorComponent_1.CNT < 50) {
17384
+ DataIteratorComponent_1.CNT++;
17385
+ return;
17386
+ }
17387
+ if (this.waitingForFirstPageRendered) {
17388
+ this.renderResolve();
17389
+ }
17390
+ else {
17391
+ this.startCheckAllRowsIsRendered();
17392
+ }
17393
+ }, 50);
17394
+ }
17395
+ finally {
17396
+ this.rowHeightsUpdate[rowContext.rowIndex] = true;
17397
+ if (!this.itemsWaitingHeight.size) {
17398
+ this.updateRowOffsetsCache(this.firstVisible, true);
17399
+ }
17400
+ }
17401
+ }
17402
+ startCheckAllRowsIsRendered(timeout) {
17403
+ this.stopCheckAllRowsIsRendered();
17404
+ this.checkRowsUpdatedTimer = setTimeout(() => this.checkRowsUpdated(), timeout ?? 50);
17405
+ }
17406
+ stopCheckAllRowsIsRendered() {
17407
+ clearTimeout(this.checkRowsUpdatedTimer);
17408
+ }
17409
+ checkRowsUpdated() {
17410
+ if (this.itemsWaitingHeight.size || !this.listEl) {
17411
+ DataIteratorComponent_1.COUNTER++;
17412
+ if (DataIteratorComponent_1.COUNTER > 50) {
17413
+ this.itemsWaitingHeight.clear();
17414
+ this.updateRowOffsetsCache(0, true);
17415
+ }
17416
+ this.startCheckAllRowsIsRendered();
17417
+ return;
17418
+ }
17419
+ this.stopCheckAllRowsIsRendered();
17420
+ this.fromPager = false;
17421
+ if (this.callOnPageChanged) {
17422
+ // нужно дополнительно вызвать onPageChanged
17423
+ this.callOnPageChanged = false;
17424
+ this.$nextTick(() => this.onPageChanged());
17425
+ return;
17426
+ }
17427
+ if (this.scrollTo === ScrollTo.DoubleCheck) {
17428
+ let first = this.firstRowForPage ?? this.activeRowIndex;
17429
+ // eslint-disable-next-line no-undefined
17430
+ if (first === null || first === undefined || first < 0) {
17431
+ this.onSelectedIndicesChanged();
17432
+ first = this.activeRowIndex;
17433
+ this.setSelected(first);
17434
+ }
17435
+ if (first >= 0 && this.rowHeightsUpdate[first]) {
17436
+ const rc = this.rowContexts[first];
17437
+ const el = this.listEl;
17438
+ const bottom = el.scrollTop + this.bodyHeight;
17439
+ if (rc.offsetY >= el.scrollTop && (rc.offsetY + rc.rowHeight <= bottom || rc.rowHeight >= bottom)) {
17440
+ this.scrollTo = ScrollTo.None;
17441
+ this.firstRowForPage = null;
17442
+ this.updatePage();
17443
+ if (this.toLastPage && this.currentPage < this.totalPages && DataIteratorComponent_1.COUNTER < 10) {
17444
+ DataIteratorComponent_1.COUNTER++;
17445
+ this.scrollTo = ScrollTo.Page;
17446
+ this.firstRowForPage = this.rowCount - 5;
17447
+ }
17448
+ }
17449
+ else {
17450
+ el.scrollTop = rc.offsetY;
17451
+ }
17452
+ }
17453
+ else {
17454
+ this.scrollTo = ScrollTo.None;
17455
+ }
17456
+ }
17457
+ if (this.scrollTo === ScrollTo.Page || this.scrollTo === ScrollTo.ActiveRow) {
17458
+ // переход на страницу, которая еще не рендерилась
17459
+ let first = this.firstRowForPage;
17460
+ if (this.scrollTo === ScrollTo.ActiveRow) {
17461
+ if (this.activeRowIndex < 0) {
17462
+ this.onSelectedIndicesChanged();
17463
+ this.setSelected(this.activeRowIndex);
17464
+ }
17465
+ first = this.activeRowIndex;
17466
+ }
17467
+ this.scrollTo = ScrollTo.DoubleCheck;
17468
+ if (first >= 0) {
17469
+ const rc = this.rowContexts[first];
17470
+ const el = this.listEl;
17471
+ el.scrollTop = rc?.offsetY ?? 0;
17472
+ }
17473
+ }
17474
+ if (this.scrollTo !== ScrollTo.None) {
17475
+ this.startCheckAllRowsIsRendered(100);
17476
+ }
17477
+ }
17478
+ updateRowOffsetsCache(rowIndex, all) {
17479
+ let context = this.rowContexts[rowIndex];
17480
+ if (!context) {
17481
+ return;
17482
+ }
17483
+ let offsetY = context.offsetY;
17484
+ let height = 0;
17485
+ const last = all ? this.rowContexts.length : this.lastVisible + 1;
17486
+ while (context && rowIndex < last) {
17487
+ context.offsetY = offsetY;
17488
+ this.rowContexts[rowIndex] = context;
17489
+ height = context.rowHeight;
17490
+ offsetY += height;
17491
+ rowIndex++;
17492
+ context = this.rowContexts[rowIndex];
17493
+ }
17494
+ this.lastRowOffsetY = offsetY;
17495
+ }
17496
+ itemStyles(rowContext) {
17497
+ const styles = {};
17498
+ if (rowContext.rowIndex === 0) {
17499
+ translateXY(styles, 0, 0);
17500
+ return styles;
17501
+ }
17502
+ if (rowContext.offsetY) {
17503
+ translateXY(styles, 0, rowContext.offsetY);
17504
+ return styles;
17505
+ }
17506
+ const posY = this.rowContexts[rowContext.rowIndex].offsetY;
17507
+ translateXY(styles, 0, posY);
17508
+ return styles;
17509
+ }
17510
+ topFixedStyles() {
17511
+ return {
17512
+ height: this.fixedTopContext?.rowHeight + 'px',
17513
+ };
17514
+ }
17515
+ emptyItemStyles(rowContext) {
17516
+ const styles = {
17517
+ height: rowContext.rowHeight + 'px',
17518
+ };
17519
+ if (rowContext.offsetY) {
17520
+ translateXY(styles, 0, rowContext.offsetY);
17521
+ }
17522
+ return styles;
17523
+ }
17524
+ onKeyDown(event) {
17525
+ const target = event.target;
17526
+ if (target.tagName !== 'BODY') {
17527
+ return;
17528
+ }
17529
+ if (['ArrowUp', 'PageUp', 'ArrowDown', 'PageDown'].includes(event.code)) {
17530
+ event.preventDefault();
17531
+ event.stopPropagation();
17532
+ }
17533
+ if (['PageUp', 'PageDown'].includes(event.code)) {
17534
+ if (event.code === 'PageUp' && this.currentPage > 0) {
17535
+ this.shouldSetActiveRow = true;
17536
+ this.emitUpdatePage(this.currentPage - 1);
17537
+ return;
17538
+ }
17539
+ if (event.code === 'PageDown' && this.currentPage < this.totalPages) {
17540
+ this.shouldSetActiveRow = true;
17541
+ this.emitUpdatePage(this.currentPage + 1);
17542
+ return;
17543
+ }
17544
+ }
17545
+ let nextRowIndex = -1;
17546
+ const maxRowIndex = this.rowContexts[this.rowContexts.length - 1]?.rowIndex;
17547
+ switch (event.code) {
17548
+ case 'ArrowUp':
17549
+ if (this.activeRowIndex > 0) {
17550
+ nextRowIndex = this.activeRowIndex - 1;
17551
+ }
17552
+ break;
17553
+ case 'ArrowDown':
17554
+ if (this.activeRowIndex < this.rowContexts.length - 1) {
17555
+ nextRowIndex = this.activeRowIndex + 1;
17556
+ }
17557
+ break;
17558
+ }
17559
+ if (nextRowIndex < 0 || nextRowIndex > maxRowIndex) {
17560
+ return;
17561
+ }
17562
+ const { offsetY, rowHeight } = this.rowContexts[nextRowIndex];
17563
+ if (!rowHeight) {
17564
+ return;
17565
+ }
17566
+ let h = 0;
17567
+ let scrollTop = this.listEl.scrollTop;
17568
+ if (event.code === 'ArrowDown') {
17569
+ h = offsetY + rowHeight - (scrollTop + this.bodyHeight);
17570
+ }
17571
+ else if (event.code === 'ArrowUp') {
17572
+ h = offsetY - rowHeight - scrollTop;
17573
+ }
17574
+ if (h > 0 && event.code === 'ArrowDown') {
17575
+ scrollTop += h;
17576
+ }
17577
+ else if (h < 0 && event.code === 'ArrowUp') {
17578
+ scrollTop += h;
17579
+ }
17580
+ else if (h === 0 && event.code === 'ArrowUp' && [0, 1, 2].includes(this.activeRowIndex)) {
17581
+ scrollTop = h;
17582
+ }
17583
+ this.listEl.scrollTop = scrollTop;
17584
+ this.setSelected(nextRowIndex);
17585
+ }
17586
+ calcTotalPages() {
17587
+ let totalPages = this.bodyHeight ? this.scrollHeight / this.bodyHeight : 1;
17588
+ const rounded = Math.floor(totalPages);
17589
+ const rest = totalPages - rounded;
17590
+ const averageHeight = this.getAverageItemHeight();
17591
+ if (rest >= averageHeight / this.scrollHeight) {
17592
+ totalPages = Math.ceil(totalPages);
17593
+ }
17594
+ else {
17595
+ totalPages = rounded;
17596
+ }
17597
+ if (this.totalPages !== totalPages) {
17598
+ this.totalPages = totalPages;
17599
+ this.emitUpdateTotalPages(totalPages);
17600
+ }
17601
+ if (!this.scrollToActiveItem && this.toLastPage && this.currentPage < this.totalPages) {
17602
+ // для перехода на последнюю страницу (для НЕ превью) изменим страницу
17603
+ this.emitUpdatePage(this.totalPages);
17604
+ }
17605
+ return totalPages;
17606
+ }
17607
+ updatePage() {
17608
+ if (this.fromPager || this.currentPage < 0 || this.firstRowForPage || this.callOnPageChanged) {
17609
+ return;
17610
+ }
17611
+ let offset;
17612
+ let realLastVisible = this.lastVisible;
17613
+ for (let i = this.lastVisible; i >= 0; i--) {
17614
+ const rowContext = this.rowContexts[i];
17615
+ if (!rowContext) {
17616
+ throw new Error('null rowContext');
17617
+ }
17618
+ if (this.offsetY + this.bodyHeight >= rowContext.offsetY) {
17619
+ realLastVisible = i;
17620
+ break;
17621
+ }
17622
+ }
17623
+ if (realLastVisible >= this.rowCount - 1 || this.scrollHeight - this.bodyHeight === this.offsetY) {
17624
+ offset = this.totalPages;
17625
+ this.emitUpdateTotalPages(this.totalPages);
17626
+ }
17627
+ else {
17628
+ const index = this.getRowIndex(this.offsetY);
17629
+ const height = this.rowContexts && this.rowContexts.length > index
17630
+ ? this.rowContexts[index]?.rowHeight
17631
+ : this.approximateRowHeight;
17632
+ offset = !index || height >= this.bodyHeight ? 1 : (this.offsetY + height * 2) / this.bodyHeight;
17633
+ if (offset < 1) {
17634
+ offset = 1;
17635
+ }
17636
+ else {
17637
+ offset = Math.ceil(offset);
17638
+ }
17639
+ }
17640
+ if (this.currentPage !== offset) {
17641
+ this.currentPage = offset;
17642
+ this.emitUpdatePage(offset);
17643
+ }
17644
+ }
17645
+ init() {
17646
+ if (this.items?.length) {
17647
+ this.rowContexts = new Array(this.items.length).fill(null);
17648
+ this.rowContexts.forEach((row, i) => {
17649
+ const offsetY = i === 0 ? 0 : this.rowContexts[i - 1].offsetY + this.approximateRowHeight;
17650
+ this.rowContexts[i] = {
17651
+ offsetY,
17652
+ row: this.items[i],
17653
+ rowIndex: i,
17654
+ index: i,
17655
+ rowHeight: this.approximateRowHeight,
17656
+ };
17657
+ });
17658
+ this.rowHeightsUpdate = new Array(this.rowCount);
17659
+ }
17660
+ else {
17661
+ this.rowContexts = [];
17662
+ this.rowHeightsUpdate = [];
17663
+ }
17664
+ this.itemsWaitingHeight.clear();
17665
+ }
17666
+ async updateRows(force = false, afterRowsHeight = false) {
17667
+ const { first, last } = this.getIndexes();
17668
+ if (last < first) {
17669
+ return;
17670
+ }
17671
+ if (!force && !this.rowsChanged && this.firstVisible === first && this.lastVisible === last) {
17672
+ return;
17673
+ }
17674
+ this.rowsChanged = false;
17675
+ this.firstVisible = first;
17676
+ this.lastVisible = last;
17677
+ let rowIndex = first;
17678
+ let idx = 0;
17679
+ const temp = new Array(last - first);
17680
+ while (rowIndex <= last && rowIndex < this.rowCount) {
17681
+ const rc = this.rowContexts[rowIndex];
17682
+ if (rc) {
17683
+ temp[idx] = rc;
17684
+ idx++;
17685
+ if (!this.fixedRowHeight && !this.rowHeightsUpdate[rowIndex]) {
17686
+ this.itemsWaitingHeight.add(rowIndex);
17687
+ }
17688
+ }
17689
+ rowIndex++;
17690
+ if (rowIndex % 50 === 0) {
17691
+ await this.$nextTick();
17692
+ }
17693
+ }
17694
+ this.pageSize = temp.length - 1;
17695
+ this.visibleItems = temp;
17696
+ }
17697
+ getIndexes() {
17698
+ let first = -1;
17699
+ let last = -1;
17700
+ if (!this.rowContexts.length) {
17701
+ return { first, last };
17702
+ }
17703
+ if (this.scrollbarV) {
17704
+ first = this.getRowIndex(this.offsetY);
17705
+ first = Math.max(first - 1, 0);
17706
+ while (first > 0) {
17707
+ if (!this.rowHeightsUpdate[first - 1]) {
17708
+ first--;
17709
+ }
17710
+ else {
17711
+ break;
17712
+ }
17713
+ }
17714
+ for (let i = first; i < this.rowContexts.length; i++) {
17715
+ const rowContext = this.rowContexts[i];
17716
+ if (!rowContext) {
17717
+ throw new Error('null');
17718
+ }
17719
+ if (last === -1 && this.offsetY + this.bodyHeight <= rowContext.offsetY) {
17720
+ last = i;
17721
+ break;
17722
+ }
17723
+ }
17724
+ }
17725
+ last = last > 0 ? last : this.rowContexts.length - 1;
17726
+ return { first, last };
17727
+ }
17728
+ getRowIndexByAverage(offsetY) {
17729
+ if (offsetY === 0 || !this.visibleItems.length) {
17730
+ return 0;
17731
+ }
17732
+ const averageHeight = this.getAverageItemHeight();
17733
+ return Math.floor(offsetY / averageHeight);
17734
+ }
17735
+ getAverageItemHeight() {
17736
+ let h = 0;
17737
+ for (const rowContext of this.visibleItems) {
17738
+ h += rowContext.rowHeight;
17739
+ }
17740
+ return this.visibleItems.length ? h / this.visibleItems.length : 0;
17741
+ }
17742
+ getRowIndex(offsetY) {
17743
+ if (offsetY === 0) {
17744
+ return 0;
17745
+ }
17746
+ let n = Math.floor(offsetY / this.approximateRowHeight);
17747
+ n = n >= this.rowCount ? this.rowCount - 1 : n;
17748
+ let result = 0;
17749
+ const diff = 10;
17750
+ for (let i = n; i > 0; i--) {
17751
+ result = i;
17752
+ if (this.rowHeightsUpdate[i] && this.rowContexts[i].offsetY - diff <= offsetY) {
17753
+ return result;
17754
+ }
17755
+ }
17756
+ return 0;
17757
+ }
17758
+ setSelected(rowIndex) {
17759
+ if (rowIndex >= 0) {
17760
+ const rc = this.rowContexts[rowIndex];
17761
+ if (rc) {
17762
+ this.emitUpdateSelect(rc.row, rc.index);
17763
+ }
17764
+ }
17765
+ }
17766
+ sort() {
17767
+ if (!this.rowContexts?.length || !this.sortField || !this.entityFromItem) {
17768
+ return;
17769
+ }
17770
+ this.rowContexts.sort((a, b) => {
17771
+ try {
17772
+ const first = this.entityFromItem(a.row);
17773
+ const second = this.entityFromItem(b.row);
17774
+ if (first && second) {
17775
+ let result = 0;
17776
+ switch (this.sortField.type) {
17777
+ case 'date':
17778
+ if (!this.$utils.isDefined(first[this.sortField.prop]) || !this.$utils.isDefined(second[this.sortField.prop])) {
17779
+ result = -1;
17780
+ }
17781
+ else {
17782
+ result = datetime.compare(first[this.sortField.prop], second[this.sortField.prop]);
17783
+ }
17784
+ break;
17785
+ case 'string':
17786
+ if (!this.$utils.isDefined(first[this.sortField.prop]) || !this.$utils.isDefined(second[this.sortField.prop])) {
17787
+ result = -1;
17788
+ }
17789
+ else {
17790
+ result = first[this.sortField.prop].localeCompare(second[this.sortField.prop]);
17791
+ }
17792
+ break;
17793
+ case 'number':
17794
+ if (!this.$utils.isDefined(first[this.sortField.prop]) || !this.$utils.isDefined(second[this.sortField.prop])) {
17795
+ result = -1;
17796
+ }
17797
+ else {
17798
+ result = first[this.sortField.prop] < second[this.sortField.prop] ? -1 : 1;
17799
+ }
17800
+ break;
17801
+ }
17802
+ return this.sortField.direction === 'asc' ? result : result * -1;
17803
+ }
17804
+ return 0;
17805
+ }
17806
+ catch (e) {
17807
+ /* eslint-disable no-console */
17808
+ console.error(e);
17809
+ }
17810
+ });
17811
+ this.rowContexts.forEach((rc, i) => {
17812
+ rc.rowIndex = i;
17813
+ });
17814
+ this.rowContexts[0].offsetY = 0;
17815
+ this.updateRowOffsetsCache(0, true);
17816
+ }
17817
+ id(item) {
17818
+ const entity = this.entityFromItem(item);
17819
+ return entity ? entity[this.keyProp] : null;
17820
+ }
17821
+ removeItem() {
17822
+ if (!this.removedItem) {
17823
+ return Promise.resolve();
17824
+ }
17825
+ const rc = this.rowContexts.find(r => r.index === this.removedItem.index);
17826
+ if (!rc) {
17827
+ return;
17828
+ }
17829
+ this.removingIndex = rc.rowIndex;
17830
+ return new Promise(resolve => {
17831
+ // setTimeout позволяет анимировать удаление элемента
17832
+ setTimeout(() => {
17833
+ if (rc) {
17834
+ this.rowContexts.splice(rc.rowIndex, 1);
17835
+ }
17836
+ for (const rc1 of this.rowContexts) {
17837
+ if (rc1.rowIndex >= rc.rowIndex) {
17838
+ rc1.rowIndex--;
17839
+ }
17840
+ if (rc1.index > this.removedItem.index) {
17841
+ rc1.index--;
17842
+ }
17843
+ }
17844
+ const start = rc.rowIndex - 1 >= 0 ? rc.rowIndex - 1 : 0;
17845
+ if (start === 0 && this.rowContexts.length) {
17846
+ this.rowContexts[0].offsetY = 0;
17847
+ }
17848
+ this.updateRowOffsetsCache(start, true);
17849
+ this.updateRows(true);
17850
+ resolve();
17851
+ }, 500);
17852
+ });
17853
+ }
17854
+ excludeItem(item) {
17855
+ const index = this.rowContexts.findIndex(c => c.row === item);
17856
+ if (index) {
17857
+ const rowContext = this.rowContexts[index];
17858
+ this.rowContexts.splice(index, 1);
17859
+ return rowContext;
17860
+ }
17861
+ return null;
17862
+ }
17863
+ includeItem(rowContext) {
17864
+ if (!rowContext) {
17865
+ return;
17866
+ }
17867
+ this.rowContexts.splice(rowContext.rowIndex, 0, rowContext);
17868
+ }
17869
+ get listStyles() {
17870
+ return {
17871
+ 'padding-left': this.padding + 'px',
17872
+ 'padding-right': this.padding + 'px',
17873
+ };
17874
+ }
17875
+ get rowCount() {
17876
+ return this.rowContexts?.length ?? 0;
17877
+ }
17878
+ get approximateRowHeight() {
17879
+ if (this.fixedRowHeight) {
17880
+ return this.rowHeight + this.itemGap;
17881
+ }
17882
+ return this.minRowHeight ?? 50;
17883
+ }
17884
+ get fixedRowHeight() {
17885
+ return typeof this.rowHeight === 'number';
17886
+ }
17887
+ get scrollHeight() {
17888
+ if (!this.bodyHeight) {
17889
+ // вызов нужен для того, чтобы при изменении bodyHeight пересчитался scrollHeight
17890
+ return 0;
17891
+ }
17892
+ let result = 0;
17893
+ if (this.scrollbarV && this.rowCount) {
17894
+ if (this.fixedRowHeight && typeof this.rowHeight === 'number') {
17895
+ const height = this.rowHeight;
17896
+ result = height * this.rowCount;
17897
+ }
17898
+ else if (Array.isArray(this.rowContexts) && this.rowContexts.length) {
17899
+ const rowContext = this.rowContexts[this.rowCount - 1];
17900
+ result = rowContext?.offsetY + rowContext?.rowHeight;
17901
+ result = Math.max(result, this.lastRowOffsetY - this.itemGap);
17902
+ }
17903
+ }
17904
+ if (!result) {
17905
+ result = this.approximateRowHeight * this.rowCount;
17906
+ }
17907
+ return result;
17908
+ }
17909
+ get scrollerStyles() {
17910
+ return {
17911
+ height: (this.scrollHeight || this.approximateRowHeight * this.rowCount) + 'px',
17912
+ width: '100%',
17913
+ };
17914
+ }
17915
+ };
17916
+ DataIteratorComponent.COUNTER = 0;
17917
+ DataIteratorComponent.CNT = 0;
17918
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17919
+ (0,external_vue_property_decorator_.Prop)({ type: Array, default: () => [] }),
17920
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", typeof (ld_data_iteratorvue_type_script_lang_ts_external_a = typeof Array !== "undefined" && Array) === "function" ? ld_data_iteratorvue_type_script_lang_ts_external_a : Object)
17921
+ ], DataIteratorComponent.prototype, "items", void 0);
17922
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17923
+ (0,external_vue_property_decorator_.Prop)(),
17924
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Number)
17925
+ ], DataIteratorComponent.prototype, "page", void 0);
17926
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17927
+ (0,external_vue_property_decorator_.Prop)({ required: true }),
17928
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", String)
17929
+ ], DataIteratorComponent.prototype, "keyProp", void 0);
17930
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17931
+ (0,external_vue_property_decorator_.Prop)(),
17932
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", typeof (ld_data_iteratorvue_type_script_lang_ts_external_b = typeof TSortField !== "undefined" && TSortField) === "function" ? ld_data_iteratorvue_type_script_lang_ts_external_b : Object)
17933
+ ], DataIteratorComponent.prototype, "sortField", void 0);
17934
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17935
+ (0,external_vue_property_decorator_.Prop)({ type: Function, default: (item) => item }),
17936
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function)
17937
+ ], DataIteratorComponent.prototype, "entityFromItem", void 0);
17938
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17939
+ (0,external_vue_property_decorator_.Prop)({ type: Array, default: () => [] }),
17940
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", typeof (ld_data_iteratorvue_type_script_lang_ts_external_c = typeof Array !== "undefined" && Array) === "function" ? ld_data_iteratorvue_type_script_lang_ts_external_c : Object)
17941
+ ], DataIteratorComponent.prototype, "selectedIndices", void 0);
17942
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17943
+ (0,external_vue_property_decorator_.Prop)(),
17944
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Number)
17945
+ ], DataIteratorComponent.prototype, "firstItemSelectCounter", void 0);
17946
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17947
+ (0,external_vue_property_decorator_.Prop)(),
17948
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Number)
17949
+ ], DataIteratorComponent.prototype, "nextItemSelectCounter", void 0);
17950
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17951
+ (0,external_vue_property_decorator_.Prop)(),
17952
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Number)
17953
+ ], DataIteratorComponent.prototype, "minRowHeight", void 0);
17954
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17955
+ (0,external_vue_property_decorator_.Prop)(),
17956
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Object)
17957
+ ], DataIteratorComponent.prototype, "rowHeight", void 0);
17958
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17959
+ (0,external_vue_property_decorator_.Prop)(),
17960
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", typeof (ld_data_iteratorvue_type_script_lang_ts_external_d = typeof TListItem !== "undefined" && TListItem) === "function" ? ld_data_iteratorvue_type_script_lang_ts_external_d : Object)
17961
+ ], DataIteratorComponent.prototype, "activeItem", void 0);
17962
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17963
+ (0,external_vue_property_decorator_.Prop)(),
17964
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Boolean)
17965
+ ], DataIteratorComponent.prototype, "fixTopActiveItem", void 0);
17966
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17967
+ (0,external_vue_property_decorator_.Prop)(),
17968
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Number)
17969
+ ], DataIteratorComponent.prototype, "padding", void 0);
17970
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17971
+ (0,external_vue_property_decorator_.Prop)({ default: 5 }),
17972
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Number)
17973
+ ], DataIteratorComponent.prototype, "itemGap", void 0);
17974
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17975
+ (0,external_vue_property_decorator_.Prop)({ default: false }),
17976
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Boolean)
17977
+ ], DataIteratorComponent.prototype, "toLastPage", void 0);
17978
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17979
+ (0,external_vue_property_decorator_.Prop)(),
17980
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Boolean)
17981
+ ], DataIteratorComponent.prototype, "scrollToActiveItem", void 0);
17982
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17983
+ (0,external_vue_property_decorator_.Prop)(),
17984
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", typeof (ld_data_iteratorvue_type_script_lang_ts_external_e = typeof TRemovedItem !== "undefined" && TRemovedItem) === "function" ? ld_data_iteratorvue_type_script_lang_ts_external_e : Object)
17985
+ ], DataIteratorComponent.prototype, "removedItem", void 0);
17986
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17987
+ Emit('loading-update'),
17988
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
17989
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", [Boolean]),
17990
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
17991
+ ], DataIteratorComponent.prototype, "emitUpdateLoading", null);
17992
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17993
+ Emit('total-pages'),
17994
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
17995
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", [Number]),
17996
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
17997
+ ], DataIteratorComponent.prototype, "emitUpdateTotalPages", null);
17998
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
17999
+ Emit('page'),
18000
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18001
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", [Number]),
18002
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
18003
+ ], DataIteratorComponent.prototype, "emitUpdatePage", null);
18004
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18005
+ Emit('select'),
18006
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18007
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", [typeof (ld_data_iteratorvue_type_script_lang_ts_external_f = typeof TListItem !== "undefined" && TListItem) === "function" ? ld_data_iteratorvue_type_script_lang_ts_external_f : Object, Number]),
18008
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
18009
+ ], DataIteratorComponent.prototype, "emitUpdateSelect", null);
18010
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18011
+ Emit('click'),
18012
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18013
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", [typeof (ld_data_iteratorvue_type_script_lang_ts_external_g = typeof TListItem !== "undefined" && TListItem) === "function" ? ld_data_iteratorvue_type_script_lang_ts_external_g : Object, Number]),
18014
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
18015
+ ], DataIteratorComponent.prototype, "emitClick", null);
18016
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18017
+ Emit('dblclick'),
18018
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18019
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", [typeof (ld_data_iteratorvue_type_script_lang_ts_external_h = typeof TListItem !== "undefined" && TListItem) === "function" ? ld_data_iteratorvue_type_script_lang_ts_external_h : Object, Number]),
18020
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
18021
+ ], DataIteratorComponent.prototype, "emitDblclick", null);
18022
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18023
+ (0,external_vue_property_decorator_.Watch)('loading'),
18024
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18025
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", []),
18026
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
18027
+ ], DataIteratorComponent.prototype, "emitLoadingChanged", null);
18028
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18029
+ (0,external_vue_property_decorator_.Watch)('items', { deep: true }),
18030
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18031
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", [typeof (ld_data_iteratorvue_type_script_lang_ts_external_j = typeof Array !== "undefined" && Array) === "function" ? ld_data_iteratorvue_type_script_lang_ts_external_j : Object, typeof (_k = typeof Array !== "undefined" && Array) === "function" ? _k : Object]),
18032
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", Promise)
18033
+ ], DataIteratorComponent.prototype, "onItemsChanged", null);
18034
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18035
+ (0,external_vue_property_decorator_.Watch)('scrollHeight'),
18036
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18037
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", []),
18038
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
18039
+ ], DataIteratorComponent.prototype, "onScrollHeightChanged", null);
18040
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18041
+ (0,external_vue_property_decorator_.Watch)('fixTopActiveItem'),
18042
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18043
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", []),
18044
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", Promise)
18045
+ ], DataIteratorComponent.prototype, "onFixTopActiveItemChanged", null);
18046
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18047
+ (0,external_vue_property_decorator_.Watch)('minRowHeight'),
18048
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18049
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", []),
18050
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
18051
+ ], DataIteratorComponent.prototype, "onMinRowHeightChanged", null);
18052
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18053
+ (0,external_vue_property_decorator_.Watch)('page'),
18054
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18055
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", []),
18056
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
18057
+ ], DataIteratorComponent.prototype, "onPageChanged", null);
18058
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18059
+ (0,external_vue_property_decorator_.Watch)('sortField'),
18060
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18061
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", [typeof (_l = typeof TSortField !== "undefined" && TSortField) === "function" ? _l : Object, typeof (_m = typeof TSortField !== "undefined" && TSortField) === "function" ? _m : Object]),
18062
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
18063
+ ], DataIteratorComponent.prototype, "onSortFieldChanged", null);
18064
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18065
+ (0,external_vue_property_decorator_.Watch)('selectedIndices', { immediate: true }),
18066
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18067
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", []),
18068
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
18069
+ ], DataIteratorComponent.prototype, "onSelectedIndicesChanged", null);
18070
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18071
+ (0,external_vue_property_decorator_.Watch)('firstItemSelectCounter'),
18072
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18073
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", []),
18074
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", Promise)
18075
+ ], DataIteratorComponent.prototype, "onFirstItemSelectCounterChanged", null);
18076
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18077
+ (0,external_vue_property_decorator_.Watch)('nextItemSelectCounter'),
18078
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18079
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", []),
18080
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
18081
+ ], DataIteratorComponent.prototype, "onNextItemSelectCounterChanged", null);
18082
+ ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18083
+ (0,external_vue_property_decorator_.Watch)('innerWidth'),
18084
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:type", Function),
18085
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:paramtypes", [Number, Number]),
18086
+ ld_data_iteratorvue_type_script_lang_ts_external_metadata("design:returntype", Promise)
18087
+ ], DataIteratorComponent.prototype, "onInnerWidthChanged", null);
18088
+ DataIteratorComponent = DataIteratorComponent_1 = ld_data_iteratorvue_type_script_lang_ts_external_decorate([
18089
+ (0,external_vue_property_decorator_.Options)({
18090
+ name: 'IteratorVirtual',
18091
+ components: {
18092
+ IteratorItem: iteratorItem
18093
+ },
18094
+ emits: ['click', 'dblclick'],
18095
+ })
18096
+ ], DataIteratorComponent);
18097
+ /* harmony default export */ const ld_data_iteratorvue_type_script_lang_ts_external = (DataIteratorComponent);
18098
+
18099
+ ;// CONCATENATED MODULE: ./src/ld-data-iterator/ld-data-iterator.ts?vue&type=script&lang=ts&external
18100
+
18101
+ ;// CONCATENATED MODULE: ./src/ld-data-iterator/ld-data-iterator.vue
18102
+
18103
+
18104
+
18105
+
18106
+ ;
18107
+ const ld_data_iterator_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_data_iteratorvue_type_script_lang_ts_external, [['render',ld_data_iteratorvue_type_template_id_7f1ec2b2_ts_true_render]])
18108
+
18109
+ /* harmony default export */ const ld_data_iterator = (ld_data_iterator_exports_);
18110
+ ;// CONCATENATED MODULE: ./src/ld-data-iterator/index.ts
18111
+
18112
+ function ld_data_iterator_reg(vue, options) {
18113
+ vue.component(options.aliases['ld-data-iterator'], ld_data_iterator);
18114
+ }
18115
+ /* harmony default export */ const src_ld_data_iterator = (ld_data_iterator_reg);
18116
+
16673
18117
  // EXTERNAL MODULE: external "vue-toastification"
16674
18118
  var external_vue_toastification_ = __webpack_require__(7982);
16675
18119
  var external_vue_toastification_default = /*#__PURE__*/__webpack_require__.n(external_vue_toastification_);
@@ -16989,6 +18433,7 @@ const ValidateMixinOptions = mixin;
16989
18433
 
16990
18434
 
16991
18435
 
18436
+
16992
18437
 
16993
18438
 
16994
18439
  const ldmuiPlugin = {
@@ -17022,6 +18467,7 @@ const ldmuiPlugin = {
17022
18467
  'ld-text-markup': options.aliases?.['ld-text-markup'] ?? 'ld-text-markup',
17023
18468
  'ld-switch': options.aliases?.['ld-switch'] ?? 'ld-switch',
17024
18469
  'ld-dialog': options.aliases?.['ld-dialog'] ?? 'ld-dialog',
18470
+ 'ld-data-iterator': options.aliases?.['ld-data-iterator'] ?? 'ld-data-iterator',
17025
18471
  };
17026
18472
  vue.config.globalProperties.$utils = {
17027
18473
  ...src_utils_namespaceObject,
@@ -17073,6 +18519,7 @@ const ldmuiPlugin = {
17073
18519
  src_ld_text_markup(vue, options);
17074
18520
  src_ld_switch(vue, options);
17075
18521
  src_ld_dialog(vue, options);
18522
+ src_ld_data_iterator(vue, options);
17076
18523
  },
17077
18524
  };
17078
18525
  /* harmony default export */ const src = (ldmuiPlugin);