@sankhyalabs/ezui 6.2.0-dev.2 → 6.2.0-dev.4

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 (52) hide show
  1. package/dist/cjs/{app-globals-cdb08d04.js → app-globals-0a67e214.js} +3 -1
  2. package/dist/cjs/ez-classic-input.cjs.entry.js +318 -0
  3. package/dist/cjs/ez-classic-text-area.cjs.entry.js +86 -0
  4. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-tree.cjs.entry.js +48 -7
  6. package/dist/cjs/ezui.cjs.js +2 -2
  7. package/dist/cjs/index-a7b0c73d.js +8 -0
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/collection/collection-manifest.json +2 -0
  10. package/dist/collection/components/ez-classic-input/ez-classic-input.css +140 -0
  11. package/dist/collection/components/ez-classic-input/ez-classic-input.js +547 -0
  12. package/dist/collection/components/ez-classic-input/interfaces/optionsSetFocus.js +1 -0
  13. package/dist/collection/components/ez-classic-input/utils/maskFormatter.js +194 -0
  14. package/dist/collection/components/ez-classic-text-area/ez-classic-text-area.css +179 -0
  15. package/dist/collection/components/ez-classic-text-area/ez-classic-text-area.js +479 -0
  16. package/dist/collection/components/ez-classic-text-area/interfaces/optionsSetFocus.js +1 -0
  17. package/dist/collection/components/ez-icon/ez-icon.css +23 -18
  18. package/dist/collection/components/ez-tree/ez-tree.css +4 -1
  19. package/dist/collection/components/ez-tree/ez-tree.js +21 -2
  20. package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +7 -1
  21. package/dist/collection/components/ez-tree/types/Tree.js +37 -3
  22. package/dist/collection/global/app-init.js +3 -1
  23. package/dist/custom-elements/index.d.ts +12 -0
  24. package/dist/custom-elements/index.js +454 -15
  25. package/dist/esm/{app-globals-8c57b015.js → app-globals-8a94d86c.js} +3 -1
  26. package/dist/esm/ez-classic-input.entry.js +314 -0
  27. package/dist/esm/ez-classic-text-area.entry.js +82 -0
  28. package/dist/esm/ez-icon.entry.js +1 -1
  29. package/dist/esm/ez-tree.entry.js +48 -7
  30. package/dist/esm/ezui.js +2 -2
  31. package/dist/esm/index-baa5e267.js +8 -0
  32. package/dist/esm/loader.js +2 -2
  33. package/dist/ezui/ezui.esm.js +1 -1
  34. package/dist/ezui/p-2d080bdc.entry.js +1 -0
  35. package/dist/ezui/p-48effc69.entry.js +1 -0
  36. package/dist/ezui/p-b2b1a1a7.entry.js +1 -0
  37. package/dist/ezui/p-e78e87f5.entry.js +1 -0
  38. package/dist/types/components/ez-classic-input/ez-classic-input.d.ts +78 -0
  39. package/dist/types/components/ez-classic-input/interfaces/optionsSetFocus.d.ts +4 -0
  40. package/dist/types/components/ez-classic-input/utils/maskFormatter.d.ts +30 -0
  41. package/dist/types/components/ez-classic-text-area/ez-classic-text-area.d.ts +61 -0
  42. package/dist/types/components/ez-classic-text-area/interfaces/optionsSetFocus.d.ts +4 -0
  43. package/dist/types/components/ez-tree/ez-tree.d.ts +4 -0
  44. package/dist/types/components/ez-tree/types/Tree.d.ts +2 -1
  45. package/dist/types/components.d.ts +372 -0
  46. package/package.json +1 -1
  47. package/react/components.d.ts +2 -0
  48. package/react/components.js +2 -0
  49. package/react/components.js.map +1 -1
  50. package/dist/ezui/p-7eb6115c.entry.js +0 -1
  51. package/dist/ezui/p-e78b5a16.entry.js +0 -1
  52. /package/dist/ezui/{p-76ad2e26.js → p-07819d50.js} +0 -0
