@shival99/z-ui 2.6.5 → 2.6.7

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 (39) hide show
  1. package/.npmignore +5 -5
  2. package/assets/css/base.css +16 -16
  3. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +10 -13
  4. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
  5. package/fesm2022/shival99-z-ui-components-z-button.mjs +7 -7
  6. package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -1
  7. package/fesm2022/shival99-z-ui-components-z-chat.mjs +2 -2
  8. package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -1
  9. package/fesm2022/shival99-z-ui-components-z-command.mjs +2 -2
  10. package/fesm2022/shival99-z-ui-components-z-command.mjs.map +1 -1
  11. package/fesm2022/shival99-z-ui-components-z-editor.mjs +2 -2
  12. package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
  13. package/fesm2022/shival99-z-ui-components-z-filter.mjs +2 -2
  14. package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -1
  15. package/fesm2022/shival99-z-ui-components-z-gallery.mjs +2 -2
  16. package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
  17. package/fesm2022/shival99-z-ui-components-z-input.mjs +2 -2
  18. package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
  19. package/fesm2022/shival99-z-ui-components-z-kanban.mjs +2 -2
  20. package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
  21. package/fesm2022/shival99-z-ui-components-z-menu.mjs +9 -7
  22. package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
  23. package/fesm2022/shival99-z-ui-components-z-pagination.mjs +2 -2
  24. package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
  25. package/fesm2022/shival99-z-ui-components-z-select.mjs +5 -4
  26. package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
  27. package/fesm2022/shival99-z-ui-components-z-table.mjs +106 -29
  28. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
  29. package/fesm2022/shival99-z-ui-components-z-upload.mjs +3 -2
  30. package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -1
  31. package/fesm2022/shival99-z-ui-utils.mjs +27 -1
  32. package/fesm2022/shival99-z-ui-utils.mjs.map +1 -1
  33. package/package.json +1 -1
  34. package/types/shival99-z-ui-components-z-autocomplete.d.ts +3 -1
  35. package/types/shival99-z-ui-components-z-menu.d.ts +2 -0
  36. package/types/shival99-z-ui-components-z-select.d.ts +1 -0
  37. package/types/shival99-z-ui-components-z-table.d.ts +2 -1
  38. package/types/shival99-z-ui-components-z-upload.d.ts +1 -0
  39. package/types/shival99-z-ui-utils.d.ts +8 -2
package/.npmignore CHANGED
@@ -18,11 +18,11 @@ components/z-chat/package.json
18
18
  components/z-checkbox/package.json
19
19
  components/z-code/package.json
20
20
  components/z-command/package.json
21
- components/z-drawer/package.json
22
21
  components/z-dropdown-menu/package.json
22
+ components/z-drawer/package.json
23
23
  components/z-editor/package.json
24
- components/z-empty/package.json
25
24
  components/z-filter/package.json
25
+ components/z-empty/package.json
26
26
  components/z-gallery/package.json
27
27
  components/z-hover-glide/package.json
28
28
  components/z-icon/package.json
@@ -31,14 +31,14 @@ components/z-kanban/package.json
31
31
  components/z-loading/package.json
32
32
  components/z-marquee/package.json
33
33
  components/z-media-player/package.json
34
- components/z-menu/package.json
35
34
  components/z-metric-card/package.json
35
+ components/z-menu/package.json
36
36
  components/z-modal/package.json
37
37
  components/z-number-ticker/package.json
38
- components/z-overlay/package.json
39
38
  components/z-pagination/package.json
40
- components/z-popover/package.json
39
+ components/z-overlay/package.json
41
40
  components/z-qrcode/package.json
41
+ components/z-popover/package.json
42
42
  components/z-radio/package.json
43
43
  components/z-scrollarea/package.json
44
44
  components/z-select/package.json
