@wizishop/angular-components 14.3.15 → 14.3.17

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.
@@ -1,13 +1,19 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
1
+ import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { NwbDatePickerEvent, NwbDatePickerOptions } from '@wizishop/ng-wizi-bulma';
2
4
  import * as i0 from "@angular/core";
3
- export declare class CalendarComponent implements OnInit {
5
+ export declare class CalendarComponent implements OnInit, OnChanges, ControlValueAccessor {
4
6
  label: string | null;
5
- type: string;
6
- options: object;
7
+ type: 'input' | 'edit' | 'select';
8
+ options: NwbDatePickerOptions;
7
9
  position: string;
8
- dateSelected: any;
9
- typeDate: string;
10
+ _dateSelected: Date | string;
11
+ set dateSelected(dateSelected: Date | string);
12
+ get dateSelected(): Date | string;
13
+ dateSelectedChange: EventEmitter<any>;
14
+ typeDate: 'datetime' | 'datetime-local' | 'date';
10
15
  noMargin: boolean;
16
+ disabled: boolean;
11
17
  selected: EventEmitter<string>;
12
18
  changeData: EventEmitter<any>;
13
19
  open: boolean;
@@ -15,12 +21,21 @@ export declare class CalendarComponent implements OnInit {
15
21
  endLabel: string;
16
22
  currentHours: any;
17
23
  currentMinutes: any;
18
- currentDate: any;
24
+ currentDate: Date;
19
25
  constructor();
20
- changeDate(event: any): void;
26
+ ngOnInit(): void;
27
+ ngOnChanges(changes: SimpleChanges): void;
28
+ writeValue(date: Date | string): void;
29
+ registerOnChange(fn: any): void;
30
+ registerOnTouched(fn: any): void;
31
+ setDisabledState(isDisabled: boolean): void;
32
+ onChangeDate(selectedDates: NwbDatePickerEvent): void;
33
+ private setDateSelected;
21
34
  triggerChange(event: any): void;
22
35
  openCalendar(value?: any): void;
23
- ngOnInit(): void;
36
+ private setCalendarDate;
37
+ private typeDateChange;
38
+ private setCalendarLabel;
24
39
  verifKeyup(events: any): void;
25
40
  verifHours(events: any): void;
26
41
  verifMinutes(events: any): void;
@@ -28,6 +43,9 @@ export declare class CalendarComponent implements OnInit {
28
43
  removeHours(target: any): void;
29
44
  addMinutes(target: any): void;
30
45
  removeMinutes(target: any): void;
46
+ private getDateData;
47
+ onChange: (value: Date | string) => void;
48
+ onTouch: () => void;
31
49
  static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, never>;
32
- static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "wac-calendar", never, { "label": "label"; "type": "type"; "options": "options"; "position": "position"; "dateSelected": "dateSelected"; "typeDate": "typeDate"; "noMargin": "noMargin"; }, { "selected": "selected"; "changeData": "changeData"; }, never, never, false>;
50
+ static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "wac-calendar", never, { "label": "label"; "type": "type"; "options": "options"; "position": "position"; "dateSelected": "dateSelected"; "typeDate": "typeDate"; "noMargin": "noMargin"; "disabled": "disabled"; }, { "dateSelectedChange": "dateSelectedChange"; "selected": "selected"; "changeData": "changeData"; }, never, never, false>;
33
51
  }
@@ -4,6 +4,8 @@ import * as i0 from "@angular/core";
4
4
  export declare class SelectOptionDirective<TOptionValue> implements OptionSelectionHandler<TOptionValue> {
5
5
  private contentRef;
6
6
  onClick(): void;
7
+ get isOptionSelected(): boolean;
8
+ cursor: string;
7
9
  disabled: boolean;
8
10
  value: TOptionValue;
9
11
  selected: boolean;
@@ -16,5 +18,5 @@ export declare class SelectOptionDirective<TOptionValue> implements OptionSelect
16
18
  setSelected(selected: boolean): void;
17
19
  getContentRef(): ElementRef<any>;
18
20
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectOptionDirective<any>, never>;
19
- static ɵdir: i0.ɵɵDirectiveDeclaration<SelectOptionDirective<any>, "[wacSelectOption]", never, { "disabled": "disabled"; "value": "value"; "selected": "selected"; }, { "selectedChange": "selectedChange"; }, never, never, false>;
21
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SelectOptionDirective<any>, "[wacOption]", never, { "disabled": "disabled"; "value": "value"; "selected": "selected"; }, { "selectedChange": "selectedChange"; }, never, never, false>;
20
22
  }
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
1
+ import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { ValueChangeService } from './value-change.service';
3
3
  import { Subject } from 'rxjs';
4
4
  import { SelectSearchTriggerComponent } from '../select-search-trigger/select-search-trigger.component';
@@ -10,6 +10,7 @@ export declare class SelectTestComponent<TOptionValue> extends SelectDirective<T
10
10
  role: string;
11
11
  customSearchTrigger: SelectSearchTriggerComponent;
12
12
  label: LabelComponent;
13
+ selectHeader: ElementRef;
13
14
  /** Whether the component is required. */
14
15
  get required(): boolean;
15
16
  set required(value: boolean);
@@ -23,6 +24,7 @@ export declare class SelectTestComponent<TOptionValue> extends SelectDirective<T
23
24
  _openPanel: boolean;
24
25
  openPanelChange: EventEmitter<boolean>;
25
26
  enableSearch: boolean;
27
+ tabIndex: number;
26
28
  isDestroyed$: Subject<void>;
27
29
  private isKeyBoardAction;
28
30
  constructor(valueChangeService: ValueChangeService<TOptionValue>);
@@ -32,6 +34,7 @@ export declare class SelectTestComponent<TOptionValue> extends SelectDirective<T
32
34
  onTogglePanel(): void;
33
35
  onClosePanel(): void;
34
36
  onKeydown(event: KeyboardEvent): void;
37
+ handleKeyboardActionWithSearch(event: KeyboardEvent): boolean;
35
38
  /** Handles keyboard events while the select is closed. */
36
39
  private _handleClosedKeydown;
37
40
  /** Handles keyboard events when the selected is open. */
@@ -6,6 +6,7 @@ import { ValueChangeService } from './value-change.service';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class SelectDirective<TOptionValue> implements OnInit, ControlValueAccessor, AfterViewInit, OnDestroy {
8
8
  protected valueChangeService: ValueChangeService<TOptionValue>;
9
+ get tabindex(): number;
9
10
  /** Handles all keydown events on the select. */
10
11
  onKeydown(event: KeyboardEvent): void;
11
12
  optionChildren: QueryList<OptionSelectionHandler<TOptionValue>>;
@@ -14,6 +15,7 @@ export declare class SelectDirective<TOptionValue> implements OnInit, ControlVal
14
15
  _value: TOptionValue;
15
16
  valueChange: EventEmitter<TOptionValue>;
16
17
  disabled: boolean;
18
+ tabIndex: number;
17
19
  isDestroyed$: Subject<void>;
18
20
  constructor(valueChangeService: ValueChangeService<TOptionValue>);
19
21
  ngOnInit(): void;
@@ -29,5 +31,5 @@ export declare class SelectDirective<TOptionValue> implements OnInit, ControlVal
29
31
  registerOnTouched(fn: any): void;
30
32
  ngOnDestroy(): void;
31
33
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectDirective<any>, never>;
32
- static ɵdir: i0.ɵɵDirectiveDeclaration<SelectDirective<any>, "[wacSelect]", never, { "value": "value"; "disabled": "disabled"; }, { "valueChange": "valueChange"; }, ["optionChildren"], never, false>;
34
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SelectDirective<any>, "[wacSelect]", never, { "value": "value"; "disabled": "disabled"; "tabIndex": "tabIndex"; }, { "valueChange": "valueChange"; }, ["optionChildren"], never, false>;
33
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wizishop/angular-components",
3
- "version": "14.3.15",
3
+ "version": "14.3.17",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "~14.0.6",
6
6
  "@angular/cdk": "^14.0.5",