@zeedhi/common 1.45.1 → 1.46.0
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/zd-common.esm.js +49 -24
- package/dist/zd-common.umd.js +49 -24
- package/package.json +2 -2
- package/types/components/zd-grid/grid.d.ts +4 -1
- package/types/components/zd-grid/interfaces.d.ts +3 -0
- package/types/components/zd-range-slider/range-slider.d.ts +3 -0
- package/types/components/zd-tree/interfaces.d.ts +1 -1
- package/types/components/zd-tree/tree.d.ts +5 -4
package/dist/zd-common.esm.js
CHANGED
|
@@ -495,7 +495,7 @@ class ApexChart extends ComponentRender {
|
|
|
495
495
|
* @param options New options
|
|
496
496
|
*/
|
|
497
497
|
updateChart(options) {
|
|
498
|
-
|
|
498
|
+
merge(this.options, options);
|
|
499
499
|
if (options.series) {
|
|
500
500
|
this.series = this.options.series;
|
|
501
501
|
}
|
|
@@ -1757,7 +1757,8 @@ class Input extends ComponentRender {
|
|
|
1757
1757
|
* Removes all input validation.
|
|
1758
1758
|
*/
|
|
1759
1759
|
clearValidations() {
|
|
1760
|
-
|
|
1760
|
+
this.validations = {};
|
|
1761
|
+
this.rules = [];
|
|
1761
1762
|
}
|
|
1762
1763
|
/**
|
|
1763
1764
|
* Updates input rules.
|
|
@@ -4947,6 +4948,9 @@ class Grid extends Iterable {
|
|
|
4947
4948
|
this.toolbarSlot = [
|
|
4948
4949
|
{ name: '<<NAME>>_gridSearch', component: 'ZdSearch' },
|
|
4949
4950
|
];
|
|
4951
|
+
this.loadingText = 'LOADING';
|
|
4952
|
+
this.noDataText = 'NO_DATA';
|
|
4953
|
+
this.noResultsText = 'NO_RESULT';
|
|
4950
4954
|
/**
|
|
4951
4955
|
* Components that will be rendered in no-data case
|
|
4952
4956
|
*/
|
|
@@ -4955,7 +4959,7 @@ class Grid extends Iterable {
|
|
|
4955
4959
|
name: '<<NAME>>_no-data',
|
|
4956
4960
|
component: 'ZdText',
|
|
4957
4961
|
cssClass: 'no-data',
|
|
4958
|
-
text:
|
|
4962
|
+
text: this.noDataText,
|
|
4959
4963
|
},
|
|
4960
4964
|
];
|
|
4961
4965
|
/**
|
|
@@ -4966,7 +4970,7 @@ class Grid extends Iterable {
|
|
|
4966
4970
|
name: '<<NAME>>_no-result',
|
|
4967
4971
|
component: 'ZdText',
|
|
4968
4972
|
cssClass: 'no-result',
|
|
4969
|
-
text:
|
|
4973
|
+
text: this.noResultsText,
|
|
4970
4974
|
},
|
|
4971
4975
|
];
|
|
4972
4976
|
/**
|
|
@@ -5070,6 +5074,7 @@ class Grid extends Iterable {
|
|
|
5070
5074
|
this.headerCellTextColor = this.getInitValue('headerCellTextColor', props.headerCellTextColor, this.headerCellTextColor);
|
|
5071
5075
|
this.dragColumns = this.getInitValue('dragColumns', props.dragColumns, this.dragColumns);
|
|
5072
5076
|
this.resizeColumns = this.getInitValue('resizeColumns', props.resizeColumns, this.resizeColumns);
|
|
5077
|
+
this.loadingText = this.getInitValue('loadingText', props.loadingText, this.loadingText);
|
|
5073
5078
|
this.toolbarSlot = props.toolbarSlot || this.toolbarSlot;
|
|
5074
5079
|
this.footerSlot = props.footerSlot || this.footerSlot;
|
|
5075
5080
|
this.noDataSlot = props.noDataSlot || this.noDataSlot;
|
|
@@ -5079,6 +5084,8 @@ class Grid extends Iterable {
|
|
|
5079
5084
|
this.footerSlot = this.changeDefaultSlotNames(this.footerSlot);
|
|
5080
5085
|
this.toolbarSlot = this.changeDefaultSlotNames(this.toolbarSlot);
|
|
5081
5086
|
this.noResultSlot = this.changeDefaultSlotNames(this.noResultSlot);
|
|
5087
|
+
this.noDataText = this.getInitValue('noDataText', props.noDataText, this.noDataText);
|
|
5088
|
+
this.noResultsText = this.getInitValue('noResultsText', props.noResultsText, this.noResultsText);
|
|
5082
5089
|
this.createAccessors();
|
|
5083
5090
|
}
|
|
5084
5091
|
onMounted(element) {
|
|
@@ -8267,6 +8274,12 @@ class RangeSlider extends Input {
|
|
|
8267
8274
|
this.vertical = this.getInitValue('vertical', props.vertical, this.vertical);
|
|
8268
8275
|
this.createAccessors();
|
|
8269
8276
|
}
|
|
8277
|
+
get value() {
|
|
8278
|
+
return this.rangeSliderValue === null ? undefined : this.rangeSliderValue;
|
|
8279
|
+
}
|
|
8280
|
+
set value(value) {
|
|
8281
|
+
this.rangeSliderValue = value;
|
|
8282
|
+
}
|
|
8270
8283
|
}
|
|
8271
8284
|
|
|
8272
8285
|
/**
|
|
@@ -10316,6 +10329,8 @@ class Tree extends ComponentRender {
|
|
|
10316
10329
|
this.titleField = '';
|
|
10317
10330
|
/** Datasource data field */
|
|
10318
10331
|
this.dataField = '';
|
|
10332
|
+
/** Datasource checked field */
|
|
10333
|
+
this.checkedField = 'checked';
|
|
10319
10334
|
/**
|
|
10320
10335
|
* Defines if the tree will be opened or not (true/false) or if it should open only until a specific level
|
|
10321
10336
|
*/
|
|
@@ -10334,7 +10349,6 @@ class Tree extends ComponentRender {
|
|
|
10334
10349
|
this.appliedConditions = {};
|
|
10335
10350
|
/* Conditions of tree */
|
|
10336
10351
|
this.factoredConditions = {};
|
|
10337
|
-
this.nodes = this.initNodes(props.nodes || this.nodes);
|
|
10338
10352
|
this.itemIconName = this.getInitValue('itemIconName', props.itemIconName, this.itemIconName);
|
|
10339
10353
|
this.groupIconName = this.getInitValue('groupIconName', props.groupIconName, this.groupIconName);
|
|
10340
10354
|
this.openedIconName = this.getInitValue('openedIconName', props.openedIconName, this.openedIconName);
|
|
@@ -10344,6 +10358,7 @@ class Tree extends ComponentRender {
|
|
|
10344
10358
|
this.parentField = this.getInitValue('parentField', props.parentField, this.parentField);
|
|
10345
10359
|
this.titleField = this.getInitValue('titleField', props.titleField, this.titleField);
|
|
10346
10360
|
this.dataField = this.getInitValue('dataField', props.dataField, this.dataField);
|
|
10361
|
+
this.checkedField = this.getInitValue('checkedField', props.checkedField, this.checkedField);
|
|
10347
10362
|
this.openLevelOnLoad = this.getInitValue('openLevelOnLoad', props.openLevelOnLoad, this.openLevelOnLoad);
|
|
10348
10363
|
this.checkbox = this.getInitValue('checkbox', props.checkbox, this.checkbox);
|
|
10349
10364
|
this.afterTitleSlot = props.afterTitleSlot || this.afterTitleSlot;
|
|
@@ -10361,29 +10376,46 @@ class Tree extends ComponentRender {
|
|
|
10361
10376
|
this.createDataStructure();
|
|
10362
10377
|
}
|
|
10363
10378
|
this.createAccessors();
|
|
10379
|
+
this.nodes = props.nodes || this.nodes;
|
|
10364
10380
|
}
|
|
10365
10381
|
/**
|
|
10366
10382
|
* Initialize all the properties of the declared nodes (reactivity)
|
|
10367
10383
|
*/
|
|
10368
|
-
initNodes(nodes) {
|
|
10369
|
-
return nodes.map((node) =>
|
|
10384
|
+
initNodes(nodes, override) {
|
|
10385
|
+
return nodes.map((node) => {
|
|
10386
|
+
let newNode = {
|
|
10387
|
+
title: '',
|
|
10388
|
+
isLeaf: false,
|
|
10389
|
+
isExpanded: true,
|
|
10390
|
+
isSelected: false,
|
|
10391
|
+
isDraggable: true,
|
|
10392
|
+
isSelectable: true,
|
|
10393
|
+
data: {
|
|
10394
|
+
[this.checkedField]: false,
|
|
10395
|
+
},
|
|
10396
|
+
children: [],
|
|
10397
|
+
};
|
|
10398
|
+
newNode = merge(newNode, node, override);
|
|
10399
|
+
newNode.children = this.initNodes(node.children || [], override);
|
|
10400
|
+
return newNode;
|
|
10401
|
+
});
|
|
10370
10402
|
}
|
|
10371
10403
|
/** Nodes */
|
|
10372
10404
|
get nodes() {
|
|
10373
10405
|
return this.nodesValue;
|
|
10374
10406
|
}
|
|
10375
10407
|
set nodes(value) {
|
|
10408
|
+
let override = {};
|
|
10376
10409
|
if (!this.allowDragDrop) {
|
|
10377
|
-
|
|
10410
|
+
override = { isDraggable: false };
|
|
10378
10411
|
}
|
|
10379
|
-
this.nodesValue = value;
|
|
10412
|
+
this.nodesValue = this.initNodes(value, override);
|
|
10380
10413
|
}
|
|
10381
10414
|
getCheckedNodes() {
|
|
10382
10415
|
const selectedNodes = [];
|
|
10383
10416
|
this.tree.traverse((node) => {
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
selectedNodes.push(instanceNode);
|
|
10417
|
+
if (node.data && node.data[this.checkedField]) {
|
|
10418
|
+
selectedNodes.push(node);
|
|
10387
10419
|
}
|
|
10388
10420
|
});
|
|
10389
10421
|
return selectedNodes;
|
|
@@ -10436,15 +10468,16 @@ class Tree extends ComponentRender {
|
|
|
10436
10468
|
}
|
|
10437
10469
|
/** Insert nodes by the current cursor position */
|
|
10438
10470
|
insertNode(newNode) {
|
|
10471
|
+
const initNode = this.initNodes([newNode])[0];
|
|
10439
10472
|
if (this.selectedNodes.length) {
|
|
10440
10473
|
const cursorPosition = {
|
|
10441
10474
|
node: this.selectedNodes[0],
|
|
10442
10475
|
placement: 'inside',
|
|
10443
10476
|
};
|
|
10444
|
-
this.tree.insert(cursorPosition,
|
|
10477
|
+
this.tree.insert(cursorPosition, initNode);
|
|
10445
10478
|
}
|
|
10446
10479
|
else {
|
|
10447
|
-
this.nodes.push(
|
|
10480
|
+
this.nodes.push(initNode);
|
|
10448
10481
|
}
|
|
10449
10482
|
}
|
|
10450
10483
|
importNodes(nodes) {
|
|
@@ -10474,15 +10507,6 @@ class Tree extends ComponentRender {
|
|
|
10474
10507
|
updateNodeData(node, value) {
|
|
10475
10508
|
this.tree.updateNode(node.path, value);
|
|
10476
10509
|
}
|
|
10477
|
-
removeDraggable(items) {
|
|
10478
|
-
items.forEach((item) => {
|
|
10479
|
-
var _a;
|
|
10480
|
-
item.isDraggable = false;
|
|
10481
|
-
if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
10482
|
-
this.removeDraggable(item.children);
|
|
10483
|
-
}
|
|
10484
|
-
});
|
|
10485
|
-
}
|
|
10486
10510
|
setTree(tree) {
|
|
10487
10511
|
this.tree = tree;
|
|
10488
10512
|
}
|
|
@@ -10614,7 +10638,7 @@ class Tree extends ComponentRender {
|
|
|
10614
10638
|
}
|
|
10615
10639
|
getParentNode(node) {
|
|
10616
10640
|
var _a;
|
|
10617
|
-
return this.getNode(((_a = node.path) === null || _a === void 0 ? void 0 : _a.slice(0, -1)) || []);
|
|
10641
|
+
return this.tree.getNode(((_a = node.path) === null || _a === void 0 ? void 0 : _a.slice(0, -1)) || []);
|
|
10618
10642
|
}
|
|
10619
10643
|
searchPath(nodes, path) {
|
|
10620
10644
|
const currentNode = (path[0] > -1 && path[0] < nodes.length) ? nodes[path[0]] : undefined;
|
|
@@ -10809,6 +10833,7 @@ class TreeGridEditable extends TreeGrid {
|
|
|
10809
10833
|
},
|
|
10810
10834
|
};
|
|
10811
10835
|
this.doubleClickEdit = this.getInitValue('doubleClickEdit', props.doubleClickEdit, this.doubleClickEdit);
|
|
10836
|
+
this.noDataSlot = this.changeDefaultSlotNames(this.noDataSlot);
|
|
10812
10837
|
this.createAccessors();
|
|
10813
10838
|
}
|
|
10814
10839
|
onMounted(element) {
|
package/dist/zd-common.umd.js
CHANGED
|
@@ -502,7 +502,7 @@
|
|
|
502
502
|
* @param options New options
|
|
503
503
|
*/
|
|
504
504
|
updateChart(options) {
|
|
505
|
-
|
|
505
|
+
merge__default["default"](this.options, options);
|
|
506
506
|
if (options.series) {
|
|
507
507
|
this.series = this.options.series;
|
|
508
508
|
}
|
|
@@ -1764,7 +1764,8 @@
|
|
|
1764
1764
|
* Removes all input validation.
|
|
1765
1765
|
*/
|
|
1766
1766
|
clearValidations() {
|
|
1767
|
-
|
|
1767
|
+
this.validations = {};
|
|
1768
|
+
this.rules = [];
|
|
1768
1769
|
}
|
|
1769
1770
|
/**
|
|
1770
1771
|
* Updates input rules.
|
|
@@ -4954,6 +4955,9 @@
|
|
|
4954
4955
|
this.toolbarSlot = [
|
|
4955
4956
|
{ name: '<<NAME>>_gridSearch', component: 'ZdSearch' },
|
|
4956
4957
|
];
|
|
4958
|
+
this.loadingText = 'LOADING';
|
|
4959
|
+
this.noDataText = 'NO_DATA';
|
|
4960
|
+
this.noResultsText = 'NO_RESULT';
|
|
4957
4961
|
/**
|
|
4958
4962
|
* Components that will be rendered in no-data case
|
|
4959
4963
|
*/
|
|
@@ -4962,7 +4966,7 @@
|
|
|
4962
4966
|
name: '<<NAME>>_no-data',
|
|
4963
4967
|
component: 'ZdText',
|
|
4964
4968
|
cssClass: 'no-data',
|
|
4965
|
-
text:
|
|
4969
|
+
text: this.noDataText,
|
|
4966
4970
|
},
|
|
4967
4971
|
];
|
|
4968
4972
|
/**
|
|
@@ -4973,7 +4977,7 @@
|
|
|
4973
4977
|
name: '<<NAME>>_no-result',
|
|
4974
4978
|
component: 'ZdText',
|
|
4975
4979
|
cssClass: 'no-result',
|
|
4976
|
-
text:
|
|
4980
|
+
text: this.noResultsText,
|
|
4977
4981
|
},
|
|
4978
4982
|
];
|
|
4979
4983
|
/**
|
|
@@ -5077,6 +5081,7 @@
|
|
|
5077
5081
|
this.headerCellTextColor = this.getInitValue('headerCellTextColor', props.headerCellTextColor, this.headerCellTextColor);
|
|
5078
5082
|
this.dragColumns = this.getInitValue('dragColumns', props.dragColumns, this.dragColumns);
|
|
5079
5083
|
this.resizeColumns = this.getInitValue('resizeColumns', props.resizeColumns, this.resizeColumns);
|
|
5084
|
+
this.loadingText = this.getInitValue('loadingText', props.loadingText, this.loadingText);
|
|
5080
5085
|
this.toolbarSlot = props.toolbarSlot || this.toolbarSlot;
|
|
5081
5086
|
this.footerSlot = props.footerSlot || this.footerSlot;
|
|
5082
5087
|
this.noDataSlot = props.noDataSlot || this.noDataSlot;
|
|
@@ -5086,6 +5091,8 @@
|
|
|
5086
5091
|
this.footerSlot = this.changeDefaultSlotNames(this.footerSlot);
|
|
5087
5092
|
this.toolbarSlot = this.changeDefaultSlotNames(this.toolbarSlot);
|
|
5088
5093
|
this.noResultSlot = this.changeDefaultSlotNames(this.noResultSlot);
|
|
5094
|
+
this.noDataText = this.getInitValue('noDataText', props.noDataText, this.noDataText);
|
|
5095
|
+
this.noResultsText = this.getInitValue('noResultsText', props.noResultsText, this.noResultsText);
|
|
5089
5096
|
this.createAccessors();
|
|
5090
5097
|
}
|
|
5091
5098
|
onMounted(element) {
|
|
@@ -8274,6 +8281,12 @@
|
|
|
8274
8281
|
this.vertical = this.getInitValue('vertical', props.vertical, this.vertical);
|
|
8275
8282
|
this.createAccessors();
|
|
8276
8283
|
}
|
|
8284
|
+
get value() {
|
|
8285
|
+
return this.rangeSliderValue === null ? undefined : this.rangeSliderValue;
|
|
8286
|
+
}
|
|
8287
|
+
set value(value) {
|
|
8288
|
+
this.rangeSliderValue = value;
|
|
8289
|
+
}
|
|
8277
8290
|
}
|
|
8278
8291
|
|
|
8279
8292
|
/**
|
|
@@ -10323,6 +10336,8 @@
|
|
|
10323
10336
|
this.titleField = '';
|
|
10324
10337
|
/** Datasource data field */
|
|
10325
10338
|
this.dataField = '';
|
|
10339
|
+
/** Datasource checked field */
|
|
10340
|
+
this.checkedField = 'checked';
|
|
10326
10341
|
/**
|
|
10327
10342
|
* Defines if the tree will be opened or not (true/false) or if it should open only until a specific level
|
|
10328
10343
|
*/
|
|
@@ -10341,7 +10356,6 @@
|
|
|
10341
10356
|
this.appliedConditions = {};
|
|
10342
10357
|
/* Conditions of tree */
|
|
10343
10358
|
this.factoredConditions = {};
|
|
10344
|
-
this.nodes = this.initNodes(props.nodes || this.nodes);
|
|
10345
10359
|
this.itemIconName = this.getInitValue('itemIconName', props.itemIconName, this.itemIconName);
|
|
10346
10360
|
this.groupIconName = this.getInitValue('groupIconName', props.groupIconName, this.groupIconName);
|
|
10347
10361
|
this.openedIconName = this.getInitValue('openedIconName', props.openedIconName, this.openedIconName);
|
|
@@ -10351,6 +10365,7 @@
|
|
|
10351
10365
|
this.parentField = this.getInitValue('parentField', props.parentField, this.parentField);
|
|
10352
10366
|
this.titleField = this.getInitValue('titleField', props.titleField, this.titleField);
|
|
10353
10367
|
this.dataField = this.getInitValue('dataField', props.dataField, this.dataField);
|
|
10368
|
+
this.checkedField = this.getInitValue('checkedField', props.checkedField, this.checkedField);
|
|
10354
10369
|
this.openLevelOnLoad = this.getInitValue('openLevelOnLoad', props.openLevelOnLoad, this.openLevelOnLoad);
|
|
10355
10370
|
this.checkbox = this.getInitValue('checkbox', props.checkbox, this.checkbox);
|
|
10356
10371
|
this.afterTitleSlot = props.afterTitleSlot || this.afterTitleSlot;
|
|
@@ -10368,29 +10383,46 @@
|
|
|
10368
10383
|
this.createDataStructure();
|
|
10369
10384
|
}
|
|
10370
10385
|
this.createAccessors();
|
|
10386
|
+
this.nodes = props.nodes || this.nodes;
|
|
10371
10387
|
}
|
|
10372
10388
|
/**
|
|
10373
10389
|
* Initialize all the properties of the declared nodes (reactivity)
|
|
10374
10390
|
*/
|
|
10375
|
-
initNodes(nodes) {
|
|
10376
|
-
return nodes.map((node) =>
|
|
10391
|
+
initNodes(nodes, override) {
|
|
10392
|
+
return nodes.map((node) => {
|
|
10393
|
+
let newNode = {
|
|
10394
|
+
title: '',
|
|
10395
|
+
isLeaf: false,
|
|
10396
|
+
isExpanded: true,
|
|
10397
|
+
isSelected: false,
|
|
10398
|
+
isDraggable: true,
|
|
10399
|
+
isSelectable: true,
|
|
10400
|
+
data: {
|
|
10401
|
+
[this.checkedField]: false,
|
|
10402
|
+
},
|
|
10403
|
+
children: [],
|
|
10404
|
+
};
|
|
10405
|
+
newNode = merge__default["default"](newNode, node, override);
|
|
10406
|
+
newNode.children = this.initNodes(node.children || [], override);
|
|
10407
|
+
return newNode;
|
|
10408
|
+
});
|
|
10377
10409
|
}
|
|
10378
10410
|
/** Nodes */
|
|
10379
10411
|
get nodes() {
|
|
10380
10412
|
return this.nodesValue;
|
|
10381
10413
|
}
|
|
10382
10414
|
set nodes(value) {
|
|
10415
|
+
let override = {};
|
|
10383
10416
|
if (!this.allowDragDrop) {
|
|
10384
|
-
|
|
10417
|
+
override = { isDraggable: false };
|
|
10385
10418
|
}
|
|
10386
|
-
this.nodesValue = value;
|
|
10419
|
+
this.nodesValue = this.initNodes(value, override);
|
|
10387
10420
|
}
|
|
10388
10421
|
getCheckedNodes() {
|
|
10389
10422
|
const selectedNodes = [];
|
|
10390
10423
|
this.tree.traverse((node) => {
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
selectedNodes.push(instanceNode);
|
|
10424
|
+
if (node.data && node.data[this.checkedField]) {
|
|
10425
|
+
selectedNodes.push(node);
|
|
10394
10426
|
}
|
|
10395
10427
|
});
|
|
10396
10428
|
return selectedNodes;
|
|
@@ -10443,15 +10475,16 @@
|
|
|
10443
10475
|
}
|
|
10444
10476
|
/** Insert nodes by the current cursor position */
|
|
10445
10477
|
insertNode(newNode) {
|
|
10478
|
+
const initNode = this.initNodes([newNode])[0];
|
|
10446
10479
|
if (this.selectedNodes.length) {
|
|
10447
10480
|
const cursorPosition = {
|
|
10448
10481
|
node: this.selectedNodes[0],
|
|
10449
10482
|
placement: 'inside',
|
|
10450
10483
|
};
|
|
10451
|
-
this.tree.insert(cursorPosition,
|
|
10484
|
+
this.tree.insert(cursorPosition, initNode);
|
|
10452
10485
|
}
|
|
10453
10486
|
else {
|
|
10454
|
-
this.nodes.push(
|
|
10487
|
+
this.nodes.push(initNode);
|
|
10455
10488
|
}
|
|
10456
10489
|
}
|
|
10457
10490
|
importNodes(nodes) {
|
|
@@ -10481,15 +10514,6 @@
|
|
|
10481
10514
|
updateNodeData(node, value) {
|
|
10482
10515
|
this.tree.updateNode(node.path, value);
|
|
10483
10516
|
}
|
|
10484
|
-
removeDraggable(items) {
|
|
10485
|
-
items.forEach((item) => {
|
|
10486
|
-
var _a;
|
|
10487
|
-
item.isDraggable = false;
|
|
10488
|
-
if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
10489
|
-
this.removeDraggable(item.children);
|
|
10490
|
-
}
|
|
10491
|
-
});
|
|
10492
|
-
}
|
|
10493
10517
|
setTree(tree) {
|
|
10494
10518
|
this.tree = tree;
|
|
10495
10519
|
}
|
|
@@ -10621,7 +10645,7 @@
|
|
|
10621
10645
|
}
|
|
10622
10646
|
getParentNode(node) {
|
|
10623
10647
|
var _a;
|
|
10624
|
-
return this.getNode(((_a = node.path) === null || _a === void 0 ? void 0 : _a.slice(0, -1)) || []);
|
|
10648
|
+
return this.tree.getNode(((_a = node.path) === null || _a === void 0 ? void 0 : _a.slice(0, -1)) || []);
|
|
10625
10649
|
}
|
|
10626
10650
|
searchPath(nodes, path) {
|
|
10627
10651
|
const currentNode = (path[0] > -1 && path[0] < nodes.length) ? nodes[path[0]] : undefined;
|
|
@@ -10816,6 +10840,7 @@
|
|
|
10816
10840
|
},
|
|
10817
10841
|
};
|
|
10818
10842
|
this.doubleClickEdit = this.getInitValue('doubleClickEdit', props.doubleClickEdit, this.doubleClickEdit);
|
|
10843
|
+
this.noDataSlot = this.changeDefaultSlotNames(this.noDataSlot);
|
|
10819
10844
|
this.createAccessors();
|
|
10820
10845
|
}
|
|
10821
10846
|
onMounted(element) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.46.0",
|
|
4
4
|
"description": "Zeedhi Common",
|
|
5
5
|
"author": "Zeedhi <zeedhi@teknisa.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"lodash.times": "^4.3.2",
|
|
38
38
|
"mockdate": "^3.0.2"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "0133e8028e0b9b5876c2bb24b9a8c4d687d22dd8"
|
|
41
41
|
}
|
|
@@ -11,6 +11,9 @@ export declare class Grid extends Iterable implements IGrid {
|
|
|
11
11
|
* Components that will be rendered on toolbar slot
|
|
12
12
|
*/
|
|
13
13
|
toolbarSlot: IComponentRender[];
|
|
14
|
+
loadingText: string;
|
|
15
|
+
noDataText: string;
|
|
16
|
+
noResultsText: string;
|
|
14
17
|
/**
|
|
15
18
|
* Components that will be rendered in no-data case
|
|
16
19
|
*/
|
|
@@ -163,5 +166,5 @@ export declare class Grid extends Iterable implements IGrid {
|
|
|
163
166
|
protected navigatePageDown(): void;
|
|
164
167
|
deleteRows(): Promise<any[]>;
|
|
165
168
|
getActionComponent(actionComponent: IComponent, column: GridColumn, row: IDictionary, parentPath?: string): IComponent;
|
|
166
|
-
|
|
169
|
+
protected changeDefaultSlotNames(slot: IComponentRender[]): IComponentRender[];
|
|
167
170
|
}
|
|
@@ -37,6 +37,9 @@ export interface IGrid extends IIterable {
|
|
|
37
37
|
toolbarSlot?: IComponentRender[];
|
|
38
38
|
dragColumns?: boolean;
|
|
39
39
|
resizeColumns?: boolean;
|
|
40
|
+
loadingText?: string;
|
|
41
|
+
noDataText?: string;
|
|
42
|
+
noResultsText?: string;
|
|
40
43
|
}
|
|
41
44
|
export interface IGridColumn extends IColumn {
|
|
42
45
|
children?: IChildrenActionColumn[];
|
|
@@ -58,9 +58,12 @@ export declare class RangeSlider extends Input implements IRangeSlider {
|
|
|
58
58
|
* Defines the range-slider ticks
|
|
59
59
|
*/
|
|
60
60
|
ticks: IRangeSliderTicks;
|
|
61
|
+
private rangeSliderValue;
|
|
61
62
|
/**
|
|
62
63
|
* Create a new Range Slider
|
|
63
64
|
* @param props Range Slider properties
|
|
64
65
|
*/
|
|
65
66
|
constructor(props: IRangeSlider);
|
|
67
|
+
get value(): any;
|
|
68
|
+
set value(value: any);
|
|
66
69
|
}
|
|
@@ -9,7 +9,6 @@ export interface ITreeNodeModel<T> {
|
|
|
9
9
|
isSelected?: boolean;
|
|
10
10
|
isDraggable?: boolean;
|
|
11
11
|
isSelectable?: boolean;
|
|
12
|
-
isChecked?: boolean;
|
|
13
12
|
data?: T;
|
|
14
13
|
}
|
|
15
14
|
export interface ITreeNode<T> extends ITreeNodeModel<T> {
|
|
@@ -62,6 +61,7 @@ export interface ITree extends IComponentRender {
|
|
|
62
61
|
parentField?: string;
|
|
63
62
|
titleField?: string;
|
|
64
63
|
dataField?: string;
|
|
64
|
+
checkedField?: string;
|
|
65
65
|
openLevelOnLoad?: number | boolean;
|
|
66
66
|
checkbox?: boolean;
|
|
67
67
|
}
|
|
@@ -37,6 +37,8 @@ export declare class Tree extends ComponentRender implements ITree {
|
|
|
37
37
|
titleField: string;
|
|
38
38
|
/** Datasource data field */
|
|
39
39
|
dataField: string;
|
|
40
|
+
/** Datasource checked field */
|
|
41
|
+
checkedField: string;
|
|
40
42
|
/**
|
|
41
43
|
* Defines if the tree will be opened or not (true/false) or if it should open only until a specific level
|
|
42
44
|
*/
|
|
@@ -66,11 +68,11 @@ export declare class Tree extends ComponentRender implements ITree {
|
|
|
66
68
|
/**
|
|
67
69
|
* Initialize all the properties of the declared nodes (reactivity)
|
|
68
70
|
*/
|
|
69
|
-
protected initNodes(nodes: ITreeNodeModel<IDictionary>[]): ITreeNodeModel<IDictionary>[];
|
|
71
|
+
protected initNodes(nodes: ITreeNodeModel<IDictionary>[], override?: IDictionary): ITreeNodeModel<IDictionary>[];
|
|
70
72
|
/** Nodes */
|
|
71
73
|
get nodes(): ITreeNodeModel<IDictionary>[];
|
|
72
74
|
set nodes(value: ITreeNodeModel<IDictionary>[]);
|
|
73
|
-
getCheckedNodes():
|
|
75
|
+
getCheckedNodes(): ITreeNode<IDictionary<any>>[];
|
|
74
76
|
/** Returns the selected nodes */
|
|
75
77
|
get selectedNodes(): ITreeNode<IDictionary>[];
|
|
76
78
|
private createDataStructure;
|
|
@@ -85,7 +87,6 @@ export declare class Tree extends ComponentRender implements ITree {
|
|
|
85
87
|
removeSelected(): void;
|
|
86
88
|
/** Update selected node */
|
|
87
89
|
updateNodeData(node: ITreeNode<IDictionary>, value: IDictionary): void;
|
|
88
|
-
private removeDraggable;
|
|
89
90
|
setTree(tree: any): void;
|
|
90
91
|
/**
|
|
91
92
|
* Return plain conditions object
|
|
@@ -110,6 +111,6 @@ export declare class Tree extends ComponentRender implements ITree {
|
|
|
110
111
|
nodeCheck(node: ITreeNode<IDictionary>, event?: Event, element?: HTMLElement): void;
|
|
111
112
|
clearSelection(nodes?: ITreeNodeModel<IDictionary<any>>[]): void;
|
|
112
113
|
getNode(path: number[]): ITreeNodeModel<IDictionary<any>> | undefined;
|
|
113
|
-
getParentNode(node: ITreeNode<IDictionary>):
|
|
114
|
+
getParentNode(node: ITreeNode<IDictionary>): any;
|
|
114
115
|
private searchPath;
|
|
115
116
|
}
|