@zeedhi/common 1.43.1 → 1.45.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.
Files changed (48) hide show
  1. package/dist/zd-common.esm.js +302 -69
  2. package/dist/zd-common.umd.js +302 -69
  3. package/package.json +2 -2
  4. package/types/components/zd-button-group/button-group.d.ts +1 -1
  5. package/types/components/zd-carousel/carousel.d.ts +2 -2
  6. package/types/components/zd-carousel/interfaces.d.ts +1 -1
  7. package/types/components/zd-collapse-card/collapse-card.d.ts +1 -1
  8. package/types/components/zd-component/component.d.ts +5 -4
  9. package/types/components/zd-dashboard/dashboard.d.ts +1 -1
  10. package/types/components/zd-date/date-range.d.ts +4 -4
  11. package/types/components/zd-date/date.d.ts +5 -5
  12. package/types/components/zd-file-input/file-input.d.ts +3 -3
  13. package/types/components/zd-form/form.d.ts +2 -2
  14. package/types/components/zd-frame/frame.d.ts +1 -1
  15. package/types/components/zd-grid/grid-editable.d.ts +6 -6
  16. package/types/components/zd-grid/grid.d.ts +5 -5
  17. package/types/components/zd-increment/increment.d.ts +2 -2
  18. package/types/components/zd-input/input.d.ts +6 -6
  19. package/types/components/zd-iterable/column.d.ts +2 -0
  20. package/types/components/zd-iterable/interfaces.d.ts +1 -0
  21. package/types/components/zd-iterable/iterable-page-component.d.ts +1 -1
  22. package/types/components/zd-iterable/iterable-page-size.d.ts +2 -2
  23. package/types/components/zd-iterable/iterable.d.ts +1 -1
  24. package/types/components/zd-login/login-button.d.ts +1 -1
  25. package/types/components/zd-master-detail/master-detail.d.ts +1 -1
  26. package/types/components/zd-menu/menu-group.d.ts +8 -0
  27. package/types/components/zd-menu/menu-link.d.ts +5 -1
  28. package/types/components/zd-menu/menu.d.ts +3 -1
  29. package/types/components/zd-modal/interfaces.d.ts +2 -0
  30. package/types/components/zd-modal/modal.d.ts +8 -0
  31. package/types/components/zd-select/select.d.ts +6 -6
  32. package/types/components/zd-select-multiple/interfaces.d.ts +1 -0
  33. package/types/components/zd-select-multiple/select-multiple.d.ts +7 -2
  34. package/types/components/zd-select-tree/select-tree.d.ts +6 -6
  35. package/types/components/zd-select-tree-multiple/interfaces.d.ts +1 -0
  36. package/types/components/zd-select-tree-multiple/select-tree-multiple.d.ts +6 -2
  37. package/types/components/zd-selectable-list/selectable-list.d.ts +1 -1
  38. package/types/components/zd-svg-map/svg-map.d.ts +1 -1
  39. package/types/components/zd-tabs/tabs.d.ts +2 -2
  40. package/types/components/zd-text-input/text-input.d.ts +4 -4
  41. package/types/components/zd-time/time.d.ts +1 -1
  42. package/types/components/zd-tree/interfaces.d.ts +4 -0
  43. package/types/components/zd-tree/tree.d.ts +39 -11
  44. package/types/components/zd-tree-grid/tree-grid-editable.d.ts +6 -6
  45. package/types/components/zd-tree-grid/tree-grid.d.ts +2 -2
  46. package/types/services/zd-loading/loading-service.d.ts +7 -1
  47. package/types/utils/report/report-type/interfaces.d.ts +1 -0
  48. package/types/utils/themes/themes.d.ts +8 -2
