@shival99/z-ui 2.5.9 → 2.5.11

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 (50) hide show
  1. package/README.md +0 -0
  2. package/assets/css/animations.css +0 -0
  3. package/assets/css/base.css +0 -0
  4. package/assets/css/features/media.css +0 -0
  5. package/assets/css/features/office.css +0 -0
  6. package/assets/css/global.css +0 -0
  7. package/assets/css/overlay.css +0 -0
  8. package/assets/css/tailwind.css +0 -0
  9. package/assets/css/themes/gray.css +0 -0
  10. package/assets/css/themes/green.css +0 -0
  11. package/assets/css/themes/hospital.css +0 -0
  12. package/assets/css/themes/neutral.css +0 -0
  13. package/assets/css/themes/orange.css +0 -0
  14. package/assets/css/themes/slate.css +0 -0
  15. package/assets/css/themes/stone.css +0 -0
  16. package/assets/css/themes/violet.css +0 -0
  17. package/assets/css/themes/zinc.css +0 -0
  18. package/assets/css/themes.css +0 -0
  19. package/assets/images/avatar.svg +0 -0
  20. package/assets/images/logo.svg +0 -0
  21. package/components/z-loading/THIRD_PARTY_NOTICES.md +0 -0
  22. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +25 -0
  23. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
  24. package/fesm2022/shival99-z-ui-components-z-calendar.mjs +1 -1
  25. package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
  26. package/fesm2022/shival99-z-ui-components-z-input.mjs +1 -1
  27. package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
  28. package/fesm2022/shival99-z-ui-components-z-kanban.mjs +1 -1
  29. package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
  30. package/fesm2022/shival99-z-ui-components-z-pagination.mjs +1 -1
  31. package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
  32. package/fesm2022/shival99-z-ui-components-z-select.mjs +234 -11
  33. package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
  34. package/fesm2022/shival99-z-ui-components-z-table.mjs +3 -3
  35. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
  36. package/fesm2022/shival99-z-ui-components-z-tabs.mjs +7 -3
  37. package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
  38. package/fesm2022/shival99-z-ui-components-z-tags.mjs +10 -21
  39. package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
  40. package/fesm2022/shival99-z-ui-utils.mjs.map +1 -1
  41. package/package.json +1 -1
  42. package/types/shival99-z-ui-components-z-autocomplete.d.ts +3 -1
  43. package/types/shival99-z-ui-components-z-calendar.d.ts +4 -4
  44. package/types/shival99-z-ui-components-z-editor.d.ts +1 -1
  45. package/types/shival99-z-ui-components-z-modal.d.ts +1 -1
  46. package/types/shival99-z-ui-components-z-select.d.ts +27 -6
  47. package/types/shival99-z-ui-components-z-table.d.ts +1 -1
  48. package/types/shival99-z-ui-components-z-tabs.d.ts +2 -1
  49. package/types/shival99-z-ui-components-z-tags.d.ts +3 -4
  50. package/types/shival99-z-ui-components-z-upload.d.ts +3 -3
package/README.md CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -239,6 +239,7 @@ class ZAutocompleteComponent {
239
239
  count: this.filteredOptions().length,
240
240
  estimateSize: () => this.effectiveOptionHeight(),
241
241
  measureElement: (element) => element.getBoundingClientRect().height,
242
+ gap: 3,
242
243
  overscan: 5,
243
244
  useApplicationRefTick: false,
244
245
  }));
