iss-ctrl 0.0.1
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 +24 -0
- package/components/autocomplete/autocomplete.component.d.ts +6 -0
- package/components/base-ctrl.d.ts +33 -0
- package/components/checkbox/checkbox.component.d.ts +16 -0
- package/components/chips/chips.component.d.ts +6 -0
- package/components/ctrl-array/ctrl-array.component.d.ts +6 -0
- package/components/date-picker/date-adapter.d.ts +37 -0
- package/components/date-picker/date-picker.component.d.ts +15 -0
- package/components/date-range-picker/date-range-picker.component.d.ts +19 -0
- package/components/datetime-picker/datetime-picker.component.d.ts +14 -0
- package/components/datetime-range-picker/datetime-range-picker.component.d.ts +6 -0
- package/components/file-picker/file-picker.component.d.ts +17 -0
- package/components/hints/hints.component.d.ts +9 -0
- package/components/input/input.component.d.ts +8 -0
- package/components/mobile/COUNTRIES.d.ts +2 -0
- package/components/mobile/mobile.component.d.ts +26 -0
- package/components/mobile/phone.service.d.ts +17 -0
- package/components/note/note.component.d.ts +6 -0
- package/components/plate-number/plate-number.component.d.ts +16 -0
- package/components/radio/radio.component.d.ts +11 -0
- package/components/select/select.component.d.ts +20 -0
- package/components/slide-toggle/slide-toggle.component.d.ts +7 -0
- package/components/textarea/textarea.component.d.ts +6 -0
- package/components/time-picker/time-picker.component.d.ts +19 -0
- package/components/toggle-button/toggle-button.component.d.ts +16 -0
- package/directives/droppable.directive.d.ts +10 -0
- package/esm2022/components/autocomplete/autocomplete.component.mjs +17 -0
- package/esm2022/components/base-ctrl.mjs +93 -0
- package/esm2022/components/checkbox/checkbox.component.mjs +73 -0
- package/esm2022/components/chips/chips.component.mjs +17 -0
- package/esm2022/components/ctrl-array/ctrl-array.component.mjs +17 -0
- package/esm2022/components/date-picker/date-adapter.mjs +183 -0
- package/esm2022/components/date-picker/date-picker.component.mjs +55 -0
- package/esm2022/components/date-range-picker/date-range-picker.component.mjs +101 -0
- package/esm2022/components/datetime-picker/datetime-picker.component.mjs +79 -0
- package/esm2022/components/datetime-range-picker/datetime-range-picker.component.mjs +17 -0
- package/esm2022/components/file-picker/file-picker.component.mjs +121 -0
- package/esm2022/components/hints/hints.component.mjs +66 -0
- package/esm2022/components/input/input.component.mjs +32 -0
- package/esm2022/components/mobile/COUNTRIES.mjs +2041 -0
- package/esm2022/components/mobile/mobile.component.mjs +141 -0
- package/esm2022/components/mobile/phone.service.mjs +99 -0
- package/esm2022/components/note/note.component.mjs +17 -0
- package/esm2022/components/plate-number/plate-number.component.mjs +114 -0
- package/esm2022/components/radio/radio.component.mjs +40 -0
- package/esm2022/components/select/select.component.mjs +124 -0
- package/esm2022/components/slide-toggle/slide-toggle.component.mjs +23 -0
- package/esm2022/components/textarea/textarea.component.mjs +17 -0
- package/esm2022/components/time-picker/time-picker.component.mjs +169 -0
- package/esm2022/components/toggle-button/toggle-button.component.mjs +87 -0
- package/esm2022/directives/droppable.directive.mjs +39 -0
- package/esm2022/interfaces/country.interface.mjs +2 -0
- package/esm2022/interfaces/date-range-emission-object.mjs +2 -0
- package/esm2022/interfaces/hint.interface.mjs +2 -0
- package/esm2022/interfaces/iso2.interface.mjs +2 -0
- package/esm2022/interfaces/mobile.interface.mjs +2 -0
- package/esm2022/interfaces/option.interface.mjs +2 -0
- package/esm2022/interfaces/time.interface.mjs +2 -0
- package/esm2022/iss-ctrl.mjs +5 -0
- package/esm2022/pipes/select-status.pipe.mjs +18 -0
- package/esm2022/public-api.mjs +20 -0
- package/fesm2022/iss-ctrl.mjs +3659 -0
- package/fesm2022/iss-ctrl.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/interfaces/country.interface.d.ts +10 -0
- package/interfaces/date-range-emission-object.d.ts +5 -0
- package/interfaces/hint.interface.d.ts +5 -0
- package/interfaces/iso2.interface.d.ts +1 -0
- package/interfaces/mobile.interface.d.ts +11 -0
- package/interfaces/option.interface.d.ts +4 -0
- package/interfaces/time.interface.d.ts +5 -0
- package/package.json +25 -0
- package/pipes/select-status.pipe.d.ts +8 -0
- package/public-api.d.ts +19 -0
|
@@ -0,0 +1,3659 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, input, signal, output, Component, CUSTOM_ELEMENTS_SCHEMA, Pipe, Injectable, Optional, Inject, effect, Directive, HostListener, ChangeDetectionStrategy, computed } from '@angular/core';
|
|
3
|
+
import * as i1$2 from '@angular/forms';
|
|
4
|
+
import { ControlContainer, FormControl, NG_VALUE_ACCESSOR, ReactiveFormsModule, NG_VALIDATORS, FormGroup, FormsModule, FormArray } from '@angular/forms';
|
|
5
|
+
import * as i1 from '@angular/material/checkbox';
|
|
6
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
7
|
+
import * as i3 from '@angular/material/core';
|
|
8
|
+
import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/material/core';
|
|
9
|
+
import * as i1$1 from '@angular/material/form-field';
|
|
10
|
+
import { MatFormFieldModule, MatFormField, MatSuffix, MatHint, MatPrefix } from '@angular/material/form-field';
|
|
11
|
+
import * as i2$1 from '@angular/material/datepicker';
|
|
12
|
+
import { MatDatepickerModule, MatDatepicker, MatDatepickerInput, MatDatepickerToggle } from '@angular/material/datepicker';
|
|
13
|
+
import * as i2 from '@angular/material/input';
|
|
14
|
+
import { MatInputModule, MatInput } from '@angular/material/input';
|
|
15
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
16
|
+
import { getYear, getMonth, getDate, getDay, getDaysInMonth, parseISO, parse, format, addYears, addMonths, addDays, formatISO, isDate, isValid, isAfter, isBefore } from 'date-fns';
|
|
17
|
+
import { DatePipe, NgClass, NgOptimizedImage, NgTemplateOutlet, JsonPipe } from '@angular/common';
|
|
18
|
+
import { enGB } from 'date-fns/locale';
|
|
19
|
+
import { Subscription } from 'rxjs';
|
|
20
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
21
|
+
import * as i1$5 from '@angular/material/button-toggle';
|
|
22
|
+
import { MatButtonToggleGroup, MatButtonToggle, MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
23
|
+
import { CdkOverlayOrigin, CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
24
|
+
import { MatTooltip } from '@angular/material/tooltip';
|
|
25
|
+
import { PhoneNumberUtil, PhoneNumberFormat } from 'google-libphonenumber';
|
|
26
|
+
import { MatSelect, MatOption } from '@angular/material/select';
|
|
27
|
+
import * as i1$3 from '@angular/material/radio';
|
|
28
|
+
import { MatRadioModule } from '@angular/material/radio';
|
|
29
|
+
import * as i2$2 from '@angular/material/autocomplete';
|
|
30
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
31
|
+
import * as i6 from '@angular/material/chips';
|
|
32
|
+
import { MatChipsModule } from '@angular/material/chips';
|
|
33
|
+
import * as i1$4 from '@angular/material/slide-toggle';
|
|
34
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
35
|
+
|
|
36
|
+
class BaseCtrl {
|
|
37
|
+
constructor() {
|
|
38
|
+
this.ctrlContainer = inject(ControlContainer);
|
|
39
|
+
this.formControlName = input("");
|
|
40
|
+
this.min = input(null);
|
|
41
|
+
this.max = input(null);
|
|
42
|
+
this.disabled = signal(false);
|
|
43
|
+
this.multiple = input(false, {
|
|
44
|
+
transform: (v) => this.#transformToBoolean(v),
|
|
45
|
+
});
|
|
46
|
+
this.placeholder = input("");
|
|
47
|
+
this.hints = input([]);
|
|
48
|
+
this.className = input(null);
|
|
49
|
+
this.onChange = output();
|
|
50
|
+
this.touched = signal(false);
|
|
51
|
+
this.ctrl = new FormControl(null);
|
|
52
|
+
this.onTouch = () => { };
|
|
53
|
+
this.onPropagateValue = (_) => { };
|
|
54
|
+
}
|
|
55
|
+
get hostCtrl() {
|
|
56
|
+
return this.ctrlContainer.control?.get(this.formControlName());
|
|
57
|
+
}
|
|
58
|
+
registerOnChange(fn) {
|
|
59
|
+
this.onPropagateValue = fn;
|
|
60
|
+
}
|
|
61
|
+
registerOnTouched(fn) {
|
|
62
|
+
this.onTouch = fn;
|
|
63
|
+
}
|
|
64
|
+
setDisabledState(isDisabled) {
|
|
65
|
+
this.disabled.set(isDisabled);
|
|
66
|
+
if (isDisabled) {
|
|
67
|
+
this.ctrl.disable();
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.ctrl.enable();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
writeValue(value) {
|
|
74
|
+
this.ctrl.setValue(value);
|
|
75
|
+
}
|
|
76
|
+
markAsTouched() {
|
|
77
|
+
this.touched.set(true);
|
|
78
|
+
this.onTouch();
|
|
79
|
+
}
|
|
80
|
+
validate(control) {
|
|
81
|
+
return this.ctrl.errors;
|
|
82
|
+
}
|
|
83
|
+
emitValue(value) {
|
|
84
|
+
let emissionValue = this.ctrl.getRawValue();
|
|
85
|
+
if (value !== undefined) {
|
|
86
|
+
emissionValue = value;
|
|
87
|
+
}
|
|
88
|
+
this.onPropagateValue(emissionValue);
|
|
89
|
+
this.emitOnChangeEvent(emissionValue);
|
|
90
|
+
}
|
|
91
|
+
propagateValue(value) {
|
|
92
|
+
let emissionValue = this.ctrl.getRawValue();
|
|
93
|
+
if (value !== undefined) {
|
|
94
|
+
emissionValue = value;
|
|
95
|
+
}
|
|
96
|
+
this.onPropagateValue(emissionValue);
|
|
97
|
+
}
|
|
98
|
+
emitOnChangeEvent($event) {
|
|
99
|
+
let emissionValue = this.ctrl.getRawValue();
|
|
100
|
+
if ($event !== undefined) {
|
|
101
|
+
emissionValue = $event;
|
|
102
|
+
}
|
|
103
|
+
this.onChange.emit(emissionValue);
|
|
104
|
+
}
|
|
105
|
+
#transformToBoolean(v) {
|
|
106
|
+
if (typeof v === "string") {
|
|
107
|
+
if (v === "") {
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
return v === "true";
|
|
111
|
+
}
|
|
112
|
+
return v;
|
|
113
|
+
}
|
|
114
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BaseCtrl, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
115
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.0", type: BaseCtrl, isStandalone: true, selector: "ng-component", inputs: { formControlName: { classPropertyName: "formControlName", publicName: "formControlName", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hints: { classPropertyName: "hints", publicName: "hints", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange" }, ngImport: i0, template: ``, isInline: true }); }
|
|
116
|
+
}
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BaseCtrl, decorators: [{
|
|
118
|
+
type: Component,
|
|
119
|
+
args: [{
|
|
120
|
+
standalone: true,
|
|
121
|
+
template: ``,
|
|
122
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
123
|
+
}]
|
|
124
|
+
}] });
|
|
125
|
+
|
|
126
|
+
class AutocompleteComponent extends BaseCtrl {
|
|
127
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: AutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
128
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: AutocompleteComponent, isStandalone: true, selector: "iss-ctrl-autocomplete", providers: [
|
|
129
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: AutocompleteComponent, multi: true }
|
|
130
|
+
], usesInheritance: true, ngImport: i0, template: "<p>autocomplete works!</p>\r\n", styles: [""] }); }
|
|
131
|
+
}
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
133
|
+
type: Component,
|
|
134
|
+
args: [{ selector: "iss-ctrl-autocomplete", standalone: true, imports: [], providers: [
|
|
135
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: AutocompleteComponent, multi: true }
|
|
136
|
+
], template: "<p>autocomplete works!</p>\r\n" }]
|
|
137
|
+
}] });
|
|
138
|
+
|
|
139
|
+
class SelectStatusPipe {
|
|
140
|
+
transform(option, ...args) {
|
|
141
|
+
const selectedOptions = args[0];
|
|
142
|
+
return selectedOptions.has(option.value);
|
|
143
|
+
}
|
|
144
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SelectStatusPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
145
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.0", ngImport: i0, type: SelectStatusPipe, isStandalone: true, name: "selectStatus" }); }
|
|
146
|
+
}
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SelectStatusPipe, decorators: [{
|
|
148
|
+
type: Pipe,
|
|
149
|
+
args: [{
|
|
150
|
+
name: "selectStatus",
|
|
151
|
+
standalone: true
|
|
152
|
+
}]
|
|
153
|
+
}] });
|
|
154
|
+
|
|
155
|
+
class CheckboxComponent extends BaseCtrl {
|
|
156
|
+
constructor() {
|
|
157
|
+
super(...arguments);
|
|
158
|
+
this.options = input.required();
|
|
159
|
+
this.selectedOptions = signal(new Map());
|
|
160
|
+
}
|
|
161
|
+
writeValue(value) {
|
|
162
|
+
this.#reset();
|
|
163
|
+
if (value === null || value === undefined) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const values = value.split(",").map((val) => val.trim());
|
|
167
|
+
let selectedOptions = this.options().filter((option) => values.includes(option.value));
|
|
168
|
+
this.addToSelectedOptionsMap(this.#selectedOptionsMapFactory(selectedOptions));
|
|
169
|
+
this.ctrl.setValue(selectedOptions);
|
|
170
|
+
}
|
|
171
|
+
addToSelectedOptionsMap(option) {
|
|
172
|
+
if (option) {
|
|
173
|
+
this.selectedOptions = signal(option);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
onCheckboxChange(checked, value) {
|
|
177
|
+
const selectedOption = this.options().find(option => option.value == value);
|
|
178
|
+
this.selectedOptions.update((prev) => {
|
|
179
|
+
const options = prev;
|
|
180
|
+
if (checked)
|
|
181
|
+
options.set(selectedOption?.value, selectedOption);
|
|
182
|
+
else
|
|
183
|
+
options.delete(selectedOption?.value);
|
|
184
|
+
return options;
|
|
185
|
+
});
|
|
186
|
+
this.getEmissionValue(this.selectedOptions());
|
|
187
|
+
}
|
|
188
|
+
stringifySelectedOptions() {
|
|
189
|
+
if (!this.selectedOptions()?.size) {
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
return Array.from(this.selectedOptions(), ([value]) => value).join();
|
|
193
|
+
}
|
|
194
|
+
getEmissionValue(options) {
|
|
195
|
+
this.addToSelectedOptionsMap(options);
|
|
196
|
+
this.emitValue(this.stringifySelectedOptions());
|
|
197
|
+
}
|
|
198
|
+
#selectedOptionsMapFactory(selectedOptions) {
|
|
199
|
+
let selectedOptionsMap = new Map();
|
|
200
|
+
for (let option of selectedOptions) {
|
|
201
|
+
selectedOptionsMap.set(option.value, option);
|
|
202
|
+
}
|
|
203
|
+
return selectedOptionsMap;
|
|
204
|
+
}
|
|
205
|
+
#reset() {
|
|
206
|
+
this.selectedOptions().clear();
|
|
207
|
+
this.ctrl.setValue(null);
|
|
208
|
+
}
|
|
209
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: CheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
210
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: CheckboxComponent, isStandalone: true, selector: "iss-ctrl-checkbox", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
211
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true },
|
|
212
|
+
], usesInheritance: true, ngImport: i0, template: "<ul class=\"list-unstyled\">\r\n @for (option of options(); track option.value; ) {\r\n <li class=\"mb-2\">\r\n <mat-checkbox\r\n [checked]=\"option | selectStatus: selectedOptions()\"\r\n (change)=\"onCheckboxChange($event.checked, option.value)\"\r\n >\r\n {{ option.label }}\r\n </mat-checkbox>\r\n </li>\r\n }\r\n</ul>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: SelectStatusPipe, name: "selectStatus" }] }); }
|
|
213
|
+
}
|
|
214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
215
|
+
type: Component,
|
|
216
|
+
args: [{ selector: "iss-ctrl-checkbox", standalone: true, imports: [ReactiveFormsModule, MatCheckboxModule, SelectStatusPipe], providers: [
|
|
217
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true },
|
|
218
|
+
], template: "<ul class=\"list-unstyled\">\r\n @for (option of options(); track option.value; ) {\r\n <li class=\"mb-2\">\r\n <mat-checkbox\r\n [checked]=\"option | selectStatus: selectedOptions()\"\r\n (change)=\"onCheckboxChange($event.checked, option.value)\"\r\n >\r\n {{ option.label }}\r\n </mat-checkbox>\r\n </li>\r\n }\r\n</ul>\r\n" }]
|
|
219
|
+
}] });
|
|
220
|
+
|
|
221
|
+
class ChipsComponent extends BaseCtrl {
|
|
222
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ChipsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
223
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: ChipsComponent, isStandalone: true, selector: "iss-ctrl-chips", providers: [
|
|
224
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: ChipsComponent, multi: true }
|
|
225
|
+
], usesInheritance: true, ngImport: i0, template: "<p>chips works!</p>\r\n", styles: [""] }); }
|
|
226
|
+
}
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ChipsComponent, decorators: [{
|
|
228
|
+
type: Component,
|
|
229
|
+
args: [{ selector: "iss-ctrl-chips", standalone: true, imports: [], providers: [
|
|
230
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: ChipsComponent, multi: true }
|
|
231
|
+
], template: "<p>chips works!</p>\r\n" }]
|
|
232
|
+
}] });
|
|
233
|
+
|
|
234
|
+
const WEEK_STARTS_ON = 0;
|
|
235
|
+
const DATE_FORMAT_ADAPTER = {
|
|
236
|
+
parse: {
|
|
237
|
+
dateInput: "dd/MM/yyyy"
|
|
238
|
+
},
|
|
239
|
+
display: {
|
|
240
|
+
dateInput: "dd/MM/yyyy",
|
|
241
|
+
monthYearLabel: "LLLL y",
|
|
242
|
+
dateA11yLabel: "dd/MM/yyyy",
|
|
243
|
+
monthYearA11yLabel: "MMMM y"
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
/** Creates an array and fills it with values. */
|
|
247
|
+
function range(length, valueFunction) {
|
|
248
|
+
const valuesArray = Array(length);
|
|
249
|
+
for (let i = 0; i < length; i++) {
|
|
250
|
+
valuesArray[i] = valueFunction(i);
|
|
251
|
+
}
|
|
252
|
+
return valuesArray;
|
|
253
|
+
}
|
|
254
|
+
// date-fns doesn't have a way to read/print month names or days of the week directly,
|
|
255
|
+
// so we get them by formatting a date with a format that produces the desired month/day.
|
|
256
|
+
const MONTH_FORMATS = {
|
|
257
|
+
long: "LLLL",
|
|
258
|
+
short: "LLL",
|
|
259
|
+
narrow: "LLLLL",
|
|
260
|
+
};
|
|
261
|
+
const DAY_OF_WEEK_FORMATS = {
|
|
262
|
+
long: "EEEE",
|
|
263
|
+
short: "EEE",
|
|
264
|
+
narrow: "EEEEE",
|
|
265
|
+
};
|
|
266
|
+
class ISSDateAdapter extends DateAdapter {
|
|
267
|
+
constructor(matDateLocale) {
|
|
268
|
+
super();
|
|
269
|
+
this.setLocale(matDateLocale);
|
|
270
|
+
}
|
|
271
|
+
getYear(date) {
|
|
272
|
+
return getYear(date);
|
|
273
|
+
}
|
|
274
|
+
getMonth(date) {
|
|
275
|
+
return getMonth(date);
|
|
276
|
+
}
|
|
277
|
+
getDate(date) {
|
|
278
|
+
return getDate(date);
|
|
279
|
+
}
|
|
280
|
+
getDayOfWeek(date) {
|
|
281
|
+
return getDay(date);
|
|
282
|
+
}
|
|
283
|
+
getMonthNames(style) {
|
|
284
|
+
const pattern = MONTH_FORMATS[style];
|
|
285
|
+
return range(12, i => this.format(new Date(2017, i, 1), pattern));
|
|
286
|
+
}
|
|
287
|
+
getDateNames() {
|
|
288
|
+
const dtf = typeof Intl !== "undefined"
|
|
289
|
+
? new Intl.DateTimeFormat(this.locale.code, {
|
|
290
|
+
day: "numeric",
|
|
291
|
+
timeZone: "utc",
|
|
292
|
+
})
|
|
293
|
+
: null;
|
|
294
|
+
return range(31, i => {
|
|
295
|
+
if (dtf) {
|
|
296
|
+
// date-fns doesn't appear to support this functionality.
|
|
297
|
+
// Fall back to `Intl` on supported browsers.
|
|
298
|
+
const date = new Date();
|
|
299
|
+
date.setUTCFullYear(2017, 0, i + 1);
|
|
300
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
301
|
+
return dtf.format(date).replace(/[\u200e\u200f]/g, "");
|
|
302
|
+
}
|
|
303
|
+
return i + "";
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
getDayOfWeekNames(style) {
|
|
307
|
+
const pattern = DAY_OF_WEEK_FORMATS[style];
|
|
308
|
+
return range(7, i => this.format(new Date(2017, 0, i + 1), pattern));
|
|
309
|
+
}
|
|
310
|
+
getYearName(date) {
|
|
311
|
+
return this.format(date, "y");
|
|
312
|
+
}
|
|
313
|
+
getFirstDayOfWeek() {
|
|
314
|
+
return WEEK_STARTS_ON;
|
|
315
|
+
}
|
|
316
|
+
getNumDaysInMonth(date) {
|
|
317
|
+
return getDaysInMonth(date);
|
|
318
|
+
}
|
|
319
|
+
clone(date) {
|
|
320
|
+
return new Date(date.getTime());
|
|
321
|
+
}
|
|
322
|
+
createDate(year, month, date) {
|
|
323
|
+
const result = new Date();
|
|
324
|
+
result.setFullYear(year, month, date);
|
|
325
|
+
result.setHours(0, 0, 0, 0);
|
|
326
|
+
return result;
|
|
327
|
+
}
|
|
328
|
+
today() {
|
|
329
|
+
return new Date();
|
|
330
|
+
}
|
|
331
|
+
parse(value, parseFormat) {
|
|
332
|
+
if (typeof value === "string" && value.length > 0) {
|
|
333
|
+
const iso8601Date = parseISO(value);
|
|
334
|
+
if (this.isValid(iso8601Date)) {
|
|
335
|
+
return iso8601Date;
|
|
336
|
+
}
|
|
337
|
+
const formats = Array.isArray(parseFormat) ? parseFormat : [parseFormat];
|
|
338
|
+
if (!parseFormat.length) {
|
|
339
|
+
throw Error("Formats array must not be empty.");
|
|
340
|
+
}
|
|
341
|
+
for (const currentFormat of formats) {
|
|
342
|
+
const fromFormat = parse(value, currentFormat, new Date(), { locale: this.locale });
|
|
343
|
+
if (this.isValid(fromFormat)) {
|
|
344
|
+
return fromFormat;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
return this.invalid();
|
|
348
|
+
}
|
|
349
|
+
else if (typeof value === "number") {
|
|
350
|
+
return new Date(value);
|
|
351
|
+
}
|
|
352
|
+
else if (value instanceof Date) {
|
|
353
|
+
return this.clone(value);
|
|
354
|
+
}
|
|
355
|
+
return null;
|
|
356
|
+
}
|
|
357
|
+
format(date, displayFormat) {
|
|
358
|
+
if (!this.isValid(date)) {
|
|
359
|
+
throw Error("DateFnsAdapter: Cannot format invalid date.");
|
|
360
|
+
}
|
|
361
|
+
return format(date, displayFormat, { locale: this.locale });
|
|
362
|
+
}
|
|
363
|
+
addCalendarYears(date, years) {
|
|
364
|
+
return addYears(date, years);
|
|
365
|
+
}
|
|
366
|
+
addCalendarMonths(date, months) {
|
|
367
|
+
return addMonths(date, months);
|
|
368
|
+
}
|
|
369
|
+
addCalendarDays(date, days) {
|
|
370
|
+
return addDays(date, days);
|
|
371
|
+
}
|
|
372
|
+
toIso8601(date) {
|
|
373
|
+
return formatISO(date, { representation: "date" });
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings
|
|
377
|
+
* (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an
|
|
378
|
+
* invalid date for all other values.
|
|
379
|
+
*/
|
|
380
|
+
deserialize(value) {
|
|
381
|
+
if (typeof value === "string") {
|
|
382
|
+
if (!value) {
|
|
383
|
+
return null;
|
|
384
|
+
}
|
|
385
|
+
const date = parseISO(value);
|
|
386
|
+
if (this.isValid(date)) {
|
|
387
|
+
return date;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
return super.deserialize(value);
|
|
391
|
+
}
|
|
392
|
+
isDateInstance(obj) {
|
|
393
|
+
return isDate(obj);
|
|
394
|
+
}
|
|
395
|
+
isValid(date) {
|
|
396
|
+
return isValid(date);
|
|
397
|
+
}
|
|
398
|
+
invalid() {
|
|
399
|
+
return new Date(NaN);
|
|
400
|
+
}
|
|
401
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ISSDateAdapter, deps: [{ token: MAT_DATE_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
402
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ISSDateAdapter }); }
|
|
403
|
+
}
|
|
404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ISSDateAdapter, decorators: [{
|
|
405
|
+
type: Injectable
|
|
406
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
407
|
+
type: Optional
|
|
408
|
+
}, {
|
|
409
|
+
type: Inject,
|
|
410
|
+
args: [MAT_DATE_LOCALE]
|
|
411
|
+
}] }] });
|
|
412
|
+
|
|
413
|
+
class DatePickerComponent extends BaseCtrl {
|
|
414
|
+
constructor() {
|
|
415
|
+
super(...arguments);
|
|
416
|
+
this.disabledDays = input([]);
|
|
417
|
+
this.minDate = input(null);
|
|
418
|
+
this.maxDate = input(null);
|
|
419
|
+
this.#datePipe = inject(DatePipe);
|
|
420
|
+
this.calendarDaysFilter = (d) => {
|
|
421
|
+
const day = (d || new Date()).getDay();
|
|
422
|
+
return !(this.disabledDays().includes(day));
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
#datePipe;
|
|
426
|
+
emit($event) {
|
|
427
|
+
const selectedDateString = this.#datePipe.transform($event.value, "yyyy-MM-ddTHH:mm:ss") + "Z";
|
|
428
|
+
this.emitValue(selectedDateString);
|
|
429
|
+
}
|
|
430
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DatePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
431
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.0", type: DatePickerComponent, isStandalone: true, selector: "iss-ctrl-date-picker", inputs: { disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
432
|
+
DatePipe,
|
|
433
|
+
{ provide: DateAdapter, useClass: ISSDateAdapter },
|
|
434
|
+
{ provide: MAT_DATE_FORMATS, useValue: DATE_FORMAT_ADAPTER },
|
|
435
|
+
{ provide: MAT_DATE_LOCALE, useValue: enGB },
|
|
436
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: DatePickerComponent, multi: true },
|
|
437
|
+
{ provide: NG_VALIDATORS, useExisting: DatePickerComponent, multi: true },
|
|
438
|
+
], usesInheritance: true, ngImport: i0, template: "<mat-form-field>\r\n <input\r\n class=\"cursor-pointer\"\r\n matInput\r\n readonly\r\n [matDatepicker]=\"picker\"\r\n (click)=\"picker.open(); markAsTouched()\"\r\n [formControl]=\"ctrl\"\r\n [min]=\"minDate()\"\r\n [max]=\"maxDate()\"\r\n [placeholder]=\"'dd/mm/yyyy'\"\r\n [matDatepickerFilter]=\"calendarDaysFilter\"\r\n (dateChange)=\"emit($event)\"\r\n />\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker></mat-datepicker>\r\n</mat-form-field>\r\n", styles: ["::ng-deep tr:has(>.mat-calendar-body-label[colspan=\"7\"]){opacity:0!important;display:none}::ng-deep .mat-datepicker-content .mat-calendar{height:unset!important}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i2$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i2$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
|
|
439
|
+
}
|
|
440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
441
|
+
type: Component,
|
|
442
|
+
args: [{ selector: "iss-ctrl-date-picker", standalone: true, imports: [MatFormFieldModule, MatInputModule, MatDatepickerModule, MatIconModule, ReactiveFormsModule], providers: [
|
|
443
|
+
DatePipe,
|
|
444
|
+
{ provide: DateAdapter, useClass: ISSDateAdapter },
|
|
445
|
+
{ provide: MAT_DATE_FORMATS, useValue: DATE_FORMAT_ADAPTER },
|
|
446
|
+
{ provide: MAT_DATE_LOCALE, useValue: enGB },
|
|
447
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: DatePickerComponent, multi: true },
|
|
448
|
+
{ provide: NG_VALIDATORS, useExisting: DatePickerComponent, multi: true },
|
|
449
|
+
], template: "<mat-form-field>\r\n <input\r\n class=\"cursor-pointer\"\r\n matInput\r\n readonly\r\n [matDatepicker]=\"picker\"\r\n (click)=\"picker.open(); markAsTouched()\"\r\n [formControl]=\"ctrl\"\r\n [min]=\"minDate()\"\r\n [max]=\"maxDate()\"\r\n [placeholder]=\"'dd/mm/yyyy'\"\r\n [matDatepickerFilter]=\"calendarDaysFilter\"\r\n (dateChange)=\"emit($event)\"\r\n />\r\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker></mat-datepicker>\r\n</mat-form-field>\r\n", styles: ["::ng-deep tr:has(>.mat-calendar-body-label[colspan=\"7\"]){opacity:0!important;display:none}::ng-deep .mat-datepicker-content .mat-calendar{height:unset!important}\n"] }]
|
|
450
|
+
}] });
|
|
451
|
+
|
|
452
|
+
class DateRangePickerComponent extends BaseCtrl {
|
|
453
|
+
constructor() {
|
|
454
|
+
super(...arguments);
|
|
455
|
+
this.disabledDays = input([]);
|
|
456
|
+
this.minDate = input(null);
|
|
457
|
+
this.maxDate = input(null);
|
|
458
|
+
this.onDateRangeObjectChange = output();
|
|
459
|
+
this.range = new FormGroup({
|
|
460
|
+
start: new FormControl(null),
|
|
461
|
+
end: new FormControl(null),
|
|
462
|
+
});
|
|
463
|
+
this.#datePipe = inject(DatePipe);
|
|
464
|
+
this.#sub = new Subscription();
|
|
465
|
+
this.calendarDaysFilter = (d) => {
|
|
466
|
+
const day = (d || new Date()).getDay();
|
|
467
|
+
return !(this.disabledDays().includes(day));
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
#datePipe;
|
|
471
|
+
#sub;
|
|
472
|
+
ngOnInit() {
|
|
473
|
+
this.#sub.add(this.range.valueChanges.subscribe((values) => {
|
|
474
|
+
if (values.start && values.end) {
|
|
475
|
+
this.emitValue(this.#getEmissionValue(values.start, values.end));
|
|
476
|
+
this.onDateRangeObjectChange.emit(this.#getEmissionObject(values.start, values.end));
|
|
477
|
+
}
|
|
478
|
+
}));
|
|
479
|
+
}
|
|
480
|
+
writeValue(value) {
|
|
481
|
+
if (typeof value === "string") {
|
|
482
|
+
const valArr = value?.split(",");
|
|
483
|
+
const valObj = {
|
|
484
|
+
start: valArr[0],
|
|
485
|
+
end: valArr[1],
|
|
486
|
+
};
|
|
487
|
+
this.range.patchValue(valObj, { emitEvent: false });
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
ngOnDestroy() {
|
|
491
|
+
this.#sub.unsubscribe();
|
|
492
|
+
}
|
|
493
|
+
#getDuration(startDate, endDate) {
|
|
494
|
+
let start = new Date(startDate).getTime();
|
|
495
|
+
let end = new Date(endDate).getTime();
|
|
496
|
+
return Math.ceil((end - start) / (1000 * 60 * 60 * 24) + 1);
|
|
497
|
+
}
|
|
498
|
+
#getFormatedDate(date) {
|
|
499
|
+
return this.#datePipe.transform(date, "yyyy-MM-ddTHH:mm:ss") + "Z";
|
|
500
|
+
}
|
|
501
|
+
#getFormatedEndDate(endDate) {
|
|
502
|
+
let inputDate = new Date(new Date(endDate).setHours(23, 59, 59));
|
|
503
|
+
return this.#getFormatedDate(inputDate);
|
|
504
|
+
}
|
|
505
|
+
#getEmissionValue(start, end) {
|
|
506
|
+
let formatedStart = this.#getFormatedDate(start);
|
|
507
|
+
let formatedEnd = this.#getFormatedEndDate(end);
|
|
508
|
+
return `${formatedStart},${formatedEnd}`;
|
|
509
|
+
}
|
|
510
|
+
#getEmissionObject(start, end) {
|
|
511
|
+
return {
|
|
512
|
+
duration: this.#getDuration(start, end),
|
|
513
|
+
start: this.#getFormatedDate(start),
|
|
514
|
+
end: this.#getFormatedEndDate(end)
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DateRangePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
518
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.0", type: DateRangePickerComponent, isStandalone: true, selector: "iss-ctrl-date-range-picker", inputs: { disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDateRangeObjectChange: "onDateRangeObjectChange" }, providers: [
|
|
519
|
+
DatePipe,
|
|
520
|
+
{ provide: DateAdapter, useClass: ISSDateAdapter },
|
|
521
|
+
{ provide: MAT_DATE_FORMATS, useValue: DATE_FORMAT_ADAPTER },
|
|
522
|
+
{ provide: MAT_DATE_LOCALE, useValue: enGB },
|
|
523
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: DateRangePickerComponent, multi: true },
|
|
524
|
+
], usesInheritance: true, ngImport: i0, template: "<mat-form-field>\r\n <mat-date-range-input\r\n [formGroup]=\"range\"\r\n [rangePicker]=\"picker\"\r\n [min]=\"minDate()\"\r\n [max]=\"maxDate()\"\r\n [dateFilter]=\"calendarDaysFilter\"\r\n >\r\n <input\r\n matStartDate\r\n formControlName=\"start\"\r\n placeholder=\"dd/mm/yyyy\"\r\n (click)=\"picker.open(); markAsTouched()\"\r\n />\r\n <input\r\n matEndDate\r\n formControlName=\"end\"\r\n placeholder=\"dd/mm/yyyy\"\r\n (click)=\"picker.open(); markAsTouched()\"\r\n />\r\n </mat-date-range-input>\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-date-range-picker #picker></mat-date-range-picker>\r\n</mat-form-field>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i2$1.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i2$1.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i2$1.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i2$1.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
525
|
+
}
|
|
526
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DateRangePickerComponent, decorators: [{
|
|
527
|
+
type: Component,
|
|
528
|
+
args: [{ selector: "iss-ctrl-date-range-picker", standalone: true, imports: [
|
|
529
|
+
MatFormFieldModule, MatDatepickerModule, FormsModule, ReactiveFormsModule,
|
|
530
|
+
], providers: [
|
|
531
|
+
DatePipe,
|
|
532
|
+
{ provide: DateAdapter, useClass: ISSDateAdapter },
|
|
533
|
+
{ provide: MAT_DATE_FORMATS, useValue: DATE_FORMAT_ADAPTER },
|
|
534
|
+
{ provide: MAT_DATE_LOCALE, useValue: enGB },
|
|
535
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: DateRangePickerComponent, multi: true },
|
|
536
|
+
], template: "<mat-form-field>\r\n <mat-date-range-input\r\n [formGroup]=\"range\"\r\n [rangePicker]=\"picker\"\r\n [min]=\"minDate()\"\r\n [max]=\"maxDate()\"\r\n [dateFilter]=\"calendarDaysFilter\"\r\n >\r\n <input\r\n matStartDate\r\n formControlName=\"start\"\r\n placeholder=\"dd/mm/yyyy\"\r\n (click)=\"picker.open(); markAsTouched()\"\r\n />\r\n <input\r\n matEndDate\r\n formControlName=\"end\"\r\n placeholder=\"dd/mm/yyyy\"\r\n (click)=\"picker.open(); markAsTouched()\"\r\n />\r\n </mat-date-range-input>\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-date-range-picker #picker></mat-date-range-picker>\r\n</mat-form-field>\r\n" }]
|
|
537
|
+
}] });
|
|
538
|
+
|
|
539
|
+
class TimePickerComponent extends BaseCtrl {
|
|
540
|
+
constructor() {
|
|
541
|
+
super(...arguments);
|
|
542
|
+
this.isOpen = signal(false);
|
|
543
|
+
this.timePicker = new FormGroup({
|
|
544
|
+
hour: new FormControl(),
|
|
545
|
+
minute: new FormControl(),
|
|
546
|
+
meridiem: new FormControl(),
|
|
547
|
+
});
|
|
548
|
+
this.displayValue = signal("");
|
|
549
|
+
this.hours = Array.from({ length: 12 }, (_, i) => i + 1);
|
|
550
|
+
this.minutes = Array.from({ length: 60 }, (_, i) => i);
|
|
551
|
+
this.#emissionValue = signal("");
|
|
552
|
+
this.#timeChanges = toSignal(this.timePicker.valueChanges);
|
|
553
|
+
this.#effectRef = effect(() => {
|
|
554
|
+
this.#emit(this.#timeChanges());
|
|
555
|
+
}, { allowSignalWrites: true });
|
|
556
|
+
}
|
|
557
|
+
#emissionValue;
|
|
558
|
+
#timeChanges;
|
|
559
|
+
#effectRef;
|
|
560
|
+
ngOnDestroy() {
|
|
561
|
+
this.#effectRef.destroy();
|
|
562
|
+
}
|
|
563
|
+
writeValue(value) {
|
|
564
|
+
if (value) {
|
|
565
|
+
if (value.includes("T")) {
|
|
566
|
+
value = this.#extractTime(value);
|
|
567
|
+
this.emitValue(value);
|
|
568
|
+
}
|
|
569
|
+
const timeObject = this.#generateTimeObject(this.#convertTo12H(value));
|
|
570
|
+
this.displayValue.set(this.#generateTimeDisplay(timeObject.hour, timeObject.minute, timeObject.meridiem));
|
|
571
|
+
this.timePicker.patchValue(timeObject, { emitEvent: false });
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
togglePickerMenu() {
|
|
575
|
+
this.isOpen.update((isOpen) => !isOpen);
|
|
576
|
+
}
|
|
577
|
+
close() {
|
|
578
|
+
this.isOpen.set(false);
|
|
579
|
+
}
|
|
580
|
+
validate(control) {
|
|
581
|
+
if (this.max() && control.getRawValue()) {
|
|
582
|
+
let maxDate = this.#geDateFromString(this.max()?.toString());
|
|
583
|
+
let controlValue = this.#geDateFromString(control.getRawValue());
|
|
584
|
+
if (isAfter(controlValue, maxDate)) {
|
|
585
|
+
return {
|
|
586
|
+
afterMaxTime: {
|
|
587
|
+
max: this.max(),
|
|
588
|
+
actual: control.getRawValue()
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
if (this.min() && control.getRawValue()) {
|
|
594
|
+
let minDate = this.#geDateFromString(this.min()?.toString());
|
|
595
|
+
let controlValue = this.#geDateFromString(control.getRawValue());
|
|
596
|
+
if (isBefore(controlValue, minDate)) {
|
|
597
|
+
return {
|
|
598
|
+
beforeMinTime: {
|
|
599
|
+
max: this.min(),
|
|
600
|
+
actual: control.getRawValue()
|
|
601
|
+
}
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
return null;
|
|
606
|
+
}
|
|
607
|
+
#emit(v) {
|
|
608
|
+
if (v && Object.values(v).every((item) => item !== null && item !== undefined)) {
|
|
609
|
+
const time24HFormat = this.#convertTo24H(v.hour, v.minute, v.meridiem);
|
|
610
|
+
this.displayValue.set(this.#generateTimeDisplay(v.hour, v.minute, v.meridiem));
|
|
611
|
+
this.#emissionValue.set(time24HFormat);
|
|
612
|
+
this.emitValue(time24HFormat);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
#convertTo24H(h, m, period) {
|
|
616
|
+
let hStr = `${h}`;
|
|
617
|
+
let mStr = `${m}`;
|
|
618
|
+
if (period === "PM") {
|
|
619
|
+
hStr = `${h + 12}`;
|
|
620
|
+
}
|
|
621
|
+
else {
|
|
622
|
+
if (h <= 9) {
|
|
623
|
+
hStr = `0${hStr}`;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
if (h === 12 && period === "AM") {
|
|
627
|
+
hStr = "00";
|
|
628
|
+
}
|
|
629
|
+
if (h === 12 && period === "PM") {
|
|
630
|
+
hStr = `${12}`;
|
|
631
|
+
}
|
|
632
|
+
if (m <= 9) {
|
|
633
|
+
mStr = `0${mStr}`;
|
|
634
|
+
}
|
|
635
|
+
return `${hStr}:${mStr}`;
|
|
636
|
+
}
|
|
637
|
+
#convertTo12H(time) {
|
|
638
|
+
let datetime = this.#geDateFromString(time);
|
|
639
|
+
return format(datetime, "h:m a");
|
|
640
|
+
}
|
|
641
|
+
#geDateFromString(time) {
|
|
642
|
+
if (!time) {
|
|
643
|
+
throw new Error(`Input value in wrong format ${time}`);
|
|
644
|
+
}
|
|
645
|
+
let timeArr = time.split(":");
|
|
646
|
+
return new Date(new Date().setHours(+timeArr[0], +timeArr[1]));
|
|
647
|
+
}
|
|
648
|
+
#generateTimeObject(time) {
|
|
649
|
+
const meridiem = time.split(" ")[1];
|
|
650
|
+
const [hour, minute] = time.split(" ")[0].split(":");
|
|
651
|
+
return {
|
|
652
|
+
hour: +hour,
|
|
653
|
+
minute: +minute,
|
|
654
|
+
meridiem: meridiem
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
#generateTimeDisplay(hour, minute, meridiem) {
|
|
658
|
+
let h = `${hour}`;
|
|
659
|
+
let m = `${minute}`;
|
|
660
|
+
if (hour <= 9) {
|
|
661
|
+
h = `0${hour}`;
|
|
662
|
+
}
|
|
663
|
+
if (minute <= 9) {
|
|
664
|
+
m = `0${minute}`;
|
|
665
|
+
}
|
|
666
|
+
return `${h}:${m} ${meridiem}`;
|
|
667
|
+
}
|
|
668
|
+
#extractTime(value) {
|
|
669
|
+
let val = value.split("T");
|
|
670
|
+
let timeArr = val[1].split(":");
|
|
671
|
+
timeArr.pop();
|
|
672
|
+
return timeArr.join(":");
|
|
673
|
+
}
|
|
674
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TimePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
675
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: TimePickerComponent, isStandalone: true, selector: "iss-ctrl-time-picker", providers: [
|
|
676
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: TimePickerComponent, multi: true },
|
|
677
|
+
{ provide: NG_VALIDATORS, useExisting: TimePickerComponent, multi: true }
|
|
678
|
+
], usesInheritance: true, ngImport: i0, template: "<mat-form-field class=\"cursor-pointer\" cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\" (click)=\"togglePickerMenu()\">\r\n <!--<span *ngIf=\"matPrefix\" matPrefix class=\"sfi {{ iconPrefixName }} font-18\"></span>-->\r\n <input\r\n class=\"cursor-pointer\"\r\n matInput\r\n placeholder=\"--:-- --\"\r\n [value]=\"displayValue()\"\r\n readonly=\"readonly\"\r\n />\r\n <ds-icon icon=\"clock\" class=\"fs-24 fc-black\" matSuffix></ds-icon>\r\n</mat-form-field>\r\n<ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayHasBackdrop]=\"true\"\r\n (backdropClick)=\"close()\"\r\n [cdkConnectedOverlayGrowAfterOpen]=\"true\"\r\n [cdkConnectedOverlayOrigin]=\"trigger\"\r\n [cdkConnectedOverlayOpen]=\"isOpen()\"\r\n>\r\n <div class=\"time-picker-wrapper\" [formGroup]=\"timePicker\">\r\n <div class=\"time-picker-title\">\r\n <span class=\"time-label\">HH</span>\r\n <span class=\"mx-1\"></span>\r\n <span class=\"time-label\">MM</span>\r\n <span class=\"mx-1\"></span>\r\n </div>\r\n <div class=\"time-picker-body\">\r\n <mat-button-toggle-group formControlName=\"hour\" hideSingleSelectionIndicator class=\"flex-nowrap\">\r\n @for (hour of hours; track hour) {\r\n <mat-button-toggle [value]=\"hour\">\r\n <span class=\"font-14 font-weight-normal\">{{ hour >= 10 ? hour : '0' + hour }}</span>\r\n </mat-button-toggle>\r\n }\r\n </mat-button-toggle-group>\r\n <span class=\"mx-1\"></span>\r\n <mat-button-toggle-group formControlName=\"minute\" hideSingleSelectionIndicator class=\"flex-nowrap\">\r\n @for (minute of minutes; track minute) {\r\n <mat-button-toggle [value]=\"minute\">\r\n <span class=\"font-14 font-weight-normal\">{{ minute >= 10 ? minute : '0' + minute }}</span>\r\n </mat-button-toggle>\r\n }\r\n </mat-button-toggle-group>\r\n <span class=\"mx-1\"></span>\r\n\r\n <mat-button-toggle-group formControlName=\"meridiem\" hideSingleSelectionIndicator>\r\n <mat-button-toggle value=\"AM\">AM</mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">PM</mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: ["input[readonly=true]{color:var(--black)!important}.time-picker-wrapper{background-color:var(--white);border:4px solid var(--light-gray);padding:10px;margin-top:-20px}.time-picker-wrapper .time-picker-title{display:flex}.time-picker-wrapper .time-picker-title .time-label{display:flex;align-items:center;justify-content:center;width:50px;min-width:50px;padding:0;font-size:.95rem;color:var(--dark-gray)}[dir=ltr] .time-picker-wrapper .time-picker-title .time-label{margin-right:4px}[dir=rtl] .time-picker-wrapper .time-picker-title .time-label{margin-left:4px}.time-picker-wrapper .time-picker-body{display:flex}.time-picker-wrapper .time-picker-body .mat-button-toggle-group{display:flex;flex-direction:column;max-height:200px;overflow-y:auto;border:none}.time-picker-wrapper .time-picker-body .mat-button-toggle-group .mat-button-toggle{border:0;width:50px;min-width:50px}.time-picker-wrapper .time-picker-body .mat-button-toggle-group .mat-button-toggle.mat-button-toggle-checked{color:var(--white)!important}\n"], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
679
|
+
}
|
|
680
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
681
|
+
type: Component,
|
|
682
|
+
args: [{ selector: "iss-ctrl-time-picker", standalone: true, imports: [
|
|
683
|
+
MatFormField,
|
|
684
|
+
MatInput,
|
|
685
|
+
MatSuffix,
|
|
686
|
+
MatButtonToggleGroup,
|
|
687
|
+
MatButtonToggle,
|
|
688
|
+
CdkOverlayOrigin,
|
|
689
|
+
CdkConnectedOverlay,
|
|
690
|
+
ReactiveFormsModule
|
|
691
|
+
], providers: [
|
|
692
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: TimePickerComponent, multi: true },
|
|
693
|
+
{ provide: NG_VALIDATORS, useExisting: TimePickerComponent, multi: true }
|
|
694
|
+
], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<mat-form-field class=\"cursor-pointer\" cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\" (click)=\"togglePickerMenu()\">\r\n <!--<span *ngIf=\"matPrefix\" matPrefix class=\"sfi {{ iconPrefixName }} font-18\"></span>-->\r\n <input\r\n class=\"cursor-pointer\"\r\n matInput\r\n placeholder=\"--:-- --\"\r\n [value]=\"displayValue()\"\r\n readonly=\"readonly\"\r\n />\r\n <ds-icon icon=\"clock\" class=\"fs-24 fc-black\" matSuffix></ds-icon>\r\n</mat-form-field>\r\n<ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayHasBackdrop]=\"true\"\r\n (backdropClick)=\"close()\"\r\n [cdkConnectedOverlayGrowAfterOpen]=\"true\"\r\n [cdkConnectedOverlayOrigin]=\"trigger\"\r\n [cdkConnectedOverlayOpen]=\"isOpen()\"\r\n>\r\n <div class=\"time-picker-wrapper\" [formGroup]=\"timePicker\">\r\n <div class=\"time-picker-title\">\r\n <span class=\"time-label\">HH</span>\r\n <span class=\"mx-1\"></span>\r\n <span class=\"time-label\">MM</span>\r\n <span class=\"mx-1\"></span>\r\n </div>\r\n <div class=\"time-picker-body\">\r\n <mat-button-toggle-group formControlName=\"hour\" hideSingleSelectionIndicator class=\"flex-nowrap\">\r\n @for (hour of hours; track hour) {\r\n <mat-button-toggle [value]=\"hour\">\r\n <span class=\"font-14 font-weight-normal\">{{ hour >= 10 ? hour : '0' + hour }}</span>\r\n </mat-button-toggle>\r\n }\r\n </mat-button-toggle-group>\r\n <span class=\"mx-1\"></span>\r\n <mat-button-toggle-group formControlName=\"minute\" hideSingleSelectionIndicator class=\"flex-nowrap\">\r\n @for (minute of minutes; track minute) {\r\n <mat-button-toggle [value]=\"minute\">\r\n <span class=\"font-14 font-weight-normal\">{{ minute >= 10 ? minute : '0' + minute }}</span>\r\n </mat-button-toggle>\r\n }\r\n </mat-button-toggle-group>\r\n <span class=\"mx-1\"></span>\r\n\r\n <mat-button-toggle-group formControlName=\"meridiem\" hideSingleSelectionIndicator>\r\n <mat-button-toggle value=\"AM\">AM</mat-button-toggle>\r\n <mat-button-toggle value=\"PM\">PM</mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: ["input[readonly=true]{color:var(--black)!important}.time-picker-wrapper{background-color:var(--white);border:4px solid var(--light-gray);padding:10px;margin-top:-20px}.time-picker-wrapper .time-picker-title{display:flex}.time-picker-wrapper .time-picker-title .time-label{display:flex;align-items:center;justify-content:center;width:50px;min-width:50px;padding:0;font-size:.95rem;color:var(--dark-gray)}[dir=ltr] .time-picker-wrapper .time-picker-title .time-label{margin-right:4px}[dir=rtl] .time-picker-wrapper .time-picker-title .time-label{margin-left:4px}.time-picker-wrapper .time-picker-body{display:flex}.time-picker-wrapper .time-picker-body .mat-button-toggle-group{display:flex;flex-direction:column;max-height:200px;overflow-y:auto;border:none}.time-picker-wrapper .time-picker-body .mat-button-toggle-group .mat-button-toggle{border:0;width:50px;min-width:50px}.time-picker-wrapper .time-picker-body .mat-button-toggle-group .mat-button-toggle.mat-button-toggle-checked{color:var(--white)!important}\n"] }]
|
|
695
|
+
}] });
|
|
696
|
+
|
|
697
|
+
class DatetimePickerComponent extends BaseCtrl {
|
|
698
|
+
constructor() {
|
|
699
|
+
super(...arguments);
|
|
700
|
+
this.disabledDays = input([]);
|
|
701
|
+
this.minDate = input(null);
|
|
702
|
+
this.maxDate = input(null);
|
|
703
|
+
this.datetimePicker = new FormGroup({
|
|
704
|
+
date: new FormControl(),
|
|
705
|
+
time: new FormControl(),
|
|
706
|
+
});
|
|
707
|
+
this.#datePipe = inject(DatePipe);
|
|
708
|
+
this.#formChanges = toSignal(this.datetimePicker.valueChanges);
|
|
709
|
+
this.#effectRef = effect(() => {
|
|
710
|
+
if (this.#formChanges() && this.#formChanges().date && this.#formChanges().time) {
|
|
711
|
+
this.emitValue(this.#getEmissionValue(this.#formChanges().date, this.#formChanges().time));
|
|
712
|
+
}
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
#datePipe;
|
|
716
|
+
#formChanges;
|
|
717
|
+
#effectRef;
|
|
718
|
+
ngOnDestroy() {
|
|
719
|
+
this.#effectRef.destroy();
|
|
720
|
+
}
|
|
721
|
+
#getEmissionValue(date, time) {
|
|
722
|
+
const d = new Date(date);
|
|
723
|
+
let timeArr = time.split(":");
|
|
724
|
+
let datetime = new Date(d.setHours(+timeArr[0], +timeArr[1], 0));
|
|
725
|
+
return this.#formatDate(datetime);
|
|
726
|
+
}
|
|
727
|
+
#formatDate(date) {
|
|
728
|
+
return this.#datePipe.transform(date, "yyyy-MM-ddTHH:mm:ss") + "Z";
|
|
729
|
+
}
|
|
730
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DatetimePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
731
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.0", type: DatetimePickerComponent, isStandalone: true, selector: "iss-ctrl-datetime-picker", inputs: { disabledDays: { classPropertyName: "disabledDays", publicName: "disabledDays", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
732
|
+
DatePipe,
|
|
733
|
+
{ provide: DateAdapter, useClass: ISSDateAdapter },
|
|
734
|
+
{ provide: MAT_DATE_FORMATS, useValue: DATE_FORMAT_ADAPTER },
|
|
735
|
+
{ provide: MAT_DATE_LOCALE, useValue: enGB },
|
|
736
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: DatetimePickerComponent, multi: true }
|
|
737
|
+
], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"datetimePicker\" class=\"d-flex gap-3\">\r\n <iss-ctrl-date-picker class=\"flex-grow-1\" formControlName=\"date\" [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" [disabledDays]=\"disabledDays()\"/>\r\n <iss-ctrl-time-picker class=\"flex-grow-1\" formControlName=\"time\" [min]=\"min()\" [max]=\"max()\"/>\r\n</form>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: TimePickerComponent, selector: "iss-ctrl-time-picker" }, { kind: "component", type: DatePickerComponent, selector: "iss-ctrl-date-picker", inputs: ["disabledDays", "minDate", "maxDate"] }] }); }
|
|
738
|
+
}
|
|
739
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DatetimePickerComponent, decorators: [{
|
|
740
|
+
type: Component,
|
|
741
|
+
args: [{ selector: "iss-ctrl-datetime-picker", standalone: true, imports: [
|
|
742
|
+
FormsModule,
|
|
743
|
+
MatDatepicker,
|
|
744
|
+
MatDatepickerInput,
|
|
745
|
+
MatDatepickerToggle,
|
|
746
|
+
MatFormField,
|
|
747
|
+
MatInput,
|
|
748
|
+
MatSuffix,
|
|
749
|
+
ReactiveFormsModule,
|
|
750
|
+
TimePickerComponent,
|
|
751
|
+
DatePickerComponent
|
|
752
|
+
], providers: [
|
|
753
|
+
DatePipe,
|
|
754
|
+
{ provide: DateAdapter, useClass: ISSDateAdapter },
|
|
755
|
+
{ provide: MAT_DATE_FORMATS, useValue: DATE_FORMAT_ADAPTER },
|
|
756
|
+
{ provide: MAT_DATE_LOCALE, useValue: enGB },
|
|
757
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: DatetimePickerComponent, multi: true }
|
|
758
|
+
], template: "<form [formGroup]=\"datetimePicker\" class=\"d-flex gap-3\">\r\n <iss-ctrl-date-picker class=\"flex-grow-1\" formControlName=\"date\" [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" [disabledDays]=\"disabledDays()\"/>\r\n <iss-ctrl-time-picker class=\"flex-grow-1\" formControlName=\"time\" [min]=\"min()\" [max]=\"max()\"/>\r\n</form>\r\n" }]
|
|
759
|
+
}] });
|
|
760
|
+
|
|
761
|
+
class DatetimeRangePickerComponent extends BaseCtrl {
|
|
762
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DatetimeRangePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
763
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: DatetimeRangePickerComponent, isStandalone: true, selector: "iss-ctrl-datetime-range-picker", providers: [
|
|
764
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: DatetimeRangePickerComponent, multi: true }
|
|
765
|
+
], usesInheritance: true, ngImport: i0, template: "<p>datetime-range-picker works!</p>\r\n", styles: [""] }); }
|
|
766
|
+
}
|
|
767
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DatetimeRangePickerComponent, decorators: [{
|
|
768
|
+
type: Component,
|
|
769
|
+
args: [{ selector: "iss-ctrl-datetime-range-picker", standalone: true, imports: [], providers: [
|
|
770
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: DatetimeRangePickerComponent, multi: true }
|
|
771
|
+
], template: "<p>datetime-range-picker works!</p>\r\n" }]
|
|
772
|
+
}] });
|
|
773
|
+
|
|
774
|
+
class DroppableDirective {
|
|
775
|
+
constructor() {
|
|
776
|
+
this.onDrop = output();
|
|
777
|
+
}
|
|
778
|
+
onDragOver(evt) {
|
|
779
|
+
evt.preventDefault();
|
|
780
|
+
evt.stopPropagation();
|
|
781
|
+
}
|
|
782
|
+
onDragLeave(evt) {
|
|
783
|
+
evt.preventDefault();
|
|
784
|
+
evt.stopPropagation();
|
|
785
|
+
}
|
|
786
|
+
onDropped(evt) {
|
|
787
|
+
evt.preventDefault();
|
|
788
|
+
evt.stopPropagation();
|
|
789
|
+
this.onDrop.emit(evt.dataTransfer.files);
|
|
790
|
+
}
|
|
791
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DroppableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
792
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.0", type: DroppableDirective, isStandalone: true, selector: "[droppable]", outputs: { onDrop: "onDrop" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDropped($event)" } }, ngImport: i0 }); }
|
|
793
|
+
}
|
|
794
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DroppableDirective, decorators: [{
|
|
795
|
+
type: Directive,
|
|
796
|
+
args: [{
|
|
797
|
+
selector: "[droppable]",
|
|
798
|
+
standalone: true,
|
|
799
|
+
}]
|
|
800
|
+
}], propDecorators: { onDragOver: [{
|
|
801
|
+
type: HostListener,
|
|
802
|
+
args: ["dragover", ["$event"]]
|
|
803
|
+
}], onDragLeave: [{
|
|
804
|
+
type: HostListener,
|
|
805
|
+
args: ["dragleave", ["$event"]]
|
|
806
|
+
}], onDropped: [{
|
|
807
|
+
type: HostListener,
|
|
808
|
+
args: ["drop", ["$event"]]
|
|
809
|
+
}] } });
|
|
810
|
+
|
|
811
|
+
class HintsComponent {
|
|
812
|
+
constructor() {
|
|
813
|
+
this.hints = input([]);
|
|
814
|
+
this.touched = input(false);
|
|
815
|
+
}
|
|
816
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: HintsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
817
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: HintsComponent, isStandalone: true, selector: "iss-ctrl-hints", inputs: { hints: { classPropertyName: "hints", publicName: "hints", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
818
|
+
@if (hints().length) {
|
|
819
|
+
<div class="d-flex align-items-center flex-wrap gap-2 mb-3">
|
|
820
|
+
@for (hint of hints(); track $index) {
|
|
821
|
+
@if (hint) {
|
|
822
|
+
<mat-hint class="d-flex align-items-center gap-1 fs-12">
|
|
823
|
+
@if (hint.valid === undefined) {
|
|
824
|
+
<ds-icon icon="info" class="fs-24 fc-dark-gray"></ds-icon>
|
|
825
|
+
<span class="fc-dark-gray text-break">{{ hint.label }}</span>
|
|
826
|
+
} @else {
|
|
827
|
+
<ds-icon
|
|
828
|
+
icon="{{ touched() ? (hint.valid ? 'check-circle-f' : 'close-circle') : 'check-circle-o' }}"
|
|
829
|
+
class="fs-24 {{ touched() ? (hint.valid ? 'fc-green' : 'fc-red') : 'fc-dark-gray' }}"
|
|
830
|
+
>
|
|
831
|
+
</ds-icon>
|
|
832
|
+
<span class="{{ touched() ? (hint.valid ? 'fc-green' : 'fc-red') : 'fc-dark-gray' }} text-break">{{ hint.label }}</span>
|
|
833
|
+
}
|
|
834
|
+
</mat-hint>
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
</div>
|
|
838
|
+
}
|
|
839
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }] }); }
|
|
840
|
+
}
|
|
841
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: HintsComponent, decorators: [{
|
|
842
|
+
type: Component,
|
|
843
|
+
args: [{
|
|
844
|
+
selector: "iss-ctrl-hints",
|
|
845
|
+
standalone: true,
|
|
846
|
+
imports: [MatHint,],
|
|
847
|
+
template: `
|
|
848
|
+
@if (hints().length) {
|
|
849
|
+
<div class="d-flex align-items-center flex-wrap gap-2 mb-3">
|
|
850
|
+
@for (hint of hints(); track $index) {
|
|
851
|
+
@if (hint) {
|
|
852
|
+
<mat-hint class="d-flex align-items-center gap-1 fs-12">
|
|
853
|
+
@if (hint.valid === undefined) {
|
|
854
|
+
<ds-icon icon="info" class="fs-24 fc-dark-gray"></ds-icon>
|
|
855
|
+
<span class="fc-dark-gray text-break">{{ hint.label }}</span>
|
|
856
|
+
} @else {
|
|
857
|
+
<ds-icon
|
|
858
|
+
icon="{{ touched() ? (hint.valid ? 'check-circle-f' : 'close-circle') : 'check-circle-o' }}"
|
|
859
|
+
class="fs-24 {{ touched() ? (hint.valid ? 'fc-green' : 'fc-red') : 'fc-dark-gray' }}"
|
|
860
|
+
>
|
|
861
|
+
</ds-icon>
|
|
862
|
+
<span class="{{ touched() ? (hint.valid ? 'fc-green' : 'fc-red') : 'fc-dark-gray' }} text-break">{{ hint.label }}</span>
|
|
863
|
+
}
|
|
864
|
+
</mat-hint>
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
</div>
|
|
868
|
+
}
|
|
869
|
+
`,
|
|
870
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
871
|
+
}]
|
|
872
|
+
}] });
|
|
873
|
+
|
|
874
|
+
class FilePickerComponent extends BaseCtrl {
|
|
875
|
+
constructor() {
|
|
876
|
+
super(...arguments);
|
|
877
|
+
this.accept = input();
|
|
878
|
+
this.showDownloadButton = input(true);
|
|
879
|
+
this.showDeleteButton = input(true);
|
|
880
|
+
this.attachments = signal([]);
|
|
881
|
+
this.#effectRef = effect(() => {
|
|
882
|
+
if (this.attachments().length) {
|
|
883
|
+
this.emitValue(this.#formDataFactory(this.attachments()));
|
|
884
|
+
}
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
#effectRef;
|
|
888
|
+
ngOnDestroy() {
|
|
889
|
+
this.#effectRef.destroy();
|
|
890
|
+
}
|
|
891
|
+
writeValue(val) {
|
|
892
|
+
this.#reset();
|
|
893
|
+
if (val) {
|
|
894
|
+
this.attachments.set([...this.attachments(), ...this.#convertFormDataToFiles(val)]);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
onDownload($event) {
|
|
898
|
+
const fileUrl = this.#createObjectUrl($event.detail.value);
|
|
899
|
+
const anchorElement = this.#createAnchorElement(fileUrl, $event.detail.value.name);
|
|
900
|
+
this.#useAnchorElementThenDispose(anchorElement, fileUrl);
|
|
901
|
+
}
|
|
902
|
+
onDelete(index) {
|
|
903
|
+
const fileHtmlElement = document.getElementById("file");
|
|
904
|
+
if (fileHtmlElement) {
|
|
905
|
+
fileHtmlElement.value = "";
|
|
906
|
+
}
|
|
907
|
+
this.attachments.update((files) => {
|
|
908
|
+
return files.filter((_, i) => i !== index);
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
captureFile($event) {
|
|
912
|
+
if (!$event) {
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
915
|
+
if (!$event.length) {
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
this.markAsTouched();
|
|
919
|
+
const files = Array.from($event);
|
|
920
|
+
this.#updateAttachments(files);
|
|
921
|
+
}
|
|
922
|
+
#createObjectUrl(file) {
|
|
923
|
+
const blob = new Blob([file], {
|
|
924
|
+
type: "application/octet-stream",
|
|
925
|
+
});
|
|
926
|
+
return window.URL.createObjectURL(blob);
|
|
927
|
+
}
|
|
928
|
+
#updateAttachments(selectedFiles) {
|
|
929
|
+
if (!this.multiple()) {
|
|
930
|
+
this.attachments.set([]);
|
|
931
|
+
this.attachments()[0] = selectedFiles[0];
|
|
932
|
+
return;
|
|
933
|
+
}
|
|
934
|
+
this.attachments.update((files) => {
|
|
935
|
+
files = [...files, ...selectedFiles];
|
|
936
|
+
return files;
|
|
937
|
+
});
|
|
938
|
+
}
|
|
939
|
+
#formDataFactory(files) {
|
|
940
|
+
const fd = new FormData();
|
|
941
|
+
for (let i = 0; i < files.length; i++) {
|
|
942
|
+
fd.append("file", files[i]);
|
|
943
|
+
}
|
|
944
|
+
return fd;
|
|
945
|
+
}
|
|
946
|
+
#reset() {
|
|
947
|
+
this.attachments.set([]);
|
|
948
|
+
}
|
|
949
|
+
#convertFormDataToFiles(val) {
|
|
950
|
+
let files = [];
|
|
951
|
+
for (let pair of val.entries()) {
|
|
952
|
+
if (pair[1] instanceof File) {
|
|
953
|
+
files.push(pair[1]);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
return files;
|
|
957
|
+
}
|
|
958
|
+
#createAnchorElement(fileUrl, fileName) {
|
|
959
|
+
let a = document.createElement("a");
|
|
960
|
+
a.setAttribute("style", "display: none");
|
|
961
|
+
a.href = fileUrl;
|
|
962
|
+
a.download = fileName;
|
|
963
|
+
return a;
|
|
964
|
+
}
|
|
965
|
+
#useAnchorElementThenDispose(a, fileUrl) {
|
|
966
|
+
a.click();
|
|
967
|
+
window.URL.revokeObjectURL(fileUrl);
|
|
968
|
+
a.remove();
|
|
969
|
+
}
|
|
970
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FilePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
971
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: FilePickerComponent, isStandalone: true, selector: "iss-ctrl-file-picker", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, showDownloadButton: { classPropertyName: "showDownloadButton", publicName: "showDownloadButton", isSignal: true, isRequired: false, transformFunction: null }, showDeleteButton: { classPropertyName: "showDeleteButton", publicName: "showDeleteButton", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
972
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: FilePickerComponent, multi: true }
|
|
973
|
+
], usesInheritance: true, ngImport: i0, template: "<ds-file-picker (click)=\"inputFile.click(); markAsTouched()\" droppable (onDrop)=\"captureFile($event)\">\r\n <input\r\n id=\"file\"\r\n type=\"file\"\r\n #inputFile\r\n [style.display]=\"'none'\"\r\n [formControl]=\"ctrl\"\r\n [multiple]=\"multiple()\"\r\n [accept]=\"accept()\"\r\n (change)=\"captureFile($any($event.target).files)\"\r\n />\r\n</ds-file-picker>\r\n\r\n<iss-ctrl-hints [hints]=\"hints()\" [touched]=\"touched()\"/>\r\n@if (attachments().length) {\r\n <section class=\"files-list\">\r\n @for (file of attachments(); track $index) {\r\n <div class=\"file-item-container\">\r\n @if (file) {\r\n <ds-attachments\r\n [matTooltip]=\"file.name\"\r\n [file]=\"file\"\r\n [showDownload]=\"showDownloadButton()\"\r\n [showActions]=\"showDeleteButton()\"\r\n (downloadEvent)=\"onDownload($event)\"\r\n (deleteEvent)=\"onDelete($index)\"\r\n >\r\n </ds-attachments>\r\n }\r\n </div>\r\n }\r\n </section>\r\n}\r\n", styles: [".file-uploader{--uploader-height: 150px;--uploader-width: 100%;--uploader-bg: var(--off-white);--uploader-border: 1px dashed var(--dark-gray);--uploader-radius: var(--box-radius);--uploader-padding: 1rem;height:var(--uploader-height);background-color:var(--uploader-bg);border:var(--uploader-border);border-radius:var(--uploader-radius);padding:var(--uploader-padding);text-align:center;cursor:pointer}.file-uploader--input{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:.75rem}.insideTableStyle{width:272px}.files-list{--file-item-width: 270px;display:grid;grid-template-columns:repeat(auto-fill,var(--file-item-width));grid-gap:.5rem}@media (max-width: 768px){.files-list{grid-template-columns:repeat(auto-fill,minmax(var(--file-item-width),1fr))}}.files-list .file-item-container .file-item{--file-bg: var(--off-white);--file-radius: var(--box-radius);--icon-color: var(--purple);--icon-size: 2rem;--file-border: transparent;display:flex;align-items:center;background-color:var(--file-bg);border:1px solid var(--file-border);border-radius:var(--file-radius);padding:0 1rem;height:70px;gap:.75rem}.files-list .file-item-container .file-item.error{--file-bg: rgba(var(--rgb-red), 10%);--file-border: var(--red);--icon-color: var(--red)}.files-list .file-item-container .file-item .icon{color:var(--icon-color);font-size:var(--icon-size)}.files-list .file-item-container .file-item .file-action{display:flex;align-items:center;gap:.5rem}ds-attachments::part(base){--file-width: 250px}::ng-deep .file-item .name-size{display:flex;flex-direction:column;justify-content:center;flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:120px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: DroppableDirective, selector: "[droppable]", outputs: ["onDrop"] }, { kind: "component", type: HintsComponent, selector: "iss-ctrl-hints", inputs: ["hints", "touched"] }] }); }
|
|
974
|
+
}
|
|
975
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FilePickerComponent, decorators: [{
|
|
976
|
+
type: Component,
|
|
977
|
+
args: [{ selector: "iss-ctrl-file-picker", standalone: true, imports: [
|
|
978
|
+
ReactiveFormsModule,
|
|
979
|
+
MatTooltip,
|
|
980
|
+
DroppableDirective,
|
|
981
|
+
HintsComponent,
|
|
982
|
+
], providers: [
|
|
983
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: FilePickerComponent, multi: true }
|
|
984
|
+
], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<ds-file-picker (click)=\"inputFile.click(); markAsTouched()\" droppable (onDrop)=\"captureFile($event)\">\r\n <input\r\n id=\"file\"\r\n type=\"file\"\r\n #inputFile\r\n [style.display]=\"'none'\"\r\n [formControl]=\"ctrl\"\r\n [multiple]=\"multiple()\"\r\n [accept]=\"accept()\"\r\n (change)=\"captureFile($any($event.target).files)\"\r\n />\r\n</ds-file-picker>\r\n\r\n<iss-ctrl-hints [hints]=\"hints()\" [touched]=\"touched()\"/>\r\n@if (attachments().length) {\r\n <section class=\"files-list\">\r\n @for (file of attachments(); track $index) {\r\n <div class=\"file-item-container\">\r\n @if (file) {\r\n <ds-attachments\r\n [matTooltip]=\"file.name\"\r\n [file]=\"file\"\r\n [showDownload]=\"showDownloadButton()\"\r\n [showActions]=\"showDeleteButton()\"\r\n (downloadEvent)=\"onDownload($event)\"\r\n (deleteEvent)=\"onDelete($index)\"\r\n >\r\n </ds-attachments>\r\n }\r\n </div>\r\n }\r\n </section>\r\n}\r\n", styles: [".file-uploader{--uploader-height: 150px;--uploader-width: 100%;--uploader-bg: var(--off-white);--uploader-border: 1px dashed var(--dark-gray);--uploader-radius: var(--box-radius);--uploader-padding: 1rem;height:var(--uploader-height);background-color:var(--uploader-bg);border:var(--uploader-border);border-radius:var(--uploader-radius);padding:var(--uploader-padding);text-align:center;cursor:pointer}.file-uploader--input{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:.75rem}.insideTableStyle{width:272px}.files-list{--file-item-width: 270px;display:grid;grid-template-columns:repeat(auto-fill,var(--file-item-width));grid-gap:.5rem}@media (max-width: 768px){.files-list{grid-template-columns:repeat(auto-fill,minmax(var(--file-item-width),1fr))}}.files-list .file-item-container .file-item{--file-bg: var(--off-white);--file-radius: var(--box-radius);--icon-color: var(--purple);--icon-size: 2rem;--file-border: transparent;display:flex;align-items:center;background-color:var(--file-bg);border:1px solid var(--file-border);border-radius:var(--file-radius);padding:0 1rem;height:70px;gap:.75rem}.files-list .file-item-container .file-item.error{--file-bg: rgba(var(--rgb-red), 10%);--file-border: var(--red);--icon-color: var(--red)}.files-list .file-item-container .file-item .icon{color:var(--icon-color);font-size:var(--icon-size)}.files-list .file-item-container .file-item .file-action{display:flex;align-items:center;gap:.5rem}ds-attachments::part(base){--file-width: 250px}::ng-deep .file-item .name-size{display:flex;flex-direction:column;justify-content:center;flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:120px}\n"] }]
|
|
985
|
+
}] });
|
|
986
|
+
|
|
987
|
+
class InputComponent extends BaseCtrl {
|
|
988
|
+
constructor() {
|
|
989
|
+
super(...arguments);
|
|
990
|
+
this.type = input("text");
|
|
991
|
+
}
|
|
992
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: InputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
993
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.0", type: InputComponent, isStandalone: true, selector: "iss-ctrl-input", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
994
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: InputComponent, multi: true }
|
|
995
|
+
], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance=\"outline\">\r\n <input\r\n (blur)=\"markAsTouched()\"\r\n (input)=\"emitOnChangeEvent()\"\r\n [formControl]=\"ctrl\"\r\n [maxlength]=\"max()\"\r\n [minlength]=\"min()\"\r\n [placeholder]=\"placeholder()\"\r\n [type]=\"type()\"\r\n matInput\r\n />\r\n <iss-ctrl-hints [hints]=\"hints()\"/>\r\n</mat-form-field>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: HintsComponent, selector: "iss-ctrl-hints", inputs: ["hints", "touched"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
996
|
+
}
|
|
997
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: InputComponent, decorators: [{
|
|
998
|
+
type: Component,
|
|
999
|
+
args: [{ selector: "iss-ctrl-input", standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1000
|
+
MatFormFieldModule,
|
|
1001
|
+
MatInputModule,
|
|
1002
|
+
ReactiveFormsModule,
|
|
1003
|
+
HintsComponent
|
|
1004
|
+
], providers: [
|
|
1005
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: InputComponent, multi: true }
|
|
1006
|
+
], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<mat-form-field appearance=\"outline\">\r\n <input\r\n (blur)=\"markAsTouched()\"\r\n (input)=\"emitOnChangeEvent()\"\r\n [formControl]=\"ctrl\"\r\n [maxlength]=\"max()\"\r\n [minlength]=\"min()\"\r\n [placeholder]=\"placeholder()\"\r\n [type]=\"type()\"\r\n matInput\r\n />\r\n <iss-ctrl-hints [hints]=\"hints()\"/>\r\n</mat-form-field>\r\n" }]
|
|
1007
|
+
}] });
|
|
1008
|
+
|
|
1009
|
+
const COUNTRIES = [
|
|
1010
|
+
{
|
|
1011
|
+
"name": "Afghanistan (افغانستان)",
|
|
1012
|
+
"code": "af",
|
|
1013
|
+
"dailCode": "93",
|
|
1014
|
+
"priority": 0,
|
|
1015
|
+
"order": 0,
|
|
1016
|
+
"placeholder": "701234567"
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
"name": "Albania (Shqipëri)",
|
|
1020
|
+
"code": "al",
|
|
1021
|
+
"dailCode": "355",
|
|
1022
|
+
"priority": 0,
|
|
1023
|
+
"order": 0,
|
|
1024
|
+
"placeholder": "672123456"
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
"name": "Algeria (الجزائر)",
|
|
1028
|
+
"code": "dz",
|
|
1029
|
+
"dailCode": "213",
|
|
1030
|
+
"priority": 0,
|
|
1031
|
+
"order": 0,
|
|
1032
|
+
"placeholder": "551234567"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"name": "American Samoa",
|
|
1036
|
+
"code": "as",
|
|
1037
|
+
"dailCode": "1",
|
|
1038
|
+
"priority": 1,
|
|
1039
|
+
"order": 0,
|
|
1040
|
+
"areaCodes": [
|
|
1041
|
+
"684"
|
|
1042
|
+
],
|
|
1043
|
+
"placeholder": "6847331234"
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
"name": "Andorra",
|
|
1047
|
+
"code": "ad",
|
|
1048
|
+
"dailCode": "376",
|
|
1049
|
+
"priority": 0,
|
|
1050
|
+
"order": 0,
|
|
1051
|
+
"placeholder": "312345"
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
"name": "Angola",
|
|
1055
|
+
"code": "ao",
|
|
1056
|
+
"dailCode": "244",
|
|
1057
|
+
"priority": 0,
|
|
1058
|
+
"order": 0,
|
|
1059
|
+
"placeholder": "923123456"
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"name": "Anguilla",
|
|
1063
|
+
"code": "ai",
|
|
1064
|
+
"dailCode": "1",
|
|
1065
|
+
"priority": 1,
|
|
1066
|
+
"order": 0,
|
|
1067
|
+
"areaCodes": [
|
|
1068
|
+
"264"
|
|
1069
|
+
],
|
|
1070
|
+
"placeholder": "2642351234"
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
"name": "Antigua and Barbuda",
|
|
1074
|
+
"code": "ag",
|
|
1075
|
+
"dailCode": "1",
|
|
1076
|
+
"priority": 1,
|
|
1077
|
+
"order": 0,
|
|
1078
|
+
"areaCodes": [
|
|
1079
|
+
"268"
|
|
1080
|
+
],
|
|
1081
|
+
"placeholder": "2684641234"
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
"name": "Argentina",
|
|
1085
|
+
"code": "ar",
|
|
1086
|
+
"dailCode": "54",
|
|
1087
|
+
"priority": 0,
|
|
1088
|
+
"order": 0,
|
|
1089
|
+
"placeholder": "91123456789"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"name": "Armenia (Հայաստան)",
|
|
1093
|
+
"code": "am",
|
|
1094
|
+
"dailCode": "374",
|
|
1095
|
+
"priority": 0,
|
|
1096
|
+
"order": 0,
|
|
1097
|
+
"placeholder": "77123456"
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
"name": "Aruba",
|
|
1101
|
+
"code": "aw",
|
|
1102
|
+
"dailCode": "297",
|
|
1103
|
+
"priority": 0,
|
|
1104
|
+
"order": 0,
|
|
1105
|
+
"placeholder": "5601234"
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
"name": "Australia",
|
|
1109
|
+
"code": "au",
|
|
1110
|
+
"dailCode": "61",
|
|
1111
|
+
"priority": 0,
|
|
1112
|
+
"order": 0,
|
|
1113
|
+
"placeholder": "412345678"
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
"name": "Austria (Österreich)",
|
|
1117
|
+
"code": "at",
|
|
1118
|
+
"dailCode": "43",
|
|
1119
|
+
"priority": 0,
|
|
1120
|
+
"order": 0,
|
|
1121
|
+
"placeholder": "664123456"
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
"name": "Azerbaijan (Azərbaycan)",
|
|
1125
|
+
"code": "az",
|
|
1126
|
+
"dailCode": "994",
|
|
1127
|
+
"priority": 0,
|
|
1128
|
+
"order": 0,
|
|
1129
|
+
"placeholder": "401234567"
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
"name": "Bahamas",
|
|
1133
|
+
"code": "bs",
|
|
1134
|
+
"dailCode": "1",
|
|
1135
|
+
"priority": 1,
|
|
1136
|
+
"order": 0,
|
|
1137
|
+
"areaCodes": [
|
|
1138
|
+
"242"
|
|
1139
|
+
],
|
|
1140
|
+
"placeholder": "2423591234"
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
"name": "Bahrain (البحرين)",
|
|
1144
|
+
"code": "bh",
|
|
1145
|
+
"dailCode": "973",
|
|
1146
|
+
"priority": 0,
|
|
1147
|
+
"order": 0,
|
|
1148
|
+
"placeholder": "36001234"
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
"name": "Bangladesh (বাংলাদেশ)",
|
|
1152
|
+
"code": "bd",
|
|
1153
|
+
"dailCode": "880",
|
|
1154
|
+
"priority": 0,
|
|
1155
|
+
"order": 0,
|
|
1156
|
+
"placeholder": "1812345678"
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
"name": "Barbados",
|
|
1160
|
+
"code": "bb",
|
|
1161
|
+
"dailCode": "1",
|
|
1162
|
+
"priority": 1,
|
|
1163
|
+
"order": 0,
|
|
1164
|
+
"areaCodes": [
|
|
1165
|
+
"246"
|
|
1166
|
+
],
|
|
1167
|
+
"placeholder": "2462501234"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"name": "Belarus (Беларусь)",
|
|
1171
|
+
"code": "by",
|
|
1172
|
+
"dailCode": "375",
|
|
1173
|
+
"priority": 0,
|
|
1174
|
+
"order": 0,
|
|
1175
|
+
"placeholder": "294911911"
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
"name": "Belgium (België)",
|
|
1179
|
+
"code": "be",
|
|
1180
|
+
"dailCode": "32",
|
|
1181
|
+
"priority": 0,
|
|
1182
|
+
"order": 0,
|
|
1183
|
+
"placeholder": "470123456"
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
"name": "Belize",
|
|
1187
|
+
"code": "bz",
|
|
1188
|
+
"dailCode": "501",
|
|
1189
|
+
"priority": 0,
|
|
1190
|
+
"order": 0,
|
|
1191
|
+
"placeholder": "6221234"
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
"name": "Benin (Bénin)",
|
|
1195
|
+
"code": "bj",
|
|
1196
|
+
"dailCode": "229",
|
|
1197
|
+
"priority": 0,
|
|
1198
|
+
"order": 0,
|
|
1199
|
+
"placeholder": "90011234"
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
"name": "Bermuda",
|
|
1203
|
+
"code": "bm",
|
|
1204
|
+
"dailCode": "1",
|
|
1205
|
+
"priority": 1,
|
|
1206
|
+
"order": 0,
|
|
1207
|
+
"areaCodes": [
|
|
1208
|
+
"441"
|
|
1209
|
+
],
|
|
1210
|
+
"placeholder": "4413701234"
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
"name": "Bhutan (འབྲུག)",
|
|
1214
|
+
"code": "bt",
|
|
1215
|
+
"dailCode": "975",
|
|
1216
|
+
"priority": 0,
|
|
1217
|
+
"order": 0,
|
|
1218
|
+
"placeholder": "17123456"
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
"name": "Bolivia",
|
|
1222
|
+
"code": "bo",
|
|
1223
|
+
"dailCode": "591",
|
|
1224
|
+
"priority": 0,
|
|
1225
|
+
"order": 0,
|
|
1226
|
+
"placeholder": "71234567"
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
"name": "Bosnia and Herzegovina (Босна и Херцеговина)",
|
|
1230
|
+
"code": "ba",
|
|
1231
|
+
"dailCode": "387",
|
|
1232
|
+
"priority": 0,
|
|
1233
|
+
"order": 0,
|
|
1234
|
+
"placeholder": "61123456"
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
"name": "Botswana",
|
|
1238
|
+
"code": "bw",
|
|
1239
|
+
"dailCode": "267",
|
|
1240
|
+
"priority": 0,
|
|
1241
|
+
"order": 0,
|
|
1242
|
+
"placeholder": "71123456"
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
"name": "Brazil (Brasil)",
|
|
1246
|
+
"code": "br",
|
|
1247
|
+
"dailCode": "55",
|
|
1248
|
+
"priority": 0,
|
|
1249
|
+
"order": 0,
|
|
1250
|
+
"placeholder": "11961234567"
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
"name": "British Indian Ocean Territory",
|
|
1254
|
+
"code": "io",
|
|
1255
|
+
"dailCode": "246",
|
|
1256
|
+
"priority": 0,
|
|
1257
|
+
"order": 0,
|
|
1258
|
+
"placeholder": "3801234"
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
"name": "British Virgin Islands",
|
|
1262
|
+
"code": "vg",
|
|
1263
|
+
"dailCode": "1",
|
|
1264
|
+
"priority": 1,
|
|
1265
|
+
"order": 0,
|
|
1266
|
+
"areaCodes": [
|
|
1267
|
+
"284"
|
|
1268
|
+
],
|
|
1269
|
+
"placeholder": "2843001234"
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
"name": "Brunei",
|
|
1273
|
+
"code": "bn",
|
|
1274
|
+
"dailCode": "673",
|
|
1275
|
+
"priority": 0,
|
|
1276
|
+
"order": 0,
|
|
1277
|
+
"placeholder": "7123456"
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
"name": "Bulgaria (България)",
|
|
1281
|
+
"code": "bg",
|
|
1282
|
+
"dailCode": "359",
|
|
1283
|
+
"priority": 0,
|
|
1284
|
+
"order": 0,
|
|
1285
|
+
"placeholder": "43012345"
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
"name": "Burkina Faso",
|
|
1289
|
+
"code": "bf",
|
|
1290
|
+
"dailCode": "226",
|
|
1291
|
+
"priority": 0,
|
|
1292
|
+
"order": 0,
|
|
1293
|
+
"placeholder": "70123456"
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
"name": "Burundi (Uburundi)",
|
|
1297
|
+
"code": "bi",
|
|
1298
|
+
"dailCode": "257",
|
|
1299
|
+
"priority": 0,
|
|
1300
|
+
"order": 0,
|
|
1301
|
+
"placeholder": "79561234"
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"name": "Cambodia (កម្ពុជា)",
|
|
1305
|
+
"code": "kh",
|
|
1306
|
+
"dailCode": "855",
|
|
1307
|
+
"priority": 0,
|
|
1308
|
+
"order": 0,
|
|
1309
|
+
"placeholder": "91234567"
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
"name": "Cameroon (Cameroun)",
|
|
1313
|
+
"code": "cm",
|
|
1314
|
+
"dailCode": "237",
|
|
1315
|
+
"priority": 0,
|
|
1316
|
+
"order": 0,
|
|
1317
|
+
"placeholder": "671234567"
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
"name": "Canada",
|
|
1321
|
+
"code": "ca",
|
|
1322
|
+
"dailCode": "1",
|
|
1323
|
+
"priority": 1,
|
|
1324
|
+
"order": 0,
|
|
1325
|
+
"areaCodes": [
|
|
1326
|
+
"204",
|
|
1327
|
+
"226",
|
|
1328
|
+
"236",
|
|
1329
|
+
"249",
|
|
1330
|
+
"250",
|
|
1331
|
+
"289",
|
|
1332
|
+
"306",
|
|
1333
|
+
"343",
|
|
1334
|
+
"365",
|
|
1335
|
+
"387",
|
|
1336
|
+
"403",
|
|
1337
|
+
"416",
|
|
1338
|
+
"418",
|
|
1339
|
+
"431",
|
|
1340
|
+
"437",
|
|
1341
|
+
"438",
|
|
1342
|
+
"450",
|
|
1343
|
+
"506",
|
|
1344
|
+
"514",
|
|
1345
|
+
"519",
|
|
1346
|
+
"548",
|
|
1347
|
+
"579",
|
|
1348
|
+
"581",
|
|
1349
|
+
"587",
|
|
1350
|
+
"604",
|
|
1351
|
+
"613",
|
|
1352
|
+
"639",
|
|
1353
|
+
"647",
|
|
1354
|
+
"672",
|
|
1355
|
+
"705",
|
|
1356
|
+
"709",
|
|
1357
|
+
"742",
|
|
1358
|
+
"778",
|
|
1359
|
+
"780",
|
|
1360
|
+
"782",
|
|
1361
|
+
"807",
|
|
1362
|
+
"819",
|
|
1363
|
+
"825",
|
|
1364
|
+
"867",
|
|
1365
|
+
"873",
|
|
1366
|
+
"902",
|
|
1367
|
+
"905"
|
|
1368
|
+
],
|
|
1369
|
+
"placeholder": "5062345678"
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
"name": "Cape Verde (Kabu Verdi)",
|
|
1373
|
+
"code": "cv",
|
|
1374
|
+
"dailCode": "238",
|
|
1375
|
+
"priority": 0,
|
|
1376
|
+
"order": 0,
|
|
1377
|
+
"placeholder": "9911234"
|
|
1378
|
+
},
|
|
1379
|
+
{
|
|
1380
|
+
"name": "Caribbean Netherlands",
|
|
1381
|
+
"code": "bq",
|
|
1382
|
+
"dailCode": "599",
|
|
1383
|
+
"priority": 1,
|
|
1384
|
+
"order": 0,
|
|
1385
|
+
"placeholder": "3181234"
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
"name": "Cayman Islands",
|
|
1389
|
+
"code": "ky",
|
|
1390
|
+
"dailCode": "1",
|
|
1391
|
+
"priority": 1,
|
|
1392
|
+
"order": 0,
|
|
1393
|
+
"areaCodes": [
|
|
1394
|
+
"345"
|
|
1395
|
+
],
|
|
1396
|
+
"placeholder": "3453231234"
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
"name": "Central African Republic (République centrafricaine)",
|
|
1400
|
+
"code": "cf",
|
|
1401
|
+
"dailCode": "236",
|
|
1402
|
+
"priority": 0,
|
|
1403
|
+
"order": 0,
|
|
1404
|
+
"placeholder": "70012345"
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
"name": "Chad (Tchad)",
|
|
1408
|
+
"code": "td",
|
|
1409
|
+
"dailCode": "235",
|
|
1410
|
+
"priority": 0,
|
|
1411
|
+
"order": 0,
|
|
1412
|
+
"placeholder": "63012345"
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
"name": "Chile",
|
|
1416
|
+
"code": "cl",
|
|
1417
|
+
"dailCode": "56",
|
|
1418
|
+
"priority": 0,
|
|
1419
|
+
"order": 0,
|
|
1420
|
+
"placeholder": "221234567"
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
"name": "China (中国)",
|
|
1424
|
+
"code": "cn",
|
|
1425
|
+
"dailCode": "86",
|
|
1426
|
+
"priority": 0,
|
|
1427
|
+
"order": 0,
|
|
1428
|
+
"placeholder": "13123456789"
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
"name": "Christmas Island",
|
|
1432
|
+
"code": "cx",
|
|
1433
|
+
"dailCode": "61",
|
|
1434
|
+
"priority": 2,
|
|
1435
|
+
"order": 0,
|
|
1436
|
+
"placeholder": "412345678"
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
"name": "Cocos (Keeling) Islands",
|
|
1440
|
+
"code": "cc",
|
|
1441
|
+
"dailCode": "61",
|
|
1442
|
+
"priority": 1,
|
|
1443
|
+
"order": 0,
|
|
1444
|
+
"placeholder": "412345678"
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
"name": "Colombia",
|
|
1448
|
+
"code": "co",
|
|
1449
|
+
"dailCode": "57",
|
|
1450
|
+
"priority": 0,
|
|
1451
|
+
"order": 0,
|
|
1452
|
+
"placeholder": "3211234567"
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
"name": "Comoros (جزر القمر)",
|
|
1456
|
+
"code": "km",
|
|
1457
|
+
"dailCode": "269",
|
|
1458
|
+
"priority": 0,
|
|
1459
|
+
"order": 0,
|
|
1460
|
+
"placeholder": "3212345"
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
"name": "Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)",
|
|
1464
|
+
"code": "cd",
|
|
1465
|
+
"dailCode": "243",
|
|
1466
|
+
"priority": 0,
|
|
1467
|
+
"order": 0,
|
|
1468
|
+
"placeholder": "991234567"
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
"name": "Congo (Republic) (Congo-Brazzaville)",
|
|
1472
|
+
"code": "cg",
|
|
1473
|
+
"dailCode": "242",
|
|
1474
|
+
"priority": 0,
|
|
1475
|
+
"order": 0,
|
|
1476
|
+
"placeholder": "061234567"
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"name": "Cook Islands",
|
|
1480
|
+
"code": "ck",
|
|
1481
|
+
"dailCode": "682",
|
|
1482
|
+
"priority": 0,
|
|
1483
|
+
"order": 0,
|
|
1484
|
+
"placeholder": "71234"
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
"name": "Costa Rica",
|
|
1488
|
+
"code": "cr",
|
|
1489
|
+
"dailCode": "506",
|
|
1490
|
+
"priority": 0,
|
|
1491
|
+
"order": 0,
|
|
1492
|
+
"placeholder": "83123456"
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
"name": "Côte d’Ivoire",
|
|
1496
|
+
"code": "ci",
|
|
1497
|
+
"dailCode": "225",
|
|
1498
|
+
"priority": 0,
|
|
1499
|
+
"order": 0,
|
|
1500
|
+
"placeholder": "0123456789"
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
"name": "Croatia (Hrvatska)",
|
|
1504
|
+
"code": "hr",
|
|
1505
|
+
"dailCode": "385",
|
|
1506
|
+
"priority": 0,
|
|
1507
|
+
"order": 0,
|
|
1508
|
+
"placeholder": "921234567"
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
"name": "Cuba",
|
|
1512
|
+
"code": "cu",
|
|
1513
|
+
"dailCode": "53",
|
|
1514
|
+
"priority": 0,
|
|
1515
|
+
"order": 0,
|
|
1516
|
+
"placeholder": "51234567"
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
"name": "Curaçao",
|
|
1520
|
+
"code": "cw",
|
|
1521
|
+
"dailCode": "599",
|
|
1522
|
+
"priority": 0,
|
|
1523
|
+
"order": 0,
|
|
1524
|
+
"placeholder": "95181234"
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
"name": "Cyprus (Κύπρος)",
|
|
1528
|
+
"code": "cy",
|
|
1529
|
+
"dailCode": "357",
|
|
1530
|
+
"priority": 0,
|
|
1531
|
+
"order": 0,
|
|
1532
|
+
"placeholder": "96123456"
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
"name": "Czech Republic (Česká republika)",
|
|
1536
|
+
"code": "cz",
|
|
1537
|
+
"dailCode": "420",
|
|
1538
|
+
"priority": 0,
|
|
1539
|
+
"order": 0,
|
|
1540
|
+
"placeholder": "601123456"
|
|
1541
|
+
},
|
|
1542
|
+
{
|
|
1543
|
+
"name": "Denmark (Danmark)",
|
|
1544
|
+
"code": "dk",
|
|
1545
|
+
"dailCode": "45",
|
|
1546
|
+
"priority": 0,
|
|
1547
|
+
"order": 0,
|
|
1548
|
+
"placeholder": "34412345"
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
"name": "Djibouti",
|
|
1552
|
+
"code": "dj",
|
|
1553
|
+
"dailCode": "253",
|
|
1554
|
+
"priority": 0,
|
|
1555
|
+
"order": 0,
|
|
1556
|
+
"placeholder": "77831001"
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
"name": "Dominica",
|
|
1560
|
+
"code": "dm",
|
|
1561
|
+
"dailCode": "1767",
|
|
1562
|
+
"priority": 0,
|
|
1563
|
+
"order": 0,
|
|
1564
|
+
"placeholder": "7672251234"
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
"name": "Dominican Republic (República Dominicana)",
|
|
1568
|
+
"code": "do",
|
|
1569
|
+
"dailCode": "1",
|
|
1570
|
+
"priority": 2,
|
|
1571
|
+
"order": 0,
|
|
1572
|
+
"areaCodes": [
|
|
1573
|
+
"809",
|
|
1574
|
+
"829",
|
|
1575
|
+
"849"
|
|
1576
|
+
],
|
|
1577
|
+
"placeholder": "8092345678"
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
"name": "Ecuador",
|
|
1581
|
+
"code": "ec",
|
|
1582
|
+
"dailCode": "593",
|
|
1583
|
+
"priority": 0,
|
|
1584
|
+
"order": 0,
|
|
1585
|
+
"placeholder": "991234567"
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
"name": "Egypt (مصر)",
|
|
1589
|
+
"code": "eg",
|
|
1590
|
+
"dailCode": "20",
|
|
1591
|
+
"priority": 0,
|
|
1592
|
+
"order": 0,
|
|
1593
|
+
"placeholder": "1001234567"
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
"name": "El Salvador",
|
|
1597
|
+
"code": "sv",
|
|
1598
|
+
"dailCode": "503",
|
|
1599
|
+
"priority": 0,
|
|
1600
|
+
"order": 0,
|
|
1601
|
+
"placeholder": "70123456"
|
|
1602
|
+
},
|
|
1603
|
+
{
|
|
1604
|
+
"name": "Equatorial Guinea (Guinea Ecuatorial)",
|
|
1605
|
+
"code": "gq",
|
|
1606
|
+
"dailCode": "240",
|
|
1607
|
+
"priority": 0,
|
|
1608
|
+
"order": 0,
|
|
1609
|
+
"placeholder": "222123456"
|
|
1610
|
+
},
|
|
1611
|
+
{
|
|
1612
|
+
"name": "Eritrea",
|
|
1613
|
+
"code": "er",
|
|
1614
|
+
"dailCode": "291",
|
|
1615
|
+
"priority": 0,
|
|
1616
|
+
"order": 0,
|
|
1617
|
+
"placeholder": "7123456"
|
|
1618
|
+
},
|
|
1619
|
+
{
|
|
1620
|
+
"name": "Estonia (Eesti)",
|
|
1621
|
+
"code": "ee",
|
|
1622
|
+
"dailCode": "372",
|
|
1623
|
+
"priority": 0,
|
|
1624
|
+
"order": 0,
|
|
1625
|
+
"placeholder": "51234567"
|
|
1626
|
+
},
|
|
1627
|
+
{
|
|
1628
|
+
"name": "Ethiopia",
|
|
1629
|
+
"code": "et",
|
|
1630
|
+
"dailCode": "251",
|
|
1631
|
+
"priority": 0,
|
|
1632
|
+
"order": 0,
|
|
1633
|
+
"placeholder": "911234567"
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
"name": "Falkland Islands (Islas Malvinas)",
|
|
1637
|
+
"code": "fk",
|
|
1638
|
+
"dailCode": "500",
|
|
1639
|
+
"priority": 0,
|
|
1640
|
+
"order": 0,
|
|
1641
|
+
"placeholder": "51234"
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
"name": "Faroe Islands (Føroyar)",
|
|
1645
|
+
"code": "fo",
|
|
1646
|
+
"dailCode": "298",
|
|
1647
|
+
"priority": 0,
|
|
1648
|
+
"order": 0,
|
|
1649
|
+
"placeholder": "211234"
|
|
1650
|
+
},
|
|
1651
|
+
{
|
|
1652
|
+
"name": "Fiji",
|
|
1653
|
+
"code": "fj",
|
|
1654
|
+
"dailCode": "679",
|
|
1655
|
+
"priority": 0,
|
|
1656
|
+
"order": 0,
|
|
1657
|
+
"placeholder": "7012345"
|
|
1658
|
+
},
|
|
1659
|
+
{
|
|
1660
|
+
"name": "Finland (Suomi)",
|
|
1661
|
+
"code": "fi",
|
|
1662
|
+
"dailCode": "358",
|
|
1663
|
+
"priority": 0,
|
|
1664
|
+
"order": 0,
|
|
1665
|
+
"placeholder": "412345678"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
"name": "France",
|
|
1669
|
+
"code": "fr",
|
|
1670
|
+
"dailCode": "33",
|
|
1671
|
+
"priority": 0,
|
|
1672
|
+
"order": 0,
|
|
1673
|
+
"placeholder": "612345678"
|
|
1674
|
+
},
|
|
1675
|
+
{
|
|
1676
|
+
"name": "French Guiana (Guyane française)",
|
|
1677
|
+
"code": "gf",
|
|
1678
|
+
"dailCode": "594",
|
|
1679
|
+
"priority": 0,
|
|
1680
|
+
"order": 0,
|
|
1681
|
+
"placeholder": "694201234"
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
"name": "French Polynesia (Polynésie française)",
|
|
1685
|
+
"code": "pf",
|
|
1686
|
+
"dailCode": "689",
|
|
1687
|
+
"priority": 0,
|
|
1688
|
+
"order": 0,
|
|
1689
|
+
"placeholder": "87123456"
|
|
1690
|
+
},
|
|
1691
|
+
{
|
|
1692
|
+
"name": "Gabon",
|
|
1693
|
+
"code": "ga",
|
|
1694
|
+
"dailCode": "241",
|
|
1695
|
+
"priority": 0,
|
|
1696
|
+
"order": 0,
|
|
1697
|
+
"placeholder": "06031234"
|
|
1698
|
+
},
|
|
1699
|
+
{
|
|
1700
|
+
"name": "Gambia",
|
|
1701
|
+
"code": "gm",
|
|
1702
|
+
"dailCode": "220",
|
|
1703
|
+
"priority": 0,
|
|
1704
|
+
"order": 0,
|
|
1705
|
+
"placeholder": "3012345"
|
|
1706
|
+
},
|
|
1707
|
+
{
|
|
1708
|
+
"name": "Georgia (საქართველო)",
|
|
1709
|
+
"code": "ge",
|
|
1710
|
+
"dailCode": "995",
|
|
1711
|
+
"priority": 0,
|
|
1712
|
+
"order": 0,
|
|
1713
|
+
"placeholder": "555123456"
|
|
1714
|
+
},
|
|
1715
|
+
{
|
|
1716
|
+
"name": "Germany (Deutschland)",
|
|
1717
|
+
"code": "de",
|
|
1718
|
+
"dailCode": "49",
|
|
1719
|
+
"priority": 0,
|
|
1720
|
+
"order": 0,
|
|
1721
|
+
"placeholder": "15123456789"
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
"name": "Ghana (Gaana)",
|
|
1725
|
+
"code": "gh",
|
|
1726
|
+
"dailCode": "233",
|
|
1727
|
+
"priority": 0,
|
|
1728
|
+
"order": 0,
|
|
1729
|
+
"placeholder": "231234567"
|
|
1730
|
+
},
|
|
1731
|
+
{
|
|
1732
|
+
"name": "Gibraltar",
|
|
1733
|
+
"code": "gi",
|
|
1734
|
+
"dailCode": "350",
|
|
1735
|
+
"priority": 0,
|
|
1736
|
+
"order": 0,
|
|
1737
|
+
"placeholder": "57123456"
|
|
1738
|
+
},
|
|
1739
|
+
{
|
|
1740
|
+
"name": "Greece (Ελλάδα)",
|
|
1741
|
+
"code": "gr",
|
|
1742
|
+
"dailCode": "30",
|
|
1743
|
+
"priority": 0,
|
|
1744
|
+
"order": 0,
|
|
1745
|
+
"placeholder": "6912345678"
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
"name": "Greenland (Kalaallit Nunaat)",
|
|
1749
|
+
"code": "gl",
|
|
1750
|
+
"dailCode": "299",
|
|
1751
|
+
"priority": 0,
|
|
1752
|
+
"order": 0,
|
|
1753
|
+
"placeholder": "221234"
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
"name": "Grenada",
|
|
1757
|
+
"code": "gd",
|
|
1758
|
+
"dailCode": "1473",
|
|
1759
|
+
"priority": 0,
|
|
1760
|
+
"order": 0,
|
|
1761
|
+
"placeholder": "4734031234"
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
"name": "Guadeloupe",
|
|
1765
|
+
"code": "gp",
|
|
1766
|
+
"dailCode": "590",
|
|
1767
|
+
"priority": 0,
|
|
1768
|
+
"order": 0,
|
|
1769
|
+
"placeholder": "690001234"
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
"name": "Guam",
|
|
1773
|
+
"code": "gu",
|
|
1774
|
+
"dailCode": "1",
|
|
1775
|
+
"priority": 1,
|
|
1776
|
+
"order": 0,
|
|
1777
|
+
"areaCodes": [
|
|
1778
|
+
"671"
|
|
1779
|
+
],
|
|
1780
|
+
"placeholder": "6713001234"
|
|
1781
|
+
},
|
|
1782
|
+
{
|
|
1783
|
+
"name": "Guatemala",
|
|
1784
|
+
"code": "gt",
|
|
1785
|
+
"dailCode": "502",
|
|
1786
|
+
"priority": 0,
|
|
1787
|
+
"order": 0,
|
|
1788
|
+
"placeholder": "51234567"
|
|
1789
|
+
},
|
|
1790
|
+
{
|
|
1791
|
+
"name": "Guernsey",
|
|
1792
|
+
"code": "gg",
|
|
1793
|
+
"dailCode": "44",
|
|
1794
|
+
"priority": 1,
|
|
1795
|
+
"order": 0,
|
|
1796
|
+
"areaCodes": [
|
|
1797
|
+
"1481"
|
|
1798
|
+
],
|
|
1799
|
+
"placeholder": "7781123456"
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
"name": "Guinea (Guinée)",
|
|
1803
|
+
"code": "gn",
|
|
1804
|
+
"dailCode": "224",
|
|
1805
|
+
"priority": 0,
|
|
1806
|
+
"order": 0,
|
|
1807
|
+
"placeholder": "601123456"
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
"name": "Guinea-Bissau (Guiné Bissau)",
|
|
1811
|
+
"code": "gw",
|
|
1812
|
+
"dailCode": "245",
|
|
1813
|
+
"priority": 0,
|
|
1814
|
+
"order": 0,
|
|
1815
|
+
"placeholder": "955012345"
|
|
1816
|
+
},
|
|
1817
|
+
{
|
|
1818
|
+
"name": "Guyana",
|
|
1819
|
+
"code": "gy",
|
|
1820
|
+
"dailCode": "592",
|
|
1821
|
+
"priority": 0,
|
|
1822
|
+
"order": 0,
|
|
1823
|
+
"placeholder": "6091234"
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
"name": "Haiti",
|
|
1827
|
+
"code": "ht",
|
|
1828
|
+
"dailCode": "509",
|
|
1829
|
+
"priority": 0,
|
|
1830
|
+
"order": 0,
|
|
1831
|
+
"placeholder": "34101234"
|
|
1832
|
+
},
|
|
1833
|
+
{
|
|
1834
|
+
"name": "Honduras",
|
|
1835
|
+
"code": "hn",
|
|
1836
|
+
"dailCode": "504",
|
|
1837
|
+
"priority": 0,
|
|
1838
|
+
"order": 0,
|
|
1839
|
+
"placeholder": "91234567"
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
1842
|
+
"name": "Hong Kong (香港)",
|
|
1843
|
+
"code": "hk",
|
|
1844
|
+
"dailCode": "852",
|
|
1845
|
+
"priority": 0,
|
|
1846
|
+
"order": 0,
|
|
1847
|
+
"placeholder": "51234567"
|
|
1848
|
+
},
|
|
1849
|
+
{
|
|
1850
|
+
"name": "Hungary (Magyarország)",
|
|
1851
|
+
"code": "hu",
|
|
1852
|
+
"dailCode": "36",
|
|
1853
|
+
"priority": 0,
|
|
1854
|
+
"order": 0,
|
|
1855
|
+
"placeholder": "201234567"
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
"name": "Iceland (Ísland)",
|
|
1859
|
+
"code": "is",
|
|
1860
|
+
"dailCode": "354",
|
|
1861
|
+
"priority": 0,
|
|
1862
|
+
"order": 0,
|
|
1863
|
+
"placeholder": "6111234"
|
|
1864
|
+
},
|
|
1865
|
+
{
|
|
1866
|
+
"name": "India (भारत)",
|
|
1867
|
+
"code": "in",
|
|
1868
|
+
"dailCode": "91",
|
|
1869
|
+
"priority": 0,
|
|
1870
|
+
"order": 0,
|
|
1871
|
+
"placeholder": "8123456789"
|
|
1872
|
+
},
|
|
1873
|
+
{
|
|
1874
|
+
"name": "Indonesia",
|
|
1875
|
+
"code": "id",
|
|
1876
|
+
"dailCode": "62",
|
|
1877
|
+
"priority": 0,
|
|
1878
|
+
"order": 0,
|
|
1879
|
+
"placeholder": "812345678"
|
|
1880
|
+
},
|
|
1881
|
+
{
|
|
1882
|
+
"name": "Iran (ايران)",
|
|
1883
|
+
"code": "ir",
|
|
1884
|
+
"dailCode": "98",
|
|
1885
|
+
"priority": 0,
|
|
1886
|
+
"order": 0,
|
|
1887
|
+
"placeholder": "9123456789"
|
|
1888
|
+
},
|
|
1889
|
+
{
|
|
1890
|
+
"name": "Iraq (العراق)",
|
|
1891
|
+
"code": "iq",
|
|
1892
|
+
"dailCode": "964",
|
|
1893
|
+
"priority": 0,
|
|
1894
|
+
"order": 0,
|
|
1895
|
+
"placeholder": "7912345678"
|
|
1896
|
+
},
|
|
1897
|
+
{
|
|
1898
|
+
"name": "Ireland",
|
|
1899
|
+
"code": "ie",
|
|
1900
|
+
"dailCode": "353",
|
|
1901
|
+
"priority": 0,
|
|
1902
|
+
"order": 0,
|
|
1903
|
+
"placeholder": "850123456"
|
|
1904
|
+
},
|
|
1905
|
+
{
|
|
1906
|
+
"name": "Isle of Man",
|
|
1907
|
+
"code": "im",
|
|
1908
|
+
"dailCode": "44",
|
|
1909
|
+
"priority": 2,
|
|
1910
|
+
"order": 0,
|
|
1911
|
+
"areaCodes": [
|
|
1912
|
+
"1624"
|
|
1913
|
+
],
|
|
1914
|
+
"placeholder": "7924123456"
|
|
1915
|
+
},
|
|
1916
|
+
{
|
|
1917
|
+
"name": "Italy (Italia)",
|
|
1918
|
+
"code": "it",
|
|
1919
|
+
"dailCode": "39",
|
|
1920
|
+
"priority": 0,
|
|
1921
|
+
"order": 0,
|
|
1922
|
+
"placeholder": "3123456789"
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
"name": "Jamaica",
|
|
1926
|
+
"code": "jm",
|
|
1927
|
+
"dailCode": "1",
|
|
1928
|
+
"priority": 1,
|
|
1929
|
+
"order": 0,
|
|
1930
|
+
"areaCodes": [
|
|
1931
|
+
"876"
|
|
1932
|
+
],
|
|
1933
|
+
"placeholder": "8762101234"
|
|
1934
|
+
},
|
|
1935
|
+
{
|
|
1936
|
+
"name": "Japan (日本)",
|
|
1937
|
+
"code": "jp",
|
|
1938
|
+
"dailCode": "81",
|
|
1939
|
+
"priority": 0,
|
|
1940
|
+
"order": 0,
|
|
1941
|
+
"placeholder": "9012345678"
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
"name": "Jersey",
|
|
1945
|
+
"code": "je",
|
|
1946
|
+
"dailCode": "44",
|
|
1947
|
+
"priority": 3,
|
|
1948
|
+
"order": 0,
|
|
1949
|
+
"areaCodes": [
|
|
1950
|
+
"1534"
|
|
1951
|
+
],
|
|
1952
|
+
"placeholder": "7797712345"
|
|
1953
|
+
},
|
|
1954
|
+
{
|
|
1955
|
+
"name": "Jordan (الأردن)",
|
|
1956
|
+
"code": "jo",
|
|
1957
|
+
"dailCode": "962",
|
|
1958
|
+
"priority": 0,
|
|
1959
|
+
"order": 0,
|
|
1960
|
+
"placeholder": "790123456"
|
|
1961
|
+
},
|
|
1962
|
+
{
|
|
1963
|
+
"name": "Kazakhstan (Казахстан)",
|
|
1964
|
+
"code": "kz",
|
|
1965
|
+
"dailCode": "7",
|
|
1966
|
+
"priority": 1,
|
|
1967
|
+
"order": 0,
|
|
1968
|
+
"placeholder": "7710009998"
|
|
1969
|
+
},
|
|
1970
|
+
{
|
|
1971
|
+
"name": "Kenya",
|
|
1972
|
+
"code": "ke",
|
|
1973
|
+
"dailCode": "254",
|
|
1974
|
+
"priority": 0,
|
|
1975
|
+
"order": 0,
|
|
1976
|
+
"placeholder": "712123456"
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
"name": "Kiribati",
|
|
1980
|
+
"code": "ki",
|
|
1981
|
+
"dailCode": "686",
|
|
1982
|
+
"priority": 0,
|
|
1983
|
+
"order": 0,
|
|
1984
|
+
"placeholder": "72001234"
|
|
1985
|
+
},
|
|
1986
|
+
{
|
|
1987
|
+
"name": "Kosovo",
|
|
1988
|
+
"code": "xk",
|
|
1989
|
+
"dailCode": "383",
|
|
1990
|
+
"priority": 0,
|
|
1991
|
+
"order": 0,
|
|
1992
|
+
"placeholder": "43201234"
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
"name": "Kuwait (الكويت)",
|
|
1996
|
+
"code": "kw",
|
|
1997
|
+
"dailCode": "965",
|
|
1998
|
+
"priority": 0,
|
|
1999
|
+
"order": 0,
|
|
2000
|
+
"placeholder": "50012345"
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
"name": "Kyrgyzstan (Кыргызстан)",
|
|
2004
|
+
"code": "kg",
|
|
2005
|
+
"dailCode": "996",
|
|
2006
|
+
"priority": 0,
|
|
2007
|
+
"order": 0,
|
|
2008
|
+
"placeholder": "700123456"
|
|
2009
|
+
},
|
|
2010
|
+
{
|
|
2011
|
+
"name": "Laos (ລາວ)",
|
|
2012
|
+
"code": "la",
|
|
2013
|
+
"dailCode": "856",
|
|
2014
|
+
"priority": 0,
|
|
2015
|
+
"order": 0,
|
|
2016
|
+
"placeholder": "2023123456"
|
|
2017
|
+
},
|
|
2018
|
+
{
|
|
2019
|
+
"name": "Latvia (Latvija)",
|
|
2020
|
+
"code": "lv",
|
|
2021
|
+
"dailCode": "371",
|
|
2022
|
+
"priority": 0,
|
|
2023
|
+
"order": 0,
|
|
2024
|
+
"placeholder": "21234567"
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
"name": "Lebanon (لبنان)",
|
|
2028
|
+
"code": "lb",
|
|
2029
|
+
"dailCode": "961",
|
|
2030
|
+
"priority": 0,
|
|
2031
|
+
"order": 0,
|
|
2032
|
+
"placeholder": "71123456"
|
|
2033
|
+
},
|
|
2034
|
+
{
|
|
2035
|
+
"name": "Lesotho",
|
|
2036
|
+
"code": "ls",
|
|
2037
|
+
"dailCode": "266",
|
|
2038
|
+
"priority": 0,
|
|
2039
|
+
"order": 0,
|
|
2040
|
+
"placeholder": "50123456"
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
"name": "Liberia",
|
|
2044
|
+
"code": "lr",
|
|
2045
|
+
"dailCode": "231",
|
|
2046
|
+
"priority": 0,
|
|
2047
|
+
"order": 0,
|
|
2048
|
+
"placeholder": "770123456"
|
|
2049
|
+
},
|
|
2050
|
+
{
|
|
2051
|
+
"name": "Libya (ليبيا)",
|
|
2052
|
+
"code": "ly",
|
|
2053
|
+
"dailCode": "218",
|
|
2054
|
+
"priority": 0,
|
|
2055
|
+
"order": 0,
|
|
2056
|
+
"placeholder": "912345678"
|
|
2057
|
+
},
|
|
2058
|
+
{
|
|
2059
|
+
"name": "Liechtenstein",
|
|
2060
|
+
"code": "li",
|
|
2061
|
+
"dailCode": "423",
|
|
2062
|
+
"priority": 0,
|
|
2063
|
+
"order": 0,
|
|
2064
|
+
"placeholder": "660234567"
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
"name": "Lithuania (Lietuva)",
|
|
2068
|
+
"code": "lt",
|
|
2069
|
+
"dailCode": "370",
|
|
2070
|
+
"priority": 0,
|
|
2071
|
+
"order": 0,
|
|
2072
|
+
"placeholder": "61234567"
|
|
2073
|
+
},
|
|
2074
|
+
{
|
|
2075
|
+
"name": "Luxembourg",
|
|
2076
|
+
"code": "lu",
|
|
2077
|
+
"dailCode": "352",
|
|
2078
|
+
"priority": 0,
|
|
2079
|
+
"order": 0,
|
|
2080
|
+
"placeholder": "628123456"
|
|
2081
|
+
},
|
|
2082
|
+
{
|
|
2083
|
+
"name": "Macau (澳門)",
|
|
2084
|
+
"code": "mo",
|
|
2085
|
+
"dailCode": "853",
|
|
2086
|
+
"priority": 0,
|
|
2087
|
+
"order": 0,
|
|
2088
|
+
"placeholder": "66123456"
|
|
2089
|
+
},
|
|
2090
|
+
{
|
|
2091
|
+
"name": "Macedonia (FYROM) (Македонија)",
|
|
2092
|
+
"code": "mk",
|
|
2093
|
+
"dailCode": "389",
|
|
2094
|
+
"priority": 0,
|
|
2095
|
+
"order": 0,
|
|
2096
|
+
"placeholder": "72345678"
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
"name": "Madagascar (Madagasikara)",
|
|
2100
|
+
"code": "mg",
|
|
2101
|
+
"dailCode": "261",
|
|
2102
|
+
"priority": 0,
|
|
2103
|
+
"order": 0,
|
|
2104
|
+
"placeholder": "321234567"
|
|
2105
|
+
},
|
|
2106
|
+
{
|
|
2107
|
+
"name": "Malawi",
|
|
2108
|
+
"code": "mw",
|
|
2109
|
+
"dailCode": "265",
|
|
2110
|
+
"priority": 0,
|
|
2111
|
+
"order": 0,
|
|
2112
|
+
"placeholder": "991234567"
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
"name": "Malaysia",
|
|
2116
|
+
"code": "my",
|
|
2117
|
+
"dailCode": "60",
|
|
2118
|
+
"priority": 0,
|
|
2119
|
+
"order": 0,
|
|
2120
|
+
"placeholder": "123456789"
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
"name": "Maldives",
|
|
2124
|
+
"code": "mv",
|
|
2125
|
+
"dailCode": "960",
|
|
2126
|
+
"priority": 0,
|
|
2127
|
+
"order": 0,
|
|
2128
|
+
"placeholder": "7712345"
|
|
2129
|
+
},
|
|
2130
|
+
{
|
|
2131
|
+
"name": "Mali",
|
|
2132
|
+
"code": "ml",
|
|
2133
|
+
"dailCode": "223",
|
|
2134
|
+
"priority": 0,
|
|
2135
|
+
"order": 0,
|
|
2136
|
+
"placeholder": "65012345"
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
"name": "Malta",
|
|
2140
|
+
"code": "mt",
|
|
2141
|
+
"dailCode": "356",
|
|
2142
|
+
"priority": 0,
|
|
2143
|
+
"order": 0,
|
|
2144
|
+
"placeholder": "96961234"
|
|
2145
|
+
},
|
|
2146
|
+
{
|
|
2147
|
+
"name": "Marshall Islands",
|
|
2148
|
+
"code": "mh",
|
|
2149
|
+
"dailCode": "692",
|
|
2150
|
+
"priority": 0,
|
|
2151
|
+
"order": 0,
|
|
2152
|
+
"placeholder": "2351234"
|
|
2153
|
+
},
|
|
2154
|
+
{
|
|
2155
|
+
"name": "Martinique",
|
|
2156
|
+
"code": "mq",
|
|
2157
|
+
"dailCode": "596",
|
|
2158
|
+
"priority": 0,
|
|
2159
|
+
"order": 0,
|
|
2160
|
+
"placeholder": "696201234"
|
|
2161
|
+
},
|
|
2162
|
+
{
|
|
2163
|
+
"name": "Mauritania (موريتانيا)",
|
|
2164
|
+
"code": "mr",
|
|
2165
|
+
"dailCode": "222",
|
|
2166
|
+
"priority": 0,
|
|
2167
|
+
"order": 0,
|
|
2168
|
+
"placeholder": "22123456"
|
|
2169
|
+
},
|
|
2170
|
+
{
|
|
2171
|
+
"name": "Mauritius (Moris)",
|
|
2172
|
+
"code": "mu",
|
|
2173
|
+
"dailCode": "230",
|
|
2174
|
+
"priority": 0,
|
|
2175
|
+
"order": 0,
|
|
2176
|
+
"placeholder": "52512345"
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
"name": "Mayotte",
|
|
2180
|
+
"code": "yt",
|
|
2181
|
+
"dailCode": "262",
|
|
2182
|
+
"priority": 1,
|
|
2183
|
+
"order": 0,
|
|
2184
|
+
"placeholder": "639012345"
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
"name": "Mexico (México)",
|
|
2188
|
+
"code": "mx",
|
|
2189
|
+
"dailCode": "52",
|
|
2190
|
+
"priority": 0,
|
|
2191
|
+
"order": 0,
|
|
2192
|
+
"placeholder": "2221234567"
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
"name": "Micronesia",
|
|
2196
|
+
"code": "fm",
|
|
2197
|
+
"dailCode": "691",
|
|
2198
|
+
"priority": 0,
|
|
2199
|
+
"order": 0,
|
|
2200
|
+
"placeholder": "3501234"
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
"name": "Moldova (Republica Moldova)",
|
|
2204
|
+
"code": "md",
|
|
2205
|
+
"dailCode": "373",
|
|
2206
|
+
"priority": 0,
|
|
2207
|
+
"order": 0,
|
|
2208
|
+
"placeholder": "62112345"
|
|
2209
|
+
},
|
|
2210
|
+
{
|
|
2211
|
+
"name": "Monaco",
|
|
2212
|
+
"code": "mc",
|
|
2213
|
+
"dailCode": "377",
|
|
2214
|
+
"priority": 0,
|
|
2215
|
+
"order": 0,
|
|
2216
|
+
"placeholder": "612345678"
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
"name": "Mongolia (Монгол)",
|
|
2220
|
+
"code": "mn",
|
|
2221
|
+
"dailCode": "976",
|
|
2222
|
+
"priority": 0,
|
|
2223
|
+
"order": 0,
|
|
2224
|
+
"placeholder": "88123456"
|
|
2225
|
+
},
|
|
2226
|
+
{
|
|
2227
|
+
"name": "Montenegro (Crna Gora)",
|
|
2228
|
+
"code": "me",
|
|
2229
|
+
"dailCode": "382",
|
|
2230
|
+
"priority": 0,
|
|
2231
|
+
"order": 0,
|
|
2232
|
+
"placeholder": "67622901"
|
|
2233
|
+
},
|
|
2234
|
+
{
|
|
2235
|
+
"name": "Montserrat",
|
|
2236
|
+
"code": "ms",
|
|
2237
|
+
"dailCode": "1",
|
|
2238
|
+
"priority": 1,
|
|
2239
|
+
"order": 0,
|
|
2240
|
+
"areaCodes": [
|
|
2241
|
+
"664"
|
|
2242
|
+
],
|
|
2243
|
+
"placeholder": "6644923456"
|
|
2244
|
+
},
|
|
2245
|
+
{
|
|
2246
|
+
"name": "Morocco (المغرب)",
|
|
2247
|
+
"code": "ma",
|
|
2248
|
+
"dailCode": "212",
|
|
2249
|
+
"priority": 0,
|
|
2250
|
+
"order": 0,
|
|
2251
|
+
"placeholder": "650123456"
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
"name": "Mozambique (Moçambique)",
|
|
2255
|
+
"code": "mz",
|
|
2256
|
+
"dailCode": "258",
|
|
2257
|
+
"priority": 0,
|
|
2258
|
+
"order": 0,
|
|
2259
|
+
"placeholder": "821234567"
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
"name": "Myanmar (Burma) (မြန်မာ)",
|
|
2263
|
+
"code": "mm",
|
|
2264
|
+
"dailCode": "95",
|
|
2265
|
+
"priority": 0,
|
|
2266
|
+
"order": 0,
|
|
2267
|
+
"placeholder": "92123456"
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
"name": "Namibia (Namibië)",
|
|
2271
|
+
"code": "na",
|
|
2272
|
+
"dailCode": "264",
|
|
2273
|
+
"priority": 0,
|
|
2274
|
+
"order": 0,
|
|
2275
|
+
"placeholder": "811234567"
|
|
2276
|
+
},
|
|
2277
|
+
{
|
|
2278
|
+
"name": "Nauru",
|
|
2279
|
+
"code": "nr",
|
|
2280
|
+
"dailCode": "674",
|
|
2281
|
+
"priority": 0,
|
|
2282
|
+
"order": 0,
|
|
2283
|
+
"placeholder": "5551234"
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
"name": "Nepal (नेपाल)",
|
|
2287
|
+
"code": "np",
|
|
2288
|
+
"dailCode": "977",
|
|
2289
|
+
"priority": 0,
|
|
2290
|
+
"order": 0,
|
|
2291
|
+
"placeholder": "9841234567"
|
|
2292
|
+
},
|
|
2293
|
+
{
|
|
2294
|
+
"name": "Netherlands (Nederland)",
|
|
2295
|
+
"code": "nl",
|
|
2296
|
+
"dailCode": "31",
|
|
2297
|
+
"priority": 0,
|
|
2298
|
+
"order": 0,
|
|
2299
|
+
"placeholder": "612345678"
|
|
2300
|
+
},
|
|
2301
|
+
{
|
|
2302
|
+
"name": "New Caledonia (Nouvelle-Calédonie)",
|
|
2303
|
+
"code": "nc",
|
|
2304
|
+
"dailCode": "687",
|
|
2305
|
+
"priority": 0,
|
|
2306
|
+
"order": 0,
|
|
2307
|
+
"placeholder": "751234"
|
|
2308
|
+
},
|
|
2309
|
+
{
|
|
2310
|
+
"name": "New Zealand",
|
|
2311
|
+
"code": "nz",
|
|
2312
|
+
"dailCode": "64",
|
|
2313
|
+
"priority": 0,
|
|
2314
|
+
"order": 0,
|
|
2315
|
+
"placeholder": "211234567"
|
|
2316
|
+
},
|
|
2317
|
+
{
|
|
2318
|
+
"name": "Nicaragua",
|
|
2319
|
+
"code": "ni",
|
|
2320
|
+
"dailCode": "505",
|
|
2321
|
+
"priority": 0,
|
|
2322
|
+
"order": 0,
|
|
2323
|
+
"placeholder": "81234567"
|
|
2324
|
+
},
|
|
2325
|
+
{
|
|
2326
|
+
"name": "Niger (Nijar)",
|
|
2327
|
+
"code": "ne",
|
|
2328
|
+
"dailCode": "227",
|
|
2329
|
+
"priority": 0,
|
|
2330
|
+
"order": 0,
|
|
2331
|
+
"placeholder": "93123456"
|
|
2332
|
+
},
|
|
2333
|
+
{
|
|
2334
|
+
"name": "Nigeria",
|
|
2335
|
+
"code": "ng",
|
|
2336
|
+
"dailCode": "234",
|
|
2337
|
+
"priority": 0,
|
|
2338
|
+
"order": 0,
|
|
2339
|
+
"placeholder": "8021234567"
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
"name": "Niue",
|
|
2343
|
+
"code": "nu",
|
|
2344
|
+
"dailCode": "683",
|
|
2345
|
+
"priority": 0,
|
|
2346
|
+
"order": 0,
|
|
2347
|
+
"placeholder": "8884012"
|
|
2348
|
+
},
|
|
2349
|
+
{
|
|
2350
|
+
"name": "Norfolk Island",
|
|
2351
|
+
"code": "nf",
|
|
2352
|
+
"dailCode": "672",
|
|
2353
|
+
"priority": 0,
|
|
2354
|
+
"order": 0,
|
|
2355
|
+
"placeholder": "381234"
|
|
2356
|
+
},
|
|
2357
|
+
{
|
|
2358
|
+
"name": "North Korea (조선 민주주의 인민 공화국)",
|
|
2359
|
+
"code": "kp",
|
|
2360
|
+
"dailCode": "850",
|
|
2361
|
+
"priority": 0,
|
|
2362
|
+
"order": 0,
|
|
2363
|
+
"placeholder": "1921234567"
|
|
2364
|
+
},
|
|
2365
|
+
{
|
|
2366
|
+
"name": "Northern Mariana Islands",
|
|
2367
|
+
"code": "mp",
|
|
2368
|
+
"dailCode": "1670",
|
|
2369
|
+
"priority": 0,
|
|
2370
|
+
"order": 0,
|
|
2371
|
+
"placeholder": "6702345678"
|
|
2372
|
+
},
|
|
2373
|
+
{
|
|
2374
|
+
"name": "Norway (Norge)",
|
|
2375
|
+
"code": "no",
|
|
2376
|
+
"dailCode": "47",
|
|
2377
|
+
"priority": 0,
|
|
2378
|
+
"order": 0,
|
|
2379
|
+
"placeholder": "40612345"
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
"name": "Oman (عُمان)",
|
|
2383
|
+
"code": "om",
|
|
2384
|
+
"dailCode": "968",
|
|
2385
|
+
"priority": 0,
|
|
2386
|
+
"order": 0,
|
|
2387
|
+
"placeholder": "92123456"
|
|
2388
|
+
},
|
|
2389
|
+
{
|
|
2390
|
+
"name": "Pakistan (پاکستان)",
|
|
2391
|
+
"code": "pk",
|
|
2392
|
+
"dailCode": "92",
|
|
2393
|
+
"priority": 0,
|
|
2394
|
+
"order": 0,
|
|
2395
|
+
"placeholder": "3012345678"
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
"name": "Palau",
|
|
2399
|
+
"code": "pw",
|
|
2400
|
+
"dailCode": "680",
|
|
2401
|
+
"priority": 0,
|
|
2402
|
+
"order": 0,
|
|
2403
|
+
"placeholder": "6201234"
|
|
2404
|
+
},
|
|
2405
|
+
{
|
|
2406
|
+
"name": "Palestine (فلسطين)",
|
|
2407
|
+
"code": "ps",
|
|
2408
|
+
"dailCode": "970",
|
|
2409
|
+
"priority": 0,
|
|
2410
|
+
"order": 0,
|
|
2411
|
+
"placeholder": "599123456"
|
|
2412
|
+
},
|
|
2413
|
+
{
|
|
2414
|
+
"name": "Panama (Panamá)",
|
|
2415
|
+
"code": "pa",
|
|
2416
|
+
"dailCode": "507",
|
|
2417
|
+
"priority": 0,
|
|
2418
|
+
"order": 0,
|
|
2419
|
+
"placeholder": "61234567"
|
|
2420
|
+
},
|
|
2421
|
+
{
|
|
2422
|
+
"name": "Papua New Guinea",
|
|
2423
|
+
"code": "pg",
|
|
2424
|
+
"dailCode": "675",
|
|
2425
|
+
"priority": 0,
|
|
2426
|
+
"order": 0,
|
|
2427
|
+
"placeholder": "70123456"
|
|
2428
|
+
},
|
|
2429
|
+
{
|
|
2430
|
+
"name": "Paraguay",
|
|
2431
|
+
"code": "py",
|
|
2432
|
+
"dailCode": "595",
|
|
2433
|
+
"priority": 0,
|
|
2434
|
+
"order": 0,
|
|
2435
|
+
"placeholder": "961456789"
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
"name": "Peru (Perú)",
|
|
2439
|
+
"code": "pe",
|
|
2440
|
+
"dailCode": "51",
|
|
2441
|
+
"priority": 0,
|
|
2442
|
+
"order": 0,
|
|
2443
|
+
"placeholder": "912345678"
|
|
2444
|
+
},
|
|
2445
|
+
{
|
|
2446
|
+
"name": "Philippines",
|
|
2447
|
+
"code": "ph",
|
|
2448
|
+
"dailCode": "63",
|
|
2449
|
+
"priority": 0,
|
|
2450
|
+
"order": 0,
|
|
2451
|
+
"placeholder": "9051234567"
|
|
2452
|
+
},
|
|
2453
|
+
{
|
|
2454
|
+
"name": "Poland (Polska)",
|
|
2455
|
+
"code": "pl",
|
|
2456
|
+
"dailCode": "48",
|
|
2457
|
+
"priority": 0,
|
|
2458
|
+
"order": 0,
|
|
2459
|
+
"placeholder": "512345678"
|
|
2460
|
+
},
|
|
2461
|
+
{
|
|
2462
|
+
"name": "Portugal",
|
|
2463
|
+
"code": "pt",
|
|
2464
|
+
"dailCode": "351",
|
|
2465
|
+
"priority": 0,
|
|
2466
|
+
"order": 0,
|
|
2467
|
+
"placeholder": "912345678"
|
|
2468
|
+
},
|
|
2469
|
+
{
|
|
2470
|
+
"name": "Puerto Rico",
|
|
2471
|
+
"code": "pr",
|
|
2472
|
+
"dailCode": "1",
|
|
2473
|
+
"priority": 3,
|
|
2474
|
+
"order": 0,
|
|
2475
|
+
"areaCodes": [
|
|
2476
|
+
"787",
|
|
2477
|
+
"939"
|
|
2478
|
+
],
|
|
2479
|
+
"placeholder": "7872345678"
|
|
2480
|
+
},
|
|
2481
|
+
{
|
|
2482
|
+
"name": "Qatar (قطر)",
|
|
2483
|
+
"code": "qa",
|
|
2484
|
+
"dailCode": "974",
|
|
2485
|
+
"priority": 0,
|
|
2486
|
+
"order": 0,
|
|
2487
|
+
"placeholder": "33123456"
|
|
2488
|
+
},
|
|
2489
|
+
{
|
|
2490
|
+
"name": "Réunion (La Réunion)",
|
|
2491
|
+
"code": "re",
|
|
2492
|
+
"dailCode": "262",
|
|
2493
|
+
"priority": 0,
|
|
2494
|
+
"order": 0,
|
|
2495
|
+
"placeholder": "692123456"
|
|
2496
|
+
},
|
|
2497
|
+
{
|
|
2498
|
+
"name": "Romania (România)",
|
|
2499
|
+
"code": "ro",
|
|
2500
|
+
"dailCode": "40",
|
|
2501
|
+
"priority": 0,
|
|
2502
|
+
"order": 0,
|
|
2503
|
+
"placeholder": "712034567"
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
"name": "Russia (Россия)",
|
|
2507
|
+
"code": "ru",
|
|
2508
|
+
"dailCode": "7",
|
|
2509
|
+
"priority": 0,
|
|
2510
|
+
"order": 0,
|
|
2511
|
+
"placeholder": "9123456789"
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
"name": "Rwanda",
|
|
2515
|
+
"code": "rw",
|
|
2516
|
+
"dailCode": "250",
|
|
2517
|
+
"priority": 0,
|
|
2518
|
+
"order": 0,
|
|
2519
|
+
"placeholder": "720123456"
|
|
2520
|
+
},
|
|
2521
|
+
{
|
|
2522
|
+
"name": "Saint Barthélemy (Saint-Barthélemy)",
|
|
2523
|
+
"code": "bl",
|
|
2524
|
+
"dailCode": "590",
|
|
2525
|
+
"priority": 1,
|
|
2526
|
+
"order": 0,
|
|
2527
|
+
"placeholder": "690001234"
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
"name": "Saint Helena",
|
|
2531
|
+
"code": "sh",
|
|
2532
|
+
"dailCode": "290",
|
|
2533
|
+
"priority": 0,
|
|
2534
|
+
"order": 0,
|
|
2535
|
+
"placeholder": "51234"
|
|
2536
|
+
},
|
|
2537
|
+
{
|
|
2538
|
+
"name": "Saint Kitts and Nevis",
|
|
2539
|
+
"code": "kn",
|
|
2540
|
+
"dailCode": "1869",
|
|
2541
|
+
"priority": 0,
|
|
2542
|
+
"order": 0,
|
|
2543
|
+
"placeholder": "8697652917"
|
|
2544
|
+
},
|
|
2545
|
+
{
|
|
2546
|
+
"name": "Saint Lucia",
|
|
2547
|
+
"code": "lc",
|
|
2548
|
+
"dailCode": "1",
|
|
2549
|
+
"priority": 1,
|
|
2550
|
+
"order": 0,
|
|
2551
|
+
"areaCodes": [
|
|
2552
|
+
"758"
|
|
2553
|
+
],
|
|
2554
|
+
"placeholder": "7582845678"
|
|
2555
|
+
},
|
|
2556
|
+
{
|
|
2557
|
+
"name": "Saint Martin (Saint-Martin (partie française))",
|
|
2558
|
+
"code": "mf",
|
|
2559
|
+
"dailCode": "590",
|
|
2560
|
+
"priority": 2,
|
|
2561
|
+
"order": 0,
|
|
2562
|
+
"placeholder": "690001234"
|
|
2563
|
+
},
|
|
2564
|
+
{
|
|
2565
|
+
"name": "Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)",
|
|
2566
|
+
"code": "pm",
|
|
2567
|
+
"dailCode": "508",
|
|
2568
|
+
"priority": 0,
|
|
2569
|
+
"order": 0,
|
|
2570
|
+
"placeholder": "551234"
|
|
2571
|
+
},
|
|
2572
|
+
{
|
|
2573
|
+
"name": "Saint Vincent and the Grenadines",
|
|
2574
|
+
"code": "vc",
|
|
2575
|
+
"dailCode": "1",
|
|
2576
|
+
"priority": 1,
|
|
2577
|
+
"order": 0,
|
|
2578
|
+
"areaCodes": [
|
|
2579
|
+
"784"
|
|
2580
|
+
],
|
|
2581
|
+
"placeholder": "7844301234"
|
|
2582
|
+
},
|
|
2583
|
+
{
|
|
2584
|
+
"name": "Samoa",
|
|
2585
|
+
"code": "ws",
|
|
2586
|
+
"dailCode": "685",
|
|
2587
|
+
"priority": 0,
|
|
2588
|
+
"order": 0,
|
|
2589
|
+
"placeholder": "7212345"
|
|
2590
|
+
},
|
|
2591
|
+
{
|
|
2592
|
+
"name": "San Marino",
|
|
2593
|
+
"code": "sm",
|
|
2594
|
+
"dailCode": "378",
|
|
2595
|
+
"priority": 0,
|
|
2596
|
+
"order": 0,
|
|
2597
|
+
"placeholder": "66661212"
|
|
2598
|
+
},
|
|
2599
|
+
{
|
|
2600
|
+
"name": "São Tomé and Príncipe (São Tomé e Príncipe)",
|
|
2601
|
+
"code": "st",
|
|
2602
|
+
"dailCode": "239",
|
|
2603
|
+
"priority": 0,
|
|
2604
|
+
"order": 0,
|
|
2605
|
+
"placeholder": "9812345"
|
|
2606
|
+
},
|
|
2607
|
+
{
|
|
2608
|
+
"name": "Saudi Arabia (المملكة العربية السعودية)",
|
|
2609
|
+
"code": "sa",
|
|
2610
|
+
"dailCode": "966",
|
|
2611
|
+
"priority": 0,
|
|
2612
|
+
"order": 1,
|
|
2613
|
+
"placeholder": "512345678"
|
|
2614
|
+
},
|
|
2615
|
+
{
|
|
2616
|
+
"name": "Senegal (Sénégal)",
|
|
2617
|
+
"code": "sn",
|
|
2618
|
+
"dailCode": "221",
|
|
2619
|
+
"priority": 0,
|
|
2620
|
+
"order": 0,
|
|
2621
|
+
"placeholder": "701234567"
|
|
2622
|
+
},
|
|
2623
|
+
{
|
|
2624
|
+
"name": "Serbia (Србија)",
|
|
2625
|
+
"code": "rs",
|
|
2626
|
+
"dailCode": "381",
|
|
2627
|
+
"priority": 0,
|
|
2628
|
+
"order": 0,
|
|
2629
|
+
"placeholder": "601234567"
|
|
2630
|
+
},
|
|
2631
|
+
{
|
|
2632
|
+
"name": "Seychelles",
|
|
2633
|
+
"code": "sc",
|
|
2634
|
+
"dailCode": "248",
|
|
2635
|
+
"priority": 0,
|
|
2636
|
+
"order": 0,
|
|
2637
|
+
"placeholder": "2510123"
|
|
2638
|
+
},
|
|
2639
|
+
{
|
|
2640
|
+
"name": "Sierra Leone",
|
|
2641
|
+
"code": "sl",
|
|
2642
|
+
"dailCode": "232",
|
|
2643
|
+
"priority": 0,
|
|
2644
|
+
"order": 0,
|
|
2645
|
+
"placeholder": "25123456"
|
|
2646
|
+
},
|
|
2647
|
+
{
|
|
2648
|
+
"name": "Singapore",
|
|
2649
|
+
"code": "sg",
|
|
2650
|
+
"dailCode": "65",
|
|
2651
|
+
"priority": 0,
|
|
2652
|
+
"order": 0,
|
|
2653
|
+
"placeholder": "81234567"
|
|
2654
|
+
},
|
|
2655
|
+
{
|
|
2656
|
+
"name": "Sint Maarten",
|
|
2657
|
+
"code": "sx",
|
|
2658
|
+
"dailCode": "1",
|
|
2659
|
+
"priority": 1,
|
|
2660
|
+
"order": 0,
|
|
2661
|
+
"areaCodes": [
|
|
2662
|
+
"721"
|
|
2663
|
+
],
|
|
2664
|
+
"placeholder": "7215205678"
|
|
2665
|
+
},
|
|
2666
|
+
{
|
|
2667
|
+
"name": "Slovakia (Slovensko)",
|
|
2668
|
+
"code": "sk",
|
|
2669
|
+
"dailCode": "421",
|
|
2670
|
+
"priority": 0,
|
|
2671
|
+
"order": 0,
|
|
2672
|
+
"placeholder": "912123456"
|
|
2673
|
+
},
|
|
2674
|
+
{
|
|
2675
|
+
"name": "Slovenia (Slovenija)",
|
|
2676
|
+
"code": "si",
|
|
2677
|
+
"dailCode": "386",
|
|
2678
|
+
"priority": 0,
|
|
2679
|
+
"order": 0,
|
|
2680
|
+
"placeholder": "31234567"
|
|
2681
|
+
},
|
|
2682
|
+
{
|
|
2683
|
+
"name": "Solomon Islands",
|
|
2684
|
+
"code": "sb",
|
|
2685
|
+
"dailCode": "677",
|
|
2686
|
+
"priority": 0,
|
|
2687
|
+
"order": 0,
|
|
2688
|
+
"placeholder": "7421234"
|
|
2689
|
+
},
|
|
2690
|
+
{
|
|
2691
|
+
"name": "Somalia (Soomaaliya)",
|
|
2692
|
+
"code": "so",
|
|
2693
|
+
"dailCode": "252",
|
|
2694
|
+
"priority": 0,
|
|
2695
|
+
"order": 0,
|
|
2696
|
+
"placeholder": "71123456"
|
|
2697
|
+
},
|
|
2698
|
+
{
|
|
2699
|
+
"name": "South Africa",
|
|
2700
|
+
"code": "za",
|
|
2701
|
+
"dailCode": "27",
|
|
2702
|
+
"priority": 0,
|
|
2703
|
+
"order": 0,
|
|
2704
|
+
"placeholder": "711234567"
|
|
2705
|
+
},
|
|
2706
|
+
{
|
|
2707
|
+
"name": "South Korea (대한민국)",
|
|
2708
|
+
"code": "kr",
|
|
2709
|
+
"dailCode": "82",
|
|
2710
|
+
"priority": 0,
|
|
2711
|
+
"order": 0,
|
|
2712
|
+
"placeholder": "1020000000"
|
|
2713
|
+
},
|
|
2714
|
+
{
|
|
2715
|
+
"name": "South Sudan (جنوب السودان)",
|
|
2716
|
+
"code": "ss",
|
|
2717
|
+
"dailCode": "211",
|
|
2718
|
+
"priority": 0,
|
|
2719
|
+
"order": 0,
|
|
2720
|
+
"placeholder": "977123456"
|
|
2721
|
+
},
|
|
2722
|
+
{
|
|
2723
|
+
"name": "Spain (España)",
|
|
2724
|
+
"code": "es",
|
|
2725
|
+
"dailCode": "34",
|
|
2726
|
+
"priority": 0,
|
|
2727
|
+
"order": 0,
|
|
2728
|
+
"placeholder": "612345678"
|
|
2729
|
+
},
|
|
2730
|
+
{
|
|
2731
|
+
"name": "Sri Lanka (ශ්රී ලංකාව)",
|
|
2732
|
+
"code": "lk",
|
|
2733
|
+
"dailCode": "94",
|
|
2734
|
+
"priority": 0,
|
|
2735
|
+
"order": 0,
|
|
2736
|
+
"placeholder": "712345678"
|
|
2737
|
+
},
|
|
2738
|
+
{
|
|
2739
|
+
"name": "Sudan (السودان)",
|
|
2740
|
+
"code": "sd",
|
|
2741
|
+
"dailCode": "249",
|
|
2742
|
+
"priority": 0,
|
|
2743
|
+
"order": 0,
|
|
2744
|
+
"placeholder": "911231234"
|
|
2745
|
+
},
|
|
2746
|
+
{
|
|
2747
|
+
"name": "Suriname",
|
|
2748
|
+
"code": "sr",
|
|
2749
|
+
"dailCode": "597",
|
|
2750
|
+
"priority": 0,
|
|
2751
|
+
"order": 0,
|
|
2752
|
+
"placeholder": "7412345"
|
|
2753
|
+
},
|
|
2754
|
+
{
|
|
2755
|
+
"name": "Svalbard and Jan Mayen",
|
|
2756
|
+
"code": "sj",
|
|
2757
|
+
"dailCode": "47",
|
|
2758
|
+
"priority": 1,
|
|
2759
|
+
"order": 0,
|
|
2760
|
+
"placeholder": "41234567"
|
|
2761
|
+
},
|
|
2762
|
+
{
|
|
2763
|
+
"name": "Swaziland",
|
|
2764
|
+
"code": "sz",
|
|
2765
|
+
"dailCode": "268",
|
|
2766
|
+
"priority": 0,
|
|
2767
|
+
"order": 0,
|
|
2768
|
+
"placeholder": "76123456"
|
|
2769
|
+
},
|
|
2770
|
+
{
|
|
2771
|
+
"name": "Sweden (Sverige)",
|
|
2772
|
+
"code": "se",
|
|
2773
|
+
"dailCode": "46",
|
|
2774
|
+
"priority": 0,
|
|
2775
|
+
"order": 0,
|
|
2776
|
+
"placeholder": "701234567"
|
|
2777
|
+
},
|
|
2778
|
+
{
|
|
2779
|
+
"name": "Switzerland (Schweiz)",
|
|
2780
|
+
"code": "ch",
|
|
2781
|
+
"dailCode": "41",
|
|
2782
|
+
"priority": 0,
|
|
2783
|
+
"order": 0,
|
|
2784
|
+
"placeholder": "781234567"
|
|
2785
|
+
},
|
|
2786
|
+
{
|
|
2787
|
+
"name": "Syria (سوريا)",
|
|
2788
|
+
"code": "sy",
|
|
2789
|
+
"dailCode": "963",
|
|
2790
|
+
"priority": 0,
|
|
2791
|
+
"order": 0,
|
|
2792
|
+
"placeholder": "944567890"
|
|
2793
|
+
},
|
|
2794
|
+
{
|
|
2795
|
+
"name": "Taiwan (台灣)",
|
|
2796
|
+
"code": "tw",
|
|
2797
|
+
"dailCode": "886",
|
|
2798
|
+
"priority": 0,
|
|
2799
|
+
"order": 0,
|
|
2800
|
+
"placeholder": "912345678"
|
|
2801
|
+
},
|
|
2802
|
+
{
|
|
2803
|
+
"name": "Tajikistan",
|
|
2804
|
+
"code": "tj",
|
|
2805
|
+
"dailCode": "992",
|
|
2806
|
+
"priority": 0,
|
|
2807
|
+
"order": 0,
|
|
2808
|
+
"placeholder": "917123456"
|
|
2809
|
+
},
|
|
2810
|
+
{
|
|
2811
|
+
"name": "Tanzania",
|
|
2812
|
+
"code": "tz",
|
|
2813
|
+
"dailCode": "255",
|
|
2814
|
+
"priority": 0,
|
|
2815
|
+
"order": 0,
|
|
2816
|
+
"placeholder": "621234567"
|
|
2817
|
+
},
|
|
2818
|
+
{
|
|
2819
|
+
"name": "Thailand (ไทย)",
|
|
2820
|
+
"code": "th",
|
|
2821
|
+
"dailCode": "66",
|
|
2822
|
+
"priority": 0,
|
|
2823
|
+
"order": 0,
|
|
2824
|
+
"placeholder": "812345678"
|
|
2825
|
+
},
|
|
2826
|
+
{
|
|
2827
|
+
"name": "Timor-Leste",
|
|
2828
|
+
"code": "tl",
|
|
2829
|
+
"dailCode": "670",
|
|
2830
|
+
"priority": 0,
|
|
2831
|
+
"order": 0,
|
|
2832
|
+
"placeholder": "77212345"
|
|
2833
|
+
},
|
|
2834
|
+
{
|
|
2835
|
+
"name": "Togo",
|
|
2836
|
+
"code": "tg",
|
|
2837
|
+
"dailCode": "228",
|
|
2838
|
+
"priority": 0,
|
|
2839
|
+
"order": 0,
|
|
2840
|
+
"placeholder": "90112345"
|
|
2841
|
+
},
|
|
2842
|
+
{
|
|
2843
|
+
"name": "Tokelau",
|
|
2844
|
+
"code": "tk",
|
|
2845
|
+
"dailCode": "690",
|
|
2846
|
+
"priority": 0,
|
|
2847
|
+
"order": 0,
|
|
2848
|
+
"placeholder": "7290"
|
|
2849
|
+
},
|
|
2850
|
+
{
|
|
2851
|
+
"name": "Tonga",
|
|
2852
|
+
"code": "to",
|
|
2853
|
+
"dailCode": "676",
|
|
2854
|
+
"priority": 0,
|
|
2855
|
+
"order": 0,
|
|
2856
|
+
"placeholder": "7715123"
|
|
2857
|
+
},
|
|
2858
|
+
{
|
|
2859
|
+
"name": "Trinidad and Tobago",
|
|
2860
|
+
"code": "tt",
|
|
2861
|
+
"dailCode": "1",
|
|
2862
|
+
"priority": 1,
|
|
2863
|
+
"order": 0,
|
|
2864
|
+
"areaCodes": [
|
|
2865
|
+
"868"
|
|
2866
|
+
],
|
|
2867
|
+
"placeholder": "8682911234"
|
|
2868
|
+
},
|
|
2869
|
+
{
|
|
2870
|
+
"name": "Tunisia (تونس)",
|
|
2871
|
+
"code": "tn",
|
|
2872
|
+
"dailCode": "216",
|
|
2873
|
+
"priority": 0,
|
|
2874
|
+
"order": 0,
|
|
2875
|
+
"placeholder": "20123456"
|
|
2876
|
+
},
|
|
2877
|
+
{
|
|
2878
|
+
"name": "Turkey (Türkiye)",
|
|
2879
|
+
"code": "tr",
|
|
2880
|
+
"dailCode": "90",
|
|
2881
|
+
"priority": 0,
|
|
2882
|
+
"order": 0,
|
|
2883
|
+
"placeholder": "5012345678"
|
|
2884
|
+
},
|
|
2885
|
+
{
|
|
2886
|
+
"name": "Turkmenistan",
|
|
2887
|
+
"code": "tm",
|
|
2888
|
+
"dailCode": "993",
|
|
2889
|
+
"priority": 0,
|
|
2890
|
+
"order": 0,
|
|
2891
|
+
"placeholder": "66123456"
|
|
2892
|
+
},
|
|
2893
|
+
{
|
|
2894
|
+
"name": "Turks and Caicos Islands",
|
|
2895
|
+
"code": "tc",
|
|
2896
|
+
"dailCode": "1649",
|
|
2897
|
+
"priority": 0,
|
|
2898
|
+
"order": 0,
|
|
2899
|
+
"placeholder": "6492311234"
|
|
2900
|
+
},
|
|
2901
|
+
{
|
|
2902
|
+
"name": "Tuvalu",
|
|
2903
|
+
"code": "tv",
|
|
2904
|
+
"dailCode": "688",
|
|
2905
|
+
"priority": 0,
|
|
2906
|
+
"order": 0,
|
|
2907
|
+
"placeholder": "901234"
|
|
2908
|
+
},
|
|
2909
|
+
{
|
|
2910
|
+
"name": "U.S. Virgin Islands",
|
|
2911
|
+
"code": "vi",
|
|
2912
|
+
"dailCode": "1",
|
|
2913
|
+
"priority": 1,
|
|
2914
|
+
"order": 0,
|
|
2915
|
+
"areaCodes": [
|
|
2916
|
+
"340"
|
|
2917
|
+
],
|
|
2918
|
+
"placeholder": "3406421234"
|
|
2919
|
+
},
|
|
2920
|
+
{
|
|
2921
|
+
"name": "Uganda",
|
|
2922
|
+
"code": "ug",
|
|
2923
|
+
"dailCode": "256",
|
|
2924
|
+
"priority": 0,
|
|
2925
|
+
"order": 0,
|
|
2926
|
+
"placeholder": "712345678"
|
|
2927
|
+
},
|
|
2928
|
+
{
|
|
2929
|
+
"name": "Ukraine (Україна)",
|
|
2930
|
+
"code": "ua",
|
|
2931
|
+
"dailCode": "380",
|
|
2932
|
+
"priority": 0,
|
|
2933
|
+
"order": 0,
|
|
2934
|
+
"placeholder": "501234567"
|
|
2935
|
+
},
|
|
2936
|
+
{
|
|
2937
|
+
"name": "United Arab Emirates (الإمارات العربية المتحدة)",
|
|
2938
|
+
"code": "ae",
|
|
2939
|
+
"dailCode": "971",
|
|
2940
|
+
"priority": 0,
|
|
2941
|
+
"order": 0,
|
|
2942
|
+
"placeholder": "501234567"
|
|
2943
|
+
},
|
|
2944
|
+
{
|
|
2945
|
+
"name": "United Kingdom",
|
|
2946
|
+
"code": "gb",
|
|
2947
|
+
"dailCode": "44",
|
|
2948
|
+
"priority": 0,
|
|
2949
|
+
"order": 0,
|
|
2950
|
+
"placeholder": "7400123456"
|
|
2951
|
+
},
|
|
2952
|
+
{
|
|
2953
|
+
"name": "United States",
|
|
2954
|
+
"code": "us",
|
|
2955
|
+
"dailCode": "1",
|
|
2956
|
+
"priority": 0,
|
|
2957
|
+
"order": 0,
|
|
2958
|
+
"placeholder": "2015550123"
|
|
2959
|
+
},
|
|
2960
|
+
{
|
|
2961
|
+
"name": "Uruguay",
|
|
2962
|
+
"code": "uy",
|
|
2963
|
+
"dailCode": "598",
|
|
2964
|
+
"priority": 0,
|
|
2965
|
+
"order": 0,
|
|
2966
|
+
"placeholder": "94231234"
|
|
2967
|
+
},
|
|
2968
|
+
{
|
|
2969
|
+
"name": "Uzbekistan (Oʻzbekiston)",
|
|
2970
|
+
"code": "uz",
|
|
2971
|
+
"dailCode": "998",
|
|
2972
|
+
"priority": 0,
|
|
2973
|
+
"order": 0,
|
|
2974
|
+
"placeholder": "912345678"
|
|
2975
|
+
},
|
|
2976
|
+
{
|
|
2977
|
+
"name": "Vanuatu",
|
|
2978
|
+
"code": "vu",
|
|
2979
|
+
"dailCode": "678",
|
|
2980
|
+
"priority": 0,
|
|
2981
|
+
"order": 0,
|
|
2982
|
+
"placeholder": "5912345"
|
|
2983
|
+
},
|
|
2984
|
+
{
|
|
2985
|
+
"name": "Vatican City (Città del Vaticano)",
|
|
2986
|
+
"code": "va",
|
|
2987
|
+
"dailCode": "39",
|
|
2988
|
+
"priority": 1,
|
|
2989
|
+
"order": 0,
|
|
2990
|
+
"placeholder": "3123456789"
|
|
2991
|
+
},
|
|
2992
|
+
{
|
|
2993
|
+
"name": "Venezuela",
|
|
2994
|
+
"code": "ve",
|
|
2995
|
+
"dailCode": "58",
|
|
2996
|
+
"priority": 0,
|
|
2997
|
+
"order": 0,
|
|
2998
|
+
"placeholder": "4121234567"
|
|
2999
|
+
},
|
|
3000
|
+
{
|
|
3001
|
+
"name": "Vietnam (Việt Nam)",
|
|
3002
|
+
"code": "vn",
|
|
3003
|
+
"dailCode": "84",
|
|
3004
|
+
"priority": 0,
|
|
3005
|
+
"order": 0,
|
|
3006
|
+
"placeholder": "912345678"
|
|
3007
|
+
},
|
|
3008
|
+
{
|
|
3009
|
+
"name": "Wallis and Futuna",
|
|
3010
|
+
"code": "wf",
|
|
3011
|
+
"dailCode": "681",
|
|
3012
|
+
"priority": 0,
|
|
3013
|
+
"order": 0,
|
|
3014
|
+
"placeholder": "821234"
|
|
3015
|
+
},
|
|
3016
|
+
{
|
|
3017
|
+
"name": "Yemen (اليمن)",
|
|
3018
|
+
"code": "ye",
|
|
3019
|
+
"dailCode": "967",
|
|
3020
|
+
"priority": 0,
|
|
3021
|
+
"order": 0,
|
|
3022
|
+
"placeholder": "712345678"
|
|
3023
|
+
},
|
|
3024
|
+
{
|
|
3025
|
+
"name": "Zambia",
|
|
3026
|
+
"code": "zm",
|
|
3027
|
+
"dailCode": "260",
|
|
3028
|
+
"priority": 0,
|
|
3029
|
+
"order": 0,
|
|
3030
|
+
"placeholder": "955123456"
|
|
3031
|
+
},
|
|
3032
|
+
{
|
|
3033
|
+
"name": "Zimbabwe",
|
|
3034
|
+
"code": "zw",
|
|
3035
|
+
"dailCode": "263",
|
|
3036
|
+
"priority": 0,
|
|
3037
|
+
"order": 0,
|
|
3038
|
+
"placeholder": "712345678"
|
|
3039
|
+
},
|
|
3040
|
+
{
|
|
3041
|
+
"name": "Åland Islands",
|
|
3042
|
+
"code": "ax",
|
|
3043
|
+
"dailCode": "358",
|
|
3044
|
+
"priority": 1,
|
|
3045
|
+
"order": 0,
|
|
3046
|
+
"placeholder": "412345678"
|
|
3047
|
+
}
|
|
3048
|
+
];
|
|
3049
|
+
|
|
3050
|
+
class PhoneService {
|
|
3051
|
+
#phoneUtil = PhoneNumberUtil.getInstance();
|
|
3052
|
+
parse(phoneNumber, countryCode) {
|
|
3053
|
+
let number = undefined;
|
|
3054
|
+
try {
|
|
3055
|
+
number = this.#phoneUtil.parse(phoneNumber, countryCode);
|
|
3056
|
+
}
|
|
3057
|
+
catch (e) { }
|
|
3058
|
+
return number;
|
|
3059
|
+
}
|
|
3060
|
+
getPhoneNumberObject(number) {
|
|
3061
|
+
const parsedNumber = this.parse(number);
|
|
3062
|
+
if (parsedNumber) {
|
|
3063
|
+
const dailCode = this.#getCountryDailCode(parsedNumber);
|
|
3064
|
+
const code = this.getCountryIsoCode(dailCode, parsedNumber);
|
|
3065
|
+
const nationalNumber = parsedNumber.getNationalNumberOrDefault().toString();
|
|
3066
|
+
const internationalNumber = this.format(number, code, PhoneNumberFormat.E164);
|
|
3067
|
+
const placeholder = this.getPlaceholder(code);
|
|
3068
|
+
const name = this.getCountryByDailCode(dailCode, parsedNumber)?.name ?? "";
|
|
3069
|
+
return { dailCode, code, nationalNumber, internationalNumber, placeholder, name, priority: 0, order: 0 };
|
|
3070
|
+
}
|
|
3071
|
+
return;
|
|
3072
|
+
}
|
|
3073
|
+
format(phoneNumber, countryCode, numberFormat) {
|
|
3074
|
+
const number = this.parse(phoneNumber, countryCode);
|
|
3075
|
+
if (number) {
|
|
3076
|
+
return this.#phoneUtil.format(number, numberFormat);
|
|
3077
|
+
}
|
|
3078
|
+
return "";
|
|
3079
|
+
}
|
|
3080
|
+
validate(number) {
|
|
3081
|
+
let isValid;
|
|
3082
|
+
try {
|
|
3083
|
+
// 1 for mobile. for more https://libphonenumbers.js.org/docs/getNumberType/
|
|
3084
|
+
if (this.#phoneUtil.getNumberType(this.#phoneUtil.parseAndKeepRawInput(number)) !== 1) {
|
|
3085
|
+
isValid = false;
|
|
3086
|
+
}
|
|
3087
|
+
else {
|
|
3088
|
+
isValid = this.#phoneUtil.isValidNumber(this.#phoneUtil.parseAndKeepRawInput(number));
|
|
3089
|
+
}
|
|
3090
|
+
}
|
|
3091
|
+
catch (e) {
|
|
3092
|
+
isValid = false;
|
|
3093
|
+
}
|
|
3094
|
+
return isValid;
|
|
3095
|
+
}
|
|
3096
|
+
getPlaceholder(countryCode) {
|
|
3097
|
+
// @ts-ignore
|
|
3098
|
+
return this.#phoneUtil.getMetadataForRegion(countryCode).values_[3][6];
|
|
3099
|
+
}
|
|
3100
|
+
getCountryIsoCode(dailCode, number) {
|
|
3101
|
+
return this.getCountryByDailCode(dailCode, number)?.code ?? "";
|
|
3102
|
+
}
|
|
3103
|
+
getCountryByDailCode(dailCode, number) {
|
|
3104
|
+
// Will use this to match area code from the first numbers
|
|
3105
|
+
const rawNumber = this.#getPhoneNumberValues(number)["2"].toString();
|
|
3106
|
+
// List of all countries with dailCode (can be more than one. e.x. US, CA, DO, PR all have +1 dailCode)
|
|
3107
|
+
const countries = COUNTRIES.filter((c) => c.dailCode === dailCode?.toString());
|
|
3108
|
+
// Main country is the country, which has no areaCodes specified in country-code.ts file.
|
|
3109
|
+
const mainCountry = countries.find((c) => c.areaCodes === undefined);
|
|
3110
|
+
// Secondary countries are all countries, which have areaCodes specified in country-code.ts file.
|
|
3111
|
+
const secondaryCountries = countries.filter((c) => c.areaCodes !== undefined);
|
|
3112
|
+
let matchedCountry = mainCountry ? mainCountry : undefined;
|
|
3113
|
+
/*
|
|
3114
|
+
Iterate over each secondary country and check if nationalNumber starts with any of areaCodes available.
|
|
3115
|
+
If no matches found, fallback to the main country.
|
|
3116
|
+
*/
|
|
3117
|
+
secondaryCountries.forEach((country) => {
|
|
3118
|
+
if (country && country.areaCodes) {
|
|
3119
|
+
country.areaCodes.forEach((areaCode) => {
|
|
3120
|
+
if (rawNumber.startsWith(areaCode)) {
|
|
3121
|
+
matchedCountry = country;
|
|
3122
|
+
}
|
|
3123
|
+
});
|
|
3124
|
+
}
|
|
3125
|
+
});
|
|
3126
|
+
return matchedCountry;
|
|
3127
|
+
}
|
|
3128
|
+
#getCountryDailCode(number) {
|
|
3129
|
+
return this.#getPhoneNumberValues(number)?.["1"].toString() ?? "";
|
|
3130
|
+
}
|
|
3131
|
+
#getPhoneNumberValues(number) {
|
|
3132
|
+
// @ts-ignore
|
|
3133
|
+
return number?.["values_"];
|
|
3134
|
+
}
|
|
3135
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PhoneService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3136
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PhoneService, providedIn: "root" }); }
|
|
3137
|
+
}
|
|
3138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PhoneService, decorators: [{
|
|
3139
|
+
type: Injectable,
|
|
3140
|
+
args: [{
|
|
3141
|
+
providedIn: "root"
|
|
3142
|
+
}]
|
|
3143
|
+
}] });
|
|
3144
|
+
|
|
3145
|
+
const DEFAULT_COUNTRY = {
|
|
3146
|
+
name: "Saudi Arabia (المملكة العربية السعودية)",
|
|
3147
|
+
code: "sa",
|
|
3148
|
+
dailCode: "966",
|
|
3149
|
+
priority: 0,
|
|
3150
|
+
order: 1000,
|
|
3151
|
+
placeholder: "512345678"
|
|
3152
|
+
};
|
|
3153
|
+
class MobileComponent extends BaseCtrl {
|
|
3154
|
+
constructor() {
|
|
3155
|
+
super(...arguments);
|
|
3156
|
+
this.phoneService = inject(PhoneService);
|
|
3157
|
+
this.isOpen = signal(false);
|
|
3158
|
+
this.selectedCountry = signal(DEFAULT_COUNTRY);
|
|
3159
|
+
this.preferredCountries = input(["sa"]);
|
|
3160
|
+
this.searchInput = new FormControl("");
|
|
3161
|
+
this.filteredCountries = computed(() => this.#searchInCountries());
|
|
3162
|
+
this.#ctrlChanges = toSignal(this.ctrl.valueChanges);
|
|
3163
|
+
this.#searchQuery = toSignal(this.searchInput.valueChanges);
|
|
3164
|
+
}
|
|
3165
|
+
#ctrlChanges;
|
|
3166
|
+
#searchQuery;
|
|
3167
|
+
writeValue(value) {
|
|
3168
|
+
if (value) {
|
|
3169
|
+
const mobileObject = this.phoneService.getPhoneNumberObject(value);
|
|
3170
|
+
if (mobileObject) {
|
|
3171
|
+
this.selectedCountry.set(mobileObject);
|
|
3172
|
+
this.emitOnChangeEvent(this.selectedCountry());
|
|
3173
|
+
}
|
|
3174
|
+
this.ctrl.setValue(mobileObject?.nationalNumber);
|
|
3175
|
+
}
|
|
3176
|
+
}
|
|
3177
|
+
emit() {
|
|
3178
|
+
if (this.#ctrlChanges()) {
|
|
3179
|
+
const numberObject = this.phoneService.getPhoneNumberObject(`+${this.selectedCountry().dailCode}${this.#ctrlChanges()}`);
|
|
3180
|
+
if (numberObject) {
|
|
3181
|
+
this.selectedCountry.set(numberObject);
|
|
3182
|
+
this.propagateValue(`+${numberObject.dailCode}${numberObject.nationalNumber}`);
|
|
3183
|
+
this.emitOnChangeEvent(this.selectedCountry());
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
else {
|
|
3187
|
+
this.propagateValue(null);
|
|
3188
|
+
this.emitOnChangeEvent(null);
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3191
|
+
validate(control) {
|
|
3192
|
+
if (!control.getRawValue()) {
|
|
3193
|
+
return null;
|
|
3194
|
+
}
|
|
3195
|
+
let error = { invalidPhoneNumber: { accepted: this.selectedCountry().placeholder, input: control.getRawValue() } };
|
|
3196
|
+
let isValid = this.phoneService.validate(control.getRawValue());
|
|
3197
|
+
if (isValid) {
|
|
3198
|
+
return null;
|
|
3199
|
+
}
|
|
3200
|
+
return error;
|
|
3201
|
+
}
|
|
3202
|
+
onInput(event) {
|
|
3203
|
+
const allowedChars = /[0-9+\-()]/;
|
|
3204
|
+
const allowedCtrlChars = /[axcv]/; // Allows copy-pasting
|
|
3205
|
+
const allowedOtherKeys = [
|
|
3206
|
+
"ArrowLeft",
|
|
3207
|
+
"ArrowUp",
|
|
3208
|
+
"ArrowRight",
|
|
3209
|
+
"ArrowDown",
|
|
3210
|
+
"Home",
|
|
3211
|
+
"End",
|
|
3212
|
+
"Insert",
|
|
3213
|
+
"Delete",
|
|
3214
|
+
"Backspace",
|
|
3215
|
+
];
|
|
3216
|
+
if (!allowedChars.test(event.key) && !(event.ctrlKey && allowedCtrlChars.test(event.key)) && !allowedOtherKeys.includes(event.key)) {
|
|
3217
|
+
event.preventDefault();
|
|
3218
|
+
}
|
|
3219
|
+
}
|
|
3220
|
+
onSelectCountry(country) {
|
|
3221
|
+
this.selectedCountry.set(country);
|
|
3222
|
+
this.searchInput.setValue("");
|
|
3223
|
+
this.closeCountryCodeMenu();
|
|
3224
|
+
this.propagateValue(`+${this.selectedCountry().dailCode}${this.#ctrlChanges()}`);
|
|
3225
|
+
this.emitOnChangeEvent(`+${this.selectedCountry().dailCode}${this.#ctrlChanges()}`);
|
|
3226
|
+
}
|
|
3227
|
+
closeCountryCodeMenu() {
|
|
3228
|
+
this.isOpen.set(false);
|
|
3229
|
+
}
|
|
3230
|
+
toggleCountryCodeMenu() {
|
|
3231
|
+
this.isOpen.update((isOpen) => !isOpen);
|
|
3232
|
+
}
|
|
3233
|
+
#sortCountries() {
|
|
3234
|
+
return COUNTRIES.map((country) => {
|
|
3235
|
+
if (this.preferredCountries().includes(country.code)) {
|
|
3236
|
+
country.order = country.priority + (-1 * (this.preferredCountries().indexOf(country.code) - this.preferredCountries().length)) * 100;
|
|
3237
|
+
}
|
|
3238
|
+
return country;
|
|
3239
|
+
}).sort((a, b) => b.order - a.order);
|
|
3240
|
+
}
|
|
3241
|
+
#searchInCountries() {
|
|
3242
|
+
if (this.#searchQuery()) {
|
|
3243
|
+
return this.#sortCountries().filter((country) => {
|
|
3244
|
+
return (country.code.toLowerCase().includes(this.#searchQuery())
|
|
3245
|
+
|| country.name.toLowerCase().includes(this.#searchQuery())
|
|
3246
|
+
|| country.dailCode.toLowerCase().includes(this.#searchQuery()));
|
|
3247
|
+
});
|
|
3248
|
+
}
|
|
3249
|
+
return this.#sortCountries();
|
|
3250
|
+
}
|
|
3251
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: MobileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3252
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: MobileComponent, isStandalone: true, selector: "iss-ctrl-mobile", inputs: { preferredCountries: { classPropertyName: "preferredCountries", publicName: "preferredCountries", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
3253
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: MobileComponent, multi: true },
|
|
3254
|
+
{ provide: NG_VALIDATORS, useExisting: MobileComponent, multi: true }
|
|
3255
|
+
], usesInheritance: true, ngImport: i0, template: "<mat-form-field cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\">\r\n <div class=\"d-inline-flex align-items-center gap-1 country-flag\" matPrefix (click)=\"toggleCountryCodeMenu()\">\r\n <img ngSrc=\"./flags/{{selectedCountry().code}}.svg\" width=\"20\" height=\"20\" alt=\"\" class=\"country-flag--image\" [priority]=\"true\">\r\n <!--@if (separateDialCode()) {\r\n <div class=\"selected-dial-code\">+{{ selectedCountry.dialCode }}</div>\r\n }-->\r\n <ds-icon icon=\"arrow-down\" class=\"fs-12 fc-dark-gray\"></ds-icon>\r\n </div>\r\n <input\r\n matInput\r\n type=\"tel\"\r\n autocomplete=\"off\"\r\n (blur)=\"markAsTouched()\"\r\n (keydown)=\"onInput($event)\"\r\n (input)=\"emit()\"\r\n [formControl]=\"ctrl\"\r\n [disabled]=\"disabled()\"\r\n [placeholder]=\"selectedCountry().placeholder\"\r\n />\r\n</mat-form-field>\r\n\r\n\r\n<ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayHasBackdrop]=\"true\"\r\n (backdropClick)=\"closeCountryCodeMenu()\"\r\n [cdkConnectedOverlayGrowAfterOpen]=\"true\"\r\n [cdkConnectedOverlayOrigin]=\"trigger\"\r\n [cdkConnectedOverlayOpen]=\"isOpen()\"\r\n>\r\n <div class=\"country-dropdown bc-white box-shadow p-2\">\r\n <div class=\"search-container\">\r\n <mat-form-field>\r\n <input matInput id=\"country-search-box\" [formControl]=\"searchInput\" (click)=\"$event.stopPropagation()\"/>\r\n </mat-form-field>\r\n </div>\r\n <ul class=\"country-list\">\r\n @for (country of filteredCountries(); track $index) {\r\n <li\r\n #countryEl\r\n [ngClass]=\"country.order > 1 ? 'preferredCounty' : ''\"\r\n class=\"d-flex align-items-center gap-2 cursor-pointer p-2\"\r\n (click)=\"onSelectCountry(country)\"\r\n >\r\n @defer (on viewport(countryEl)) {\r\n <img ngSrc=\"./flags/{{country.code}}.svg\" width=\"20\" height=\"20\" alt=\"\" class=\"country-flag--image\">\r\n }\r\n <span class=\"fs-12 fc-black\">{{ country.name }}</span>\r\n <span class=\"fs-12 fc-dark-gray\">+{{ country.dailCode }}</span>\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n</ng-template>\r\n", styles: [".country-flag{border-inline-end:var(--input-border);padding-inline-end:.5rem;margin-inline-end:.5rem;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }], deferBlockDependencies: [() => [NgOptimizedImage]] }); }
|
|
3256
|
+
}
|
|
3257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: MobileComponent, decorators: [{
|
|
3258
|
+
type: Component,
|
|
3259
|
+
args: [{ selector: "iss-ctrl-mobile", standalone: true, imports: [
|
|
3260
|
+
ReactiveFormsModule,
|
|
3261
|
+
NgClass,
|
|
3262
|
+
CdkConnectedOverlay,
|
|
3263
|
+
CdkOverlayOrigin,
|
|
3264
|
+
MatFormField,
|
|
3265
|
+
MatInput,
|
|
3266
|
+
MatPrefix,
|
|
3267
|
+
NgOptimizedImage
|
|
3268
|
+
], providers: [
|
|
3269
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: MobileComponent, multi: true },
|
|
3270
|
+
{ provide: NG_VALIDATORS, useExisting: MobileComponent, multi: true }
|
|
3271
|
+
], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<mat-form-field cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\">\r\n <div class=\"d-inline-flex align-items-center gap-1 country-flag\" matPrefix (click)=\"toggleCountryCodeMenu()\">\r\n <img ngSrc=\"./flags/{{selectedCountry().code}}.svg\" width=\"20\" height=\"20\" alt=\"\" class=\"country-flag--image\" [priority]=\"true\">\r\n <!--@if (separateDialCode()) {\r\n <div class=\"selected-dial-code\">+{{ selectedCountry.dialCode }}</div>\r\n }-->\r\n <ds-icon icon=\"arrow-down\" class=\"fs-12 fc-dark-gray\"></ds-icon>\r\n </div>\r\n <input\r\n matInput\r\n type=\"tel\"\r\n autocomplete=\"off\"\r\n (blur)=\"markAsTouched()\"\r\n (keydown)=\"onInput($event)\"\r\n (input)=\"emit()\"\r\n [formControl]=\"ctrl\"\r\n [disabled]=\"disabled()\"\r\n [placeholder]=\"selectedCountry().placeholder\"\r\n />\r\n</mat-form-field>\r\n\r\n\r\n<ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayHasBackdrop]=\"true\"\r\n (backdropClick)=\"closeCountryCodeMenu()\"\r\n [cdkConnectedOverlayGrowAfterOpen]=\"true\"\r\n [cdkConnectedOverlayOrigin]=\"trigger\"\r\n [cdkConnectedOverlayOpen]=\"isOpen()\"\r\n>\r\n <div class=\"country-dropdown bc-white box-shadow p-2\">\r\n <div class=\"search-container\">\r\n <mat-form-field>\r\n <input matInput id=\"country-search-box\" [formControl]=\"searchInput\" (click)=\"$event.stopPropagation()\"/>\r\n </mat-form-field>\r\n </div>\r\n <ul class=\"country-list\">\r\n @for (country of filteredCountries(); track $index) {\r\n <li\r\n #countryEl\r\n [ngClass]=\"country.order > 1 ? 'preferredCounty' : ''\"\r\n class=\"d-flex align-items-center gap-2 cursor-pointer p-2\"\r\n (click)=\"onSelectCountry(country)\"\r\n >\r\n @defer (on viewport(countryEl)) {\r\n <img ngSrc=\"./flags/{{country.code}}.svg\" width=\"20\" height=\"20\" alt=\"\" class=\"country-flag--image\">\r\n }\r\n <span class=\"fs-12 fc-black\">{{ country.name }}</span>\r\n <span class=\"fs-12 fc-dark-gray\">+{{ country.dailCode }}</span>\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n</ng-template>\r\n", styles: [".country-flag{border-inline-end:var(--input-border);padding-inline-end:.5rem;margin-inline-end:.5rem;cursor:pointer}\n"] }]
|
|
3272
|
+
}] });
|
|
3273
|
+
|
|
3274
|
+
class NoteComponent extends BaseCtrl {
|
|
3275
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NoteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3276
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: NoteComponent, isStandalone: true, selector: "iss-ctrl-note", providers: [
|
|
3277
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: NoteComponent, multi: true }
|
|
3278
|
+
], usesInheritance: true, ngImport: i0, template: "<p>note works!</p>\r\n", styles: [""] }); }
|
|
3279
|
+
}
|
|
3280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NoteComponent, decorators: [{
|
|
3281
|
+
type: Component,
|
|
3282
|
+
args: [{ selector: "iss-ctrl-note", standalone: true, imports: [], providers: [
|
|
3283
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: NoteComponent, multi: true }
|
|
3284
|
+
], template: "<p>note works!</p>\r\n" }]
|
|
3285
|
+
}] });
|
|
3286
|
+
|
|
3287
|
+
class PlateNumberComponent extends BaseCtrl {
|
|
3288
|
+
constructor() {
|
|
3289
|
+
super(...arguments);
|
|
3290
|
+
this.plate = new FormGroup({
|
|
3291
|
+
numbers: new FormArray([
|
|
3292
|
+
new FormControl(null),
|
|
3293
|
+
new FormControl(null),
|
|
3294
|
+
new FormControl(null),
|
|
3295
|
+
new FormControl(null),
|
|
3296
|
+
]),
|
|
3297
|
+
letters: new FormArray([
|
|
3298
|
+
new FormControl(null),
|
|
3299
|
+
new FormControl(null),
|
|
3300
|
+
new FormControl(null),
|
|
3301
|
+
]),
|
|
3302
|
+
});
|
|
3303
|
+
this.options = [
|
|
3304
|
+
{ label: "A/أ", value: "A" },
|
|
3305
|
+
{ label: "B/ب", value: "B" },
|
|
3306
|
+
{ label: "J/ح", value: "J" },
|
|
3307
|
+
{ label: "D/د", value: "D" },
|
|
3308
|
+
{ label: "R/ر", value: "R" },
|
|
3309
|
+
{ label: "S/س", value: "S" },
|
|
3310
|
+
{ label: "X/ص", value: "X" },
|
|
3311
|
+
{ label: "T/ط", value: "T" },
|
|
3312
|
+
{ label: "E/ع", value: "E" },
|
|
3313
|
+
{ label: "G/ق", value: "G" },
|
|
3314
|
+
{ label: "K/ك", value: "K" },
|
|
3315
|
+
{ label: "L/ل", value: "L" },
|
|
3316
|
+
{ label: "Z/م", value: "Z" },
|
|
3317
|
+
{ label: "N/ن", value: "N" },
|
|
3318
|
+
{ label: "H/هـ", value: "H" },
|
|
3319
|
+
{ label: "U/و", value: "U" },
|
|
3320
|
+
{ label: "V/ي", value: "V" }
|
|
3321
|
+
];
|
|
3322
|
+
this.#plateChanges = toSignal(this.plate.valueChanges);
|
|
3323
|
+
this.#lettersArr = computed(() => this.#plateChanges()["letters"].filter((l) => l));
|
|
3324
|
+
this.#letters = computed(() => this.#lettersArr().join(""));
|
|
3325
|
+
this.#numbersArr = computed(() => this.#plateChanges()["numbers"].filter((l) => l));
|
|
3326
|
+
this.#numbers = computed(() => this.#numbersArr().join(""));
|
|
3327
|
+
this.#plateHasValue = computed(() => !!(this.#letters().length && this.#numbers().length));
|
|
3328
|
+
this.#effectRef = effect(() => {
|
|
3329
|
+
if (this.#plateChanges()) {
|
|
3330
|
+
this.propagateValue(this.#getEmissionValue());
|
|
3331
|
+
this.emitOnChangeEvent({ letters: this.#lettersArr(), numbers: this.#numbersArr() });
|
|
3332
|
+
}
|
|
3333
|
+
});
|
|
3334
|
+
}
|
|
3335
|
+
#plateChanges;
|
|
3336
|
+
#lettersArr;
|
|
3337
|
+
#letters;
|
|
3338
|
+
#numbersArr;
|
|
3339
|
+
#numbers;
|
|
3340
|
+
#plateHasValue;
|
|
3341
|
+
#effectRef;
|
|
3342
|
+
get letterControls() {
|
|
3343
|
+
return this.plate.controls["letters"].controls;
|
|
3344
|
+
}
|
|
3345
|
+
get numberControls() {
|
|
3346
|
+
return this.plate.controls["numbers"].controls;
|
|
3347
|
+
}
|
|
3348
|
+
writeValue(value) {
|
|
3349
|
+
let processedValue = this.#splitPlateValues(value);
|
|
3350
|
+
if (processedValue) {
|
|
3351
|
+
this.plate.patchValue(processedValue);
|
|
3352
|
+
}
|
|
3353
|
+
}
|
|
3354
|
+
ngOnDestroy() {
|
|
3355
|
+
this.#effectRef.destroy();
|
|
3356
|
+
}
|
|
3357
|
+
#getEmissionValue() {
|
|
3358
|
+
if (this.#plateHasValue()) {
|
|
3359
|
+
return `${this.#letters()}-${this.#numbers()}`;
|
|
3360
|
+
}
|
|
3361
|
+
return null;
|
|
3362
|
+
}
|
|
3363
|
+
#splitPlateValues(value) {
|
|
3364
|
+
if (value) {
|
|
3365
|
+
let lettersAndNumbers = value.split("-");
|
|
3366
|
+
let letters = lettersAndNumbers[0].split("");
|
|
3367
|
+
let numbers = lettersAndNumbers[1].split("");
|
|
3368
|
+
return { letters, numbers };
|
|
3369
|
+
}
|
|
3370
|
+
return null;
|
|
3371
|
+
}
|
|
3372
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PlateNumberComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3373
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: PlateNumberComponent, isStandalone: true, selector: "iss-ctrl-plate-number", providers: [
|
|
3374
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: PlateNumberComponent, multi: true }
|
|
3375
|
+
], usesInheritance: true, ngImport: i0, template: "<div [formGroup]=\"plate\">\r\n <div class=\"row mb-4\">\r\n <ng-container formArrayName=\"numbers\">\r\n @for (item of numberControls; track $index) {\r\n <div class=\"col-sm-3\">\r\n <mat-form-field class=\"mat-form-field-number\">\r\n <input\r\n type=\"number\"\r\n matInput\r\n [formControlName]=\"$index\"\r\n maxlength=\"1\"\r\n placeholder=\"\"\r\n oninput=\"if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n }\r\n </ng-container>\r\n </div>\r\n <div class=\"row mb-4\">\r\n <ng-container formArrayName=\"letters\">\r\n @for (el of letterControls; track $index) {\r\n <div class=\"col-sm-4\">\r\n <mat-form-field class=\"mat-form-field-number\">\r\n <mat-select disableOptionCentering [formControlName]=\"$index\">\r\n @for (option of options; track option.value) {\r\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n }\r\n </ng-container>\r\n </div>\r\n <!--<div class=\"row mb-4\">\r\n <div class=\"col-12\">\r\n <ng-container *ngTemplateOutlet=\"plateElement\"></ng-container>\r\n </div>\r\n </div>-->\r\n</div>\r\n\r\n\r\n<!--<ng-template #plateElement>\r\n <div class=\"plate d-inline-flex align-items-stretch justify-content-between fs-18\">\r\n <div class=\"d-flex flex-column border-right w-100\">\r\n <div class=\"ARPlate border-bottom d-flex h-50 w-100\">\r\n <div class=\"fc-black border-right w-50 d-flex align-items-center justify-content-center gap-1\">\r\n <span>{{ number1 | arabicNumbers }}</span>\r\n <span>{{ number2 | arabicNumbers }}</span>\r\n <span>{{ number3 | arabicNumbers }}</span>\r\n <span>{{ number4 | arabicNumbers }}</span>\r\n </div>\r\n <span class=\"fw-medium fc-black w-50 d-flex align-items-center justify-content-center\">\r\n <span>{{ letter1Ar }}</span> <span class=\"m-1\">{{ letter2Ar }}</span> <span>{{ letter3Ar }}</span>\r\n </span>\r\n </div>\r\n <div class=\"ENPlate d-flex h-50 w-100\">\r\n <span class=\"fc-black border-right w-50 d-flex align-items-center justify-content-center\">\r\n {{ number1 === null || number1 === undefined ? '' : number1 }}\r\n {{ number2 === null || number2 === undefined ? '' : number2 }}\r\n {{ number3 === null || number3 === undefined ? '' : number3 }}\r\n {{ number4 === null || number4 === undefined ? '' : number4 }}\r\n </span>\r\n <span class=\"fw-medium fc-black w-50 d-flex align-items-center justify-content-center\">\r\n {{ letter1En.toUpperCase() + ' ' + letter2En.toUpperCase() + ' ' + letter3En.toUpperCase() }}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-column gap-2 justify-content-center px-2 align-items-center\">\r\n <img src=\"assets/images/ksa-symbol.svg\" alt=\"\"/>\r\n\r\n <span class=\"fw-medium fs-12 line-height-1-2\">K<br/>S<br/>A</span>\r\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <circle cx=\"4.49162\" cy=\"4.06193\" r=\"3.99162\" fill=\"#1D252D\"/>\r\n </svg>\r\n </div>\r\n </div>\r\n</ng-template>-->\r\n", styles: [""], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] }); }
|
|
3376
|
+
}
|
|
3377
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PlateNumberComponent, decorators: [{
|
|
3378
|
+
type: Component,
|
|
3379
|
+
args: [{ selector: "iss-ctrl-plate-number", standalone: true, imports: [
|
|
3380
|
+
MatFormField,
|
|
3381
|
+
ReactiveFormsModule,
|
|
3382
|
+
MatInput,
|
|
3383
|
+
MatSelect,
|
|
3384
|
+
MatOption,
|
|
3385
|
+
NgTemplateOutlet
|
|
3386
|
+
], providers: [
|
|
3387
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: PlateNumberComponent, multi: true }
|
|
3388
|
+
], template: "<div [formGroup]=\"plate\">\r\n <div class=\"row mb-4\">\r\n <ng-container formArrayName=\"numbers\">\r\n @for (item of numberControls; track $index) {\r\n <div class=\"col-sm-3\">\r\n <mat-form-field class=\"mat-form-field-number\">\r\n <input\r\n type=\"number\"\r\n matInput\r\n [formControlName]=\"$index\"\r\n maxlength=\"1\"\r\n placeholder=\"\"\r\n oninput=\"if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n }\r\n </ng-container>\r\n </div>\r\n <div class=\"row mb-4\">\r\n <ng-container formArrayName=\"letters\">\r\n @for (el of letterControls; track $index) {\r\n <div class=\"col-sm-4\">\r\n <mat-form-field class=\"mat-form-field-number\">\r\n <mat-select disableOptionCentering [formControlName]=\"$index\">\r\n @for (option of options; track option.value) {\r\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n }\r\n </ng-container>\r\n </div>\r\n <!--<div class=\"row mb-4\">\r\n <div class=\"col-12\">\r\n <ng-container *ngTemplateOutlet=\"plateElement\"></ng-container>\r\n </div>\r\n </div>-->\r\n</div>\r\n\r\n\r\n<!--<ng-template #plateElement>\r\n <div class=\"plate d-inline-flex align-items-stretch justify-content-between fs-18\">\r\n <div class=\"d-flex flex-column border-right w-100\">\r\n <div class=\"ARPlate border-bottom d-flex h-50 w-100\">\r\n <div class=\"fc-black border-right w-50 d-flex align-items-center justify-content-center gap-1\">\r\n <span>{{ number1 | arabicNumbers }}</span>\r\n <span>{{ number2 | arabicNumbers }}</span>\r\n <span>{{ number3 | arabicNumbers }}</span>\r\n <span>{{ number4 | arabicNumbers }}</span>\r\n </div>\r\n <span class=\"fw-medium fc-black w-50 d-flex align-items-center justify-content-center\">\r\n <span>{{ letter1Ar }}</span> <span class=\"m-1\">{{ letter2Ar }}</span> <span>{{ letter3Ar }}</span>\r\n </span>\r\n </div>\r\n <div class=\"ENPlate d-flex h-50 w-100\">\r\n <span class=\"fc-black border-right w-50 d-flex align-items-center justify-content-center\">\r\n {{ number1 === null || number1 === undefined ? '' : number1 }}\r\n {{ number2 === null || number2 === undefined ? '' : number2 }}\r\n {{ number3 === null || number3 === undefined ? '' : number3 }}\r\n {{ number4 === null || number4 === undefined ? '' : number4 }}\r\n </span>\r\n <span class=\"fw-medium fc-black w-50 d-flex align-items-center justify-content-center\">\r\n {{ letter1En.toUpperCase() + ' ' + letter2En.toUpperCase() + ' ' + letter3En.toUpperCase() }}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-column gap-2 justify-content-center px-2 align-items-center\">\r\n <img src=\"assets/images/ksa-symbol.svg\" alt=\"\"/>\r\n\r\n <span class=\"fw-medium fs-12 line-height-1-2\">K<br/>S<br/>A</span>\r\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <circle cx=\"4.49162\" cy=\"4.06193\" r=\"3.99162\" fill=\"#1D252D\"/>\r\n </svg>\r\n </div>\r\n </div>\r\n</ng-template>-->\r\n" }]
|
|
3389
|
+
}] });
|
|
3390
|
+
|
|
3391
|
+
class RadioComponent extends BaseCtrl {
|
|
3392
|
+
constructor() {
|
|
3393
|
+
super(...arguments);
|
|
3394
|
+
this.options = input.required();
|
|
3395
|
+
}
|
|
3396
|
+
writeValue(value) {
|
|
3397
|
+
if (value === null || value === undefined) {
|
|
3398
|
+
return;
|
|
3399
|
+
}
|
|
3400
|
+
const values = value.split(",").map(val => val.trim());
|
|
3401
|
+
if (values.length > 1) {
|
|
3402
|
+
this.emitValue(null);
|
|
3403
|
+
throw new Error("You cannot set multiple values while the control is in single selection mode!");
|
|
3404
|
+
}
|
|
3405
|
+
this.ctrl.setValue(value);
|
|
3406
|
+
}
|
|
3407
|
+
onRadioChange(value) {
|
|
3408
|
+
this.emitValue(value);
|
|
3409
|
+
}
|
|
3410
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: RadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3411
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: RadioComponent, isStandalone: true, selector: "iss-ctrl-radio", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
3412
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: RadioComponent, multi: true }
|
|
3413
|
+
], usesInheritance: true, ngImport: i0, template: "<mat-radio-group aria-label=\"Select an option\">\r\n @for (option of options(); track option.value) {\r\n <mat-radio-button\r\n [value]=\"option.value\"\r\n [checked]=\"ctrl.value === option.value\"\r\n (change)=\"onRadioChange(option.value)\"\r\n >{{ option.label }}\r\n </mat-radio-button>\r\n }\r\n</mat-radio-group>\r\n", styles: [".mat-mdc-radio-group{flex-direction:column!important}\n"], dependencies: [{ kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i1$3.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i1$3.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
|
|
3414
|
+
}
|
|
3415
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: RadioComponent, decorators: [{
|
|
3416
|
+
type: Component,
|
|
3417
|
+
args: [{ selector: "iss-ctrl-radio", standalone: true, imports: [
|
|
3418
|
+
MatRadioModule,
|
|
3419
|
+
ReactiveFormsModule,
|
|
3420
|
+
], providers: [
|
|
3421
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: RadioComponent, multi: true }
|
|
3422
|
+
], template: "<mat-radio-group aria-label=\"Select an option\">\r\n @for (option of options(); track option.value) {\r\n <mat-radio-button\r\n [value]=\"option.value\"\r\n [checked]=\"ctrl.value === option.value\"\r\n (change)=\"onRadioChange(option.value)\"\r\n >{{ option.label }}\r\n </mat-radio-button>\r\n }\r\n</mat-radio-group>\r\n", styles: [".mat-mdc-radio-group{flex-direction:column!important}\n"] }]
|
|
3423
|
+
}] });
|
|
3424
|
+
|
|
3425
|
+
class SelectComponent extends BaseCtrl {
|
|
3426
|
+
constructor() {
|
|
3427
|
+
super(...arguments);
|
|
3428
|
+
this.selectedOptions = signal(new Map());
|
|
3429
|
+
this.options = input.required();
|
|
3430
|
+
this.query = toSignal(this.ctrl.valueChanges);
|
|
3431
|
+
this.filteredOptions = computed(() => this.#filter(this.query()));
|
|
3432
|
+
this.displayFn = (options) => {
|
|
3433
|
+
if (Array.isArray(options) && !this.multiple()) {
|
|
3434
|
+
/*const selectedLabel: string[] = options.map((o) => o.label);
|
|
3435
|
+
if (this.multiple() && selectedLabel.length > 1) {
|
|
3436
|
+
str += ` + ${selectedLabel.length - 1}`;
|
|
3437
|
+
}*/
|
|
3438
|
+
return options[0].label;
|
|
3439
|
+
}
|
|
3440
|
+
return "";
|
|
3441
|
+
};
|
|
3442
|
+
}
|
|
3443
|
+
writeValue(value) {
|
|
3444
|
+
this.#reset();
|
|
3445
|
+
if (value === null || value === undefined) {
|
|
3446
|
+
return;
|
|
3447
|
+
}
|
|
3448
|
+
const values = value.split(",").map(val => val.trim());
|
|
3449
|
+
let selectedOptions = this.options().filter((option) => values.includes(option.value));
|
|
3450
|
+
if (!this.multiple()) {
|
|
3451
|
+
if (selectedOptions.length > 1) {
|
|
3452
|
+
this.emitValue(null);
|
|
3453
|
+
throw new Error("You cannot set multiple values while the control is in single selection mode!");
|
|
3454
|
+
}
|
|
3455
|
+
selectedOptions = selectedOptions.splice(-selectedOptions.length, selectedOptions.length - selectedOptions.length + 1);
|
|
3456
|
+
}
|
|
3457
|
+
for (let i = 0; i < selectedOptions.length; i++) {
|
|
3458
|
+
const val = selectedOptions[i];
|
|
3459
|
+
this.addToSelectedOptionsMap(val);
|
|
3460
|
+
}
|
|
3461
|
+
this.ctrl.setValue(selectedOptions);
|
|
3462
|
+
}
|
|
3463
|
+
stringifySelectedOptions() {
|
|
3464
|
+
if (!this.selectedOptions()?.size) {
|
|
3465
|
+
return null;
|
|
3466
|
+
}
|
|
3467
|
+
return Array.from(this.selectedOptions(), ([value]) => value).join();
|
|
3468
|
+
}
|
|
3469
|
+
getEmissionValue($event) {
|
|
3470
|
+
this.addToSelectedOptionsMap($event?.option.value);
|
|
3471
|
+
this.emitValue(this.stringifySelectedOptions());
|
|
3472
|
+
}
|
|
3473
|
+
removeFromSelectedOptionsMap(option) {
|
|
3474
|
+
this.selectedOptions().delete(option.value);
|
|
3475
|
+
//to update menu options with new version of the options
|
|
3476
|
+
this.filteredOptions = computed(() => this.#filter(this.query()));
|
|
3477
|
+
this.emitValue(this.stringifySelectedOptions());
|
|
3478
|
+
}
|
|
3479
|
+
addToSelectedOptionsMap(option) {
|
|
3480
|
+
if (option) {
|
|
3481
|
+
const selectedOption = option;
|
|
3482
|
+
if (!this.multiple()) {
|
|
3483
|
+
this.#reset();
|
|
3484
|
+
}
|
|
3485
|
+
this.selectedOptions().set(selectedOption.value, selectedOption);
|
|
3486
|
+
this.ctrl.setValue(Array.from(this.selectedOptions(), ([_, option]) => option));
|
|
3487
|
+
}
|
|
3488
|
+
}
|
|
3489
|
+
clearSelection() {
|
|
3490
|
+
this.#reset();
|
|
3491
|
+
this.emitOnChangeEvent(null);
|
|
3492
|
+
this.emitValue(null);
|
|
3493
|
+
}
|
|
3494
|
+
#filter(queryString) {
|
|
3495
|
+
if (queryString === null || queryString === undefined || typeof queryString !== "string") {
|
|
3496
|
+
return JSON.parse(JSON.stringify(this.options()));
|
|
3497
|
+
}
|
|
3498
|
+
const query = queryString.toLowerCase();
|
|
3499
|
+
const filteredOptions = this.options().filter((option) => {
|
|
3500
|
+
return (option.value.toLowerCase().includes(query) || option.label.toLowerCase().includes(query));
|
|
3501
|
+
});
|
|
3502
|
+
return JSON.parse(JSON.stringify(filteredOptions));
|
|
3503
|
+
}
|
|
3504
|
+
#reset() {
|
|
3505
|
+
this.selectedOptions().clear();
|
|
3506
|
+
this.filteredOptions = computed(() => this.#filter(this.query()));
|
|
3507
|
+
this.ctrl.setValue(null);
|
|
3508
|
+
}
|
|
3509
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3510
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: SelectComponent, isStandalone: true, selector: "iss-ctrl-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
3511
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true },
|
|
3512
|
+
{ provide: NG_VALIDATORS, useExisting: SelectComponent, multi: true }
|
|
3513
|
+
], usesInheritance: true, ngImport: i0, template: "<mat-form-field floatLabel=\"always\">\r\n <mat-label />\r\n <input [formControl]=\"ctrl\" [matAutocomplete]=\"auto\" class=\"m-0\" [matChipInputFor]=\"chipGrid\" [placeholder]=\"placeholder()\" matInput/>\r\n @if (selectedOptions().size) {\r\n <span matSuffix class=\"sfi sfi-close fs-18 fc-black cursor-pointer\" (click)=\"clearSelection()\"></span>\r\n } @else {\r\n <span matSuffix class=\"sfi sfi-arrow-down fs-18 fc-black cursor-pointer\"></span>\r\n }\r\n\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n [displayWith]=\"displayFn\"\r\n autoActiveFirstOption\r\n hideSingleSelectionIndicator\r\n (optionSelected)=\"getEmissionValue($event)\"\r\n >\r\n @if (filteredOptions().length) {\r\n @for (option of filteredOptions(); track option.value) {\r\n <mat-option\r\n [value]=\"option\"\r\n [ngClass]=\"{'mdc-list-item__selected': option | selectStatus: selectedOptions()}\"\r\n >\r\n {{ option.label }}\r\n </mat-option>\r\n }\r\n } @else {\r\n <mat-option disabled=\"true\">No Result Found</mat-option>\r\n }\r\n </mat-autocomplete>\r\n</mat-form-field>\r\n<mat-chip-grid #chipGrid>\r\n @if (multiple()) {\r\n @for (chip of selectedOptions(); track chip[0]) {\r\n <mat-chip-row (removed)=\"removeFromSelectedOptionsMap(chip[1])\">\r\n {{ chip[1].label }}\r\n <button matChipRemove [attr.aria-label]=\"'remove ' + chip[1].label\">\r\n <ds-icon icon=\"trash\" class=\"fc-red\"></ds-icon>\r\n </button>\r\n </mat-chip-row>\r\n }\r\n }\r\n</mat-chip-grid>\r\n", styles: ["::ng-deep .mat-mdc-option.mdc-list-item__selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{--mat-option-selected-state-label-text-color: var(--green);color:var(--green)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i6.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i6.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i6.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i6.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: SelectStatusPipe, name: "selectStatus" }] }); }
|
|
3514
|
+
}
|
|
3515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SelectComponent, decorators: [{
|
|
3516
|
+
type: Component,
|
|
3517
|
+
args: [{ selector: "iss-ctrl-select", standalone: true, imports: [
|
|
3518
|
+
ReactiveFormsModule,
|
|
3519
|
+
MatAutocompleteModule,
|
|
3520
|
+
MatInputModule,
|
|
3521
|
+
MatChipsModule,
|
|
3522
|
+
MatIconModule,
|
|
3523
|
+
NgClass,
|
|
3524
|
+
SelectStatusPipe,
|
|
3525
|
+
JsonPipe,
|
|
3526
|
+
], providers: [
|
|
3527
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: SelectComponent, multi: true },
|
|
3528
|
+
{ provide: NG_VALIDATORS, useExisting: SelectComponent, multi: true }
|
|
3529
|
+
], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<mat-form-field floatLabel=\"always\">\r\n <mat-label />\r\n <input [formControl]=\"ctrl\" [matAutocomplete]=\"auto\" class=\"m-0\" [matChipInputFor]=\"chipGrid\" [placeholder]=\"placeholder()\" matInput/>\r\n @if (selectedOptions().size) {\r\n <span matSuffix class=\"sfi sfi-close fs-18 fc-black cursor-pointer\" (click)=\"clearSelection()\"></span>\r\n } @else {\r\n <span matSuffix class=\"sfi sfi-arrow-down fs-18 fc-black cursor-pointer\"></span>\r\n }\r\n\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n [displayWith]=\"displayFn\"\r\n autoActiveFirstOption\r\n hideSingleSelectionIndicator\r\n (optionSelected)=\"getEmissionValue($event)\"\r\n >\r\n @if (filteredOptions().length) {\r\n @for (option of filteredOptions(); track option.value) {\r\n <mat-option\r\n [value]=\"option\"\r\n [ngClass]=\"{'mdc-list-item__selected': option | selectStatus: selectedOptions()}\"\r\n >\r\n {{ option.label }}\r\n </mat-option>\r\n }\r\n } @else {\r\n <mat-option disabled=\"true\">No Result Found</mat-option>\r\n }\r\n </mat-autocomplete>\r\n</mat-form-field>\r\n<mat-chip-grid #chipGrid>\r\n @if (multiple()) {\r\n @for (chip of selectedOptions(); track chip[0]) {\r\n <mat-chip-row (removed)=\"removeFromSelectedOptionsMap(chip[1])\">\r\n {{ chip[1].label }}\r\n <button matChipRemove [attr.aria-label]=\"'remove ' + chip[1].label\">\r\n <ds-icon icon=\"trash\" class=\"fc-red\"></ds-icon>\r\n </button>\r\n </mat-chip-row>\r\n }\r\n }\r\n</mat-chip-grid>\r\n", styles: ["::ng-deep .mat-mdc-option.mdc-list-item__selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{--mat-option-selected-state-label-text-color: var(--green);color:var(--green)}\n"] }]
|
|
3530
|
+
}] });
|
|
3531
|
+
|
|
3532
|
+
class SlideToggleComponent extends BaseCtrl {
|
|
3533
|
+
onSlideToggleChange(checked) {
|
|
3534
|
+
this.emitValue(checked);
|
|
3535
|
+
}
|
|
3536
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SlideToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3537
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: SlideToggleComponent, isStandalone: true, selector: "iss-ctrl-slide-toggle", providers: [
|
|
3538
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: SlideToggleComponent, multi: true }
|
|
3539
|
+
], usesInheritance: true, ngImport: i0, template: "<mat-slide-toggle\r\n class=\"d-block\" [formControl]=\"ctrl\"\r\n (change)=\"onSlideToggleChange($event.checked)\"\r\n></mat-slide-toggle>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i1$4.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
|
|
3540
|
+
}
|
|
3541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SlideToggleComponent, decorators: [{
|
|
3542
|
+
type: Component,
|
|
3543
|
+
args: [{ selector: "iss-ctrl-slide-toggle", standalone: true, imports: [MatSlideToggleModule, ReactiveFormsModule], providers: [
|
|
3544
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: SlideToggleComponent, multi: true }
|
|
3545
|
+
], template: "<mat-slide-toggle\r\n class=\"d-block\" [formControl]=\"ctrl\"\r\n (change)=\"onSlideToggleChange($event.checked)\"\r\n></mat-slide-toggle>\r\n" }]
|
|
3546
|
+
}] });
|
|
3547
|
+
|
|
3548
|
+
class CtrlArrayComponent extends BaseCtrl {
|
|
3549
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: CtrlArrayComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3550
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: CtrlArrayComponent, isStandalone: true, selector: "iss-ctrl-ctrl-array", providers: [
|
|
3551
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: CtrlArrayComponent, multi: true }
|
|
3552
|
+
], usesInheritance: true, ngImport: i0, template: "<p>ctrl-array works!</p>\r\n", styles: [""] }); }
|
|
3553
|
+
}
|
|
3554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: CtrlArrayComponent, decorators: [{
|
|
3555
|
+
type: Component,
|
|
3556
|
+
args: [{ selector: "iss-ctrl-ctrl-array", standalone: true, imports: [], providers: [
|
|
3557
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: CtrlArrayComponent, multi: true }
|
|
3558
|
+
], template: "<p>ctrl-array works!</p>\r\n" }]
|
|
3559
|
+
}] });
|
|
3560
|
+
|
|
3561
|
+
class TextareaComponent extends BaseCtrl {
|
|
3562
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3563
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: TextareaComponent, isStandalone: true, selector: "iss-ctrl-textarea", providers: [
|
|
3564
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: TextareaComponent, multi: true }
|
|
3565
|
+
], usesInheritance: true, ngImport: i0, template: "<p>textarea works!</p>\r\n", styles: [""] }); }
|
|
3566
|
+
}
|
|
3567
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TextareaComponent, decorators: [{
|
|
3568
|
+
type: Component,
|
|
3569
|
+
args: [{ selector: "iss-ctrl-textarea", standalone: true, imports: [], providers: [
|
|
3570
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: TextareaComponent, multi: true }
|
|
3571
|
+
], template: "<p>textarea works!</p>\r\n" }]
|
|
3572
|
+
}] });
|
|
3573
|
+
|
|
3574
|
+
class ToggleButtonComponent extends BaseCtrl {
|
|
3575
|
+
constructor() {
|
|
3576
|
+
super(...arguments);
|
|
3577
|
+
this.options = input.required();
|
|
3578
|
+
this.selectedOptions = signal(new Map());
|
|
3579
|
+
}
|
|
3580
|
+
writeValue(value) {
|
|
3581
|
+
this.#reset();
|
|
3582
|
+
if (value === null || value === undefined) {
|
|
3583
|
+
return;
|
|
3584
|
+
}
|
|
3585
|
+
const values = value.split(",").map((val) => val.trim());
|
|
3586
|
+
let selectedOptions = this.options().filter((option) => values.includes(option.value));
|
|
3587
|
+
if (!this.multiple()) {
|
|
3588
|
+
if (selectedOptions.length > 1) {
|
|
3589
|
+
this.emitValue(null);
|
|
3590
|
+
throw new Error("You cannot set multiple values while the control is in single selection mode!");
|
|
3591
|
+
}
|
|
3592
|
+
this.ctrl.setValue(values[0]);
|
|
3593
|
+
this.addToSelectedOptionsMap(this.#selectedOptionsMapFactory([selectedOptions[0]]));
|
|
3594
|
+
return;
|
|
3595
|
+
}
|
|
3596
|
+
this.addToSelectedOptionsMap(this.#selectedOptionsMapFactory(selectedOptions));
|
|
3597
|
+
this.ctrl.setValue(values);
|
|
3598
|
+
}
|
|
3599
|
+
addToSelectedOptionsMap(option) {
|
|
3600
|
+
if (option) {
|
|
3601
|
+
this.selectedOptions = signal(option);
|
|
3602
|
+
}
|
|
3603
|
+
}
|
|
3604
|
+
onToggleButtonChange(checked, value) {
|
|
3605
|
+
if (!this.multiple()) {
|
|
3606
|
+
this.emitValue(value);
|
|
3607
|
+
}
|
|
3608
|
+
else {
|
|
3609
|
+
const option = this.options().find(option => option.value == value);
|
|
3610
|
+
this.selectedOptions.update((prev) => {
|
|
3611
|
+
const options = prev;
|
|
3612
|
+
if (checked)
|
|
3613
|
+
options.set(option?.value, option);
|
|
3614
|
+
else
|
|
3615
|
+
options.delete(option?.value);
|
|
3616
|
+
return options;
|
|
3617
|
+
});
|
|
3618
|
+
this.getEmissionValue(this.selectedOptions());
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
stringifySelectedOptions() {
|
|
3622
|
+
if (!this.selectedOptions()?.size) {
|
|
3623
|
+
return null;
|
|
3624
|
+
}
|
|
3625
|
+
return Array.from(this.selectedOptions(), ([value]) => value).join();
|
|
3626
|
+
}
|
|
3627
|
+
getEmissionValue(options) {
|
|
3628
|
+
this.addToSelectedOptionsMap(options);
|
|
3629
|
+
this.emitValue(this.stringifySelectedOptions());
|
|
3630
|
+
}
|
|
3631
|
+
#selectedOptionsMapFactory(selectedOptions) {
|
|
3632
|
+
let selectedOptionsMap = new Map();
|
|
3633
|
+
for (let option of selectedOptions) {
|
|
3634
|
+
selectedOptionsMap.set(option.value, option);
|
|
3635
|
+
}
|
|
3636
|
+
return selectedOptionsMap;
|
|
3637
|
+
}
|
|
3638
|
+
#reset() {
|
|
3639
|
+
this.selectedOptions().clear();
|
|
3640
|
+
this.ctrl.setValue(null);
|
|
3641
|
+
}
|
|
3642
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ToggleButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3643
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: ToggleButtonComponent, isStandalone: true, selector: "iss-ctrl-toggle-button", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
3644
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: ToggleButtonComponent, multi: true }
|
|
3645
|
+
], usesInheritance: true, ngImport: i0, template: "<mat-button-toggle-group\r\n [formControl]=\"ctrl\"\r\n [multiple]=multiple()\r\n [hideMultipleSelectionIndicator]=\"true\"\r\n [hideSingleSelectionIndicator]=\"true\"\r\n>\r\n @for (option of options(); track option.value) {\r\n <mat-button-toggle\r\n class=\"d-block\"\r\n [value]=\"option.value\"\r\n (change)=\"onToggleButtonChange($event.source.checked,option.value\r\n )\"\r\n >{{ option.label }}\r\n </mat-button-toggle>\r\n }\r\n</mat-button-toggle-group>\r\n", styles: [".mat-button-toggle-group-appearance-standard{border-radius:unset!important}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i1$5.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1$5.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
|
|
3646
|
+
}
|
|
3647
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ToggleButtonComponent, decorators: [{
|
|
3648
|
+
type: Component,
|
|
3649
|
+
args: [{ selector: "iss-ctrl-toggle-button", standalone: true, imports: [MatButtonToggleModule, ReactiveFormsModule], providers: [
|
|
3650
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: ToggleButtonComponent, multi: true }
|
|
3651
|
+
], template: "<mat-button-toggle-group\r\n [formControl]=\"ctrl\"\r\n [multiple]=multiple()\r\n [hideMultipleSelectionIndicator]=\"true\"\r\n [hideSingleSelectionIndicator]=\"true\"\r\n>\r\n @for (option of options(); track option.value) {\r\n <mat-button-toggle\r\n class=\"d-block\"\r\n [value]=\"option.value\"\r\n (change)=\"onToggleButtonChange($event.source.checked,option.value\r\n )\"\r\n >{{ option.label }}\r\n </mat-button-toggle>\r\n }\r\n</mat-button-toggle-group>\r\n", styles: [".mat-button-toggle-group-appearance-standard{border-radius:unset!important}\n"] }]
|
|
3652
|
+
}] });
|
|
3653
|
+
|
|
3654
|
+
/**
|
|
3655
|
+
* Generated bundle index. Do not edit.
|
|
3656
|
+
*/
|
|
3657
|
+
|
|
3658
|
+
export { AutocompleteComponent, CheckboxComponent, ChipsComponent, CtrlArrayComponent, DEFAULT_COUNTRY, DatePickerComponent, DateRangePickerComponent, DatetimePickerComponent, DatetimeRangePickerComponent, FilePickerComponent, InputComponent, MobileComponent, NoteComponent, PlateNumberComponent, RadioComponent, SelectComponent, SlideToggleComponent, TextareaComponent, TimePickerComponent, ToggleButtonComponent };
|
|
3659
|
+
//# sourceMappingURL=iss-ctrl.mjs.map
|