@@ -43,9 +43,15 @@ export class Tree extends Node {
43
43
  }
44
44
  });
45
45
  }
46
- setFilterPattern(pattern) {
47
- this._filterPattern = StringUtils.replaceAccentuatedCharsKeepSymbols(pattern);
48
- this.applyFilter(this);
46
+ async setFilterPattern(pattern, enableHierarchicalFilter = true) {
47
+ if (pattern && enableHierarchicalFilter && pattern.includes('.')) {
48
+ const layers = pattern.split('.').map(p => StringUtils.replaceAccentuatedCharsKeepSymbols(p.trim()));
49
+ await this.applyLayeredFilter(this, layers, 0);
50
+ }
51
+ else {
52
+ this._filterPattern = StringUtils.replaceAccentuatedCharsKeepSymbols(pattern);
53
+ this.applyFilter(this);
54
+ }
49
55
  this._changeCallback();
50
56
  }
51
57
  updateItem(item) {
@@ -102,6 +108,34 @@ export class Tree extends Node {
102
108
  }
103
109
  node.visible = isVisible;
104
110
  }
111
+ async applyLayeredFilter(node, layers, level) {
112
+ if (!node.item) {
113
+ const results = await Promise.all(Array.from(node.children.values()).map(child => this.applyLayeredFilter(child, layers, level)));
114
+ const childFound = results.some(Boolean);
115
+ node.visible = childFound;
116
+ return childFound;
117
+ }
118
+ const normalizedLabel = StringUtils.replaceAccentuatedCharsKeepSymbols(node.item.label);
119
+ if (!normalizedLabel.includes(layers[level])) {
120
+ const results = await Promise.all(Array.from(node.children.values()).map(child => this.applyLayeredFilter(child, layers, level)));
121
+ const childFound = results.some(Boolean);
122
+ if (childFound)
123
+ node.item.expanded = true;
124
+ node.visible = childFound;
125
+ return childFound;
126
+ }
127
+ if (level === layers.length - 1) {
128
+ node.visible = true;
129
+ this.setAllChildrenVisible(node);
130
+ return true;
131
+ }
132
+ const results = await Promise.all(Array.from(node.children.values()).map(child => this.applyLayeredFilter(child, layers, level + 1)));
133
+ const childFound = results.some(Boolean);
134
+ if (childFound)
135
+ node.item.expanded = true;
136
+ node.visible = childFound;
137
+ return childFound;
138
+ }
105
139
  async walkPath(parent, path, callback, currentLevel = 0) {
106
140
  return new Promise(async (resolve) => {
107
141
  const levels = path.split(">>").map(item => item.trim());
@@ -1,6 +1,8 @@
1
1
  import initI18n from '../utils/i18n';
2
2
  export default async function initializeApp() {
3
3
  await initI18n();
4
- console.log('Global initialization ez-ui completed!');
4
+ if (process.env.NODE_ENV !== 'development') {
5
+ console.log('Global initialization ez-ui completed!');
6
+ }
5
7
  }
6
8
  ;
@@ -80,6 +80,18 @@ export const EzChip: {
80
80
  new (): EzChip;
81
81
  };
82
82
 
83
+ interface EzClassicInput extends Components.EzClassicInput, HTMLElement {}
84
+ export const EzClassicInput: {
85
+ prototype: EzClassicInput;
86
+ new (): EzClassicInput;
87
+ };
88
+
89
+ interface EzClassicTextArea extends Components.EzClassicTextArea, HTMLElement {}
90
+ export const EzClassicTextArea: {
91
+ prototype: EzClassicTextArea;
92
+ new (): EzClassicTextArea;
93
+ };
94
+
83
95
  interface EzCollapsibleBox extends Components.EzCollapsibleBox, HTMLElement {}
84
96
  export const EzCollapsibleBox: {
85
97
  prototype: EzCollapsibleBox;