realgrid-vue2 0.9.1

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.
@@ -0,0 +1,782 @@
1
+ import * as m from "realgrid";
2
+ import { toRaw as $, defineComponent as d, h as y, nextTick as F } from "vue";
3
+ const C = (t) => t.replace(/-./g, (e) => e[1].toUpperCase()), f = (t) => t.charAt(0).toUpperCase() + t.slice(1), a = (t, e = "") => {
4
+ const n = {};
5
+ for (let i in t)
6
+ n[C(e ? `${e}-${i}` : i)] = $(t[i]);
7
+ return n;
8
+ }, p = (t, e = {}, n = {}) => {
9
+ t = t || {};
10
+ const i = ["children"];
11
+ for (const [o, s] of Object.entries(e))
12
+ if (!i.includes(o))
13
+ if (!n.hasOwnProperty(o))
14
+ t[o] = null;
15
+ else if (Array.isArray(s))
16
+ (!n[o] || JSON.stringify(s) != JSON.stringify(n[o])) && (t[o] = n[o]);
17
+ else if (s instanceof Object && !(s instanceof Date || Array.isArray(s) || typeof s == "function"))
18
+ if (!(n[o] instanceof Object))
19
+ t[o] = n[o];
20
+ else {
21
+ const r = p({}, s, n[o]);
22
+ r && Object.keys(r).length > 0 && (t[o] = r);
23
+ }
24
+ else
25
+ s !== n[o] && (t[o] = n[o]);
26
+ for (const [o, s] of Object.entries(n))
27
+ i.includes(o) || e.hasOwnProperty(o) || (t[o] = s);
28
+ return t;
29
+ }, g = (t, e, n) => {
30
+ for (const [i, o] of Object.entries(n))
31
+ i && typeof o == "function" && i.startsWith("on") && (i === "onRowInserting" ? t.onRowInserting = o : i === "onDataRowInserting" ? e.onRowInserting = o : (t.hasOwnProperty(i) && (t[i] = o), e.hasOwnProperty(i) && (e[i] = o)));
32
+ }, w = () => d({
33
+ name: "RealGridBase",
34
+ props: {
35
+ disabled: Boolean,
36
+ gridProps: Object,
37
+ dataProps: Object,
38
+ locale: Object,
39
+ autoGenerateField: Boolean,
40
+ rows: Array,
41
+ rowStyleCallback: Function,
42
+ cellStyleCallback: Function,
43
+ layout: Array,
44
+ onInitialized: Function,
45
+ onDestroy: Function,
46
+ onCurrentChanging: Function,
47
+ onCurrentChanged: Function,
48
+ onCurrentRowChanged: Function,
49
+ onValidateColumn: Function,
50
+ onValidateRow: Function,
51
+ onValidationFail: Function,
52
+ onColumnCheckedChanged: Function,
53
+ onMenuItemClicked: Function,
54
+ onContextMenuPopup: Function,
55
+ onContextMenuItemClicked: Function,
56
+ onCellButtonClicked: Function,
57
+ onScrollToBottom: Function,
58
+ onTopIndexChanged: Function,
59
+ onTopIndexChanging: Function,
60
+ onLeftPosChanged: Function,
61
+ onRowsDeleting: Function,
62
+ onRowInserting: Function,
63
+ onSelectionCleared: Function,
64
+ onSelectionChanged: Function,
65
+ onSelectionAdded: Function,
66
+ onSelectionEnded: Function,
67
+ onShowEditor: Function,
68
+ onShowEditCommand: Function,
69
+ onHideEditor: Function,
70
+ onEditChange: Function,
71
+ onGetEditValue: Function,
72
+ onEditCommit: Function,
73
+ onEditCanceled: Function,
74
+ onItemEditCanceled: Function,
75
+ onItemEditCancel: Function,
76
+ onEditSearch: Function,
77
+ onSearchCellButtonClick: Function,
78
+ onCellEdited: Function,
79
+ onEditRowChanged: Function,
80
+ onEditRowPasted: Function,
81
+ onRowsPasted: Function,
82
+ onCellPasting: Function,
83
+ onItemChecked: Function,
84
+ onItemAllChecked: Function,
85
+ onErrorClicked: Function,
86
+ onSorting: Function,
87
+ onSortingChanged: Function,
88
+ onFiltering: Function,
89
+ onFilteringChanged: Function,
90
+ onWheel: Function,
91
+ onKeyDown: Function,
92
+ onKeyPress: Function,
93
+ onKeyUp: Function,
94
+ onShowTooltip: Function,
95
+ onShowHeaderTooltip: Function,
96
+ onColumnPropertyChanged: Function,
97
+ onLayoutPropertyChanged: Function,
98
+ onGridActivated: Function,
99
+ onCopy: Function,
100
+ onPaste: Function,
101
+ onPasted: Function,
102
+ onItemsChecked: Function,
103
+ onCellClicked: Function,
104
+ onCellDblClicked: Function,
105
+ onCellItemClicked: Function,
106
+ onCommandStackChanged: Function,
107
+ onDataLoadComplated: Function,
108
+ onLayoutExpanding: Function,
109
+ onLayoutExpanded: Function,
110
+ onLayoutCollapsing: Function,
111
+ onLayoutCollapsed: Function
112
+ },
113
+ data() {
114
+ return {
115
+ $dataProvider: null,
116
+ $gridView: null,
117
+ _mountTimer: null,
118
+ _mountCBs: []
119
+ };
120
+ },
121
+ mounted() {
122
+ const t = this.$el, e = a(this.$props);
123
+ if (this.$listeners) {
124
+ for (const [o, s] of Object.entries(this.$listeners))
125
+ if (o && typeof s == "function")
126
+ if (o === "row-inserting")
127
+ e.onRowInserting = s;
128
+ else if (o === "data-row-inserting")
129
+ e.onDataRowInserting = s;
130
+ else {
131
+ const r = "on" + f(C(o));
132
+ e.hasOwnProperty(r) && (e[r] = s);
133
+ }
134
+ }
135
+ const { grid: n, dataProvider: i } = this._createGrid(t, e);
136
+ this.$dataProvider = i, this.$gridView = n, this.executeCB(), g(n, i, e), this._applyOptions(e), e.layout && n.setColumnLayout(e.layout), this._doInitProc(n, e), this._setData(e);
137
+ },
138
+ computed: {
139
+ dataProvider: {
140
+ get() {
141
+ return this.$data.$dataProvider;
142
+ },
143
+ set(t) {
144
+ this.$dataProvider = t;
145
+ }
146
+ },
147
+ gridView: {
148
+ get() {
149
+ return this.$data.$gridView;
150
+ },
151
+ set(t) {
152
+ this.$gridView = t;
153
+ }
154
+ }
155
+ },
156
+ unmounted() {
157
+ const t = a(this.$props), e = a(this.$attrs, "on"), n = t.onDestroy || e.onDestroy;
158
+ n && n(this.gridView), this.gridView = this.gridView && this.gridView.destroy(), this.dataProvider = this.dataProvider && this.dataProvider.destroy();
159
+ },
160
+ destroyed() {
161
+ const t = a(this.$props), e = a(this.$attrs, "on"), n = t.onDestroy || e.onDestroy;
162
+ n && n(this.gridView), this.gridView = this.gridView && this.gridView.destroy(), this.dataProvider = this.dataProvider && this.dataProvider.destroy();
163
+ },
164
+ watch: {
165
+ gridProps: {
166
+ handler(t, e) {
167
+ const n = p({}, e, t);
168
+ this.gridView && n && Object.keys(n).length > 0 && this.gridView.setOptions(n);
169
+ },
170
+ deep: !0
171
+ },
172
+ disabled(t, e) {
173
+ this.gridView && (this.gridView.disabled = t);
174
+ },
175
+ dataProps: {
176
+ handler(t, e) {
177
+ const n = p({}, e, t);
178
+ this.dataProvider && n && Object.keys(n).length > 0 && this.dataProvider.setOptions(n);
179
+ },
180
+ deep: !0
181
+ },
182
+ locale: {
183
+ handler(t, e) {
184
+ t && m.default.setLocale(t);
185
+ }
186
+ },
187
+ layout: {
188
+ handler(t, e) {
189
+ this.gridView && this.gridView.setColumnLayout(t);
190
+ },
191
+ deep: !0
192
+ }
193
+ },
194
+ methods: {
195
+ addCallback(t) {
196
+ this.$data._mountCBs.push(t), clearTimeout(this.$data._mountTimer);
197
+ const e = this;
198
+ this.$data._mountTimer = window.setTimeout(function() {
199
+ e.executeCB();
200
+ }, 20);
201
+ },
202
+ removeCallback(t) {
203
+ if (this.$data._mountCBs.indexOf(t) >= 0) {
204
+ const e = this.$data._mountCBs.indexOf(t);
205
+ this.$data._mountCBs.splice(e, 1);
206
+ }
207
+ },
208
+ executeCB() {
209
+ const t = this.$gridView, e = this.$dataProvider;
210
+ if (!!t && (clearTimeout(this._mountTimer), t && t._view)) {
211
+ t.beginUpdate();
212
+ try {
213
+ e == null || e.beginUpdate();
214
+ try {
215
+ const n = this.$data._mountCBs.sort((i, o) => (i.$mountSeq == null ? -1 : i.$mountSeq) - (o.$mountSeq == null ? -1 : o.$mountSeq));
216
+ for (; n && n.length; ) {
217
+ const i = n.shift();
218
+ i == null || i.call(this, t);
219
+ }
220
+ } finally {
221
+ e == null || e.endUpdate();
222
+ }
223
+ } finally {
224
+ t.endUpdate(!0), this.$data._mountTimer = null, this.$data._mountCBs = [];
225
+ }
226
+ }
227
+ },
228
+ _applyOptions(t) {
229
+ const e = this.$gridView, n = this.$dataProvider;
230
+ if (e)
231
+ for (let [i, o] of Object.entries(t))
232
+ switch (i) {
233
+ case "gridProps":
234
+ o && e.setOptions(o);
235
+ break;
236
+ case "disabled":
237
+ e && (e.disabled = !!o);
238
+ break;
239
+ case "dataProps":
240
+ o && (n == null || n.setOptions(o));
241
+ break;
242
+ case "layout":
243
+ o && e && e.setColumnLayout(o);
244
+ break;
245
+ case "rowStyleCallback":
246
+ e.setRowStyleCallback(o);
247
+ break;
248
+ case "cellStyleCallback":
249
+ e.setCellStyleCallback(o);
250
+ break;
251
+ case "locale":
252
+ o && m.default.setLocale(o);
253
+ break;
254
+ }
255
+ this._doApplyOptions(t);
256
+ },
257
+ _createGrid(t, e) {
258
+ return {
259
+ grid: null,
260
+ dataProvider: null
261
+ };
262
+ },
263
+ _doInitProc(t, e) {
264
+ const n = e.onInitialized;
265
+ if (n) {
266
+ const i = n.constructor.name;
267
+ i === "Function" ? n(t) : i === "AsyncFunction" && Promise.resolve(n(t));
268
+ }
269
+ },
270
+ _doApplyOptions(t) {
271
+ },
272
+ _setData(t) {
273
+ }
274
+ },
275
+ render() {
276
+ var s, r;
277
+ const t = (c) => {
278
+ const l = [];
279
+ if (Array.isArray(c))
280
+ for (let h of c)
281
+ Array.isArray(h.children) ? l.push(...t(h.children)) : l.push(h);
282
+ return l;
283
+ }, e = [];
284
+ for (let c of Object.keys(this.$slots)) {
285
+ let l = this.$slots[c];
286
+ typeof l == "function" && (l = l()), e.push(...t(l));
287
+ }
288
+ let n = 0;
289
+ for (let c = 0; c < e.length; c++) {
290
+ const l = e[c];
291
+ if (l.type instanceof Object && l.type.hasOwnProperty("name")) {
292
+ const h = l.type.name;
293
+ h && /^RG.+Column$/.exec(h) && (l.props = l.props || {}, l.props && ((r = (s = l.props).displayIndex) != null || (s.displayIndex = n++)));
294
+ }
295
+ l.$mountSeq = c;
296
+ }
297
+ const i = this.$attrs.style ? this.$attrs.style : { width: "100%", height: "100%" };
298
+ return y("div", { style: i }, e);
299
+ }
300
+ }), P = d({
301
+ name: "RealGridVue",
302
+ extends: w(),
303
+ props: {
304
+ accessibility: Boolean,
305
+ waiOptions: Object,
306
+ onPageChanging: Function,
307
+ onPageChanged: Function,
308
+ onPageCountChanged: Function,
309
+ onGrouping: Function,
310
+ onGrouped: Function,
311
+ onExpanding: Function,
312
+ onExpanded: Function,
313
+ onCollapsing: Function,
314
+ onCollapsed: Function,
315
+ onRowCountChanged: Function,
316
+ onRowUpdating: Function,
317
+ onRowUpdated: Function,
318
+ onRowsUpdated: Function,
319
+ onRowListUpdated: Function,
320
+ onDataRowInserting: Function,
321
+ onRowInserted: Function,
322
+ onRowsInserted: Function,
323
+ onRowDeleting: Function,
324
+ onRowDeleted: Function,
325
+ onRowsDeleted: Function,
326
+ onRowMoving: Function,
327
+ onRowMoved: Function,
328
+ onRowsMoving: Function,
329
+ onRowsMoved: Function,
330
+ onRowListMoving: Function,
331
+ onRowListMoved: Function,
332
+ onValueChanged: Function,
333
+ onDataChanged: Function,
334
+ onRowStateChanged: Function,
335
+ onRowStatesChanged: Function,
336
+ onRowStatesCleared: Function,
337
+ onRestoreRows: Function
338
+ },
339
+ data() {
340
+ return {
341
+ $dataProvider: null,
342
+ $gridView: null
343
+ };
344
+ },
345
+ watch: {
346
+ rows: {
347
+ handler(t, e) {
348
+ var n;
349
+ if (this.$data._mountTimer != null) {
350
+ const i = () => {
351
+ F(() => {
352
+ var o;
353
+ (o = this.$dataProvider) == null || o.setRows(t);
354
+ });
355
+ };
356
+ i.$mountSeq = 1 / 0, this.addCallback(i);
357
+ } else
358
+ (n = this.$dataProvider) == null || n.setRows(t);
359
+ }
360
+ }
361
+ },
362
+ methods: {
363
+ _createGrid(t, e) {
364
+ var o;
365
+ const n = new m.default.GridView(t, e == null ? void 0 : e.accessibility, e == null ? void 0 : e.waiOptions), i = new m.default.LocalDataProvider((o = e.dataProps) == null ? void 0 : o.undoable);
366
+ return n.setDataSource(i), {
367
+ grid: n,
368
+ dataProvider: i
369
+ };
370
+ },
371
+ _doApplyOptions(t) {
372
+ },
373
+ _setData(t) {
374
+ var e;
375
+ t.rows && ((e = this.$dataProvider) == null || e.setRows(t.rows));
376
+ }
377
+ }
378
+ }), S = d({
379
+ name: "RealTreeVue",
380
+ extends: w(),
381
+ props: {
382
+ treeOptions: Object,
383
+ treeField: String,
384
+ needSorting: Boolean,
385
+ childrenField: String,
386
+ iconField: String,
387
+ json: Object,
388
+ rowsProp: String,
389
+ childrenProp: String,
390
+ iconProp: String,
391
+ onTreeItemExpanding: Function,
392
+ onTreeItemExpanded: Function,
393
+ onTreeItemCollapsing: Function,
394
+ onTreeItemCollapsed: Function,
395
+ onTreeItemChanged: Function,
396
+ onRowCountChanged: Function,
397
+ onRowAdding: Function,
398
+ onRowAdded: Function,
399
+ onRowsAdded: Function,
400
+ onRowDeleting: Function,
401
+ onRowDeleted: Function,
402
+ onRowsDeleted: Function,
403
+ onRowUpdating: Function,
404
+ onRowUpdated: Function,
405
+ onRowsUpdating: Function,
406
+ onRowsUpdated: Function,
407
+ onValueChanged: Function,
408
+ onDataChanged: Function,
409
+ onRowStateChanged: Function,
410
+ onRowStatesChanged: Function,
411
+ onRowSiblingMoving: Function,
412
+ onRowSiblingMoved: Function,
413
+ onRowsSiblingMoving: Function,
414
+ onRowsSiblingMoved: Function,
415
+ onRowParentChanging: Function,
416
+ onRowParentChanged: Function
417
+ },
418
+ data() {
419
+ return {
420
+ $gridView: null,
421
+ $dataProvider: null
422
+ };
423
+ },
424
+ computed: {
425
+ gridView: {
426
+ get() {
427
+ return this.$data.$gridView;
428
+ },
429
+ set(t) {
430
+ this.$gridView = t;
431
+ }
432
+ },
433
+ dataProvider: {
434
+ get() {
435
+ return this.$data.$dataProvider;
436
+ },
437
+ set(t) {
438
+ this.$dataProvider = t;
439
+ }
440
+ }
441
+ },
442
+ methods: {
443
+ _createGrid(t, e) {
444
+ var o;
445
+ const n = new m.TreeView(t), i = new m.LocalTreeDataProvider((o = e.dataProps) == null ? void 0 : o.undoable);
446
+ return n.setDataSource(i), {
447
+ grid: n,
448
+ dataProvider: i
449
+ };
450
+ },
451
+ _doApplyOptions(t) {
452
+ var e;
453
+ for (const [n, i] of Object.entries(t))
454
+ switch (n) {
455
+ case "treeOptions":
456
+ i && ((e = this.$gridView) == null || e.setTreeOptions(i));
457
+ break;
458
+ }
459
+ },
460
+ _setData(t) {
461
+ var e, n;
462
+ t.rows ? (e = this.$dataProvider) == null || e.setRows(t.rows, this.treeField, this.needSorting, this.childrenField, this.iconField) : t.json && ((n = this.$dataProvider) == null || n.setObjectRows(t.json, this.rowsProp, this.childrenProp, this.iconProp));
463
+ }
464
+ },
465
+ watch: {
466
+ rows: {
467
+ handler(t, e) {
468
+ var n;
469
+ if (this.$data._mountTimer != null) {
470
+ const i = () => {
471
+ F(() => {
472
+ var o;
473
+ (o = this.$dataProvider) == null || o.setRows(t, this.treeField, this.needSorting, this.childrenField, this.iconField);
474
+ });
475
+ };
476
+ i.$mountSeq = 1 / 0, this.addCallback(i);
477
+ } else
478
+ (n = this.$dataProvider) == null || n.setRows(t, this.treeField, this.needSorting, this.childrenField, this.iconField);
479
+ }
480
+ },
481
+ json: {
482
+ handler(t, e) {
483
+ var n;
484
+ if (this.$data._mountTimer != null) {
485
+ const i = () => {
486
+ F(() => {
487
+ var o;
488
+ (o = this.$dataProvider) == null || o.setObjectRows(t, this.rowsProp, this.childrenProp, this.iconProp);
489
+ });
490
+ };
491
+ i.$mountSeq = 1 / 0, this.addCallback(i);
492
+ } else
493
+ (n = this.$dataProvider) == null || n.setObjectRows(t, this.rowsProp, this.childrenProp, this.iconProp);
494
+ }
495
+ }
496
+ }
497
+ }), u = d({
498
+ name: "ComponentBase",
499
+ props: {},
500
+ data() {
501
+ return {
502
+ $model: null,
503
+ $oldValue: null
504
+ };
505
+ },
506
+ mounted() {
507
+ const t = this.$parent;
508
+ t && (this.$oldValue = a(this.$attrs), this.mountCB.$mountSeq = this._vnode.$mountSeq, t.addCallback(this.mountCB));
509
+ },
510
+ unmounted() {
511
+ const t = this.$parent;
512
+ t && (t.removeCallback(this.mountCB), t.addCallback(this.unmountCB));
513
+ },
514
+ destroyed() {
515
+ const t = this.$parent;
516
+ t && (t.removeCallback(this.mountCB), t.addCallback(this.unmountCB));
517
+ },
518
+ watch: {
519
+ $attrs: {
520
+ handler(t, e) {
521
+ var o;
522
+ const n = a(t), i = p({}, a(this.$data.$oldValue), a(t));
523
+ if (i && Object.keys(i).length > 0) {
524
+ const s = (o = this.$data) == null ? void 0 : o.$model;
525
+ s && s.assignFrom(n), this._doWatchAttrs(i), this.$oldValue = n;
526
+ }
527
+ },
528
+ deep: !0
529
+ }
530
+ },
531
+ methods: {
532
+ mountCB() {
533
+ },
534
+ unmountCB() {
535
+ },
536
+ _doWatchAttrs(t) {
537
+ }
538
+ },
539
+ render() {
540
+ }
541
+ }), b = d({
542
+ name: "RGSeriesColumn",
543
+ extends: u,
544
+ data() {
545
+ return {};
546
+ },
547
+ props: {},
548
+ methods: {
549
+ mountCB(t) {
550
+ var n, i;
551
+ if (a((n = this.$parent) == null ? void 0 : n.$attrs)) {
552
+ const o = a(this.$attrs);
553
+ t && (this.$model = t.addColumn({ ...o, type: "series" }, (i = o.displayIndex) != null ? i : -1));
554
+ }
555
+ },
556
+ unmountCB(t) {
557
+ this.$data.$model && t.removeColumn(this.$model.name);
558
+ },
559
+ _doWatchAttrs(t) {
560
+ if (t.hasOwnProperty("width") && !isNaN(t.width)) {
561
+ const n = this.$data.$model.layout;
562
+ n && (n.cellWidth = t.width);
563
+ }
564
+ }
565
+ }
566
+ }), k = d({
567
+ name: "RGStateBar",
568
+ extends: u,
569
+ props: {},
570
+ data() {
571
+ return {};
572
+ },
573
+ methods: {
574
+ mountCB(t) {
575
+ t.setStateBar(a(this.$attrs)), this.$model = t.stateBar;
576
+ }
577
+ }
578
+ }), B = d({
579
+ name: "RGRowIndicator",
580
+ extends: u,
581
+ props: {},
582
+ data() {
583
+ return {};
584
+ },
585
+ methods: {
586
+ mountCB(t) {
587
+ t.setRowIndicator(a(this.$attrs)), this.$model = t.rowIndicator;
588
+ }
589
+ }
590
+ }), v = d({
591
+ name: "RGHeaderSummaries",
592
+ extends: u,
593
+ props: {},
594
+ data() {
595
+ return {};
596
+ },
597
+ methods: {
598
+ mountCB(t) {
599
+ t.setHeaderSummaries(a(this.$attrs)), this.$model = t.headerSummaries;
600
+ }
601
+ }
602
+ }), O = d({
603
+ name: "RGHeaderSummary",
604
+ extends: u,
605
+ props: {},
606
+ data() {
607
+ return {};
608
+ },
609
+ methods: {
610
+ mountCB(t) {
611
+ t.setHeaderSummary(a(this.$attrs)), this.$model = t.headerSummary;
612
+ }
613
+ }
614
+ }), V = d({
615
+ name: "RGHeader",
616
+ extends: u,
617
+ props: {},
618
+ data() {
619
+ return {};
620
+ },
621
+ methods: {
622
+ mountCB(t) {
623
+ t.setHeader(a(this.$attrs)), this.$model = t.header;
624
+ }
625
+ }
626
+ }), G = d({
627
+ name: "RGGroupPanel",
628
+ extends: u,
629
+ props: {},
630
+ data() {
631
+ return {};
632
+ },
633
+ methods: {
634
+ mountCB(t) {
635
+ t.setGroupPanel(a(this.$attrs)), this.$model = t.groupPanel;
636
+ }
637
+ }
638
+ }), x = d({
639
+ name: "RGFooter",
640
+ extends: u,
641
+ props: {},
642
+ data() {
643
+ return {};
644
+ },
645
+ methods: {
646
+ mountCB(t) {
647
+ t.setFooter(a(this.$attrs)), this.$model = t.footer;
648
+ }
649
+ }
650
+ }), I = d({
651
+ name: "RGFooters",
652
+ extends: u,
653
+ props: {},
654
+ data() {
655
+ return {};
656
+ },
657
+ methods: {
658
+ mountCB(t) {
659
+ t.setFooters(a(this.$attrs)), this.$model = t.footer;
660
+ }
661
+ }
662
+ }), D = d({
663
+ name: "RGFilterPanel",
664
+ extends: u,
665
+ props: {},
666
+ data() {
667
+ return {};
668
+ },
669
+ methods: {
670
+ mountCB(t) {
671
+ t.setFilterPanel(a(this.$attrs)), this.$model = t.filterPanel;
672
+ }
673
+ }
674
+ }), _ = d({
675
+ name: "RGDataField",
676
+ extends: u,
677
+ props: {},
678
+ data() {
679
+ return {};
680
+ },
681
+ methods: {
682
+ mountCB(t) {
683
+ const e = a(this.$attrs);
684
+ if (e.fieldName) {
685
+ const n = t.getDataSource();
686
+ n.fieldByName(e.fieldName) || (this.$model = n.addField(e, !0));
687
+ }
688
+ },
689
+ unmountDB(t) {
690
+ this.$model && t.getDataSource().removeField(this.$model);
691
+ }
692
+ }
693
+ }), A = d({
694
+ name: "RGDataColumn",
695
+ extends: u,
696
+ data() {
697
+ return {};
698
+ },
699
+ props: {},
700
+ methods: {
701
+ mountCB(t) {
702
+ var n, i;
703
+ const e = a((n = this.$parent) == null ? void 0 : n.$props);
704
+ if (e) {
705
+ const o = e.autoGenerateField, s = t == null ? void 0 : t.getDataSource(), r = a(this.$attrs);
706
+ let c = r.fieldName;
707
+ o && (!c && r.field && (c = r.field.fieldName), s && !s.fieldByName(c) && s.addField(r.field || c)), t && (this.$model = t.addColumn({ ...r, fieldName: c }, (i = r.displayIndex) != null ? i : -1));
708
+ }
709
+ },
710
+ unmountCB(t) {
711
+ var n;
712
+ this.$data.$model && t.removeColumn(this.$data.$model.name);
713
+ const e = a((n = this.$parent) == null ? void 0 : n.$props);
714
+ if (e) {
715
+ const i = e.autoGenerateField, o = t == null ? void 0 : t.getDataSource(), s = a(this.$attrs);
716
+ let r = s.fieldName;
717
+ i && (!r && s.field && (r = s.field.fieldName), t.columnByField(r) || o.removeField(r));
718
+ }
719
+ },
720
+ _doWatchAttrs(t) {
721
+ if (t.hasOwnProperty("width") && !isNaN(t.width)) {
722
+ const n = this.$data.$model.layout;
723
+ n && (n.cellWidth = t.width);
724
+ }
725
+ }
726
+ }
727
+ }), T = d({
728
+ name: "RGLiteralColumn",
729
+ extends: u,
730
+ data() {
731
+ return {};
732
+ },
733
+ props: {},
734
+ methods: {
735
+ mountCB(t) {
736
+ var n, i;
737
+ if (a((n = this.$parent) == null ? void 0 : n.$attrs)) {
738
+ const o = a(this.$attrs);
739
+ t && (this.$model = t.addColumn({ ...o, type: "literal" }, (i = o.displayIndex) != null ? i : -1));
740
+ }
741
+ },
742
+ unmountCB(t) {
743
+ this.$data.$model && t.removeColumn(this.$model.name);
744
+ },
745
+ _doWatchAttrs(t) {
746
+ if (t.hasOwnProperty("width") && !isNaN(t.width)) {
747
+ const n = this.$data.$model.layout;
748
+ n && (n.cellWidth = t.width);
749
+ }
750
+ }
751
+ }
752
+ }), j = d({
753
+ name: "RGCheckBar",
754
+ extends: u,
755
+ props: {},
756
+ data() {
757
+ return {};
758
+ },
759
+ methods: {
760
+ mountCB(t) {
761
+ t.setCheckBar(a(this.$attrs)), this.$model = t.checkBar;
762
+ }
763
+ }
764
+ });
765
+ export {
766
+ j as RGCheckBar,
767
+ A as RGDataColumn,
768
+ _ as RGDataField,
769
+ D as RGFilterPanel,
770
+ x as RGFooter,
771
+ I as RGFooters,
772
+ G as RGGroupPanel,
773
+ V as RGHeader,
774
+ v as RGHeaderSummaries,
775
+ O as RGHeaderSummary,
776
+ T as RGLiteralColumn,
777
+ B as RGRowIndicator,
778
+ b as RGSeriesColumn,
779
+ k as RGStateBar,
780
+ P as RealGridVue,
781
+ S as RealTreeVue
782
+ };