@cqa-lib/cqa-ui 1.1.544 → 1.1.545

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.
@@ -0,0 +1,74 @@
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { AbstractControl, ControlValueAccessor, FormGroup, ValidationErrors, Validator } from '@angular/forms';
3
+ import { DynamicSelectFieldConfig, SelectOption } from '../dynamic-select/dynamic-select-field.component';
4
+ import { RadioCardOption } from '../radio-card-group/radio-card-option.model';
5
+ import * as i0 from "@angular/core";
6
+ export declare type ViewportSelectionMode = 'desktop' | 'laptop' | 'mobile' | 'custom';
7
+ export interface ViewportSelectorValue {
8
+ mode: ViewportSelectionMode;
9
+ device?: string | null;
10
+ customValue?: string | null;
11
+ }
12
+ export declare class ViewportSelectorComponent implements ControlValueAccessor, Validator, OnChanges {
13
+ label: string;
14
+ required: boolean;
15
+ disabled: boolean;
16
+ desktopLabel: string;
17
+ laptopLabel: string;
18
+ mobileLabel: string;
19
+ customLabel: string;
20
+ desktopDeviceLabel: string;
21
+ desktopDevicePlaceholder: string;
22
+ desktopDeviceOptions: SelectOption[];
23
+ laptopDeviceLabel: string;
24
+ laptopDevicePlaceholder: string;
25
+ laptopDeviceOptions: SelectOption[];
26
+ mobileDeviceLabel: string;
27
+ mobileDevicePlaceholder: string;
28
+ mobileDeviceOptions: SelectOption[];
29
+ customValueLabel: string;
30
+ customValuePlaceholder: string;
31
+ customValueHint: string;
32
+ valueChange: EventEmitter<ViewportSelectorValue>;
33
+ readonly modeOptions: RadioCardOption[];
34
+ readonly desktopDeviceForm: FormGroup;
35
+ readonly laptopDeviceForm: FormGroup;
36
+ readonly mobileDeviceForm: FormGroup;
37
+ desktopDeviceConfig: DynamicSelectFieldConfig;
38
+ laptopDeviceConfig: DynamicSelectFieldConfig;
39
+ mobileDeviceConfig: DynamicSelectFieldConfig;
40
+ customInputValue: string;
41
+ internalValue: ViewportSelectorValue;
42
+ private onChange;
43
+ private onTouched;
44
+ private onValidatorChange;
45
+ ngOnChanges(changes: SimpleChanges): void;
46
+ writeValue(value: ViewportSelectorValue | null | undefined): void;
47
+ registerOnChange(fn: (value: ViewportSelectorValue) => void): void;
48
+ registerOnTouched(fn: () => void): void;
49
+ registerOnValidatorChange(fn: () => void): void;
50
+ setDisabledState(isDisabled: boolean): void;
51
+ validate(_control: AbstractControl): ValidationErrors | null;
52
+ get isDesktopMode(): boolean;
53
+ get isLaptopMode(): boolean;
54
+ get isMobileMode(): boolean;
55
+ get isCustomMode(): boolean;
56
+ onModeChange(mode: string | null): void;
57
+ onDesktopSelectionChange(selection: {
58
+ value: any;
59
+ }): void;
60
+ onLaptopSelectionChange(selection: {
61
+ value: any;
62
+ }): void;
63
+ onMobileSelectionChange(selection: {
64
+ value: any;
65
+ }): void;
66
+ addCustomValue(rawValue?: string): void;
67
+ clearCustomValue(): void;
68
+ private emitValue;
69
+ private normalizeValue;
70
+ private normalizeCustomValue;
71
+ private isValidMode;
72
+ static ɵfac: i0.ɵɵFactoryDeclaration<ViewportSelectorComponent, never>;
73
+ static ɵcmp: i0.ɵɵComponentDeclaration<ViewportSelectorComponent, "cqa-viewport-selector", never, { "label": "label"; "required": "required"; "disabled": "disabled"; "desktopLabel": "desktopLabel"; "laptopLabel": "laptopLabel"; "mobileLabel": "mobileLabel"; "customLabel": "customLabel"; "desktopDeviceLabel": "desktopDeviceLabel"; "desktopDevicePlaceholder": "desktopDevicePlaceholder"; "desktopDeviceOptions": "desktopDeviceOptions"; "laptopDeviceLabel": "laptopDeviceLabel"; "laptopDevicePlaceholder": "laptopDevicePlaceholder"; "laptopDeviceOptions": "laptopDeviceOptions"; "mobileDeviceLabel": "mobileDeviceLabel"; "mobileDevicePlaceholder": "mobileDevicePlaceholder"; "mobileDeviceOptions": "mobileDeviceOptions"; "customValueLabel": "customValueLabel"; "customValuePlaceholder": "customValuePlaceholder"; "customValueHint": "customValueHint"; }, { "valueChange": "valueChange"; }, never, never>;
74
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cqa-lib/cqa-ui",
3
- "version": "1.1.544",
3
+ "version": "1.1.545",
4
4
  "description": "UI Kit library for Angular 13.4",
5
5
  "keywords": [
6
6
  "angular",
package/public-api.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from './lib/segment-control/segment-control.component';
7
7
  export * from './lib/stepper/stepper.component';
8
8
  export * from './lib/radio-card-group/radio-card-group.component';
9
9
  export * from './lib/radio-card-group/radio-card-option.model';
10
+ export * from './lib/viewport-selector/viewport-selector.component';
10
11
  export * from './lib/dialog/dialog.component';
11
12
  export * from './lib/dialog/dialog.service';
12
13
  export * from './lib/dialog/dialog.models';