ng-zenduit 2.3.1 → 2.3.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-zenduit",
3
- "version": "2.3.1",
3
+ "version": "2.3.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=22.0.0 <23.0.0",
6
6
  "@angular/core": ">=22.0.0 <23.0.0",
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, OnInit, ElementRef, NgZone, TemplateRef, OnChanges, ViewContainerRef, SimpleChanges, Renderer2, InjectionToken, AfterViewInit, ChangeDetectorRef, OnDestroy } from '@angular/core';
2
+ import { EventEmitter, OnInit, ElementRef, NgZone, TemplateRef, OnChanges, ViewContainerRef, SimpleChanges, DoCheck, Renderer2, InjectionToken, AfterViewInit, ChangeDetectorRef, OnDestroy } from '@angular/core';
3
3
  import * as i60 from '@angular/cdk/overlay';
4
4
  import { Overlay } from '@angular/cdk/overlay';
5
5
  import * as i62 from '@ngx-translate/core';
@@ -810,18 +810,20 @@ declare class ZenduDatepickerComponent implements OnChanges {
810
810
  static ɵcmp: i0.ɵɵComponentDeclaration<ZenduDatepickerComponent, "zen-datepicker", never, { "date": { "alias": "date"; "required": false; }; "showTime": { "alias": "showTime"; "required": false; }; "showSeconds": { "alias": "showSeconds"; "required": false; }; "showDate": { "alias": "showDate"; "required": false; }; "parentContainer": { "alias": "parentContainer"; "required": false; }; "containerClass": { "alias": "containerClass"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "boxDesign": { "alias": "boxDesign"; "required": false; }; "highlightDays": { "alias": "highlightDays"; "required": false; }; "autoConfirm": { "alias": "autoConfirm"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "highlightError": { "alias": "highlightError"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "dispalyOverParent": { "alias": "dispalyOverParent"; "required": false; }; }, { "dateChange": "dateChange"; }, never, never, false, never>;
811
811
  }
812
812
 
813
- declare class ZenduFilterComponent implements OnChanges {
813
+ declare class ZenduFilterComponent implements OnChanges, DoCheck {
814
814
  renderer: Renderer2;
815
815
  config: FiltersConfig;
816
816
  filter: object;
817
817
  position: string;
818
818
  resetBehavior: 'set_all' | 'clear';
819
+ defaultFilter?: object;
819
820
  filterChange: EventEmitter<object>;
820
821
  isVisible: boolean;
821
822
  isVisibleChange: EventEmitter<boolean>;
822
823
  customTrigger: boolean;
823
824
  imageUrl: string;
824
825
  label: string;
826
+ triggerVariant: 'default' | 'icon-only';
825
827
  showOptions: boolean;
826
828
  customOptions: string;
827
829
  wrapperBodyClass: string;
@@ -830,13 +832,18 @@ declare class ZenduFilterComponent implements OnChanges {
830
832
  isApplied: boolean;
831
833
  private lastAppliedFilter;
832
834
  private resetedFilter;
835
+ private _defaultFilterSignature;
836
+ selectedCount: number;
837
+ resetDisabled: boolean;
838
+ appliedCount: number;
839
+ hasActiveFilters: boolean;
833
840
  menuLeft: string;
834
841
  menuRight: string;
835
842
  menuTop: string;
836
843
  menuBottom: string;
844
+ menuMaxHeight: string;
837
845
  showNoFilterResult: boolean;
838
846
  errorMessage: string[];
839
- datepickerPosition: typeof DATEPICKER_POSITION;
840
847
  selectedDateRangeOptions: {
841
848
  [key: string]: string;
842
849
  };
@@ -844,6 +851,7 @@ declare class ZenduFilterComponent implements OnChanges {
844
851
  _componentElement: ElementRef<HTMLElement>;
845
852
  constructor(renderer: Renderer2);
846
853
  ngOnChanges(changes: any): void;
854
+ ngDoCheck(): void;
847
855
  outsideHandling(event: MouseEvent): void;
848
856
  windowSizeHandling(): void;
849
857
  windowScroll(): void;
@@ -853,20 +861,51 @@ declare class ZenduFilterComponent implements OnChanges {
853
861
  private extractUniqueDataSource;
854
862
  onSelectAll(item: FiltersConfigItem): void;
855
863
  isItemActive(item: FiltersConfigItem): boolean;
864
+ /**
865
+ * Whether a section is actively contributing to the filter — used to show the
866
+ * per-section "applied" dot next to its chevron. Mirrors the per-type gating
867
+ * of computeSelectedCount() (e.g. a radio only counts when it differs from the
868
+ * default), so the dot and the trigger count badge can never disagree. Unlike
869
+ * isItemActive(), this has no side effects and treats a default radio as
870
+ * inactive.
871
+ */
872
+ isItemFiltered(item: FiltersConfigItem): boolean;
856
873
  searchTextChanged(): void;
857
874
  private resetLazyLoadingSources;
858
875
  private filterItems;
859
876
  loadMore(item: FiltersConfigItem, showSelectedOnTop: boolean): Promise<void>;
860
877
  toggleItem(item: FiltersConfigItem): void;
878
+ toggleEnabled(item: FiltersConfigItem): void;
861
879
  private resetFilters;
862
880
  private restorePreviousApplied;
881
+ /**
882
+ * Reflects a filter object onto the in-panel item state (checkboxes, radios,
883
+ * ranges, toggle/date) without emitting. Used to restore the last-applied
884
+ * filter and to reset the panel to a provided `defaultFilter`.
885
+ */
886
+ private applyFilterToItems;
863
887
  reset(): void;
888
+ /**
889
+ * Resets the dropdown's internal selection state (checkboxes, radios, date /
890
+ * number ranges) and the trigger count badge to match a filter object —
891
+ * defaults to the currently bound `filter`. Call this from the host after
892
+ * changing the bound filter outside the component's own UI (e.g. removing a
893
+ * chip in a view-filters bar) so the dropdown and badge stay in sync.
894
+ */
895
+ syncFromFilter(filter?: object): void;
864
896
  apply(): void;
865
897
  private updateAppliedState;
898
+ /**
899
+ * Builds a filter object from the config items. By default it reads the live
900
+ * in-panel state; pass `source` (another filter object) to derive the SAME-
901
+ * shaped object from that source instead — used to compare the current
902
+ * selection against a default preset without duplicating the per-type rules.
903
+ */
866
904
  private getFilterObject;
867
905
  hide(): void;
868
906
  radioChanged(value: string, item: FiltersConfigItem): void;
869
907
  checkChanged(item: DataSource, configItem: FiltersConfigItem): void;
908
+ toggleDsItem(dsItem: DataSource, item: FiltersConfigItem): void;
870
909
  toggle(): void;
871
910
  onCheckValidity(item: FiltersConfigItem): boolean;
872
911
  updatePlacement(pos?: 'fixed' | 'absolute'): void;
@@ -880,11 +919,10 @@ declare class ZenduFilterComponent implements OnChanges {
880
919
  hasTreeData(configItem: FiltersConfigItem): boolean;
881
920
  handleDateRangeOptionClick(item: any, option: any): void;
882
921
  handleCustomDateRangeClick(item: any): void;
883
- handleEndDateChange(item: any): void;
884
- get hasMultiselectItems(): boolean;
885
- get selectedCount(): number;
922
+ handleEndDateChange(item: FiltersConfigItem, date: Date | null): void;
923
+ private computeSelectedCount;
886
924
  static ɵfac: i0.ɵɵFactoryDeclaration<ZenduFilterComponent, never>;
887
- static ɵcmp: i0.ɵɵComponentDeclaration<ZenduFilterComponent, "zen-filter", never, { "config": { "alias": "config"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "position": { "alias": "position"; "required": false; }; "resetBehavior": { "alias": "resetBehavior"; "required": false; }; "isVisible": { "alias": "isVisible"; "required": false; }; "customTrigger": { "alias": "customTrigger"; "required": false; }; "imageUrl": { "alias": "imageUrl"; "required": false; }; "label": { "alias": "label"; "required": false; }; "showOptions": { "alias": "showOptions"; "required": false; }; "customOptions": { "alias": "customOptions"; "required": false; }; "wrapperBodyClass": { "alias": "wrapperBodyClass"; "required": false; }; "customPosition": { "alias": "customPosition"; "required": false; }; }, { "filterChange": "filterChange"; "isVisibleChange": "isVisibleChange"; }, never, ["*"], false, never>;
925
+ static ɵcmp: i0.ɵɵComponentDeclaration<ZenduFilterComponent, "zen-filter", never, { "config": { "alias": "config"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "position": { "alias": "position"; "required": false; }; "resetBehavior": { "alias": "resetBehavior"; "required": false; }; "defaultFilter": { "alias": "defaultFilter"; "required": false; }; "isVisible": { "alias": "isVisible"; "required": false; }; "customTrigger": { "alias": "customTrigger"; "required": false; }; "imageUrl": { "alias": "imageUrl"; "required": false; }; "label": { "alias": "label"; "required": false; }; "triggerVariant": { "alias": "triggerVariant"; "required": false; }; "showOptions": { "alias": "showOptions"; "required": false; }; "customOptions": { "alias": "customOptions"; "required": false; }; "wrapperBodyClass": { "alias": "wrapperBodyClass"; "required": false; }; "customPosition": { "alias": "customPosition"; "required": false; }; }, { "filterChange": "filterChange"; "isVisibleChange": "isVisibleChange"; }, never, ["*"], false, never>;
888
926
  }
889
927
 
890
928
  declare class ZenduGroupsComponent implements OnChanges {
@@ -2025,7 +2063,7 @@ interface DropdownOption {
2025
2063
  icon?: string;
2026
2064
  }
2027
2065
  declare class ZenduInputComponent implements ControlValueAccessor, OnInit, OnChanges {
2028
- inputElement: ElementRef<HTMLInputElement>;
2066
+ inputElement: ElementRef<HTMLInputElement | HTMLTextAreaElement>;
2029
2067
  /**
2030
2068
  * Input type attribute
2031
2069
  */
@@ -2130,6 +2168,22 @@ declare class ZenduInputComponent implements ControlValueAccessor, OnInit, OnCha
2130
2168
  * Trailing static text
2131
2169
  */
2132
2170
  trailingText: string;
2171
+ /**
2172
+ * Render a multiline textarea instead of a single-line input.
2173
+ * Composes with label/hint/character-count/states; single-line
2174
+ * adornments (leading/trailing dropdowns and text) are not used.
2175
+ */
2176
+ multiline: boolean;
2177
+ /**
2178
+ * Initial visible rows for the multiline textarea (height is then
2179
+ * user-resizable vertically). Only applies when `multiline` is true.
2180
+ */
2181
+ rows: number;
2182
+ /**
2183
+ * Whether the multiline textarea can be resized via the footer drag handle.
2184
+ * When false, the handle is hidden and the height stays fixed at `rows`.
2185
+ */
2186
+ resizable: boolean;
2133
2187
  /**
2134
2188
  * Input size
2135
2189
  */
@@ -2151,7 +2205,15 @@ declare class ZenduInputComponent implements ControlValueAccessor, OnInit, OnCha
2151
2205
  */
2152
2206
  width: string;
2153
2207
  /**
2154
- * Value change event
2208
+ * Value change event for the `[(value)]` two-way binding.
2209
+ *
2210
+ * NOTE — type contract for `type="number"`: this output always emits the
2211
+ * RAW STRING from the input element. The CVA path (`[(ngModel)]` /
2212
+ * `formControl`) instead emits a real `number` (or '' when empty/invalid).
2213
+ * So a consumer binding BOTH `[(value)]` and ngModel/formControl to the same
2214
+ * number input will observe a `string` here and a `number` there for the
2215
+ * same edit. Bind only one, and prefer ngModel/formControl when you need the
2216
+ * numeric value.
2155
2217
  */
2156
2218
  valueChange: EventEmitter<string>;
2157
2219
  /**
@@ -2202,7 +2264,7 @@ declare class ZenduInputComponent implements ControlValueAccessor, OnInit, OnCha
2202
2264
  * Leading icon click event
2203
2265
  */
2204
2266
  leadingIconClick: EventEmitter<MouseEvent>;
2205
- value: string;
2267
+ value: string | number;
2206
2268
  isFocused: boolean;
2207
2269
  showHelpTooltip: boolean;
2208
2270
  leadingDropdownOpen: boolean;
@@ -2232,11 +2294,12 @@ declare class ZenduInputComponent implements ControlValueAccessor, OnInit, OnCha
2232
2294
  get hostClass(): boolean;
2233
2295
  ngOnInit(): void;
2234
2296
  ngOnChanges(changes: SimpleChanges): void;
2235
- writeValue(value: string): void;
2236
- registerOnChange(fn: (value: string) => void): void;
2297
+ writeValue(value: string | number): void;
2298
+ registerOnChange(fn: (value: string | number) => void): void;
2237
2299
  registerOnTouched(fn: () => void): void;
2238
2300
  setDisabledState(isDisabled: boolean): void;
2239
2301
  onInputChange(event: Event): void;
2302
+ private coerceValue;
2240
2303
  onInputFocus(event: FocusEvent): void;
2241
2304
  onInputBlur(event: FocusEvent): void;
2242
2305
  onKeydown(event: KeyboardEvent): void;
@@ -2256,6 +2319,12 @@ declare class ZenduInputComponent implements ControlValueAccessor, OnInit, OnCha
2256
2319
  getLeadingDropdownLabel(): string;
2257
2320
  getTrailingDropdownLabel(): string;
2258
2321
  focusInput(): void;
2322
+ /**
2323
+ * Drag-to-resize for the multiline textarea via the custom footer handle.
2324
+ * Native resize is disabled in CSS; this adjusts the textarea height while
2325
+ * the pointer is held, clamped to a minimum.
2326
+ */
2327
+ onResizeStart(event: PointerEvent): void;
2259
2328
  parsePhoneNumber(): void;
2260
2329
  onCountryChanged(country: any): void;
2261
2330
  onPhoneChanged(input?: HTMLInputElement): void;
@@ -2264,7 +2333,10 @@ declare class ZenduInputComponent implements ControlValueAccessor, OnInit, OnCha
2264
2333
  onPhoneInputChange(event: Event): void;
2265
2334
  onLeadingIconClick(event: MouseEvent): void;
2266
2335
  static ɵfac: i0.ɵɵFactoryDeclaration<ZenduInputComponent, never>;
2267
- static ɵcmp: i0.ɵɵComponentDeclaration<ZenduInputComponent, "zen-input", never, { "type": { "alias": "type"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "label": { "alias": "label"; "required": false; }; "hintText": { "alias": "hintText"; "required": false; }; "leadingIcon": { "alias": "leadingIcon"; "required": false; }; "helpIcon": { "alias": "helpIcon"; "required": false; }; "helpTooltip": { "alias": "helpTooltip"; "required": false; }; "destructive": { "alias": "destructive"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "minLength": { "alias": "minLength"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "leadingDropdownOptions": { "alias": "leadingDropdownOptions"; "required": false; }; "leadingDropdownValue": { "alias": "leadingDropdownValue"; "required": false; }; "leadingDropdownPlaceholder": { "alias": "leadingDropdownPlaceholder"; "required": false; }; "trailingDropdownOptions": { "alias": "trailingDropdownOptions"; "required": false; }; "trailingDropdownValue": { "alias": "trailingDropdownValue"; "required": false; }; "trailingDropdownPlaceholder": { "alias": "trailingDropdownPlaceholder"; "required": false; }; "leadingText": { "alias": "leadingText"; "required": false; }; "trailingText": { "alias": "trailingText"; "required": false; }; "size": { "alias": "size"; "required": false; }; "showCharacterCount": { "alias": "showCharacterCount"; "required": false; }; "phoneMaxLength": { "alias": "phoneMaxLength"; "required": false; }; "phone": { "alias": "phone"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, { "valueChange": "valueChange"; "inputFocus": "inputFocus"; "inputBlur": "inputBlur"; "inputKeydown": "inputKeydown"; "inputKeyup": "inputKeyup"; "leadingDropdownChange": "leadingDropdownChange"; "leadingDropdownValueChange": "leadingDropdownValueChange"; "trailingDropdownChange": "trailingDropdownChange"; "trailingDropdownValueChange": "trailingDropdownValueChange"; "helpIconClick": "helpIconClick"; "phoneChange": "phoneChange"; "validChange": "validChange"; "leadingIconClick": "leadingIconClick"; }, never, never, false, never>;
2336
+ static ɵcmp: i0.ɵɵComponentDeclaration<ZenduInputComponent, "zen-input", never, { "type": { "alias": "type"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "label": { "alias": "label"; "required": false; }; "hintText": { "alias": "hintText"; "required": false; }; "leadingIcon": { "alias": "leadingIcon"; "required": false; }; "helpIcon": { "alias": "helpIcon"; "required": false; }; "helpTooltip": { "alias": "helpTooltip"; "required": false; }; "destructive": { "alias": "destructive"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "minLength": { "alias": "minLength"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "leadingDropdownOptions": { "alias": "leadingDropdownOptions"; "required": false; }; "leadingDropdownValue": { "alias": "leadingDropdownValue"; "required": false; }; "leadingDropdownPlaceholder": { "alias": "leadingDropdownPlaceholder"; "required": false; }; "trailingDropdownOptions": { "alias": "trailingDropdownOptions"; "required": false; }; "trailingDropdownValue": { "alias": "trailingDropdownValue"; "required": false; }; "trailingDropdownPlaceholder": { "alias": "trailingDropdownPlaceholder"; "required": false; }; "leadingText": { "alias": "leadingText"; "required": false; }; "trailingText": { "alias": "trailingText"; "required": false; }; "multiline": { "alias": "multiline"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "size": { "alias": "size"; "required": false; }; "showCharacterCount": { "alias": "showCharacterCount"; "required": false; }; "phoneMaxLength": { "alias": "phoneMaxLength"; "required": false; }; "phone": { "alias": "phone"; "required": false; }; "width": { "alias": "width"; "required": false; }; }, { "valueChange": "valueChange"; "inputFocus": "inputFocus"; "inputBlur": "inputBlur"; "inputKeydown": "inputKeydown"; "inputKeyup": "inputKeyup"; "leadingDropdownChange": "leadingDropdownChange"; "leadingDropdownValueChange": "leadingDropdownValueChange"; "trailingDropdownChange": "trailingDropdownChange"; "trailingDropdownValueChange": "trailingDropdownValueChange"; "helpIconClick": "helpIconClick"; "phoneChange": "phoneChange"; "validChange": "validChange"; "leadingIconClick": "leadingIconClick"; }, never, never, false, never>;
2337
+ static ngAcceptInputType_multiline: unknown;
2338
+ static ngAcceptInputType_rows: unknown;
2339
+ static ngAcceptInputType_resizable: unknown;
2268
2340
  }
2269
2341
 
2270
2342
  declare class ZenButtonComponent {