@zeedhi/common 1.67.0 → 1.68.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.
@@ -23,6 +23,10 @@ class Component {
23
23
  * @param props Components properties
24
24
  */
25
25
  constructor(props) {
26
+ /**
27
+ * Automatically add focus to input when it's created.
28
+ */
29
+ this.autofocus = false;
26
30
  /**
27
31
  * Children component structure if the component has children.
28
32
  */
@@ -77,6 +81,7 @@ class Component {
77
81
  this.parent = props.parent;
78
82
  this.name = props.name;
79
83
  this.events = Event.factory(props.events || this.events);
84
+ this.autofocus = this.getInitValue('autofocus', props.autofocus, this.autofocus);
80
85
  this.cssClass = this.getInitValue('cssClass', props.cssClass, this.cssClass);
81
86
  this.cssStyle = this.getInitValue('cssStyle', props.cssStyle, this.cssStyle);
82
87
  this.directives = this.getInitValue('directives', props.directives, this.directives);
@@ -1612,10 +1617,6 @@ class Input extends ComponentRender {
1612
1617
  * Input auto complete.
1613
1618
  */
1614
1619
  this.autofill = true;
1615
- /**
1616
- * Automatically add focus to input when it's created.
1617
- */
1618
- this.autofocus = false;
1619
1620
  /**
1620
1621
  * Add input clear functionality if the input isn't readonly or disabled.
1621
1622
  */
@@ -1704,7 +1705,6 @@ class Input extends ComponentRender {
1704
1705
  this.align = this.getInitValue('align', props.align, this.align);
1705
1706
  this.alwaysShowError = this.getInitValue('alwaysShowError', props.alwaysShowError, this.alwaysShowError);
1706
1707
  this.autofill = this.getInitValue('autofill', props.autofill, this.autofill);
1707
- this.autofocus = this.getInitValue('autofocus', props.autofocus, this.autofocus);
1708
1708
  this.clearable = this.getInitValue('clearable', props.clearable, this.clearable);
1709
1709
  this.color = this.getInitValue('color', props.color, this.color);
1710
1710
  this.dense = this.getInitValue('dense', props.dense, this.dense);
@@ -4073,19 +4073,25 @@ class DateRange extends TextInput {
4073
4073
  const chars = replaced.split('');
4074
4074
  return chars.length ? chars.every((char) => Mask.isMaskDelimiter(char)) : true;
4075
4075
  }
4076
- updateHelperHint() {
4077
- if (this.helperValue) {
4076
+ updateHelperHint(helperValue) {
4077
+ const previousHelperHint = this.helperValue ? DateHelper.getLabel(this.helperValue) : '';
4078
+ if (!this.hint || previousHelperHint !== this.hint) {
4078
4079
  this.previousHint = this.hint;
4079
4080
  this.previousPersistentHint = this.persistentHint;
4080
- this.hint = DateHelper.getLabel(this.helperValue);
4081
- this.persistentHint = true;
4082
4081
  }
4082
+ this.helperValue = helperValue;
4083
+ const label = DateHelper.getLabel(helperValue);
4084
+ if (!helperValue || !label) {
4085
+ this.hint = this.previousHint;
4086
+ this.persistentHint = this.previousPersistentHint;
4087
+ return;
4088
+ }
4089
+ this.hint = label;
4090
+ this.persistentHint = true;
4083
4091
  }
4084
4092
  change(event, element) {
4085
4093
  super.change(event, element);
4086
- this.helperValue = '';
4087
- this.hint = this.previousHint;
4088
- this.persistentHint = this.previousPersistentHint;
4094
+ this.updateHelperHint('');
4089
4095
  }
4090
4096
  getMaskValue() {
4091
4097
  let mask = '';
@@ -7914,6 +7920,10 @@ class Menu extends ComponentRender {
7914
7920
  * Defines if the menu is an application menu
7915
7921
  */
7916
7922
  this.app = false;
7923
+ /**
7924
+ * Defines if the menu must be rendered inside an absolute div
7925
+ */
7926
+ this.absolute = false;
7917
7927
  /**
7918
7928
  * Defines if the menu should rests under the application toolbar
7919
7929
  */
@@ -8007,6 +8017,7 @@ class Menu extends ComponentRender {
8007
8017
  /** Store the current item focused */
8008
8018
  this.currentItem = null;
8009
8019
  this.app = this.getInitValue('app', props.app, this.app);
8020
+ this.absolute = this.getInitValue('absolute', props.absolute, this.absolute);
8010
8021
  this.clipped = this.getInitValue('clipped', props.clipped, this.clipped);
8011
8022
  this.fixed = this.getInitValue('fixed', props.fixed, this.fixed);
8012
8023
  this.floating = this.getInitValue('floating', props.floating, this.floating);
@@ -9273,6 +9284,7 @@ class TreeDataStructure {
9273
9284
  this.parentField = tree.parentField;
9274
9285
  this.fetchOnDemand = tree.fetchOnDemand;
9275
9286
  this.openLevelOnLoad = tree.openLevelOnLoad;
9287
+ this.tree = tree;
9276
9288
  this.init();
9277
9289
  }
9278
9290
  /**
@@ -9292,20 +9304,20 @@ class TreeDataStructure {
9292
9304
  this.searchValue = this.originalDatasource.search;
9293
9305
  this.searchHasNoData = false;
9294
9306
  if (this.fetchOnDemand) {
9295
- if (this.originalDatasource.search) {
9307
+ if (this.tree.detach || this.originalDatasource.search) {
9296
9308
  delete this.originalDatasource.filter[this.parentField];
9297
9309
  }
9298
9310
  else if (!this.originalDatasource.filter[this.parentField]) {
9299
9311
  this.originalDatasource.filter[this.parentField] = 'NULL';
9300
9312
  }
9301
9313
  }
9302
- if (!this.fetchOnDemand && this.searchValue) {
9314
+ if (!this.tree.detach && !this.fetchOnDemand && this.searchValue) {
9303
9315
  this.searchAllData();
9304
9316
  return Promise.resolve(this.originalDatasource.data);
9305
9317
  }
9306
9318
  return originalGet.call(this.originalDatasource).then((data) => {
9307
9319
  if (this.searchValue) {
9308
- this.searchOnDemand();
9320
+ this.buildDetached();
9309
9321
  }
9310
9322
  else {
9311
9323
  this.buildTree();
@@ -9318,7 +9330,10 @@ class TreeDataStructure {
9318
9330
  * search data
9319
9331
  */
9320
9332
  buildTree() {
9321
- if (this.fetchOnDemand) {
9333
+ if (this.tree.detach) {
9334
+ this.buildDetached();
9335
+ }
9336
+ else if (this.fetchOnDemand) {
9322
9337
  this.buildOnDemand();
9323
9338
  }
9324
9339
  else {
@@ -9571,13 +9586,12 @@ class TreeDataStructure {
9571
9586
  });
9572
9587
  }
9573
9588
  /**
9574
- * Search tree with fetchOnDemand
9575
- * @param data datasource data
9589
+ * Arrange treeData in a uniform structure
9576
9590
  */
9577
- searchOnDemand() {
9591
+ buildDetached() {
9578
9592
  this.treeData = [];
9579
9593
  this.treeStructure = {};
9580
- const childData = this.originalDatasource.data.map((row) => (Object.assign(Object.assign({}, row), { tree__children: [], tree__opened: false, tree__searched: true, tree__level: 1, tree__parent: undefined })));
9594
+ const childData = this.originalDatasource.data.map((row) => (Object.assign(Object.assign({}, row), { tree__children: [], tree__opened: false, tree__searched: !!this.searchValue, tree__level: 1, tree__parent: undefined })));
9581
9595
  this.treeData = childData;
9582
9596
  this.treeStructure['no-parent'] = childData;
9583
9597
  }
@@ -11042,11 +11056,15 @@ class Tooltip extends ComponentRender {
11042
11056
  */
11043
11057
  this.nudge = 0;
11044
11058
  /**
11045
- * Nudge the content to the top
11059
+ * Open the tooltip on activator click
11046
11060
  */
11047
11061
  this.openOnClick = false;
11048
11062
  /**
11049
- * Nudge the content to the top
11063
+ * Open the tooltip on activator focus
11064
+ */
11065
+ this.openOnFocus = true;
11066
+ /**
11067
+ * Open the tooltip on activator hover
11050
11068
  */
11051
11069
  this.openOnHover = true;
11052
11070
  /**
@@ -11066,6 +11084,7 @@ class Tooltip extends ComponentRender {
11066
11084
  this.minWidth = this.getInitValue('minWidth', props.minWidth, this.minWidth);
11067
11085
  this.nudge = this.getInitValue('nudge', props.nudge, this.nudge);
11068
11086
  this.openOnClick = this.getInitValue('openOnClick', props.openOnClick, this.openOnClick);
11087
+ this.openOnFocus = this.getInitValue('openOnFocus', props.openOnFocus, this.openOnFocus);
11069
11088
  this.openOnHover = this.getInitValue('openOnHover', props.openOnHover, this.openOnHover);
11070
11089
  this.right = this.getInitValue('right', props.right, this.right);
11071
11090
  this.top = this.getInitValue('top', props.top, this.top);
@@ -11495,6 +11514,10 @@ class TreeGrid extends Grid {
11495
11514
  * Even though all children are selected, the parent node is not
11496
11515
  */
11497
11516
  this.flat = false;
11517
+ /**
11518
+ * Display the rows detached from their parents
11519
+ */
11520
+ this.detach = false;
11498
11521
  this.navigationTreeKeyMapping = {
11499
11522
  right: {
11500
11523
  event: this.navigateToggle.bind(this, false),
@@ -11512,6 +11535,7 @@ class TreeGrid extends Grid {
11512
11535
  this.parentField = this.getInitValue('parentField', props.parentField, this.parentField);
11513
11536
  this.fetchOnDemand = this.getInitValue('fetchOnDemand', props.fetchOnDemand, this.fetchOnDemand);
11514
11537
  this.flat = this.getInitValue('flat', props.flat, this.flat);
11538
+ this.detach = this.getInitValue('detach', props.detach, this.detach);
11515
11539
  this.treeDataStructure = new TreeDataStructure(this);
11516
11540
  this.createAccessors();
11517
11541
  }
@@ -11526,17 +11550,15 @@ class TreeGrid extends Grid {
11526
11550
  * Build tree data
11527
11551
  */
11528
11552
  buildTree(doGet = true) {
11529
- if (doGet) {
11530
- if (this.fetchOnDemand) {
11531
- this.datasource.addFilter(this.parentField, 'NULL');
11532
- }
11533
- else {
11534
- this.datasource.get();
11535
- }
11536
- }
11537
- else {
11553
+ if (!doGet) {
11538
11554
  this.treeDataStructure.buildTree();
11555
+ return;
11556
+ }
11557
+ if (!this.fetchOnDemand) {
11558
+ this.datasource.get();
11559
+ return;
11539
11560
  }
11561
+ this.datasource.addFilter(this.parentField, 'NULL');
11540
11562
  }
11541
11563
  /**
11542
11564
  * This function takes an array of objects and updates the data in the tree.
@@ -30,6 +30,10 @@
30
30
  * @param props Components properties
31
31
  */
32
32
  constructor(props) {
33
+ /**
34
+ * Automatically add focus to input when it's created.
35
+ */
36
+ this.autofocus = false;
33
37
  /**
34
38
  * Children component structure if the component has children.
35
39
  */
@@ -84,6 +88,7 @@
84
88
  this.parent = props.parent;
85
89
  this.name = props.name;
86
90
  this.events = core.Event.factory(props.events || this.events);
91
+ this.autofocus = this.getInitValue('autofocus', props.autofocus, this.autofocus);
87
92
  this.cssClass = this.getInitValue('cssClass', props.cssClass, this.cssClass);
88
93
  this.cssStyle = this.getInitValue('cssStyle', props.cssStyle, this.cssStyle);
89
94
  this.directives = this.getInitValue('directives', props.directives, this.directives);
@@ -1619,10 +1624,6 @@
1619
1624
  * Input auto complete.
1620
1625
  */
1621
1626
  this.autofill = true;
1622
- /**
1623
- * Automatically add focus to input when it's created.
1624
- */
1625
- this.autofocus = false;
1626
1627
  /**
1627
1628
  * Add input clear functionality if the input isn't readonly or disabled.
1628
1629
  */
@@ -1711,7 +1712,6 @@
1711
1712
  this.align = this.getInitValue('align', props.align, this.align);
1712
1713
  this.alwaysShowError = this.getInitValue('alwaysShowError', props.alwaysShowError, this.alwaysShowError);
1713
1714
  this.autofill = this.getInitValue('autofill', props.autofill, this.autofill);
1714
- this.autofocus = this.getInitValue('autofocus', props.autofocus, this.autofocus);
1715
1715
  this.clearable = this.getInitValue('clearable', props.clearable, this.clearable);
1716
1716
  this.color = this.getInitValue('color', props.color, this.color);
1717
1717
  this.dense = this.getInitValue('dense', props.dense, this.dense);
@@ -4080,19 +4080,25 @@
4080
4080
  const chars = replaced.split('');
4081
4081
  return chars.length ? chars.every((char) => core.Mask.isMaskDelimiter(char)) : true;
4082
4082
  }
4083
- updateHelperHint() {
4084
- if (this.helperValue) {
4083
+ updateHelperHint(helperValue) {
4084
+ const previousHelperHint = this.helperValue ? core.DateHelper.getLabel(this.helperValue) : '';
4085
+ if (!this.hint || previousHelperHint !== this.hint) {
4085
4086
  this.previousHint = this.hint;
4086
4087
  this.previousPersistentHint = this.persistentHint;
4087
- this.hint = core.DateHelper.getLabel(this.helperValue);
4088
- this.persistentHint = true;
4089
4088
  }
4089
+ this.helperValue = helperValue;
4090
+ const label = core.DateHelper.getLabel(helperValue);
4091
+ if (!helperValue || !label) {
4092
+ this.hint = this.previousHint;
4093
+ this.persistentHint = this.previousPersistentHint;
4094
+ return;
4095
+ }
4096
+ this.hint = label;
4097
+ this.persistentHint = true;
4090
4098
  }
4091
4099
  change(event, element) {
4092
4100
  super.change(event, element);
4093
- this.helperValue = '';
4094
- this.hint = this.previousHint;
4095
- this.persistentHint = this.previousPersistentHint;
4101
+ this.updateHelperHint('');
4096
4102
  }
4097
4103
  getMaskValue() {
4098
4104
  let mask = '';
@@ -7921,6 +7927,10 @@
7921
7927
  * Defines if the menu is an application menu
7922
7928
  */
7923
7929
  this.app = false;
7930
+ /**
7931
+ * Defines if the menu must be rendered inside an absolute div
7932
+ */
7933
+ this.absolute = false;
7924
7934
  /**
7925
7935
  * Defines if the menu should rests under the application toolbar
7926
7936
  */
@@ -8014,6 +8024,7 @@
8014
8024
  /** Store the current item focused */
8015
8025
  this.currentItem = null;
8016
8026
  this.app = this.getInitValue('app', props.app, this.app);
8027
+ this.absolute = this.getInitValue('absolute', props.absolute, this.absolute);
8017
8028
  this.clipped = this.getInitValue('clipped', props.clipped, this.clipped);
8018
8029
  this.fixed = this.getInitValue('fixed', props.fixed, this.fixed);
8019
8030
  this.floating = this.getInitValue('floating', props.floating, this.floating);
@@ -9280,6 +9291,7 @@
9280
9291
  this.parentField = tree.parentField;
9281
9292
  this.fetchOnDemand = tree.fetchOnDemand;
9282
9293
  this.openLevelOnLoad = tree.openLevelOnLoad;
9294
+ this.tree = tree;
9283
9295
  this.init();
9284
9296
  }
9285
9297
  /**
@@ -9299,20 +9311,20 @@
9299
9311
  this.searchValue = this.originalDatasource.search;
9300
9312
  this.searchHasNoData = false;
9301
9313
  if (this.fetchOnDemand) {
9302
- if (this.originalDatasource.search) {
9314
+ if (this.tree.detach || this.originalDatasource.search) {
9303
9315
  delete this.originalDatasource.filter[this.parentField];
9304
9316
  }
9305
9317
  else if (!this.originalDatasource.filter[this.parentField]) {
9306
9318
  this.originalDatasource.filter[this.parentField] = 'NULL';
9307
9319
  }
9308
9320
  }
9309
- if (!this.fetchOnDemand && this.searchValue) {
9321
+ if (!this.tree.detach && !this.fetchOnDemand && this.searchValue) {
9310
9322
  this.searchAllData();
9311
9323
  return Promise.resolve(this.originalDatasource.data);
9312
9324
  }
9313
9325
  return originalGet.call(this.originalDatasource).then((data) => {
9314
9326
  if (this.searchValue) {
9315
- this.searchOnDemand();
9327
+ this.buildDetached();
9316
9328
  }
9317
9329
  else {
9318
9330
  this.buildTree();
@@ -9325,7 +9337,10 @@
9325
9337
  * search data
9326
9338
  */
9327
9339
  buildTree() {
9328
- if (this.fetchOnDemand) {
9340
+ if (this.tree.detach) {
9341
+ this.buildDetached();
9342
+ }
9343
+ else if (this.fetchOnDemand) {
9329
9344
  this.buildOnDemand();
9330
9345
  }
9331
9346
  else {
@@ -9578,13 +9593,12 @@
9578
9593
  });
9579
9594
  }
9580
9595
  /**
9581
- * Search tree with fetchOnDemand
9582
- * @param data datasource data
9596
+ * Arrange treeData in a uniform structure
9583
9597
  */
9584
- searchOnDemand() {
9598
+ buildDetached() {
9585
9599
  this.treeData = [];
9586
9600
  this.treeStructure = {};
9587
- const childData = this.originalDatasource.data.map((row) => (Object.assign(Object.assign({}, row), { tree__children: [], tree__opened: false, tree__searched: true, tree__level: 1, tree__parent: undefined })));
9601
+ const childData = this.originalDatasource.data.map((row) => (Object.assign(Object.assign({}, row), { tree__children: [], tree__opened: false, tree__searched: !!this.searchValue, tree__level: 1, tree__parent: undefined })));
9588
9602
  this.treeData = childData;
9589
9603
  this.treeStructure['no-parent'] = childData;
9590
9604
  }
@@ -11049,11 +11063,15 @@
11049
11063
  */
11050
11064
  this.nudge = 0;
11051
11065
  /**
11052
- * Nudge the content to the top
11066
+ * Open the tooltip on activator click
11053
11067
  */
11054
11068
  this.openOnClick = false;
11055
11069
  /**
11056
- * Nudge the content to the top
11070
+ * Open the tooltip on activator focus
11071
+ */
11072
+ this.openOnFocus = true;
11073
+ /**
11074
+ * Open the tooltip on activator hover
11057
11075
  */
11058
11076
  this.openOnHover = true;
11059
11077
  /**
@@ -11073,6 +11091,7 @@
11073
11091
  this.minWidth = this.getInitValue('minWidth', props.minWidth, this.minWidth);
11074
11092
  this.nudge = this.getInitValue('nudge', props.nudge, this.nudge);
11075
11093
  this.openOnClick = this.getInitValue('openOnClick', props.openOnClick, this.openOnClick);
11094
+ this.openOnFocus = this.getInitValue('openOnFocus', props.openOnFocus, this.openOnFocus);
11076
11095
  this.openOnHover = this.getInitValue('openOnHover', props.openOnHover, this.openOnHover);
11077
11096
  this.right = this.getInitValue('right', props.right, this.right);
11078
11097
  this.top = this.getInitValue('top', props.top, this.top);
@@ -11502,6 +11521,10 @@
11502
11521
  * Even though all children are selected, the parent node is not
11503
11522
  */
11504
11523
  this.flat = false;
11524
+ /**
11525
+ * Display the rows detached from their parents
11526
+ */
11527
+ this.detach = false;
11505
11528
  this.navigationTreeKeyMapping = {
11506
11529
  right: {
11507
11530
  event: this.navigateToggle.bind(this, false),
@@ -11519,6 +11542,7 @@
11519
11542
  this.parentField = this.getInitValue('parentField', props.parentField, this.parentField);
11520
11543
  this.fetchOnDemand = this.getInitValue('fetchOnDemand', props.fetchOnDemand, this.fetchOnDemand);
11521
11544
  this.flat = this.getInitValue('flat', props.flat, this.flat);
11545
+ this.detach = this.getInitValue('detach', props.detach, this.detach);
11522
11546
  this.treeDataStructure = new TreeDataStructure(this);
11523
11547
  this.createAccessors();
11524
11548
  }
@@ -11533,17 +11557,15 @@
11533
11557
  * Build tree data
11534
11558
  */
11535
11559
  buildTree(doGet = true) {
11536
- if (doGet) {
11537
- if (this.fetchOnDemand) {
11538
- this.datasource.addFilter(this.parentField, 'NULL');
11539
- }
11540
- else {
11541
- this.datasource.get();
11542
- }
11543
- }
11544
- else {
11560
+ if (!doGet) {
11545
11561
  this.treeDataStructure.buildTree();
11562
+ return;
11563
+ }
11564
+ if (!this.fetchOnDemand) {
11565
+ this.datasource.get();
11566
+ return;
11546
11567
  }
11568
+ this.datasource.addFilter(this.parentField, 'NULL');
11547
11569
  }
11548
11570
  /**
11549
11571
  * This function takes an array of objects and updates the data in the tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/common",
3
- "version": "1.67.0",
3
+ "version": "1.68.0",
4
4
  "description": "Zeedhi Common",
5
5
  "author": "Zeedhi <zeedhi@teknisa.com>",
6
6
  "license": "ISC",
@@ -39,5 +39,5 @@
39
39
  "lodash.times": "^4.3.2",
40
40
  "mockdate": "^3.0.2"
41
41
  },
42
- "gitHead": "e073bdc1515fa3ab9da439f984a2a8f8fd572c9e"
42
+ "gitHead": "84cc6c01ee3c9aab7566b333f73e2aac50ad5c4f"
43
43
  }
@@ -4,6 +4,10 @@ import { IComponent, IComponentDirectives, IComponentEvents } from './interfaces
4
4
  * Base class for all Zeedhi components.
5
5
  */
6
6
  export declare class Component implements IComponent {
7
+ /**
8
+ * Automatically add focus to input when it's created.
9
+ */
10
+ autofocus: boolean;
7
11
  /**
8
12
  * Children component structure if the component has children.
9
13
  */
@@ -7,6 +7,7 @@ export interface IPropAccessor {
7
7
  };
8
8
  }
9
9
  export interface IComponent {
10
+ autofocus?: boolean;
10
11
  children?: IComponent[];
11
12
  componentId?: number;
12
13
  cssClass?: string;
@@ -127,7 +127,7 @@ export declare class DateRange extends TextInput implements IDateRange {
127
127
  protected isSimpleFormat(format: string): boolean;
128
128
  private previousHint;
129
129
  private previousPersistentHint;
130
- updateHelperHint(): void;
130
+ updateHelperHint(helperValue: string): void;
131
131
  change(event?: Event, element?: any): void;
132
132
  getMaskValue(): any;
133
133
  }
@@ -71,12 +71,16 @@ export declare class Form extends ComponentRender implements IForm {
71
71
  [key: string]: any;
72
72
  children?: import("..").IComponentRender[] | undefined;
73
73
  component: string;
74
+ autofocus?: boolean | undefined;
74
75
  componentId?: number | undefined;
75
76
  cssClass?: string | undefined;
76
77
  cssStyle?: string | object | undefined;
77
78
  events?: import("..").IComponentEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
78
79
  directives?: import("..").IComponentDirectives | undefined;
79
- isVisible?: string | boolean | undefined;
80
+ isVisible?: string | boolean | undefined; /**
81
+ * Applies the align-items css property.
82
+ * Available options are start, center, end, space-between, space-around and stretch.
83
+ */
80
84
  dark?: boolean | undefined;
81
85
  light?: boolean | undefined;
82
86
  keyMap?: import("@zeedhi/core").IKeyMap<import("@zeedhi/core").IEventParam<any>> | undefined;
@@ -18,6 +18,7 @@ export declare class GridColumn extends Column implements IGridColumn {
18
18
  [key: string]: any;
19
19
  children?: import("..").IComponentRender[] | undefined;
20
20
  component: string;
21
+ autofocus?: boolean | undefined;
21
22
  componentId?: number | undefined;
22
23
  cssClass?: string | undefined;
23
24
  cssStyle?: string | object | undefined;
@@ -27,10 +28,7 @@ export declare class GridColumn extends Column implements IGridColumn {
27
28
  dark?: boolean | undefined;
28
29
  light?: boolean | undefined;
29
30
  keyMap?: import("@zeedhi/core").IKeyMap<import("@zeedhi/core").IEventParam<any>> | undefined;
30
- name: string; /**
31
- * Creates a new Grid Column.
32
- * @param props Grid column properties
33
- */
31
+ name: string;
34
32
  parent?: import("..").Component | undefined;
35
33
  tabStop?: boolean | undefined;
36
34
  }[];
@@ -17,10 +17,6 @@ export declare class Input extends ComponentRender implements IInput {
17
17
  * Input auto complete.
18
18
  */
19
19
  autofill: boolean;
20
- /**
21
- * Automatically add focus to input when it's created.
22
- */
23
- autofocus: boolean;
24
20
  /**
25
21
  * Add input clear functionality if the input isn't readonly or disabled.
26
22
  */
@@ -12,7 +12,6 @@ export interface IInput extends IComponentRender {
12
12
  align?: string;
13
13
  alwaysShowError?: boolean;
14
14
  autofill?: boolean;
15
- autofocus?: boolean;
16
15
  clearable?: boolean;
17
16
  color?: string;
18
17
  dark?: boolean;
@@ -9,6 +9,7 @@ export declare type IMenuLinkEvents = IComponentEvents<IMenuLinkEvent>;
9
9
  */
10
10
  export interface IMenu extends IComponentRender {
11
11
  app?: boolean | string;
12
+ absolute?: boolean | string;
12
13
  clipped?: boolean | string;
13
14
  dense?: boolean | string;
14
15
  fixed?: boolean | string;
@@ -9,6 +9,10 @@ export declare class Menu extends ComponentRender implements IMenu {
9
9
  * Defines if the menu is an application menu
10
10
  */
11
11
  app: boolean | string;
12
+ /**
13
+ * Defines if the menu must be rendered inside an absolute div
14
+ */
15
+ absolute: boolean | string;
12
16
  /**
13
17
  * Defines if the menu should rests under the application toolbar
14
18
  */
@@ -12,6 +12,7 @@ export interface ITooltip extends IComponentRender {
12
12
  minWidth?: number | string;
13
13
  nudge?: number | string;
14
14
  openOnClick?: boolean;
15
+ openOnFocus?: boolean;
15
16
  openOnHover?: boolean;
16
17
  right?: boolean;
17
18
  top?: boolean;
@@ -34,11 +34,15 @@ export declare class Tooltip extends ComponentRender implements ITooltip {
34
34
  */
35
35
  nudge: number | string;
36
36
  /**
37
- * Nudge the content to the top
37
+ * Open the tooltip on activator click
38
38
  */
39
39
  openOnClick: boolean;
40
40
  /**
41
- * Nudge the content to the top
41
+ * Open the tooltip on activator focus
42
+ */
43
+ openOnFocus: boolean;
44
+ /**
45
+ * Open the tooltip on activator hover
42
46
  */
43
47
  openOnHover: boolean;
44
48
  /**
@@ -6,6 +6,7 @@ export interface ITreeGrid extends IGrid {
6
6
  openLevelOnLoad?: number | boolean;
7
7
  fetchOnDemand?: boolean;
8
8
  flat?: boolean;
9
+ detach?: boolean;
9
10
  }
10
11
  export interface ITreeGridEditable extends ITreeGrid {
11
12
  columns?: IGridColumnEditable[];
@@ -35,6 +35,10 @@ export declare class TreeGrid extends Grid implements ITreeGrid {
35
35
  * Even though all children are selected, the parent node is not
36
36
  */
37
37
  flat: boolean;
38
+ /**
39
+ * Display the rows detached from their parents
40
+ */
41
+ detach: boolean;
38
42
  viewUpdateScrollData?: () => void;
39
43
  /**
40
44
  * Creates a new Tree Grid.
@@ -4,4 +4,5 @@ export interface ITreeDataStructure {
4
4
  parentField: string;
5
5
  openLevelOnLoad: number | boolean;
6
6
  fetchOnDemand: boolean;
7
+ detach?: boolean;
7
8
  }
@@ -29,6 +29,10 @@ export declare class TreeDataStructure {
29
29
  * Stores tree structure
30
30
  */
31
31
  private treeStructure;
32
+ /**
33
+ * Tree component
34
+ */
35
+ private tree;
32
36
  constructor(tree: ITreeDataStructure);
33
37
  /**
34
38
  * Creates properties and methods
@@ -122,10 +126,9 @@ export declare class TreeDataStructure {
122
126
  */
123
127
  private reloadAndUpdateSelectedRows;
124
128
  /**
125
- * Search tree with fetchOnDemand
126
- * @param data datasource data
129
+ * Arrange treeData in a uniform structure
127
130
  */
128
- private searchOnDemand;
131
+ buildDetached(): void;
129
132
  /**
130
133
  * Search value against a memory datasource
131
134
  */