@@ -426,6 +427,7 @@ class ZAutocompleteComponent {
426
427
  _onTouched = () => void 0;
427
428
  _ngControl = null;
428
429
  _isNavigationFilling = false;
430
+ _hasPendingInput = false;
429
431
  constructor() {
430
432
  effect(onCleanup => {
431
433
  const triggerEl = this.triggerRef()?.nativeElement;
@@ -534,6 +536,7 @@ class ZAutocompleteComponent {
534
536
  this._value.set(value ?? '');
535
537
  this.inputValue.set(value ?? '');
536
538
  this.debouncedQuery.set(value ?? '');
539
+ this._hasPendingInput = false;
537
540
  if (this.zType() === 'address_bar') {
538
541
  this.searchQuery.set(value ?? '');
539
542
  }
@@ -553,6 +556,7 @@ class ZAutocompleteComponent {
553
556
  this._pendingSearch.set(false);
554
557
  this.inputValue.set(value);
555
558
  this._value.set(value);
559
+ this._hasPendingInput = true;
556
560
  this.uiState.update(s => ({ ...s, dirty: true }));
557
561
  this._onChange(value);
558
562
  if (!this._isNavigationFilling) {
@@ -649,6 +653,10 @@ class ZAutocompleteComponent {
649
653
  event.preventDefault();
650
654
  if (isAddressBarMode && this._valueBeforeNavigation !== null) {
651
655
  this._revertToValueBeforeNavigation();
656
+ this._hasPendingInput = false;
657
+ }
658
+ else {
659
+ this._cancelPendingInput();
652
660
  }
653
661
  this._valueBeforeNavigation = null;
654
662
  this._closePanel();
@@ -721,6 +729,7 @@ class ZAutocompleteComponent {
721
729
  }, 0);
722
730
  }
723
731
  _resetInput() {
732
+ this._hasPendingInput = false;
724
733
  if (!this.zResetOnSelect()) {
725
734
  this._closePanel();
726
735
  this.activeIndex.set(-1);
@@ -755,6 +764,7 @@ class ZAutocompleteComponent {
755
764
  }, 50);
756
765
  }
757
766
  onPopoverHideStart() {
767
+ this._cancelPendingInput();
758
768
  this._openRequested = false;
759
769
  this.uiState.update(s => ({ ...s, isOpen: false }));
760
770
  this.activeIndex.set(-1);
@@ -779,6 +789,7 @@ class ZAutocompleteComponent {
779
789
  this.zOnSelect.emit(option);
780
790
  this._selectedOption.set(option);
781
791
  const newValue = this.zResetOnSelect() ? '' : option.label;
792
+ this._hasPendingInput = false;
782
793
  this.inputValue.set(newValue);
783
794
  this._value.set(newValue);
784
795
  this.debouncedQuery.set(newValue);
@@ -793,6 +804,7 @@ class ZAutocompleteComponent {
793
804
  clearInput(event) {
794
805
  event.stopPropagation();
795
806
  event.preventDefault();
807
+ this._hasPendingInput = false;
796
808
  this.inputValue.set('');
797
809
  this._value.set('');
798
810
  this.uiState.update(s => ({ ...s, dirty: true }));
@@ -833,9 +845,14 @@ class ZAutocompleteComponent {
833
845
  this.inputRef()?.nativeElement.blur();
834
846
  }
835
847
  clear() {
848
+ this._hasPendingInput = false;
836
849
  this.inputValue.set('');
837
850
  this._value.set('');
838
851
  this.debouncedQuery.set('');
852
+ const inputEl = this.inputRef()?.nativeElement;
853
+ if (inputEl) {
854
+ inputEl.value = '';
855
+ }
839
856
  this._onChange('');
840
857
  this.zValueChange.emit('');
841
858
  this._selectedOption.set(null);
@@ -858,6 +875,7 @@ class ZAutocompleteComponent {
858
875
  this._closePanel();
859
876
  }
860
877
  setValue(value) {
878
+ this._hasPendingInput = false;
861
879
  this._value.set(value);
862
880
  this.inputValue.set(value);
863
881
  this.debouncedQuery.set(value);
@@ -877,6 +895,13 @@ class ZAutocompleteComponent {
877
895
  _closePanel() {
878
896
  this._popoverControl()?.close();
879
897
  }
898
+ _cancelPendingInput() {
899
+ if (!this._hasPendingInput) {
900
+ return;
901
+ }
902
+ this._hasPendingInput = false;
903
+ this.clear();
904
+ }
880
905
  _setupDebounce() {
881
906
  this._query$
882
907
  .pipe(debounceTime(this.effectiveDebounceTime()), distinctUntilChanged(), takeUntilDestroyed(this._destroyRef))