@@ -86,46 +86,46 @@ body {
86
86
  /* ==================== Utility Classes ==================== */
87
87
 
88
88
  @layer utilities {
89
- .shadow-0,
90
- .shadow-1,
91
- .shadow-2,
92
- .shadow-3,
93
- .shadow-card,
94
- .shadow-card-md,
95
- .shadow-card-lg,
96
- .shadow-card-soft {
89
+ :where(.shadow-0),
90
+ :where(.shadow-1),
91
+ :where(.shadow-2),
92
+ :where(.shadow-3),
93
+ :where(.shadow-card),
94
+ :where(.shadow-card-md),
95
+ :where(.shadow-card-lg),
96
+ :where(.shadow-card-soft) {
97
97
  --tw-shadow-color: initial;
98
98
  }
99
99
 
100
- .shadow-0 {
100
+ :where(.shadow-0) {
101
101
  box-shadow: var(--shadow-0);
102
102
  }
103
103
 
104
- .shadow-1 {
104
+ :where(.shadow-1) {
105
105
  box-shadow: var(--shadow-1);
106
106
  }
107
107
 
108
- .shadow-2 {
108
+ :where(.shadow-2) {
109
109
  box-shadow: var(--shadow-2);
110
110
  }
111
111
 
112
- .shadow-3 {
112
+ :where(.shadow-3) {
113
113
  box-shadow: var(--shadow-3);
114
114
  }
115
115
 
116
- .shadow-card {
116
+ :where(.shadow-card) {
117
117
  box-shadow: var(--shadow-card);
118
118
  }
119
119
 
120
- .shadow-card-md {
120
+ :where(.shadow-card-md) {
121
121
  box-shadow: var(--shadow-card-md);
122
122
  }
123
123
 
124
- .shadow-card-lg {
124
+ :where(.shadow-card-lg) {
125
125
  box-shadow: var(--shadow-card-lg);
126
126
  }
127
127
 
128
- .shadow-card-soft {
128
+ :where(.shadow-card-soft) {
129
129
  box-shadow: var(--shadow-card-soft);
130
130
  }
131
131
  }
@@ -10,7 +10,7 @@ import { ZLoadingComponent } from '@shival99/z-ui/components/z-loading';
10
10
  import { ZPopoverDirective } from '@shival99/z-ui/components/z-popover';
11
11
  import { ZTooltipDirective } from '@shival99/z-ui/components/z-tooltip';
12
12
  import { ZHighlightPipe, ZSafeHtmlPipe } from '@shival99/z-ui/pipes';
13
- import { zTransform, zUuid, zResolveAsyncSelectedOptions, zMergeAsyncOptions, zRemoveVietnamese, zMergeClasses, zCreateEvent, Z_ASYNC_OPTIONS_DEFAULT_PAGE_SIZE, zToAsyncOptionsObservable, zResolveAsyncOptionsHasMore } from '@shival99/z-ui/utils';
13
+ import { zTransform, zUuid, zCreateDestroySafeTimeout, zResolveAsyncSelectedOptions, zMergeAsyncOptions, zRemoveVietnamese, zMergeClasses, zCreateEvent, Z_ASYNC_OPTIONS_DEFAULT_PAGE_SIZE, zToAsyncOptionsObservable, zResolveAsyncOptionsHasMore } from '@shival99/z-ui/utils';
14
14
  import { injectVirtualizer } from '@tanstack/angular-virtual';
15
15
  import { Subject, debounceTime, distinctUntilChanged, finalize } from 'rxjs';
16
16
  import { cva } from 'class-variance-authority';
@@ -222,7 +222,9 @@ class ZAutocompleteComponent {
222
222
  ...(ngDevMode ? [{ debugName: "dropdownWidth" }] : /* istanbul ignore next */ []));
223
223
  _pendingSearch = signal(false, /* @ts-ignore */
224
224
  ...(ngDevMode ? [{ debugName: "_pendingSearch" }] : /* istanbul ignore next */ []));
225
- _localLoadingTimeout = null;
225
+ _localLoadingTimer = zCreateDestroySafeTimeout(this._destroyRef);
226
+ _focusInputTimer = zCreateDestroySafeTimeout(this._destroyRef);
227
+ _navigationFillTimer = zCreateDestroySafeTimeout(this._destroyRef);
226
228
  _loadMoreObserver = null;
227
229
  _virtualScrollListener = null;
228
230
  _asyncLoadSubscription = null;
@@ -702,7 +704,7 @@ class ZAutocompleteComponent {
702
704
  if (inputEl) {
703
705
  inputEl.value = option.label;
704
706
  }
705
- setTimeout(() => {
707
+ this._navigationFillTimer.schedule(() => {
706
708
  this._isNavigationFilling = false;
707
709
  }, 0);
708
710
  }
@@ -724,7 +726,7 @@ class ZAutocompleteComponent {
724
726
  inputEl.value = value;
725
727
  }
726
728
  this._valueBeforeNavigation = null;
727
- setTimeout(() => {
729
+ this._navigationFillTimer.schedule(() => {
728
730
  this._isNavigationFilling = false;
729
731
  }, 0);
730
732
  }
@@ -759,7 +761,7 @@ class ZAutocompleteComponent {
759
761
  if (triggerEl) {
760
762
  this.dropdownWidth.set(triggerEl.getBoundingClientRect().width);
761
763
  }
762
- setTimeout(() => {
764
+ this._focusInputTimer.schedule(() => {
763
765
  this.inputRef()?.nativeElement.focus();
764
766
  }, 50);
765
767
  }
@@ -823,7 +825,7 @@ class ZAutocompleteComponent {
823
825
  }
824
826
  this.zOnCommit.emit({ value: '', source: 'blur' });
825
827
  this._resetAsyncOptions();
826
- setTimeout(() => {
828
+ this._focusInputTimer.schedule(() => {
827
829
  this.inputRef()?.nativeElement.focus();
828
830
  });
829
831
  }
@@ -922,9 +924,8 @@ class ZAutocompleteComponent {
922
924
  this._resetOptionsScrollTop();
923
925
  this._clearLocalLoadingTimer();
924
926
  this._pendingSearch.set(true);
925
- this._localLoadingTimeout = setTimeout(() => {
927
+ this._localLoadingTimer.schedule(() => {
926
928
  this._pendingSearch.set(false);
927
- this._localLoadingTimeout = null;
928
929
  }, 100);
929
930
  });
930
931
  }
@@ -1077,11 +1078,7 @@ class ZAutocompleteComponent {
1077
1078
  this._asyncLoadingMore.set(false);
1078
1079
  }
1079
1080
  _clearLocalLoadingTimer() {
1080
- if (!this._localLoadingTimeout) {
1081
- return;
1082
- }
1083
- clearTimeout(this._localLoadingTimeout);
1084
- this._localLoadingTimeout = null;
1081
+ this._localLoadingTimer.cancel();
1085
1082
  }
1086
1083
  _setupLoadMoreObserver() {
1087
1084
  this._cleanupLoadMoreObserver();