@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.
- package/README.md +0 -0
- package/assets/css/animations.css +0 -0
- package/assets/css/base.css +0 -0
- package/assets/css/features/media.css +0 -0
- package/assets/css/features/office.css +0 -0
- package/assets/css/global.css +0 -0
- package/assets/css/overlay.css +0 -0
- package/assets/css/tailwind.css +0 -0
- package/assets/css/themes/gray.css +0 -0
- package/assets/css/themes/green.css +0 -0
- package/assets/css/themes/hospital.css +0 -0
- package/assets/css/themes/neutral.css +0 -0
- package/assets/css/themes/orange.css +0 -0
- package/assets/css/themes/slate.css +0 -0
- package/assets/css/themes/stone.css +0 -0
- package/assets/css/themes/violet.css +0 -0
- package/assets/css/themes/zinc.css +0 -0
- package/assets/css/themes.css +0 -0
- package/assets/images/avatar.svg +0 -0
- package/assets/images/logo.svg +0 -0
- package/components/z-loading/THIRD_PARTY_NOTICES.md +0 -0
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +25 -0
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-select.mjs +234 -11
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-table.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs +7 -3
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tags.mjs +10 -21
- package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-utils.mjs.map +1 -1
- package/package.json +1 -1
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +3 -1
- package/types/shival99-z-ui-components-z-calendar.d.ts +4 -4
- package/types/shival99-z-ui-components-z-editor.d.ts +1 -1
- package/types/shival99-z-ui-components-z-modal.d.ts +1 -1
- package/types/shival99-z-ui-components-z-select.d.ts +27 -6
- package/types/shival99-z-ui-components-z-table.d.ts +1 -1
- package/types/shival99-z-ui-components-z-tabs.d.ts +2 -1
- package/types/shival99-z-ui-components-z-tags.d.ts +3 -4
- package/types/shival99-z-ui-components-z-upload.d.ts +3 -3
package/README.md
CHANGED
|
File without changes
|
|
File without changes
|
package/assets/css/base.css
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/assets/css/global.css
CHANGED
|
File without changes
|
package/assets/css/overlay.css
CHANGED
|
File without changes
|
package/assets/css/tailwind.css
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
|
package/assets/css/themes.css
CHANGED
|
File without changes
|
package/assets/images/avatar.svg
CHANGED
|
File without changes
|
package/assets/images/logo.svg
CHANGED
|
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))
|