@@ -192,6 +192,7 @@ class Component {
192
192
  * @param element Element mounted reference
193
193
  */
194
194
  onMounted(element) {
195
+ this.element = element;
195
196
  if (Object.keys(this.keyMap).length) {
196
197
  KeyMap.bind(this.keyMap, this, element);
197
198
  }
@@ -219,7 +220,11 @@ class Component {
219
220
  * @param element Element clicked
220
221
  */
221
222
  click(event, element) {
222
- this.callEvent('click', { event, element, component: this });
223
+ this.callEvent('click', {
224
+ event: (event || new MouseEvent('click')),
225
+ element: (element || this.element),
226
+ component: this,
227
+ });
223
228
  }
224
229
  /**
225
230
  * Triggered when the component is focused.
@@ -552,7 +557,10 @@ class ApexChart extends ComponentRender {
552
557
  */
553
558
  clickEvent(event, chartContext, config) {
554
559
  this.callEvent('chartClick', {
555
- event, component: this, chartContext, config,
560
+ event: (event || new MouseEvent('click')),
561
+ component: this,
562
+ chartContext,
563
+ config,
556
564
  });
557
565
  }
558
566
  /**
@@ -1642,9 +1650,9 @@ class Input extends ComponentRender {
1642
1650
  */
1643
1651
  this.storePath = '';
1644
1652
  /**
1645
- * Input value.
1646
- */
1647
- this.value = undefined;
1653
+ * Internal input value.
1654
+ */
1655
+ this.value = null;
1648
1656
  /**
1649
1657
  * Input validations.
1650
1658
  */
@@ -1792,6 +1800,8 @@ class Input extends ComponentRender {
1792
1800
  * @param element Element clicked
1793
1801
  */
1794
1802
  change(event, element) {
1803
+ if (this.value === '')
1804
+ this.value = null;
1795
1805
  if (this.events.change && typeof this.events.change === 'function') {
1796
1806
  this.events.change({ event, element, component: this });
1797
1807
  }
@@ -2804,61 +2814,34 @@ class ModalService {
2804
2814
  */
2805
2815
  ModalService.modals = [];
2806
2816
 
2807
- class Loading extends Component {
2808
- /*
2809
- * Creates a new Loading Overlay
2810
- * @param props Modal structure
2811
- */
2812
- constructor(props) {
2813
- super(props);
2814
- /**
2815
- * text to show in Loader Overlay
2816
- */
2817
- this.text = 'Loading';
2818
- this.isVisible = false;
2819
- this.zIndex = 999;
2820
- this.text = this.getInitValue('text', props.text, this.text);
2821
- this.zIndex = this.getInitValue('zIndex', props.zIndex, this.zIndex);
2822
- this.defaultText = this.text;
2823
- }
2824
- /**
2825
- * Displays overlay
2826
- */
2827
- show(text) {
2828
- if (text)
2829
- this.text = text;
2830
- else
2831
- this.text = this.defaultText;
2832
- this.isVisible = true;
2833
- }
2834
- /**
2835
- * Close overlay
2836
- */
2837
- hide() {
2838
- this.isVisible = false;
2839
- }
2840
- }
2841
-
2842
2817
  /**
2843
2818
  * Loading Service Class
2844
2819
  */
2845
2820
  class LoadingService {
2821
+ /**
2822
+ * Creates a new loading instance
2823
+ * @param loading loading structure
2824
+ */
2825
+ static create(CreateLoading, props) {
2826
+ const instance = new CreateLoading(props);
2827
+ this.loading = instance;
2828
+ return instance;
2829
+ }
2846
2830
  /**
2847
2831
  * Displays a Loading.
2848
2832
  * If has an opened Loading it will be closed.
2849
2833
  * @param Loading loading structure
2850
2834
  */
2851
2835
  static show(text) {
2852
- this.instance.show(text);
2836
+ this.loading.show(text);
2853
2837
  }
2854
2838
  /**
2855
2839
  * Hides current Loading
2856
2840
  */
2857
2841
  static hide() {
2858
- this.instance.hide();
2842
+ this.loading.hide();
2859
2843
  }
2860
- }
2861
- LoadingService.instance = new Loading({ name: 'loading-instance' });
2844
+ }
2862
2845
 
2863
2846
  /**
2864
2847
  * Base class for Dashboard component.
@@ -3465,8 +3448,9 @@ class Date$1 extends TextInput {
3465
3448
  return !this.dateError || I18n.translate('VALIDATION_INVALID_DATE');
3466
3449
  }
3467
3450
  click(event, element) {
3468
- super.click(event, element);
3469
- if (!event.defaultPrevented) {
3451
+ const clickEvent = event || new MouseEvent('click');
3452
+ super.click(clickEvent, element);
3453
+ if (!clickEvent.defaultPrevented) {
3470
3454
  this.showDatePicker = !this.showDatePicker;
3471
3455
  }
3472
3456
  }
@@ -3814,8 +3798,9 @@ class DateRange extends TextInput {
3814
3798
  return !this.dateError || I18n.translate('VALIDATION_INVALID_DATE');
3815
3799
  }
3816
3800
  click(event, element) {
3817
- super.click(event, element);
3818
- if (!event.defaultPrevented) {
3801
+ const clickEvent = event || new MouseEvent('click');
3802
+ super.click(clickEvent, element);
3803
+ if (!clickEvent.defaultPrevented) {
3819
3804
  this.showDatePicker = !this.showDatePicker;
3820
3805
  }
3821
3806
  }
@@ -4188,7 +4173,7 @@ class FileInput extends TextInput {
4188
4173
  * Triggered when a removable chip is clicked
4189
4174
  * @param event DOM event
4190
4175
  * @param index Chip index
4191
- * @param element HTMLElement
4176
+ * @param element any
4192
4177
  */
4193
4178
  chipClick(event, index, element) {
4194
4179
  event.stopImmediatePropagation();
@@ -4476,6 +4461,8 @@ class Column extends Component {
4476
4461
  this.componentProps = {};
4477
4462
  /** column style property */
4478
4463
  this.style = {};
4464
+ /** Type of XLS */
4465
+ this.xlsType = '';
4479
4466
  /* Stores lookup data to prevent unnecessary requests */
4480
4467
  this.lookupData = {};
4481
4468
  /* Stores lookup data count (only to be reactive and force column update) */
@@ -4518,6 +4505,7 @@ class Column extends Component {
4518
4505
  this.loading = this.getInitValue('loading', props.loading, this.loading);
4519
4506
  this.style = this.getInitValue('style', props.style, this.style);
4520
4507
  this.componentProps = this.getInitValue('componentProps', props.componentProps, this.componentProps);
4508
+ this.xlsType = this.getInitValue('xlsType', props.xlsType, this.xlsType);
4521
4509
  this.conditions = this.getInitValue('conditions', props.conditions, this.conditions);
4522
4510
  this.createConditions();
4523
4511
  this.createActionConditions();
@@ -7036,6 +7024,41 @@ class ListGroup extends ListItem {
7036
7024
  }
7037
7025
  }
7038
7026
 
7027
+ class Loading extends Component {
7028
+ /*
7029
+ * Creates a new Loading Overlay
7030
+ * @param props Modal structure
7031
+ */
7032
+ constructor(props) {
7033
+ super(props);
7034
+ /**
7035
+ * text to show in Loader Overlay
7036
+ */
7037
+ this.text = 'Loading';
7038
+ this.isVisible = false;
7039
+ this.zIndex = 999;
7040
+ this.text = this.getInitValue('text', props.text, this.text);
7041
+ this.zIndex = this.getInitValue('zIndex', props.zIndex, this.zIndex);
7042
+ this.defaultText = this.text;
7043
+ }
7044
+ /**
7045
+ * Displays overlay
7046
+ */
7047
+ show(text) {
7048
+ if (text)
7049
+ this.text = text;
7050
+ else
7051
+ this.text = this.defaultText;
7052
+ this.isVisible = true;
7053
+ }
7054
+ /**
7055
+ * Close overlay
7056
+ */
7057
+ hide() {
7058
+ this.isVisible = false;
7059
+ }
7060
+ }
7061
+
7039
7062
  /**
7040
7063
  * Base class for Login component.
7041
7064
  */
@@ -7392,6 +7415,8 @@ class Menu extends ComponentRender {
7392
7415
  this.filteredMenuItems = [];
7393
7416
  /** Search value */
7394
7417
  this.searchValue = '';
7418
+ /** Store the current item focused */
7419
+ this.currentItem = null;
7395
7420
  this.app = this.getInitValue('app', props.app, this.app);
7396
7421
  this.clipped = this.getInitValue('clipped', props.clipped, this.clipped);
7397
7422
  this.fixed = this.getInitValue('fixed', props.fixed, this.fixed);
@@ -7667,9 +7692,21 @@ class MenuLink extends ComponentRender {
7667
7692
  */
7668
7693
  click(event) {
7669
7694
  let preventDefault = false;
7670
- preventDefault = this.callEvent('click', { event, component: this });
7695
+ preventDefault = this.callEvent('click', {
7696
+ event: (event || new MouseEvent('click')),
7697
+ component: this,
7698
+ });
7671
7699
  if (preventDefault) {
7672
- event.preventDefault();
7700
+ event === null || event === void 0 ? void 0 : event.preventDefault();
7701
+ }
7702
+ this.setFocus();
7703
+ }
7704
+ /**
7705
+ * Event triggered when this item is focus
7706
+ */
7707
+ focus() {
7708
+ if (this.parentMenu) {
7709
+ this.parentMenu.currentItem = this;
7673
7710
  }
7674
7711
  }
7675
7712
  /**
@@ -7738,6 +7775,29 @@ class MenuGroup extends ComponentRender {
7738
7775
  close() {
7739
7776
  this.opened = false;
7740
7777
  }
7778
+ /**
7779
+ * Event triggered when this item is clicked
7780
+ */
7781
+ click(event) {
7782
+ let preventDefault = false;
7783
+ preventDefault = this.callEvent('click', {
7784
+ event: (event || new MouseEvent('click')),
7785
+ component: this,
7786
+ });
7787
+ if (preventDefault) {
7788
+ event === null || event === void 0 ? void 0 : event.preventDefault();
7789
+ }
7790
+ this.setFocus();
7791
+ }
7792
+ /**
7793
+ * Event triggered when this item is focus
7794
+ */
7795
+ focus(event) {
7796
+ this.callEvent('focus', { event, component: this });
7797
+ if (this.parentMenu) {
7798
+ this.parentMenu.currentItem = this;
7799
+ }
7800
+ }
7741
7801
  }
7742
7802
 
7743
7803
  /**
@@ -7815,10 +7875,20 @@ class Modal extends Component {
7815
7875
  * If true the modal won't close when overlay is clicked
7816
7876
  */
7817
7877
  this.persistent = false;
7878
+ /**
7879
+ * Allows modal to be dragged around in the screen
7880
+ */
7881
+ this.draggable = false;
7882
+ /**
7883
+ * Css selector of the drag handle
7884
+ */
7885
+ this.dragHandle = '';
7818
7886
  this.title = this.getInitValue('title', props.title, this.title);
7819
7887
  this.fullscreen = this.getInitValue('fullscreen', props.fullscreen, this.fullscreen);
7820
7888
  this.grid = this.getInitValue('grid', props.grid, this.grid);
7821
7889
  this.persistent = this.getInitValue('persistent', props.persistent, this.persistent);
7890
+ this.draggable = this.getInitValue('draggable', props.draggable, this.draggable);
7891
+ this.dragHandle = this.getInitValue('dragHandle', props.dragHandle, this.dragHandle);
7822
7892
  this.isVisible = false;
7823
7893
  this.createAccessors();
7824
7894
  }
@@ -8240,11 +8310,16 @@ class SelectMultiple extends Select {
8240
8310
  * Number of hidden items
8241
8311
  */
8242
8312
  this.moreChip = 0;
8313
+ /**
8314
+ * Max number of rows the component can have
8315
+ */
8316
+ this.maxRows = undefined;
8243
8317
  this.showSelectAll = false;
8244
8318
  if (!this.selectedValue) {
8245
8319
  this.selectedValue = [];
8246
8320
  }
8247
8321
  this.showSelectAll = this.getInitValue('showSelectAll', props.showSelectAll, this.showSelectAll);
8322
+ this.maxRows = this.getInitValue('maxRows', props.maxRows, this.maxRows);
8248
8323
  this.createAccessors();
8249
8324
  }
8250
8325
  afterFocus() {
@@ -8420,6 +8495,21 @@ class SelectMultiple extends Select {
8420
8495
  removePushedValue() {
8421
8496
  this.removeInserts();
8422
8497
  }
8498
+ doSearch(value) {
8499
+ return __awaiter(this, void 0, void 0, function* () {
8500
+ if (this.manualMode || value) {
8501
+ yield this.updateSearch(value);
8502
+ }
8503
+ else {
8504
+ if (!this.manualMode) {
8505
+ this.datasource.data = [...this.cachedData];
8506
+ this.datasource.total = this.cachedTotal;
8507
+ }
8508
+ this.removeInserts();
8509
+ this.insertSelected();
8510
+ }
8511
+ });
8512
+ }
8423
8513
  /**
8424
8514
  * Removes unselected inserts from datasource
8425
8515
  */
@@ -9260,8 +9350,13 @@ class SelectTreeMultiple extends SelectTree {
9260
9350
  */
9261
9351
  this.selectedNodes = [];
9262
9352
  this.selectValue = [];
9353
+ /**
9354
+ * Changes the behavior of checked nodes that will be displayed in the array of values
9355
+ */
9356
+ this.valueConsistsOf = 'LEAF_PRIORITY';
9263
9357
  this.flat = this.getInitValue('flat', props.flat, this.flat);
9264
9358
  this.limit = this.getInitValue('limit', props.limit, this.limit);
9359
+ this.valueConsistsOf = this.getInitValue('valueConsistsOf', props.valueConsistsOf, this.valueConsistsOf);
9265
9360
  this.createAccessors();
9266
9361
  }
9267
9362
  /**
@@ -10081,8 +10176,11 @@ class Time extends TextInput {
10081
10176
  || I18n.translate('VALIDATION_TIME_NOT_ALLOWED');
10082
10177
  }
10083
10178
  click(event) {
10084
- this.callEvent('click', { event, component: this });
10085
- if (!event.defaultPrevented) {
10179
+ this.callEvent('click', {
10180
+ event: (event || new MouseEvent('click')),
10181
+ component: this,
10182
+ });
10183
+ if (!(event === null || event === void 0 ? void 0 : event.defaultPrevented)) {
10086
10184
  this.showTimePicker = !this.showTimePicker;
10087
10185
  }
10088
10186
  }
@@ -10208,6 +10306,10 @@ class Tree extends ComponentRender {
10208
10306
  * Components that will be rendered on toolbar slot
10209
10307
  */
10210
10308
  this.toolbarSlot = [];
10309
+ /**
10310
+ * Components that will be rendered on title slot
10311
+ */
10312
+ this.titleSlot = [];
10211
10313
  /** Datasource parent field */
10212
10314
  this.parentField = '';
10213
10315
  /** Datasource title field */
@@ -10218,11 +10320,21 @@ class Tree extends ComponentRender {
10218
10320
  * Defines if the tree will be opened or not (true/false) or if it should open only until a specific level
10219
10321
  */
10220
10322
  this.openLevelOnLoad = false;
10323
+ /**
10324
+ * Allow row check
10325
+ */
10326
+ this.checkbox = false;
10221
10327
  /**
10222
10328
  * Defines if should wait and not execute GET method when Datasource is created
10223
10329
  */
10224
10330
  this.lazyLoad = true;
10225
- this.nodes = props.nodes || this.nodes;
10331
+ /**
10332
+ * Dictionary of nodePath ponting to Dictionary of path pointing to the condition (applied) return value
10333
+ */
10334
+ this.appliedConditions = {};
10335
+ /* Conditions of tree */
10336
+ this.factoredConditions = {};
10337
+ this.nodes = this.initNodes(props.nodes || this.nodes);
10226
10338
  this.itemIconName = this.getInitValue('itemIconName', props.itemIconName, this.itemIconName);
10227
10339
  this.groupIconName = this.getInitValue('groupIconName', props.groupIconName, this.groupIconName);
10228
10340
  this.openedIconName = this.getInitValue('openedIconName', props.openedIconName, this.openedIconName);
@@ -10233,8 +10345,16 @@ class Tree extends ComponentRender {
10233
10345
  this.titleField = this.getInitValue('titleField', props.titleField, this.titleField);
10234
10346
  this.dataField = this.getInitValue('dataField', props.dataField, this.dataField);
10235
10347
  this.openLevelOnLoad = this.getInitValue('openLevelOnLoad', props.openLevelOnLoad, this.openLevelOnLoad);
10348
+ this.checkbox = this.getInitValue('checkbox', props.checkbox, this.checkbox);
10236
10349
  this.afterTitleSlot = props.afterTitleSlot || this.afterTitleSlot;
10237
10350
  this.toolbarSlot = props.toolbarSlot || this.toolbarSlot;
10351
+ this.titleSlot = props.titleSlot || this.titleSlot;
10352
+ if (props.afterTitleSlot) {
10353
+ this.createConditions([props.afterTitleSlot]);
10354
+ }
10355
+ if (props.titleSlot) {
10356
+ this.createConditions(props.titleSlot);
10357
+ }
10238
10358
  if (props.datasource && Object.keys(props.datasource).length) {
10239
10359
  this.lazyLoad = props.datasource.lazyLoad !== false;
10240
10360
  this.datasource = DatasourceFactory.factory(Object.assign(Object.assign({}, props.datasource), { searchIn: props.datasource.searchIn || [this.titleField, this.dataField].filter(Boolean), lazyLoad: true, loadAll: true }));
@@ -10242,6 +10362,12 @@ class Tree extends ComponentRender {
10242
10362
  }
10243
10363
  this.createAccessors();
10244
10364
  }
10365
+ /**
10366
+ * Initialize all the properties of the declared nodes (reactivity)
10367
+ */
10368
+ initNodes(nodes) {
10369
+ return nodes.map((node) => (Object.assign(Object.assign({ isLeaf: false, isExpanded: true, isSelected: false, isDraggable: true, isSelectable: true, isChecked: false }, node), { children: this.initNodes(node.children || []) })));
10370
+ }
10245
10371
  /** Nodes */
10246
10372
  get nodes() {
10247
10373
  return this.nodesValue;
@@ -10252,6 +10378,16 @@ class Tree extends ComponentRender {
10252
10378
  }
10253
10379
  this.nodesValue = value;
10254
10380
  }
10381
+ getCheckedNodes() {
10382
+ const selectedNodes = [];
10383
+ this.tree.traverse((node) => {
10384
+ const instanceNode = this.getNode(node.path || []);
10385
+ if (instanceNode === null || instanceNode === void 0 ? void 0 : instanceNode.isChecked) {
10386
+ selectedNodes.push(instanceNode);
10387
+ }
10388
+ });
10389
+ return selectedNodes;
10390
+ }
10255
10391
  /** Returns the selected nodes */
10256
10392
  get selectedNodes() {
10257
10393
  var _a;
@@ -10350,16 +10486,87 @@ class Tree extends ComponentRender {
10350
10486
  setTree(tree) {
10351
10487
  this.tree = tree;
10352
10488
  }
10353
- /** Get the conditions function to be applied to each column depending on the node */
10354
- getConditions(conditions) {
10355
- const cond = Event.factory(conditions);
10356
- return (node) => {
10357
- const appliedConditions = {};
10358
- Object.keys(conditions).forEach((condition) => {
10359
- appliedConditions[condition] = cond[condition](node);
10360
- });
10361
- return appliedConditions;
10362
- };
10489
+ /**
10490
+ * Return plain conditions object
10491
+ * @param conditions Conditions object
10492
+ * @param parentPath Path to parent property
10493
+ */
10494
+ getPlainConditions(conditions, parentPath = '') {
10495
+ let plainData = {};
10496
+ Object.keys(conditions).forEach((key) => {
10497
+ const fullKey = parentPath ? [parentPath, key].join('.') : key;
10498
+ if (typeof conditions[key] === 'object') {
10499
+ plainData = Object.assign(Object.assign({}, plainData), this.getPlainConditions(conditions[key], fullKey));
10500
+ }
10501
+ else {
10502
+ plainData[fullKey] = conditions[key];
10503
+ }
10504
+ });
10505
+ return plainData;
10506
+ }
10507
+ createConditions(children, parentPath = '') {
10508
+ children.forEach((child) => {
10509
+ const path = parentPath ? `${parentPath}.${child.name}` : child.name;
10510
+ if (child.conditions) {
10511
+ const plainConditions = this.getPlainConditions(child.conditions);
10512
+ this.factoredConditions[path] = Event.factory(plainConditions);
10513
+ }
10514
+ if (child.children) {
10515
+ this.createConditions(child.children, path);
10516
+ }
10517
+ });
10518
+ }
10519
+ applyCondition(node, factoredConditions) {
10520
+ const appliedConditions = {};
10521
+ Object.keys(factoredConditions).forEach((condition) => {
10522
+ const conditionFunction = factoredConditions[condition];
10523
+ set(appliedConditions, condition, conditionFunction(node));
10524
+ });
10525
+ return appliedConditions;
10526
+ }
10527
+ applyChildCondition(node, factoredConditions = this.factoredConditions) {
10528
+ const appliedConditions = {};
10529
+ Object.keys(factoredConditions).forEach((comp) => {
10530
+ const conditions = this.factoredConditions[comp];
10531
+ appliedConditions[comp] = Object.assign({}, this.applyCondition(node, conditions));
10532
+ });
10533
+ return appliedConditions;
10534
+ }
10535
+ reapplyConditions(node) {
10536
+ const nodePath = node.pathStr;
10537
+ if (!nodePath)
10538
+ return {};
10539
+ const appliedConditions = Object.assign({}, this.appliedConditions);
10540
+ appliedConditions[nodePath] = this.applyChildCondition(node);
10541
+ this.appliedConditions = appliedConditions;
10542
+ return this.appliedConditions[nodePath];
10543
+ }
10544
+ getSlotComponent(slot, node, parentPath = '') {
10545
+ const slotArr = Array.isArray(slot) ? slot : [slot];
10546
+ const newComponents = [];
10547
+ slotArr.forEach((component) => {
10548
+ var _a;
10549
+ if (!component)
10550
+ return;
10551
+ const nodePath = node.pathStr;
10552
+ if (!nodePath)
10553
+ return;
10554
+ const compName = component.name;
10555
+ const instanceName = `${compName}_${nodePath}`;
10556
+ const path = parentPath ? `${parentPath}.${compName}` : compName;
10557
+ const newComponent = merge({}, component, (_a = this.appliedConditions[nodePath]) === null || _a === void 0 ? void 0 : _a[path]);
10558
+ const newChildren = this.getSlotComponent(newComponent.children || [], node, path);
10559
+ newComponent.name = instanceName;
10560
+ newComponent.children = newChildren;
10561
+ try {
10562
+ Metadata.updateInstance(instanceName, newComponent);
10563
+ }
10564
+ catch (e) {
10565
+ // do nothing
10566
+ }
10567
+ newComponents.push(newComponent);
10568
+ });
10569
+ return newComponents;
10363
10570
  }
10364
10571
  /** Triggers when dragging nodes have been dropped */
10365
10572
  nodeDrop(nodes, position, event, element) {
@@ -10387,6 +10594,12 @@ class Tree extends ComponentRender {
10387
10594
  event, element, component: this, node,
10388
10595
  });
10389
10596
  }
10597
+ /** Triggers when a node has been checked/unchecked */
10598
+ nodeCheck(node, event, element) {
10599
+ this.callEvent('onNodeCheck', {
10600
+ event, element, component: this, node,
10601
+ });
10602
+ }
10390
10603
  clearSelection(nodes) {
10391
10604
  const nodesArray = nodes || this.nodes;
10392
10605
  nodesArray.forEach((node) => {
@@ -10396,6 +10609,19 @@ class Tree extends ComponentRender {
10396
10609
  }
10397
10610
  });
10398
10611
  }
10612
+ getNode(path) {
10613
+ return this.searchPath(this.nodes, path);
10614
+ }
10615
+ getParentNode(node) {
10616
+ var _a;
10617
+ return this.getNode(((_a = node.path) === null || _a === void 0 ? void 0 : _a.slice(0, -1)) || []);
10618
+ }
10619
+ searchPath(nodes, path) {
10620
+ const currentNode = (path[0] > -1 && path[0] < nodes.length) ? nodes[path[0]] : undefined;
10621
+ if (currentNode && path.length > 1)
10622
+ return this.searchPath(currentNode.children || [], path.slice(1));
10623
+ return currentNode;
10624
+ }
10399
10625
  }
10400
10626
 
10401
10627
  /**
@@ -11035,7 +11261,7 @@ Icons.mdiIcons = {
11035
11261
  tableColumns: 'mdi-table-headers-eye',
11036
11262
  unfold: 'mdi-unfold-more-horizontal',
11037
11263
  warning: 'mdi-exclamation',
11038
- zoom: 'mdi-magnify-scan',
11264
+ zoom: 'mdi-magnify',
11039
11265
  zoomIn: 'mdi-plus-circle-outline',
11040
11266
  zoomPanning: 'mdi-hand-back-right-outline',
11041
11267
  zoomOut: 'mdi-minus-circle-outline',
@@ -11133,15 +11359,23 @@ const defaultTheme = {
11133
11359
  zeedhi: {
11134
11360
  light: {
11135
11361
  'font-color': 'var(--v-grey-darken2)',
11136
- 'background-base': '#F6F6F6',
11362
+ 'background-base': '#FDFDFD',
11363
+ 'background-base-2': '#F6F6F6',
11364
+ 'background-base-3': '#EEE',
11137
11365
  'scrollbar-track': 'var(--v-grey-lighten5)',
11138
11366
  'scrollbar-thumb': 'var(--v-grey-lighten4)',
11367
+ 'badge-background-color': '#f44336',
11368
+ 'badge-text-color': '#fff',
11139
11369
  },
11140
11370
  dark: {
11141
11371
  'font-color': 'var(--v-grey-lighten3)',
11142
- 'background-base': '#121212',
11372
+ 'background-base': '#1E1E1E',
11373
+ 'background-base-2': 'var(--v-grey-darken2)',
11374
+ 'background-base-3': 'var(--v-grey-darken4)',
11143
11375
  'scrollbar-track': 'var(--v-grey-darken3)',
11144
11376
  'scrollbar-thumb': 'var(--v-grey-base)',
11377
+ 'badge-background-color': '#f44336',
11378
+ 'badge-text-color': '#fff',
11145
11379
  },
11146
11380
  variables: {
11147
11381
  'default-padding': '16px',
@@ -11159,8 +11393,6 @@ const defaultTheme = {
11159
11393
  'font-body4-weight': '500',
11160
11394
  'font-caption-size': '11px',
11161
11395
  'font-caption-weight': '400',
11162
- 'badge-background-color': '#f44336',
11163
- 'badge-text-color': '#fff',
11164
11396
  },
11165
11397
  },
11166
11398
  };
@@ -11415,6 +11647,7 @@ class BaseReport {
11415
11647
  sequence: index,
11416
11648
  format: this.getFormatOfColumn(col),
11417
11649
  size: `${size}%`,
11650
+ xlsType: col.xlsType,
11418
11651
  };
11419
11652
  return Object.assign(Object.assign({}, result), { [col.name]: row });
11420
11653
  }, {});