@ardium-ui/ui 3.3.0-alpha1 → 3.4.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/esm2022/lib/_internal/focusable-component.mjs +5 -5
- package/esm2022/lib/_internal/form-field-component.mjs +5 -27
- package/esm2022/lib/_internal/item-storages/simple-item-storage.mjs +5 -2
- package/esm2022/lib/_internal/ngmodel-component.mjs +57 -5
- package/esm2022/lib/_internal/selectable-list-component.mjs +10 -12
- package/esm2022/lib/checkbox/checkbox.component.mjs +2 -3
- package/esm2022/lib/checkbox-list/checkbox-list.component.mjs +2 -4
- package/esm2022/lib/file-inputs/file-input/file-input.component.mjs +3 -3
- package/esm2022/lib/file-inputs/file-input-base.mjs +3 -4
- package/esm2022/lib/form-field/form-field.component.mjs +7 -10
- package/esm2022/lib/form-field/form-field.defaults.mjs +2 -1
- package/esm2022/lib/form-field/form-field.module.mjs +25 -4
- package/esm2022/lib/form-field/horizontal-form-field.component.mjs +33 -0
- package/esm2022/lib/form-field/index.mjs +2 -1
- package/esm2022/lib/form-field-frame/form-field-frame.component.mjs +12 -7
- package/esm2022/lib/inputs/digit-input/digit-input.component.mjs +98 -21
- package/esm2022/lib/inputs/digit-input/digit-input.defaults.mjs +4 -1
- package/esm2022/lib/inputs/digit-input/digit-input.model.mjs +79 -32
- package/esm2022/lib/inputs/digit-input/digit-input.module.mjs +5 -4
- package/esm2022/lib/inputs/digit-input/digit-input.types.mjs +1 -1
- package/esm2022/lib/inputs/digit-input/digit-input.utils.mjs +1 -1
- package/esm2022/lib/inputs/hex-input/hex-input.component.mjs +3 -3
- package/esm2022/lib/inputs/input/input.component.mjs +3 -3
- package/esm2022/lib/inputs/number-input/number-input.component.mjs +3 -3
- package/esm2022/lib/inputs/password-input/password-input.component.mjs +3 -3
- package/esm2022/lib/inputs/simple-input/simple-input.component.mjs +3 -3
- package/esm2022/lib/radio/radio/radio.component.mjs +77 -6
- package/esm2022/lib/radio/radio/radio.defaults.mjs +3 -3
- package/esm2022/lib/radio/radio-group.component.mjs +3 -3
- package/esm2022/lib/segment/segment.component.mjs +26 -4
- package/esm2022/lib/select/select.component.mjs +4 -4
- package/esm2022/lib/slider/range-slider/range-slider.component.mjs +2 -1
- package/esm2022/lib/table/table.component.mjs +1 -1
- package/fesm2022/ardium-ui-ui.mjs +431 -139
- package/fesm2022/ardium-ui-ui.mjs.map +1 -1
- package/lib/_internal/focusable-component.d.ts +1 -1
- package/lib/_internal/form-field-component.d.ts +4 -13
- package/lib/_internal/item-storages/simple-item-storage.d.ts +1 -0
- package/lib/_internal/ngmodel-component.d.ts +16 -3
- package/lib/_internal/selectable-list-component.d.ts +3 -4
- package/lib/checkbox/checkbox.component.d.ts +1 -2
- package/lib/checkbox-list/checkbox-list.component.d.ts +1 -2
- package/lib/file-inputs/file-input-base.d.ts +1 -2
- package/lib/form-field/form-field.component.d.ts +3 -3
- package/lib/form-field/form-field.defaults.d.ts +1 -0
- package/lib/form-field/form-field.module.d.ts +8 -7
- package/lib/form-field/horizontal-form-field.component.d.ts +19 -0
- package/lib/form-field/index.d.ts +1 -0
- package/lib/form-field-frame/form-field-frame.component.d.ts +3 -2
- package/lib/inputs/digit-input/digit-input.component.d.ts +19 -4
- package/lib/inputs/digit-input/digit-input.defaults.d.ts +4 -1
- package/lib/inputs/digit-input/digit-input.model.d.ts +2 -1
- package/lib/inputs/digit-input/digit-input.module.d.ts +2 -1
- package/lib/inputs/digit-input/digit-input.types.d.ts +3 -1
- package/lib/inputs/digit-input/digit-input.utils.d.ts +3 -0
- package/lib/radio/radio/radio.component.d.ts +41 -3
- package/lib/radio/radio/radio.defaults.d.ts +2 -2
- package/lib/radio/radio-group.component.d.ts +1 -2
- package/lib/slider/range-slider/range-slider.component.d.ts +1 -1
- package/package.json +1 -1
- package/prebuilt-themes/default/chips.css.map +1 -1
- package/prebuilt-themes/default/core.css +2 -0
- package/prebuilt-themes/default/core.css.map +1 -1
- package/prebuilt-themes/default/form-field-frame.css +10 -4
- package/prebuilt-themes/default/form-field-frame.css.map +1 -1
- package/prebuilt-themes/default/form-field.css +74 -9
- package/prebuilt-themes/default/form-field.css.map +1 -1
- package/prebuilt-themes/default/inputs/digit-input.css +15 -3
- package/prebuilt-themes/default/inputs/digit-input.css.map +1 -1
- package/prebuilt-themes/default/inputs/file-input.css +0 -5
- package/prebuilt-themes/default/inputs/file-input.css.map +1 -1
- package/prebuilt-themes/default/inputs/input.css +0 -5
- package/prebuilt-themes/default/inputs/input.css.map +1 -1
- package/prebuilt-themes/default/inputs/number-input.css +6 -3
- package/prebuilt-themes/default/inputs/number-input.css.map +1 -1
- package/prebuilt-themes/default/inputs/simple-input.css +0 -5
- package/prebuilt-themes/default/inputs/simple-input.css.map +1 -1
- package/prebuilt-themes/default/segment.css +6 -3
- package/prebuilt-themes/default/segment.css.map +1 -1
- package/themes/default/_mixins.scss +6 -4
- package/themes/default/core.scss +3 -0
- package/themes/default/form-field-frame.scss +5 -1
- package/themes/default/form-field.scss +63 -2
- package/themes/default/inputs/digit-input.scss +12 -0
- package/themes/default/inputs/file-input.scss +79 -85
- package/themes/default/inputs/input.scss +46 -52
- package/themes/default/inputs/simple-input.scss +12 -19
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import 'first-last';
|
|
2
|
+
import { AutofillMonitor, CdkAutofill } from '@angular/cdk/text-field';
|
|
2
3
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, signal, Directive, Input, HostBinding, computed, output, ViewChildren, inject, Injector, InjectionToken, effect, viewChildren, forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, NgModule, viewChild, contentChild, ViewContainerRef, TemplateRef, HostListener, Pipe, model, ElementRef, ChangeDetectorRef, ContentChildren, ViewChild, ContentChild, contentChildren, Renderer2, Injectable } from '@angular/core';
|
|
4
|
+
import { input, signal, Directive, Input, HostBinding, computed, output, ViewChildren, inject, Injector, runInInjectionContext, InjectionToken, effect, viewChildren, forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, NgModule, viewChild, contentChild, ViewContainerRef, TemplateRef, HostListener, Pipe, model, ElementRef, ChangeDetectorRef, ContentChildren, ViewChild, ContentChild, contentChildren, Renderer2, Injectable } from '@angular/core';
|
|
4
5
|
import { NgControl, Validators, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
6
|
import * as i4 from '@ardium-ui/devkit';
|
|
6
7
|
import { coerceBooleanProperty, coerceNumberProperty, coerceArrayProperty, ArdiumClickOutsideEventModule, ArdiumInnerHTMLModule, ArdiumFilesizePipeModule, ArdiumFilenamePipeModule, ArdiumFileextPipeModule, ArdiumHoldEventModule } from '@ardium-ui/devkit';
|
|
8
|
+
import { toObservable } from '@angular/core/rxjs-interop';
|
|
7
9
|
import { map, Subject, merge, takeUntil, startWith, BehaviorSubject } from 'rxjs';
|
|
8
10
|
import { TakeChance } from 'take-chance';
|
|
9
|
-
import {
|
|
11
|
+
import { isAnyString, isNull, isArray, isNumber, isFunction, isRegExp, isDefined, any, isPrimitive, isString, evaluate, isObject, isPromise } from 'simple-bool';
|
|
10
12
|
import * as i1 from '@angular/common';
|
|
11
13
|
import { CommonModule, DOCUMENT, DecimalPipe, AsyncPipe } from '@angular/common';
|
|
12
14
|
import { Overlay, ScrollStrategyOptions, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
@@ -95,7 +97,7 @@ class _FocusableComponentBase extends _DisablableComponentBase {
|
|
|
95
97
|
/**
|
|
96
98
|
* Whether the component is currently focused.
|
|
97
99
|
*/
|
|
98
|
-
this.isFocused = false;
|
|
100
|
+
this.isFocused = signal(false);
|
|
99
101
|
}
|
|
100
102
|
/**
|
|
101
103
|
* Focuses the correct element in the component.
|
|
@@ -126,7 +128,7 @@ class _FocusableComponentBase extends _DisablableComponentBase {
|
|
|
126
128
|
* @param event The focus event to emit.
|
|
127
129
|
*/
|
|
128
130
|
onFocus(event) {
|
|
129
|
-
this.isFocused
|
|
131
|
+
this.isFocused.set(true);
|
|
130
132
|
this.focusEvent.emit(event);
|
|
131
133
|
}
|
|
132
134
|
/**
|
|
@@ -134,7 +136,7 @@ class _FocusableComponentBase extends _DisablableComponentBase {
|
|
|
134
136
|
* @param event The focus event to emit.
|
|
135
137
|
*/
|
|
136
138
|
onBlur(event) {
|
|
137
|
-
this.isFocused
|
|
139
|
+
this.isFocused.set(false);
|
|
138
140
|
this.blurEvent.emit(event);
|
|
139
141
|
}
|
|
140
142
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: _FocusableComponentBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -157,6 +159,22 @@ const _ngModelComponentDefaults = {
|
|
|
157
159
|
* **Warning**: `writeValue` function should be implemented on the child component!
|
|
158
160
|
*/
|
|
159
161
|
class _NgModelComponentBase extends _FocusableComponentBase {
|
|
162
|
+
constructor() {
|
|
163
|
+
super(...arguments);
|
|
164
|
+
//! event handlers
|
|
165
|
+
this.wasTouched = signal(false);
|
|
166
|
+
this._shouldEmitTouched = false;
|
|
167
|
+
//! form field related
|
|
168
|
+
this._injector = inject(Injector);
|
|
169
|
+
this._ngControl = null;
|
|
170
|
+
this.htmlId = input(TakeChance.id());
|
|
171
|
+
this._hasError = input(undefined, {
|
|
172
|
+
transform: v => coerceBooleanProperty(v),
|
|
173
|
+
alias: 'hasError',
|
|
174
|
+
});
|
|
175
|
+
this._hasErrorInControl = signal(false);
|
|
176
|
+
this.hasError = computed(() => this._hasError() ?? (this.wasTouched() && this._hasErrorInControl()));
|
|
177
|
+
}
|
|
160
178
|
/**
|
|
161
179
|
* Registers a function to handle touched state. Required by ControlValueAccessor.
|
|
162
180
|
* @param fn The function to register.
|
|
@@ -178,13 +196,44 @@ class _NgModelComponentBase extends _FocusableComponentBase {
|
|
|
178
196
|
setDisabledState(isDisabled) {
|
|
179
197
|
this.disabled.set(isDisabled);
|
|
180
198
|
}
|
|
181
|
-
|
|
199
|
+
onFocus(event) {
|
|
200
|
+
super.onFocus(event);
|
|
201
|
+
this._shouldEmitTouched = false;
|
|
202
|
+
}
|
|
182
203
|
onBlur(event) {
|
|
204
|
+
this._shouldEmitTouched = true;
|
|
183
205
|
super.onBlur(event);
|
|
184
|
-
|
|
206
|
+
setTimeout(() => {
|
|
207
|
+
if (!this._shouldEmitTouched)
|
|
208
|
+
return;
|
|
209
|
+
this.wasTouched.set(true);
|
|
210
|
+
this._onTouchedRegistered?.();
|
|
211
|
+
}, 0);
|
|
212
|
+
}
|
|
213
|
+
ngOnInit() {
|
|
214
|
+
this._ngControl = this._injector.get(NgControl, null);
|
|
215
|
+
if (this._ngControl) {
|
|
216
|
+
this._ngControl.valueAccessor = this;
|
|
217
|
+
this._hasErrorInControl.set(this._ngControl.status === 'INVALID');
|
|
218
|
+
this._statusChangesSub = this._ngControl.statusChanges
|
|
219
|
+
?.pipe(map(v => v === 'INVALID'))
|
|
220
|
+
.subscribe(v => this._hasErrorInControl.set(v));
|
|
221
|
+
if (!this._ngControl.control)
|
|
222
|
+
return;
|
|
223
|
+
runInInjectionContext(this._injector, () => {
|
|
224
|
+
// do not read the next line of code if you are easily frightened
|
|
225
|
+
// I'm not proud of this part, but it had to be done. God please forgive me
|
|
226
|
+
// I didn't find any other feasible way to detect when the control changes its touched state
|
|
227
|
+
// so it had to be hacked like this
|
|
228
|
+
toObservable(this._ngControl?.control?.touchedReactive)?.subscribe(v => this.wasTouched.set(v));
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
ngOnDestroy() {
|
|
233
|
+
this._statusChangesSub?.unsubscribe();
|
|
185
234
|
}
|
|
186
235
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: _NgModelComponentBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
187
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
236
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: _NgModelComponentBase, inputs: { htmlId: { classPropertyName: "htmlId", publicName: "htmlId", isSignal: true, isRequired: false, transformFunction: null }, _hasError: { classPropertyName: "_hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
188
237
|
}
|
|
189
238
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: _NgModelComponentBase, decorators: [{
|
|
190
239
|
type: Directive
|
|
@@ -202,37 +251,17 @@ const _formFieldComponentDefaults = {
|
|
|
202
251
|
class _FormFieldComponentBase extends _NgModelComponentBase {
|
|
203
252
|
constructor() {
|
|
204
253
|
super(...arguments);
|
|
205
|
-
this._injector = inject(Injector);
|
|
206
|
-
this._ngControl = null;
|
|
207
254
|
this._required = input(undefined, {
|
|
208
255
|
transform: v => coerceBooleanProperty(v),
|
|
209
256
|
alias: 'required',
|
|
210
257
|
});
|
|
211
|
-
this.
|
|
212
|
-
this._hasError = input(undefined, {
|
|
213
|
-
transform: v => coerceBooleanProperty(v),
|
|
214
|
-
alias: 'hasError',
|
|
215
|
-
});
|
|
216
|
-
this._hasErrorInControl = signal(false);
|
|
217
|
-
this.hasError = computed(() => this._hasError() ?? this._hasErrorInControl());
|
|
218
|
-
}
|
|
219
|
-
ngOnInit() {
|
|
220
|
-
this._ngControl = this._injector.get(NgControl, null);
|
|
221
|
-
if (this._ngControl) {
|
|
222
|
-
this._ngControl.valueAccessor = this;
|
|
223
|
-
this._statusChangesSub = this._ngControl.statusChanges
|
|
224
|
-
?.pipe(map(v => v === 'INVALID'))
|
|
225
|
-
.subscribe(v => this._hasErrorInControl.set(v));
|
|
226
|
-
}
|
|
258
|
+
this.isSuccess = input(false, { transform: v => coerceBooleanProperty(v) });
|
|
227
259
|
}
|
|
228
260
|
get required() {
|
|
229
261
|
return this._required() ?? !!this._ngControl?.control?.hasValidator(Validators.required);
|
|
230
262
|
}
|
|
231
|
-
ngOnDestroy() {
|
|
232
|
-
this._statusChangesSub?.unsubscribe();
|
|
233
|
-
}
|
|
234
263
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: _FormFieldComponentBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
235
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: _FormFieldComponentBase, inputs: { _required: { classPropertyName: "_required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null },
|
|
264
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: _FormFieldComponentBase, inputs: { _required: { classPropertyName: "_required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, isSuccess: { classPropertyName: "isSuccess", publicName: "isSuccess", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
236
265
|
}
|
|
237
266
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: _FormFieldComponentBase, decorators: [{
|
|
238
267
|
type: Directive
|
|
@@ -308,6 +337,9 @@ const _digitInputDefaults = {
|
|
|
308
337
|
shape: DigitInputShape.Square,
|
|
309
338
|
compact: false,
|
|
310
339
|
outputAsString: false,
|
|
340
|
+
transform: null,
|
|
341
|
+
inputAttrs: {},
|
|
342
|
+
autoFillParseFn: v => v,
|
|
311
343
|
};
|
|
312
344
|
const ARD_DIGIT_INPUT_DEFAULTS = new InjectionToken('ard-digit-input-defaults', {
|
|
313
345
|
factory: () => ({
|
|
@@ -331,8 +363,7 @@ class DigitInputModel {
|
|
|
331
363
|
this._ardHost = _ardHost;
|
|
332
364
|
this._configArray = signal([]);
|
|
333
365
|
this.configArrayData = computed(() => {
|
|
334
|
-
|
|
335
|
-
return this._configArray().map(v => {
|
|
366
|
+
return this._configArray().map((v, i) => {
|
|
336
367
|
if ('static' in v) {
|
|
337
368
|
return {
|
|
338
369
|
type: DigitInputConfigDataType.Static,
|
|
@@ -341,29 +372,32 @@ class DigitInputModel {
|
|
|
341
372
|
}
|
|
342
373
|
return {
|
|
343
374
|
type: DigitInputConfigDataType.Input,
|
|
344
|
-
index:
|
|
375
|
+
index: i,
|
|
345
376
|
readonly: v.readonly,
|
|
346
377
|
placeholder: v.placeholder ?? '',
|
|
347
378
|
};
|
|
348
379
|
});
|
|
349
380
|
});
|
|
350
|
-
this._configArrayNoStatics = computed(() => this._configArray().filter(v => !('static' in v)));
|
|
351
381
|
this.isConfigDefined = computed(() => this._configArray().length > 0);
|
|
352
382
|
this.value = signal(null);
|
|
353
383
|
this.stringValue = computed(() => this.value()
|
|
354
384
|
?.map(v => v ?? ' ')
|
|
355
|
-
.join('')
|
|
356
|
-
|
|
357
|
-
this.isValueFull = computed(() => this.value()?.filter(v => v).length === this._configArrayNoStatics().length);
|
|
385
|
+
.join('') ?? '');
|
|
386
|
+
this.isValueFull = computed(() => this.value()?.filter(v => v).length === this._configArray().length);
|
|
358
387
|
//set the value array to be the same length
|
|
359
388
|
effect(() => {
|
|
360
|
-
const
|
|
389
|
+
const configArr = this.configArrayData();
|
|
390
|
+
const length = configArr.length;
|
|
361
391
|
this.value.update(arr => {
|
|
362
392
|
if (!arr)
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
393
|
+
arr = [];
|
|
394
|
+
const newArr = [];
|
|
395
|
+
for (let i = 0; i < length; i++) {
|
|
396
|
+
const curr = arr[i];
|
|
397
|
+
const config = configArr[i];
|
|
398
|
+
newArr.push(config.type === DigitInputConfigDataType.Static ? config.char : curr ?? null);
|
|
399
|
+
}
|
|
400
|
+
return newArr;
|
|
367
401
|
});
|
|
368
402
|
}, { allowSignalWrites: true });
|
|
369
403
|
}
|
|
@@ -371,13 +405,23 @@ class DigitInputModel {
|
|
|
371
405
|
return !!this.value()?.[index];
|
|
372
406
|
}
|
|
373
407
|
writeValue(v) {
|
|
374
|
-
if (
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
408
|
+
if (this._ardHost.outputAsString()) {
|
|
409
|
+
if (!isAnyString(v) && !isNull(v)) {
|
|
410
|
+
throw new Error(`ARD-FT0040b: Trying to set <ard-digit-input>'s value to "${v}" (of type ${typeof v}), but the input uses [outputAsString]="true", and thus expects string or null.`);
|
|
411
|
+
}
|
|
412
|
+
const vArray = v?.split('') ?? [];
|
|
413
|
+
if (vArray.length > this._configArray().length) {
|
|
414
|
+
console.warn(`ARD-WA0041: Value provided to <ard-digit-input> is too long. Got ${vArray.length} characters, but expected a maximum of ${this._configArray().length} characters.`);
|
|
415
|
+
}
|
|
416
|
+
return this._writeValue(vArray);
|
|
417
|
+
}
|
|
418
|
+
if (!isAnyString(v) && !isNull(v) && !isArray(v)) {
|
|
419
|
+
throw new Error(`ARD-FT0041: Trying to set <ard-digit-input>'s value to "${v}" (of type ${typeof v}), expected string or array of characters.`);
|
|
379
420
|
}
|
|
380
421
|
const vArray = coerceArrayProperty(v);
|
|
422
|
+
if (vArray.length > this._configArray().length) {
|
|
423
|
+
console.warn(`ARD-WA0041: Value provided to <ard-digit-input> is too long. Got ${vArray.length} characters, but expected a maximum of ${this._configArray().length} characters.`);
|
|
424
|
+
}
|
|
381
425
|
const problemIndex = vArray.findIndex(el => !isAnyString(el) || el.length > 1);
|
|
382
426
|
if (problemIndex !== -1) {
|
|
383
427
|
throw new Error(`ARD-FT0042: Array passed to <ard-digit-input>'s value must only contain strings of length 1 or 0. Element "${vArray[problemIndex]}" at index ${problemIndex} does not match those requirements.`);
|
|
@@ -385,17 +429,19 @@ class DigitInputModel {
|
|
|
385
429
|
return this._writeValue(vArray);
|
|
386
430
|
}
|
|
387
431
|
_writeValue(v) {
|
|
388
|
-
const
|
|
432
|
+
const isOldValueTheSame = this.value() ? this.value().every((ch, i) => ch === v?.[i]) : !v;
|
|
433
|
+
if (isOldValueTheSame)
|
|
434
|
+
return false;
|
|
389
435
|
this.value.set(v && v.map(el => el || null));
|
|
390
436
|
this.validateValueAndUpdate();
|
|
391
437
|
this._updateInputElements();
|
|
392
|
-
return
|
|
438
|
+
return true;
|
|
393
439
|
}
|
|
394
440
|
_updateInputElements() {
|
|
395
|
-
const
|
|
441
|
+
const v = this.value() ?? [];
|
|
396
442
|
let i = 0;
|
|
397
443
|
for (const inputEl of this._ardHost.inputs()) {
|
|
398
|
-
inputEl.nativeElement.value =
|
|
444
|
+
inputEl.nativeElement.value = v[i] ?? '';
|
|
399
445
|
i++;
|
|
400
446
|
}
|
|
401
447
|
}
|
|
@@ -446,9 +492,32 @@ class DigitInputModel {
|
|
|
446
492
|
}
|
|
447
493
|
}));
|
|
448
494
|
}
|
|
495
|
+
resetInputValue(index) {
|
|
496
|
+
if (index < 0 || index > this._configArray().length)
|
|
497
|
+
return;
|
|
498
|
+
const config = this._configArray()[index];
|
|
499
|
+
let newValue = '';
|
|
500
|
+
if ('static' in config) {
|
|
501
|
+
newValue = config.static;
|
|
502
|
+
}
|
|
503
|
+
//get the corresponding HTML input element
|
|
504
|
+
const inputEl = this._ardHost.inputs()[index];
|
|
505
|
+
if (!inputEl) {
|
|
506
|
+
throw new Error("ARD-IS0048: <ard-digit-input>'s value changed, but its corresponding input element could not be found. If you are reading this, you probably experienced a problem with Ardium UI. Please report this issue to the creators.");
|
|
507
|
+
}
|
|
508
|
+
//update the input element and value array
|
|
509
|
+
inputEl.nativeElement.value = newValue;
|
|
510
|
+
this.value.update(arr => {
|
|
511
|
+
if (!arr)
|
|
512
|
+
arr = [];
|
|
513
|
+
const newArr = [...arr];
|
|
514
|
+
newArr[index] = newValue || null;
|
|
515
|
+
return newArr;
|
|
516
|
+
});
|
|
517
|
+
}
|
|
449
518
|
//! validate against the config
|
|
450
519
|
validateInputAndSetValue(input, index) {
|
|
451
|
-
if (index < 0 || index > this.
|
|
520
|
+
if (index < 0 || index > this._configArray().length)
|
|
452
521
|
return null;
|
|
453
522
|
let v = this.value();
|
|
454
523
|
//prepare the value array if does not exist
|
|
@@ -467,11 +536,11 @@ class DigitInputModel {
|
|
|
467
536
|
const lastChar = input.charAt(input.length - 1);
|
|
468
537
|
input = firstChar === before ? lastChar : firstChar;
|
|
469
538
|
//validate and transform, if necessary
|
|
470
|
-
const inputChar = this._validateSingleChar(input, before, this.
|
|
539
|
+
const inputChar = this._validateSingleChar(input, before, this._configArray()[index]);
|
|
471
540
|
//get the corresponding HTML input element
|
|
472
541
|
const inputEl = this._ardHost.inputs()[index];
|
|
473
542
|
if (!inputEl) {
|
|
474
|
-
throw new Error("ARD-IS0048: <ard-digit-input>'s value changed, but its corresponding input element could not be found.
|
|
543
|
+
throw new Error("ARD-IS0048: <ard-digit-input>'s value changed, but its corresponding input element could not be found. If you are reading this, you probably experienced a problem with Ardium UI. Please report this issue to the creators.");
|
|
475
544
|
}
|
|
476
545
|
//update the input element and value array
|
|
477
546
|
const newVal = inputChar ?? before;
|
|
@@ -484,7 +553,7 @@ class DigitInputModel {
|
|
|
484
553
|
return newArr;
|
|
485
554
|
});
|
|
486
555
|
//return changes marker and validated value
|
|
487
|
-
return { wasChanged: newVal !== before, resultChar: inputChar };
|
|
556
|
+
return { wasChanged: newVal !== before, wasValidChar: !isNull(inputChar), resultChar: inputChar };
|
|
488
557
|
}
|
|
489
558
|
validateValueAndUpdate() {
|
|
490
559
|
const v = this.value();
|
|
@@ -492,39 +561,49 @@ class DigitInputModel {
|
|
|
492
561
|
return;
|
|
493
562
|
let before = '';
|
|
494
563
|
const newValue = [];
|
|
495
|
-
for (let i = 0; i < Math.min(this.
|
|
564
|
+
for (let i = 0; i < Math.min(this._configArray().length, v.length); i++) {
|
|
496
565
|
const char = v[i];
|
|
497
566
|
before += char ?? ' ';
|
|
498
567
|
if (!char) {
|
|
499
568
|
newValue.push(char);
|
|
500
569
|
continue;
|
|
501
570
|
}
|
|
502
|
-
const
|
|
503
|
-
const newChar = this._validateSingleChar(char, before, config);
|
|
571
|
+
const newChar = this._validateSingleChar(char, before, this._configArray()[i]);
|
|
504
572
|
newValue.push(newChar);
|
|
505
573
|
}
|
|
506
574
|
this.value.set(newValue);
|
|
507
575
|
}
|
|
508
576
|
_validateSingleChar(char, before, config) {
|
|
577
|
+
// return the character if it is static
|
|
578
|
+
if ('static' in config)
|
|
579
|
+
return config.static;
|
|
580
|
+
// for peace of mind protect against modifying read-only fields
|
|
509
581
|
if (config.readonly) {
|
|
510
582
|
throw new Error(`ARD-IS0049R: trying to set value of a <ard-digit-input>'s readonly field. This is error is fatal to the functioning of Ardium UI. Please report this issue to the creators.`);
|
|
511
583
|
}
|
|
584
|
+
// process regex or convert string into regex
|
|
512
585
|
if (!isFunction(config.accept)) {
|
|
513
586
|
const regExp = isRegExp(config.accept) ? config.accept : new RegExp(`[${_sanitizeRegExpString(config.accept)}]`);
|
|
514
587
|
config.accept = str => regExp.test(str);
|
|
515
588
|
}
|
|
516
589
|
if (!char)
|
|
517
590
|
return char;
|
|
591
|
+
// check if input fits the criteria
|
|
518
592
|
const canAccept = config.accept(char, before);
|
|
519
593
|
if (!canAccept)
|
|
520
594
|
return null;
|
|
521
|
-
|
|
522
|
-
|
|
595
|
+
// transform if needed
|
|
596
|
+
const transform = config.transform ?? this._ardHost.transform();
|
|
597
|
+
if (transform) {
|
|
598
|
+
if (transform === TransformType.Lowercase) {
|
|
523
599
|
return char.toLowerCase();
|
|
524
600
|
}
|
|
525
|
-
if (
|
|
601
|
+
if (transform === TransformType.Uppercase) {
|
|
526
602
|
return char.toUpperCase();
|
|
527
603
|
}
|
|
604
|
+
if (isFunction(transform)) {
|
|
605
|
+
return transform(char).charAt(0);
|
|
606
|
+
}
|
|
528
607
|
console.warn(`ARD-IS0049T: <ard-digit-input>'s value validator encountered an unexpected value of the config's "transform" property. Ardium UI was able to handle this issue, but please report it to the creators.`);
|
|
529
608
|
}
|
|
530
609
|
return char;
|
|
@@ -534,8 +613,15 @@ class DigitInputModel {
|
|
|
534
613
|
class ArdiumDigitInputComponent extends _FormFieldComponentBase {
|
|
535
614
|
constructor(defaults) {
|
|
536
615
|
super(defaults);
|
|
616
|
+
this._autoFillMonitor = inject(AutofillMonitor);
|
|
537
617
|
//! inputs ref
|
|
538
618
|
this.inputs = viewChildren('input');
|
|
619
|
+
this.inputAttrs = input(this._DEFAULTS.inputAttrs);
|
|
620
|
+
//! auto-fill
|
|
621
|
+
this.autoFillParseFn = input(this._DEFAULTS.autoFillParseFn);
|
|
622
|
+
this.isAutofilled = signal(false);
|
|
623
|
+
this._wasAutofillValueRead = signal(false);
|
|
624
|
+
this._autoFillSubs = [];
|
|
539
625
|
//! data model
|
|
540
626
|
this.model = new DigitInputModel(this);
|
|
541
627
|
//! appearance
|
|
@@ -548,12 +634,14 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
|
|
|
548
634
|
`ard-variant-${this.variant()}`,
|
|
549
635
|
`ard-shape-${this.shape()}`,
|
|
550
636
|
this.compact() ? 'ard-compact' : '',
|
|
637
|
+
this.isAutofilled() ? 'ard-autofilled' : '',
|
|
551
638
|
].join(' '));
|
|
552
639
|
//! model access points
|
|
553
640
|
this.config = input.required({
|
|
554
641
|
transform: v => this.model.setConfig(v),
|
|
555
642
|
});
|
|
556
643
|
this.configArrayData = this.model.configArrayData;
|
|
644
|
+
this.transform = input(this._DEFAULTS.transform);
|
|
557
645
|
this._oldConfigArrayDataLength = -1;
|
|
558
646
|
this.configArrayDataEffect = effect(() => {
|
|
559
647
|
if (this.configArrayData().length === this._oldConfigArrayDataLength)
|
|
@@ -561,6 +649,7 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
|
|
|
561
649
|
this._oldConfigArrayDataLength = this.configArrayData().length;
|
|
562
650
|
this._emitChange();
|
|
563
651
|
});
|
|
652
|
+
this._wasViewInit = false;
|
|
564
653
|
//! value two-way binding
|
|
565
654
|
this.outputAsString = input(this._DEFAULTS.outputAsString, { transform: v => coerceBooleanProperty(v) });
|
|
566
655
|
this.outputControlValueAccessorOnFinish = input(false, { transform: v => coerceBooleanProperty(v) });
|
|
@@ -576,6 +665,43 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
|
|
|
576
665
|
this.focusIndexEvent = output({ alias: 'focusIndex' });
|
|
577
666
|
this.blurIndexEvent = output({ alias: 'blurIndex' });
|
|
578
667
|
}
|
|
668
|
+
_setInputAttributes() {
|
|
669
|
+
const inputs = this.inputs();
|
|
670
|
+
for (const input of inputs) {
|
|
671
|
+
const inputEl = input.nativeElement;
|
|
672
|
+
const attributes = {
|
|
673
|
+
autocorrect: 'off',
|
|
674
|
+
autocapitalize: 'off',
|
|
675
|
+
autocomplete: 'postal-code',
|
|
676
|
+
...this.inputAttrs(),
|
|
677
|
+
};
|
|
678
|
+
for (const key of Object.keys(attributes)) {
|
|
679
|
+
inputEl.setAttribute(key, attributes[key]);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
_subscribeToAutoFillOnInputs() {
|
|
684
|
+
const inputs = this.inputs();
|
|
685
|
+
for (const input of inputs) {
|
|
686
|
+
const sub = this._autoFillMonitor.monitor(input).subscribe(event => {
|
|
687
|
+
this.isAutofilled.set(event.isAutofilled);
|
|
688
|
+
});
|
|
689
|
+
this._autoFillSubs.push(sub);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
_unsubscribeFromAutoFill() {
|
|
693
|
+
const inputs = this.inputs();
|
|
694
|
+
for (const input of inputs) {
|
|
695
|
+
this._autoFillMonitor.stopMonitoring(input);
|
|
696
|
+
}
|
|
697
|
+
for (const sub of this._autoFillSubs) {
|
|
698
|
+
sub.unsubscribe();
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
ngOnDestroy() {
|
|
702
|
+
super.ngOnDestroy();
|
|
703
|
+
this._unsubscribeFromAutoFill();
|
|
704
|
+
}
|
|
579
705
|
ngOnInit() {
|
|
580
706
|
super.ngOnInit();
|
|
581
707
|
this._oldConfigArrayDataLength = this.configArrayData().length;
|
|
@@ -583,13 +709,24 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
|
|
|
583
709
|
isInputEmpty(index) {
|
|
584
710
|
return !this.model.isDefinedAtIndex(index);
|
|
585
711
|
}
|
|
586
|
-
//! control value accessor's write value implementation
|
|
587
712
|
writeValue(v) {
|
|
713
|
+
if (!this._wasViewInit) {
|
|
714
|
+
this._valueBeforeViewInit = v;
|
|
715
|
+
return;
|
|
716
|
+
}
|
|
588
717
|
this._writeValue(v);
|
|
589
718
|
}
|
|
590
719
|
_writeValue(v) {
|
|
591
720
|
return this.model.writeValue(v);
|
|
592
721
|
}
|
|
722
|
+
ngAfterViewInit() {
|
|
723
|
+
this._wasViewInit = true;
|
|
724
|
+
if (this._valueBeforeViewInit) {
|
|
725
|
+
this._writeValue(this._valueBeforeViewInit);
|
|
726
|
+
}
|
|
727
|
+
this._setInputAttributes();
|
|
728
|
+
this._subscribeToAutoFillOnInputs();
|
|
729
|
+
}
|
|
593
730
|
set value(v) {
|
|
594
731
|
this.writeValue(v);
|
|
595
732
|
}
|
|
@@ -600,30 +737,44 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
|
|
|
600
737
|
event.preventDefault();
|
|
601
738
|
if (!value)
|
|
602
739
|
return;
|
|
603
|
-
|
|
740
|
+
this._handleMultiDigitChange(value, index);
|
|
741
|
+
}
|
|
742
|
+
onInput(event, index) {
|
|
743
|
+
const value = event.target.value;
|
|
744
|
+
if (this.isAutofilled()) {
|
|
745
|
+
if (!this._wasAutofillValueRead()) {
|
|
746
|
+
this._wasAutofillValueRead.set(true);
|
|
747
|
+
setTimeout(() => {
|
|
748
|
+
this._wasAutofillValueRead.set(false);
|
|
749
|
+
const parsedValue = this.autoFillParseFn()(value);
|
|
750
|
+
this._handleMultiDigitChange(parsedValue, 0);
|
|
751
|
+
}, 0);
|
|
752
|
+
}
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
755
|
+
const wasValidCharacter = this._updateSingleInputValue(value, index);
|
|
756
|
+
if (!wasValidCharacter)
|
|
757
|
+
return;
|
|
758
|
+
this.focusByIndex(index + 1);
|
|
759
|
+
}
|
|
760
|
+
_handleMultiDigitChange(value, startIndex) {
|
|
761
|
+
const maxLength = this.inputs().length - startIndex;
|
|
604
762
|
value
|
|
605
763
|
.slice(0, maxLength)
|
|
606
764
|
.split('')
|
|
607
765
|
.forEach((char, i) => {
|
|
608
|
-
this.model.
|
|
766
|
+
this.model.resetInputValue(startIndex + i);
|
|
767
|
+
this.model.validateInputAndSetValue(char, startIndex + i);
|
|
609
768
|
});
|
|
610
|
-
this.focusByIndex(
|
|
611
|
-
|
|
612
|
-
onInput(event, index) {
|
|
613
|
-
const wasChanged = this._updateSingleInputValue(event.target.value, index);
|
|
614
|
-
if (!wasChanged)
|
|
615
|
-
return;
|
|
616
|
-
this.focusByIndex(index + 1);
|
|
769
|
+
this.focusByIndex(startIndex - 1 + Math.min(value.length, maxLength));
|
|
770
|
+
this._emitChange();
|
|
617
771
|
}
|
|
618
772
|
_updateSingleInputValue(value, index) {
|
|
619
773
|
const changeResult = this.model.validateInputAndSetValue(value, index);
|
|
620
|
-
if (
|
|
621
|
-
|
|
622
|
-
this._emitChange();
|
|
623
|
-
if (this.model.isValueFull()) {
|
|
624
|
-
this.blur();
|
|
774
|
+
if (changeResult?.wasChanged) {
|
|
775
|
+
this._emitChange();
|
|
625
776
|
}
|
|
626
|
-
return
|
|
777
|
+
return changeResult?.wasValidChar ?? false;
|
|
627
778
|
}
|
|
628
779
|
focusByIndex(index, tryFocusingNext, direction) {
|
|
629
780
|
if (index < 0 || index >= this.inputs().length)
|
|
@@ -631,6 +782,9 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
|
|
|
631
782
|
const nextEl = this.inputs()[index]?.nativeElement;
|
|
632
783
|
if (!nextEl)
|
|
633
784
|
return false;
|
|
785
|
+
if (nextEl.getAttribute('data-ard-static') !== null) {
|
|
786
|
+
return this.focusByIndex(index + (direction ?? 1));
|
|
787
|
+
}
|
|
634
788
|
nextEl.focus();
|
|
635
789
|
if (tryFocusingNext && direction && document.activeElement !== nextEl) {
|
|
636
790
|
return this.focusByIndex(index + direction);
|
|
@@ -640,6 +794,7 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
|
|
|
640
794
|
//focus, blur, change
|
|
641
795
|
onFocusMaster(event, index) {
|
|
642
796
|
this.focusIndexEvent.emit(index);
|
|
797
|
+
event.target.setSelectionRange(0, 1);
|
|
643
798
|
this.onFocus(event);
|
|
644
799
|
}
|
|
645
800
|
onBlurMaster(event, index) {
|
|
@@ -678,7 +833,7 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
|
|
|
678
833
|
}
|
|
679
834
|
}
|
|
680
835
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputComponent, deps: [{ token: ARD_DIGIT_INPUT_DEFAULTS }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
681
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumDigitInputComponent, selector: "ard-digit-input", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, outputAsString: { classPropertyName: "outputAsString", publicName: "outputAsString", isSignal: true, isRequired: false, transformFunction: null }, outputControlValueAccessorOnFinish: { classPropertyName: "outputControlValueAccessorOnFinish", publicName: "outputControlValueAccessorOnFinish", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", finishedValue: "finishedValue", focusIndexEvent: "focusIndex", blurIndexEvent: "blurIndex" }, providers: [
|
|
836
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumDigitInputComponent, selector: "ard-digit-input", inputs: { inputAttrs: { classPropertyName: "inputAttrs", publicName: "inputAttrs", isSignal: true, isRequired: false, transformFunction: null }, autoFillParseFn: { classPropertyName: "autoFillParseFn", publicName: "autoFillParseFn", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, transform: { classPropertyName: "transform", publicName: "transform", isSignal: true, isRequired: false, transformFunction: null }, outputAsString: { classPropertyName: "outputAsString", publicName: "outputAsString", isSignal: true, isRequired: false, transformFunction: null }, outputControlValueAccessorOnFinish: { classPropertyName: "outputControlValueAccessorOnFinish", publicName: "outputControlValueAccessorOnFinish", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", finishedValue: "finishedValue", focusIndexEvent: "focusIndex", blurIndexEvent: "blurIndex" }, providers: [
|
|
682
837
|
{
|
|
683
838
|
provide: NG_VALUE_ACCESSOR,
|
|
684
839
|
useExisting: forwardRef(() => ArdiumDigitInputComponent),
|
|
@@ -688,7 +843,7 @@ class ArdiumDigitInputComponent extends _FormFieldComponentBase {
|
|
|
688
843
|
provide: _FormFieldComponentBase,
|
|
689
844
|
useExisting: ArdiumDigitInputComponent,
|
|
690
845
|
},
|
|
691
|
-
], viewQueries: [{ propertyName: "inputs", predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"ard-digit-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-error]=\"hasError()\"\r\n>\r\n @for (data of configArrayData(); track $index) {\r\n <div\r\n class=\"ard-digit-input__item\"\r\n [class.ard-digit-input__item-with-input]=\"data.type === 'input'\"\r\n >\r\n @if (data.type === 'input') {\r\n <input\r\n #input\r\n #focusableElement\r\n class=\"ard-digit-input__input\"\r\n type=\"text\"\r\n
|
|
846
|
+
], viewQueries: [{ propertyName: "inputs", predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"ard-digit-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-error]=\"hasError()\"\r\n [class.ard-is-success]=\"isSuccess()\"\r\n>\r\n @for (data of configArrayData(); track $index) {\r\n <div\r\n class=\"ard-digit-input__item\"\r\n [class.ard-digit-input__item-with-input]=\"data.type === 'input'\"\r\n >\r\n @if (data.type === 'input') {\r\n <input\r\n #input\r\n #focusableElement\r\n class=\"ard-digit-input__input\"\r\n type=\"text\"\r\n [readonly]=\"data.readonly\"\r\n [placeholder]=\"data.placeholder\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [class.ard-digit-input__input-readonly]=\"data.readonly\"\r\n [class.ard-digit-input__input-empty]=\"isInputEmpty(data.index!)\"\r\n (paste)=\"onPaste($event, data.index!)\"\r\n (input)=\"onInput($event, data.index!)\"\r\n (focus)=\"onFocusMaster($event, data.index!)\"\r\n (blur)=\"onBlurMaster($event, data.index!)\"\r\n (keydown)=\"onKeydown($event, data.index!)\"\r\n />\r\n } @else {\r\n <div class=\"ard-digit-input__static\">\r\n {{ data.char }}\r\n </div>\r\n <input\r\n #input\r\n type=\"text\"\r\n class=\"ard-digit-input__static-input\"\r\n data-ard-static\r\n autocomplete=\"off\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n [value]=\"data.char\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".ard-digit-input__static-input{position:absolute;opacity:0;appearance:none;pointer-events:none;width:0;height:0}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
692
847
|
}
|
|
693
848
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputComponent, decorators: [{
|
|
694
849
|
type: Component,
|
|
@@ -702,7 +857,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
702
857
|
provide: _FormFieldComponentBase,
|
|
703
858
|
useExisting: ArdiumDigitInputComponent,
|
|
704
859
|
},
|
|
705
|
-
], template: "<div\r\n class=\"ard-digit-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-error]=\"hasError()\"\r\n>\r\n @for (data of configArrayData(); track $index) {\r\n <div\r\n class=\"ard-digit-input__item\"\r\n [class.ard-digit-input__item-with-input]=\"data.type === 'input'\"\r\n >\r\n @if (data.type === 'input') {\r\n <input\r\n #input\r\n #focusableElement\r\n class=\"ard-digit-input__input\"\r\n type=\"text\"\r\n
|
|
860
|
+
], template: "<div\r\n class=\"ard-digit-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-error]=\"hasError()\"\r\n [class.ard-is-success]=\"isSuccess()\"\r\n>\r\n @for (data of configArrayData(); track $index) {\r\n <div\r\n class=\"ard-digit-input__item\"\r\n [class.ard-digit-input__item-with-input]=\"data.type === 'input'\"\r\n >\r\n @if (data.type === 'input') {\r\n <input\r\n #input\r\n #focusableElement\r\n class=\"ard-digit-input__input\"\r\n type=\"text\"\r\n [readonly]=\"data.readonly\"\r\n [placeholder]=\"data.placeholder\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [class.ard-digit-input__input-readonly]=\"data.readonly\"\r\n [class.ard-digit-input__input-empty]=\"isInputEmpty(data.index!)\"\r\n (paste)=\"onPaste($event, data.index!)\"\r\n (input)=\"onInput($event, data.index!)\"\r\n (focus)=\"onFocusMaster($event, data.index!)\"\r\n (blur)=\"onBlurMaster($event, data.index!)\"\r\n (keydown)=\"onKeydown($event, data.index!)\"\r\n />\r\n } @else {\r\n <div class=\"ard-digit-input__static\">\r\n {{ data.char }}\r\n </div>\r\n <input\r\n #input\r\n type=\"text\"\r\n class=\"ard-digit-input__static-input\"\r\n data-ard-static\r\n autocomplete=\"off\"\r\n tabindex=\"-1\"\r\n aria-hidden=\"true\"\r\n [value]=\"data.char\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".ard-digit-input__static-input{position:absolute;opacity:0;appearance:none;pointer-events:none;width:0;height:0}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}\n"] }]
|
|
706
861
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
707
862
|
type: Inject,
|
|
708
863
|
args: [ARD_DIGIT_INPUT_DEFAULTS]
|
|
@@ -712,14 +867,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
712
867
|
|
|
713
868
|
class ArdiumDigitInputModule {
|
|
714
869
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
715
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputModule, declarations: [ArdiumDigitInputComponent], imports: [CommonModule], exports: [ArdiumDigitInputComponent] }); }
|
|
870
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputModule, declarations: [ArdiumDigitInputComponent], imports: [CommonModule, CdkAutofill], exports: [ArdiumDigitInputComponent] }); }
|
|
716
871
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputModule, imports: [CommonModule] }); }
|
|
717
872
|
}
|
|
718
873
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumDigitInputModule, decorators: [{
|
|
719
874
|
type: NgModule,
|
|
720
875
|
args: [{
|
|
721
876
|
declarations: [ArdiumDigitInputComponent],
|
|
722
|
-
imports: [CommonModule],
|
|
877
|
+
imports: [CommonModule, CdkAutofill],
|
|
723
878
|
exports: [ArdiumDigitInputComponent],
|
|
724
879
|
}]
|
|
725
880
|
}] });
|
|
@@ -938,8 +1093,7 @@ class ArdiumFormFieldFrameComponent extends _FocusableComponentBase {
|
|
|
938
1093
|
constructor(defaults) {
|
|
939
1094
|
super(defaults);
|
|
940
1095
|
this.hasError = input(false, { transform: v => coerceBooleanProperty(v) });
|
|
941
|
-
|
|
942
|
-
this.isFocused = false;
|
|
1096
|
+
this.isSuccess = input(false, { transform: v => coerceBooleanProperty(v) });
|
|
943
1097
|
//! appearance
|
|
944
1098
|
/**
|
|
945
1099
|
* The appearance of the component, aka the styling.
|
|
@@ -958,7 +1112,8 @@ class ArdiumFormFieldFrameComponent extends _FocusableComponentBase {
|
|
|
958
1112
|
`ard-variant-${this.variant()}`,
|
|
959
1113
|
this.compact() ? 'ard-compact' : '',
|
|
960
1114
|
this.hasError() ? 'ard-has-error' : '',
|
|
961
|
-
this.
|
|
1115
|
+
this.isSuccess() ? 'ard-is-success' : '',
|
|
1116
|
+
this.isFocused() ? 'ard-focused' : 'ard-unfocused',
|
|
962
1117
|
].join(' '));
|
|
963
1118
|
//! prefix & suffix
|
|
964
1119
|
this.prefixTemplateInput = input(undefined, { alias: 'prefixTemplate' });
|
|
@@ -966,8 +1121,12 @@ class ArdiumFormFieldFrameComponent extends _FocusableComponentBase {
|
|
|
966
1121
|
this.prefixTemplate = contentChild(ArdFormFieldPrefixTemplateDirective);
|
|
967
1122
|
this.suffixTemplate = contentChild(ArdFormFieldSuffixTemplateDirective);
|
|
968
1123
|
}
|
|
1124
|
+
//! focused state
|
|
1125
|
+
set _setIsFocused(v) {
|
|
1126
|
+
this.isFocused.set(v);
|
|
1127
|
+
}
|
|
969
1128
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumFormFieldFrameComponent, deps: [{ token: ARD_FORM_FIELD_FRAME_DEFAULTS }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
970
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: { hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null },
|
|
1129
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: { hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, isSuccess: { classPropertyName: "isSuccess", publicName: "isSuccess", isSignal: true, isRequired: false, transformFunction: null }, _setIsFocused: { classPropertyName: "_setIsFocused", publicName: "isFocused", isSignal: false, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, prefixTemplateInput: { classPropertyName: "prefixTemplateInput", publicName: "prefixTemplate", isSignal: true, isRequired: false, transformFunction: null }, suffixTemplateInput: { classPropertyName: "suffixTemplateInput", publicName: "suffixTemplate", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "prefixTemplate", first: true, predicate: ArdFormFieldPrefixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suffixTemplate", first: true, predicate: ArdFormFieldSuffixTemplateDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"ard-form-field-frame\"\n [ngClass]=\"ngClasses()\"\n>\n <div class=\"ard-form-field-overlay\"></div>\n @if (prefixTemplateInput() ?? prefixTemplate()) {\n <div class=\"ard-form-field-prefix-container\">\n <ng-template [ngTemplateOutlet]=\"prefixTemplateInput() ?? prefixTemplate()?.template ?? null\"></ng-template>\n </div>\n }\n <div class=\"ard-form-field-content-container\">\n <ng-content></ng-content>\n </div>\n @if (suffixTemplateInput() ?? suffixTemplate()) {\n <div class=\"ard-form-field-suffix-container\">\n <ng-template [ngTemplateOutlet]=\"suffixTemplateInput() ?? suffixTemplate()?.template ?? null\"></ng-template>\n </div>\n }\n</div>\n", styles: [".ard-form-field-frame{position:relative}.ard-form-field-overlay{position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
971
1130
|
}
|
|
972
1131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumFormFieldFrameComponent, decorators: [{
|
|
973
1132
|
type: Component,
|
|
@@ -975,8 +1134,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
975
1134
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
976
1135
|
type: Inject,
|
|
977
1136
|
args: [ARD_FORM_FIELD_FRAME_DEFAULTS]
|
|
978
|
-
}] }], propDecorators: {
|
|
979
|
-
type: Input
|
|
1137
|
+
}] }], propDecorators: { _setIsFocused: [{
|
|
1138
|
+
type: Input,
|
|
1139
|
+
args: [{ alias: 'isFocused' }]
|
|
980
1140
|
}] } });
|
|
981
1141
|
|
|
982
1142
|
class ArdiumFormFieldFrameModule {
|
|
@@ -1854,7 +2014,7 @@ class ArdiumInputComponent extends _SimpleInputComponentBase {
|
|
|
1854
2014
|
provide: _FormFieldComponentBase,
|
|
1855
2015
|
useExisting: ArdiumInputComponent,
|
|
1856
2016
|
},
|
|
1857
|
-
], queries: [{ propertyName: "prefixTemplate", first: true, predicate: ArdInputPrefixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suffixTemplate", first: true, predicate: ArdInputSuffixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "placeholderTemplate", first: true, predicate: ArdInputPlaceholderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suggestionTemplate", first: true, predicate: ArdInputSuggestionTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suggestionLoadingTemplate", first: true, predicate: ArdInputLoadingTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "dropdownHost", first: true, predicate: ["suggestionsHost"], descendants: true, isSignal: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["suggestionsTemplate"], descendants: true, read: TemplateRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused\"\r\n [hasError]=\"hasError()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-input\"\r\n #suggestionsHost\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-value]=\"value\"\r\n (click)=\"focus()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayAutocomplete()) {\r\n <div class=\"ard-autocomplete\">{{ autocomplete() }}</div>\r\n }\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n\r\n @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<ng-template #suggestionsTemplate>\r\n <ard-dropdown-panel\r\n class=\"ard-dropdown-panel ard-input-suggestions-panel\"\r\n role=\"listbox\"\r\n [compact]=\"compact\"\r\n aria-label=\"Suggestions\"\r\n [appearance]=\"dropdownAppearanceOrDefault()\"\r\n [variant]=\"dropdownVariantOrDefault()\"\r\n [isOpen]=\"shouldDisplaySuggestions()\"\r\n (ardClickOutside)=\"handleSuggestionClickOutside($event)\"\r\n (mousemove)=\"onMouseMove()\"\r\n >\r\n @for (item of suggestionItems(); track item.index) {\r\n <div\r\n class=\"ard-option\"\r\n role=\"option\"\r\n [class.ard-option-selected]=\"item.selected()\"\r\n [class.ard-option-highlighted]=\"item.highlighted()\"\r\n [attr.aria-selected]=\"item.selected()\"\r\n (click)=\"selectSuggestion(item, $event)\"\r\n (mouseenter)=\"onSuggestionMouseEnter(item, $event)\"\r\n (mouseleave)=\"onSuggestionMouseLeave(item, $event)\"\r\n >\r\n <span class=\"ard-option-label\">\r\n <ng-template #defaultOptionTemplate>\r\n {{ item.label() }}\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"suggestionTemplate()?.template || defaultOptionTemplate\"\r\n [ngTemplateOutletContext]=\"getOptionContext(item)\"\r\n ></ng-template>\r\n </span>\r\n </div>\r\n }\r\n @if (areSuggestionsLoading()) {\r\n <ng-template #defaultLoadingPlaceholderTemplate>\r\n <div class=\"ard-option ard-option-disabled\">{{ suggestionsLoadingText() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"suggestionLoadingTemplate()?.template || defaultLoadingPlaceholderTemplate\"></ng-template>\r\n }\r\n </ard-dropdown-panel>\r\n</ng-template>\r\n", styles: [".ard-input-container{position:relative}.ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}.ard-text-align-left input,.ard-text-align-left .ard-placeholder{text-align:left}.ard-text-align-center input,.ard-text-align-center .ard-placeholder{text-align:center}.ard-text-align-right input,.ard-text-align-right .ard-placeholder{text-align:right}.ard-autocomplete{position:absolute}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: _ClearButtonComponent, selector: "ard-clear-button" }, { kind: "component", type: ArdiumDropdownPanelComponent, selector: "ard-dropdown-panel", inputs: ["panelId", "headerTemplate", "footerTemplate", "filterValue", "appearance", "variant", "compact", "isOpen"], outputs: ["scroll", "scrollToEnd"] }, { kind: "directive", type: i4.ClickOutsideDirective, selector: "[ardClickOutside]", outputs: ["ardClickOutside"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2017
|
+
], queries: [{ propertyName: "prefixTemplate", first: true, predicate: ArdInputPrefixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suffixTemplate", first: true, predicate: ArdInputSuffixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "placeholderTemplate", first: true, predicate: ArdInputPlaceholderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suggestionTemplate", first: true, predicate: ArdInputSuggestionTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suggestionLoadingTemplate", first: true, predicate: ArdInputLoadingTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "dropdownHost", first: true, predicate: ["suggestionsHost"], descendants: true, isSignal: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["suggestionsTemplate"], descendants: true, read: TemplateRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-input\"\r\n #suggestionsHost\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-value]=\"value\"\r\n (click)=\"focus()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayAutocomplete()) {\r\n <div class=\"ard-autocomplete\">{{ autocomplete() }}</div>\r\n }\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n\r\n @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<ng-template #suggestionsTemplate>\r\n <ard-dropdown-panel\r\n class=\"ard-dropdown-panel ard-input-suggestions-panel\"\r\n role=\"listbox\"\r\n [compact]=\"compact\"\r\n aria-label=\"Suggestions\"\r\n [appearance]=\"dropdownAppearanceOrDefault()\"\r\n [variant]=\"dropdownVariantOrDefault()\"\r\n [isOpen]=\"shouldDisplaySuggestions()\"\r\n (ardClickOutside)=\"handleSuggestionClickOutside($event)\"\r\n (mousemove)=\"onMouseMove()\"\r\n >\r\n @for (item of suggestionItems(); track item.index) {\r\n <div\r\n class=\"ard-option\"\r\n role=\"option\"\r\n [class.ard-option-selected]=\"item.selected()\"\r\n [class.ard-option-highlighted]=\"item.highlighted()\"\r\n [attr.aria-selected]=\"item.selected()\"\r\n (click)=\"selectSuggestion(item, $event)\"\r\n (mouseenter)=\"onSuggestionMouseEnter(item, $event)\"\r\n (mouseleave)=\"onSuggestionMouseLeave(item, $event)\"\r\n >\r\n <span class=\"ard-option-label\">\r\n <ng-template #defaultOptionTemplate>\r\n {{ item.label() }}\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"suggestionTemplate()?.template || defaultOptionTemplate\"\r\n [ngTemplateOutletContext]=\"getOptionContext(item)\"\r\n ></ng-template>\r\n </span>\r\n </div>\r\n }\r\n @if (areSuggestionsLoading()) {\r\n <ng-template #defaultLoadingPlaceholderTemplate>\r\n <div class=\"ard-option ard-option-disabled\">{{ suggestionsLoadingText() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"suggestionLoadingTemplate()?.template || defaultLoadingPlaceholderTemplate\"></ng-template>\r\n }\r\n </ard-dropdown-panel>\r\n</ng-template>\r\n", styles: [".ard-input-container{position:relative}.ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}.ard-text-align-left input,.ard-text-align-left .ard-placeholder{text-align:left}.ard-text-align-center input,.ard-text-align-center .ard-placeholder{text-align:center}.ard-text-align-right input,.ard-text-align-right .ard-placeholder{text-align:right}.ard-autocomplete{position:absolute}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isSuccess", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: _ClearButtonComponent, selector: "ard-clear-button" }, { kind: "component", type: ArdiumDropdownPanelComponent, selector: "ard-dropdown-panel", inputs: ["panelId", "headerTemplate", "footerTemplate", "filterValue", "appearance", "variant", "compact", "isOpen"], outputs: ["scroll", "scrollToEnd"] }, { kind: "directive", type: i4.ClickOutsideDirective, selector: "[ardClickOutside]", outputs: ["ardClickOutside"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1858
2018
|
}
|
|
1859
2019
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumInputComponent, decorators: [{
|
|
1860
2020
|
type: Component,
|
|
@@ -1868,7 +2028,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1868
2028
|
provide: _FormFieldComponentBase,
|
|
1869
2029
|
useExisting: ArdiumInputComponent,
|
|
1870
2030
|
},
|
|
1871
|
-
], template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused\"\r\n [hasError]=\"hasError()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-input\"\r\n #suggestionsHost\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-value]=\"value\"\r\n (click)=\"focus()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayAutocomplete()) {\r\n <div class=\"ard-autocomplete\">{{ autocomplete() }}</div>\r\n }\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n\r\n @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<ng-template #suggestionsTemplate>\r\n <ard-dropdown-panel\r\n class=\"ard-dropdown-panel ard-input-suggestions-panel\"\r\n role=\"listbox\"\r\n [compact]=\"compact\"\r\n aria-label=\"Suggestions\"\r\n [appearance]=\"dropdownAppearanceOrDefault()\"\r\n [variant]=\"dropdownVariantOrDefault()\"\r\n [isOpen]=\"shouldDisplaySuggestions()\"\r\n (ardClickOutside)=\"handleSuggestionClickOutside($event)\"\r\n (mousemove)=\"onMouseMove()\"\r\n >\r\n @for (item of suggestionItems(); track item.index) {\r\n <div\r\n class=\"ard-option\"\r\n role=\"option\"\r\n [class.ard-option-selected]=\"item.selected()\"\r\n [class.ard-option-highlighted]=\"item.highlighted()\"\r\n [attr.aria-selected]=\"item.selected()\"\r\n (click)=\"selectSuggestion(item, $event)\"\r\n (mouseenter)=\"onSuggestionMouseEnter(item, $event)\"\r\n (mouseleave)=\"onSuggestionMouseLeave(item, $event)\"\r\n >\r\n <span class=\"ard-option-label\">\r\n <ng-template #defaultOptionTemplate>\r\n {{ item.label() }}\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"suggestionTemplate()?.template || defaultOptionTemplate\"\r\n [ngTemplateOutletContext]=\"getOptionContext(item)\"\r\n ></ng-template>\r\n </span>\r\n </div>\r\n }\r\n @if (areSuggestionsLoading()) {\r\n <ng-template #defaultLoadingPlaceholderTemplate>\r\n <div class=\"ard-option ard-option-disabled\">{{ suggestionsLoadingText() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"suggestionLoadingTemplate()?.template || defaultLoadingPlaceholderTemplate\"></ng-template>\r\n }\r\n </ard-dropdown-panel>\r\n</ng-template>\r\n", styles: [".ard-input-container{position:relative}.ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}.ard-text-align-left input,.ard-text-align-left .ard-placeholder{text-align:left}.ard-text-align-center input,.ard-text-align-center .ard-placeholder{text-align:center}.ard-text-align-right input,.ard-text-align-right .ard-placeholder{text-align:right}.ard-autocomplete{position:absolute}\n"] }]
|
|
2031
|
+
], template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-input\"\r\n #suggestionsHost\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-value]=\"value\"\r\n (click)=\"focus()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayAutocomplete()) {\r\n <div class=\"ard-autocomplete\">{{ autocomplete() }}</div>\r\n }\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n\r\n @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<ng-template #suggestionsTemplate>\r\n <ard-dropdown-panel\r\n class=\"ard-dropdown-panel ard-input-suggestions-panel\"\r\n role=\"listbox\"\r\n [compact]=\"compact\"\r\n aria-label=\"Suggestions\"\r\n [appearance]=\"dropdownAppearanceOrDefault()\"\r\n [variant]=\"dropdownVariantOrDefault()\"\r\n [isOpen]=\"shouldDisplaySuggestions()\"\r\n (ardClickOutside)=\"handleSuggestionClickOutside($event)\"\r\n (mousemove)=\"onMouseMove()\"\r\n >\r\n @for (item of suggestionItems(); track item.index) {\r\n <div\r\n class=\"ard-option\"\r\n role=\"option\"\r\n [class.ard-option-selected]=\"item.selected()\"\r\n [class.ard-option-highlighted]=\"item.highlighted()\"\r\n [attr.aria-selected]=\"item.selected()\"\r\n (click)=\"selectSuggestion(item, $event)\"\r\n (mouseenter)=\"onSuggestionMouseEnter(item, $event)\"\r\n (mouseleave)=\"onSuggestionMouseLeave(item, $event)\"\r\n >\r\n <span class=\"ard-option-label\">\r\n <ng-template #defaultOptionTemplate>\r\n {{ item.label() }}\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"suggestionTemplate()?.template || defaultOptionTemplate\"\r\n [ngTemplateOutletContext]=\"getOptionContext(item)\"\r\n ></ng-template>\r\n </span>\r\n </div>\r\n }\r\n @if (areSuggestionsLoading()) {\r\n <ng-template #defaultLoadingPlaceholderTemplate>\r\n <div class=\"ard-option ard-option-disabled\">{{ suggestionsLoadingText() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"suggestionLoadingTemplate()?.template || defaultLoadingPlaceholderTemplate\"></ng-template>\r\n }\r\n </ard-dropdown-panel>\r\n</ng-template>\r\n", styles: [".ard-input-container{position:relative}.ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}.ard-text-align-left input,.ard-text-align-left .ard-placeholder{text-align:left}.ard-text-align-center input,.ard-text-align-center .ard-placeholder{text-align:center}.ard-text-align-right input,.ard-text-align-right .ard-placeholder{text-align:right}.ard-autocomplete{position:absolute}\n"] }]
|
|
1872
2032
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1873
2033
|
type: Inject,
|
|
1874
2034
|
args: [ARD_INPUT_DEFAULTS]
|
|
@@ -2218,7 +2378,7 @@ class ArdiumPasswordInputComponent extends _FormFieldComponentBase {
|
|
|
2218
2378
|
provide: _FormFieldComponentBase,
|
|
2219
2379
|
useExisting: ArdiumPasswordInputComponent,
|
|
2220
2380
|
},
|
|
2221
|
-
], queries: [{ propertyName: "prefixTemplate", first: true, predicate: ArdPasswordInputPrefixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suffixTemplate", first: true, predicate: ArdPasswordInputSuffixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "placeholderTemplate", first: true, predicate: ArdPasswordInputPlaceholderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "revealTemplate", first: true, predicate: ArdPasswordInputRevealButtonTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "textInputEl", first: true, predicate: ["textInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused\"\r\n [hasError]=\"hasError()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-password-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-value]=\"value()\"\r\n (click)=\"focus()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\" />\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n [type]=\"!revealable() || !revealed() ? 'password' : 'text'\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (change)=\"onChange($event)\"\r\n (copy)=\"onCopy($event)\"\r\n [class.ard-revealed]=\"revealable() && revealed()\"\r\n />\r\n </div>\r\n\r\n @if (revealable()) {\r\n <button\r\n class=\"ard-reveal-button\"\r\n type=\"button\"\r\n (click)=\"!holdToReveal() && toggleReveal()\"\r\n (mousedown)=\"holdToReveal() && revealed.set(true)\"\r\n (mouseup)=\"holdToReveal() && revealed.set(false)\"\r\n >\r\n <ng-template\r\n #defaultRevealTemplate\r\n let-revealed\r\n >\r\n <ard-icon [icon]=\"revealed ? 'visibility' : 'visibility_off'\"></ard-icon>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"revealTemplate()?.template || defaultRevealTemplate\"\r\n [ngTemplateOutletContext]=\"revealButtonContext()\"\r\n />\r\n </button>\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2381
|
+
], queries: [{ propertyName: "prefixTemplate", first: true, predicate: ArdPasswordInputPrefixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suffixTemplate", first: true, predicate: ArdPasswordInputSuffixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "placeholderTemplate", first: true, predicate: ArdPasswordInputPlaceholderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "revealTemplate", first: true, predicate: ArdPasswordInputRevealButtonTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "textInputEl", first: true, predicate: ["textInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-password-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-value]=\"value()\"\r\n (click)=\"focus()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\" />\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n [type]=\"!revealable() || !revealed() ? 'password' : 'text'\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (change)=\"onChange($event)\"\r\n (copy)=\"onCopy($event)\"\r\n [class.ard-revealed]=\"revealable() && revealed()\"\r\n />\r\n </div>\r\n\r\n @if (revealable()) {\r\n <button\r\n class=\"ard-reveal-button\"\r\n type=\"button\"\r\n (click)=\"!holdToReveal() && toggleReveal()\"\r\n (mousedown)=\"holdToReveal() && revealed.set(true)\"\r\n (mouseup)=\"holdToReveal() && revealed.set(false)\"\r\n >\r\n <ng-template\r\n #defaultRevealTemplate\r\n let-revealed\r\n >\r\n <ard-icon [icon]=\"revealed ? 'visibility' : 'visibility_off'\"></ard-icon>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"revealTemplate()?.template || defaultRevealTemplate\"\r\n [ngTemplateOutletContext]=\"revealButtonContext()\"\r\n />\r\n </button>\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isSuccess", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2222
2382
|
}
|
|
2223
2383
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumPasswordInputComponent, decorators: [{
|
|
2224
2384
|
type: Component,
|
|
@@ -2232,7 +2392,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2232
2392
|
provide: _FormFieldComponentBase,
|
|
2233
2393
|
useExisting: ArdiumPasswordInputComponent,
|
|
2234
2394
|
},
|
|
2235
|
-
], template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused\"\r\n [hasError]=\"hasError()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-password-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-value]=\"value()\"\r\n (click)=\"focus()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\" />\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n [type]=\"!revealable() || !revealed() ? 'password' : 'text'\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (change)=\"onChange($event)\"\r\n (copy)=\"onCopy($event)\"\r\n [class.ard-revealed]=\"revealable() && revealed()\"\r\n />\r\n </div>\r\n\r\n @if (revealable()) {\r\n <button\r\n class=\"ard-reveal-button\"\r\n type=\"button\"\r\n (click)=\"!holdToReveal() && toggleReveal()\"\r\n (mousedown)=\"holdToReveal() && revealed.set(true)\"\r\n (mouseup)=\"holdToReveal() && revealed.set(false)\"\r\n >\r\n <ng-template\r\n #defaultRevealTemplate\r\n let-revealed\r\n >\r\n <ard-icon [icon]=\"revealed ? 'visibility' : 'visibility_off'\"></ard-icon>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"revealTemplate()?.template || defaultRevealTemplate\"\r\n [ngTemplateOutletContext]=\"revealButtonContext()\"\r\n />\r\n </button>\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n" }]
|
|
2395
|
+
], template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-password-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-value]=\"value()\"\r\n (click)=\"focus()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\" />\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n [type]=\"!revealable() || !revealed() ? 'password' : 'text'\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (change)=\"onChange($event)\"\r\n (copy)=\"onCopy($event)\"\r\n [class.ard-revealed]=\"revealable() && revealed()\"\r\n />\r\n </div>\r\n\r\n @if (revealable()) {\r\n <button\r\n class=\"ard-reveal-button\"\r\n type=\"button\"\r\n (click)=\"!holdToReveal() && toggleReveal()\"\r\n (mousedown)=\"holdToReveal() && revealed.set(true)\"\r\n (mouseup)=\"holdToReveal() && revealed.set(false)\"\r\n >\r\n <ng-template\r\n #defaultRevealTemplate\r\n let-revealed\r\n >\r\n <ard-icon [icon]=\"revealed ? 'visibility' : 'visibility_off'\"></ard-icon>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"revealTemplate()?.template || defaultRevealTemplate\"\r\n [ngTemplateOutletContext]=\"revealButtonContext()\"\r\n />\r\n </button>\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n" }]
|
|
2236
2396
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2237
2397
|
type: Inject,
|
|
2238
2398
|
args: [ARD_PASSWORD_INPUT_DEFAULTS]
|
|
@@ -2361,7 +2521,7 @@ class ArdiumSimpleInputComponent extends _SimpleInputComponentBase {
|
|
|
2361
2521
|
provide: _FormFieldComponentBase,
|
|
2362
2522
|
useExisting: ArdiumSimpleInputComponent
|
|
2363
2523
|
},
|
|
2364
|
-
], queries: [{ propertyName: "prefixTemplate", first: true, predicate: ArdSimpleInputPrefixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suffixTemplate", first: true, predicate: ArdSimpleInputSuffixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "placeholderTemplate", first: true, predicate: ArdSimpleInputPlaceholderTemplateDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused\"\r\n [hasError]=\"hasError()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-simple-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-value]=\"value\"\r\n (click)=\"focus()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocusMaster($event)\"\r\n (blur)=\"onBlurMaster($event)\"\r\n (change)=\"onChange($event)\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n\r\n @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n", styles: [".ard-input-container{position:relative}.ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}.ard-text-align-left input,.ard-text-align-left .ard-placeholder{text-align:left}.ard-text-align-center input,.ard-text-align-center .ard-placeholder{text-align:center}.ard-text-align-right input,.ard-text-align-right .ard-placeholder{text-align:right}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: _ClearButtonComponent, selector: "ard-clear-button" }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2524
|
+
], queries: [{ propertyName: "prefixTemplate", first: true, predicate: ArdSimpleInputPrefixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suffixTemplate", first: true, predicate: ArdSimpleInputSuffixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "placeholderTemplate", first: true, predicate: ArdSimpleInputPlaceholderTemplateDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-simple-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-value]=\"value\"\r\n (click)=\"focus()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocusMaster($event)\"\r\n (blur)=\"onBlurMaster($event)\"\r\n (change)=\"onChange($event)\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n\r\n @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n", styles: [".ard-input-container{position:relative}.ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}.ard-text-align-left input,.ard-text-align-left .ard-placeholder{text-align:left}.ard-text-align-center input,.ard-text-align-center .ard-placeholder{text-align:center}.ard-text-align-right input,.ard-text-align-right .ard-placeholder{text-align:right}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: _ClearButtonComponent, selector: "ard-clear-button" }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isSuccess", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2365
2525
|
}
|
|
2366
2526
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumSimpleInputComponent, decorators: [{
|
|
2367
2527
|
type: Component,
|
|
@@ -2375,7 +2535,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2375
2535
|
provide: _FormFieldComponentBase,
|
|
2376
2536
|
useExisting: ArdiumSimpleInputComponent
|
|
2377
2537
|
},
|
|
2378
|
-
], template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused\"\r\n [hasError]=\"hasError()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-simple-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-value]=\"value\"\r\n (click)=\"focus()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocusMaster($event)\"\r\n (blur)=\"onBlurMaster($event)\"\r\n (change)=\"onChange($event)\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n\r\n @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n", styles: [".ard-input-container{position:relative}.ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}.ard-text-align-left input,.ard-text-align-left .ard-placeholder{text-align:left}.ard-text-align-center input,.ard-text-align-center .ard-placeholder{text-align:center}.ard-text-align-right input,.ard-text-align-right .ard-placeholder{text-align:right}\n"] }]
|
|
2538
|
+
], template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-simple-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-value]=\"value\"\r\n (click)=\"focus()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocusMaster($event)\"\r\n (blur)=\"onBlurMaster($event)\"\r\n (change)=\"onChange($event)\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n\r\n @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n", styles: [".ard-input-container{position:relative}.ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}.ard-text-align-left input,.ard-text-align-left .ard-placeholder{text-align:left}.ard-text-align-center input,.ard-text-align-center .ard-placeholder{text-align:center}.ard-text-align-right input,.ard-text-align-right .ard-placeholder{text-align:right}\n"] }]
|
|
2379
2539
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2380
2540
|
type: Inject,
|
|
2381
2541
|
args: [ARD_SIMPLE_INPUT_DEFAULTS]
|
|
@@ -3616,7 +3776,7 @@ class ArdiumSelectComponent extends _FormFieldComponentBase {
|
|
|
3616
3776
|
}
|
|
3617
3777
|
//! change & touch event emitters
|
|
3618
3778
|
_emitChange() {
|
|
3619
|
-
const value = this.itemStorage.value();
|
|
3779
|
+
const value = this.multiselectable() ? this.itemStorage.value() : this.itemStorage.value()[0];
|
|
3620
3780
|
this._onChangeRegistered?.(value);
|
|
3621
3781
|
this.changeEvent.emit(value);
|
|
3622
3782
|
this.valueChange.emit(value);
|
|
@@ -4093,7 +4253,7 @@ class ArdiumSelectComponent extends _FormFieldComponentBase {
|
|
|
4093
4253
|
provide: _FormFieldComponentBase,
|
|
4094
4254
|
useExisting: ArdiumSelectComponent,
|
|
4095
4255
|
},
|
|
4096
|
-
], queries: [{ propertyName: "optionTemplate", first: true, predicate: ArdOptionTemplateDirective, descendants: true, isSignal: true }, { propertyName: "optgroupTemplate", first: true, predicate: ArdOptgroupTemplateDirective, descendants: true, isSignal: true }, { propertyName: "valueTemplate", first: true, predicate: ArdValueTemplateDirective, descendants: true, isSignal: true }, { propertyName: "placeholderTemplate", first: true, predicate: ArdSelectPlaceholderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "loadingSpinnerTemplate", first: true, predicate: ArdLoadingSpinnerTemplateDirective, descendants: true, isSignal: true }, { propertyName: "loadingPlaceholderTemplate", first: true, predicate: ArdLoadingPlaceholderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "dropdownHeaderTemplate", first: true, predicate: ArdDropdownHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "dropdownFooterTemplate", first: true, predicate: ArdDropdownFooterTemplateDirective, descendants: true, isSignal: true }, { propertyName: "noItemsFoundTemplate", first: true, predicate: ArdNoItemsFoundTemplateDirective, descendants: true, isSignal: true }, { propertyName: "addCustomTemplate", first: true, predicate: ArdAddCustomTemplateDirective, descendants: true, isSignal: true }, { propertyName: "itemLimitReachedTemplate", first: true, predicate: ArdItemLimitReachedTemplateDirective, descendants: true, isSignal: true }, { propertyName: "itemDisplayLimitTemplate", first: true, predicate: ArdItemDisplayLimitTemplateDirective, descendants: true, isSignal: true }, { propertyName: "prefixTemplate", first: true, predicate: ArdSelectPrefixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suffixTemplate", first: true, predicate: ArdSelectSuffixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "optionComponents", predicate: ArdiumOptionComponent }], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "dropdownPanel", first: true, predicate: ArdiumDropdownPanelComponent, descendants: true, isSignal: true }, { propertyName: "dropdownHost", first: true, predicate: ["dropdownHost"], descendants: true, read: ElementRef }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, read: TemplateRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused\"\r\n [hasError]=\"hasError()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-select\"\r\n #dropdownHost\r\n (click)=\"handleAnywhereClick($event)\"\r\n [class.ard-has-value]=\"itemStorage.isAnyItemSelected()\"\r\n [ngClass]=\"ngClasses()\"\r\n >\r\n <div class=\"ard-select-value-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\" />\r\n } @if (shouldDisplayValue()) { @for (item of itemStorage.selectedItems(); track item.index) {\r\n <div\r\n class=\"ard-select-value\"\r\n [class.ard-value-disabled]=\"item.disabled()\"\r\n [attr.hidden]=\"!isValueWithinDisplayLimit($index)\"\r\n >\r\n <ng-template\r\n *ngIf=\"isValueWithinDisplayLimit($index)\"\r\n [ngTemplateOutlet]=\"valueTemplate()?.template || (multiselectable() ? defaultMultiValueTemplate : defaultValueTemplate)\"\r\n [ngTemplateOutletContext]=\"getValueContext(item)\"\r\n />\r\n </div>\r\n }\r\n\r\n <ng-template\r\n #defaultValueTemplate\r\n let-item\r\n >\r\n <div\r\n [ardInnerHTML]=\"item.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></div>\r\n </ng-template>\r\n <ng-template\r\n #defaultMultiValueTemplate\r\n let-item\r\n let-unselect=\"unselect\"\r\n >\r\n <ard-deletable-chip\r\n (delete)=\"unselect(item)\"\r\n [variant]=\"variant()\"\r\n compact\r\n appearance=\"outlined-strong\"\r\n >\r\n <div\r\n [ardInnerHTML]=\"item.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></div>\r\n <!-- TODO check if can remove div -->\r\n </ard-deletable-chip>\r\n </ng-template>\r\n } @if (itemStorage.isAnyItemSelected() && shouldShowItemDisplayLimit()) {\r\n <div class=\"ard-overflow-indicator\">\r\n <ng-template\r\n [ngTemplateOutlet]=\"itemDisplayLimitTemplate()?.template || defaultItemDisplayLimitTemplate\"\r\n [ngTemplateOutletContext]=\"getItemDisplayLimitContext()\"\r\n />\r\n\r\n <ng-template\r\n #defaultItemDisplayLimitTemplate\r\n let-count=\"overflowCount\"\r\n >\r\n <div>{{ count }} more...</div>\r\n </ng-template>\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"ard-search-input\"\r\n role=\"combobox\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-owns]=\"isOpen() ? htmlId() : null\"\r\n >\r\n <input\r\n #searchInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"searchInputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"isInputElementReadonly()\"\r\n [disabled]=\"disabled()\"\r\n [value]=\"searchTerm()\"\r\n aria-autocomplete=\"list\"\r\n [attr.aria-controls]=\"isOpen() ? htmlId() : null\"\r\n (input)=\"filter(searchInput.value)\"\r\n (change)=\"$event.stopPropagation()\"\r\n (focus)=\"onFocus($event)\"\r\n (focus)=\"onSearchInputFocus()\"\r\n (blur)=\"onBlur($event)\"\r\n (blur)=\"onSearchInputBlur()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"ard-select-controls\">\r\n @if (isLoading()) {\r\n <ng-template #defaultLoadingSpinnerTemplate>\r\n <div class=\"ard-simple-spinner\"></div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate()?.template || defaultLoadingSpinnerTemplate\" />\r\n } @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"handleClearButtonClick($event)\"\r\n />\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"ard-dropdown-arrow-wrapper\"\r\n (click)=\"handleDropdownArrowClick($event)\"\r\n >\r\n <span class=\"ard-dropdown-arrow\"></span>\r\n <div class=\"ard-hitbox\"></div>\r\n </button>\r\n </div>\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<ng-template #dropdownTemplate>\r\n <ard-dropdown-panel\r\n class=\"ard-dropdown-panel ard-select-dropdown-panel\"\r\n role=\"listbox\"\r\n aria-label=\"Options list\"\r\n [headerTemplate]=\"dropdownHeaderTemplate()?.template ?? null\"\r\n [footerTemplate]=\"dropdownFooterTemplate()?.template ?? null\"\r\n [appearance]=\"dropdownAppearanceOrDefault()\"\r\n [variant]=\"dropdownVariantOrDefault()\"\r\n [isOpen]=\"true\"\r\n [filterValue]=\"searchTerm()\"\r\n [panelId]=\"htmlId()\"\r\n [compact]=\"compact()\"\r\n (ardClickOutside)=\"handleOutsideClick($event)\"\r\n (mousemove)=\"onMouseMove()\"\r\n (scroll)=\"scrollEvent.emit($event)\"\r\n (scrollToEnd)=\"scrollToEndEvent.emit($event)\"\r\n >\r\n @if (!shouldShowNoItemsFound()) { @for (group of itemStorage.groups(); track $index) {\r\n <div\r\n class=\"ard-optgroup\"\r\n role=\"group\"\r\n [class.ard-group-disabled]=\"group.disabled()\"\r\n [class.ard-group-selected]=\"group.selected()\"\r\n [class.ard-group-highlighted]=\"group.highlighted()\"\r\n (mouseover)=\"onGroupMouseover(group)\"\r\n (click)=\"onGroupClick(group)\"\r\n >\r\n @if (group.label() !== '' && group.label() !== undefined) {\r\n <ng-template\r\n #defaultOptgroupTemplate\r\n let-group\r\n >\r\n <span\r\n class=\"ard-optgroup-label\"\r\n [ardInnerHTML]=\"group.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></span>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"optgroupTemplate()?.template || defaultOptgroupTemplate\"\r\n [ngTemplateOutletContext]=\"getGroupContext(group)\"\r\n />\r\n }\r\n\r\n <div class=\"ard-optgroup-children\">\r\n @for (option of group.children(); track option.index) {\r\n <div\r\n class=\"ard-option\"\r\n role=\"option\"\r\n [class.ard-option-disabled]=\"option.disabled()\"\r\n [class.ard-option-selected]=\"option.selected()\"\r\n [class.ard-option-highlighted]=\"option.highlighted()\"\r\n [class.ard-option-highlighted-recent]=\"option.highlighted_recently()\"\r\n [attr.aria-selected]=\"option.selected()\"\r\n [attr.id]=\"htmlId() + '-' + option.index\"\r\n (click)=\"onItemClick(option, $event)\"\r\n (mouseover)=\"onItemMouseOver($event)\"\r\n (mouseenter)=\"onItemMouseEnter(option, $event)\"\r\n (mouseleave)=\"onItemMouseLeave(option, $event)\"\r\n >\r\n <div class=\"ard-option-label\">\r\n <ng-template\r\n #defaultOptionTemplate\r\n let-option\r\n >\r\n <span\r\n [ardInnerHTML]=\"option.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></span>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"optionTemplate()?.template || defaultOptionTemplate\"\r\n [ngTemplateOutletContext]=\"getOptionContext(option)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n } } @if (shouldShowNoItemsFound()) {\r\n <ng-template #defaultNoItemsFoundTemplate>\r\n <div class=\"ard-option ard-option-disabled\">{{ noItemsFoundText() }}</div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"noItemsFoundTemplate()?.template || defaultNoItemsFoundTemplate\"\r\n [ngTemplateOutletContext]=\"getSearchContext()\"\r\n />\r\n } @if (shouldShowAddCustom()) {\r\n <ng-template\r\n #defaultAddCustomTemplate\r\n let-searchTerm\r\n >\r\n <div\r\n class=\"ard-option ard-option-highlighted ard-add-custom\"\r\n (click)=\"addCustomOption(searchTerm)\"\r\n >\r\n <span class=\"ard-add-custom-label\">Add option</span>\r\n <span class=\"ard-add-custom-value\">\"{{ searchTerm }}\"</span>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"addCustomTemplate()?.template || defaultAddCustomTemplate\"\r\n [ngTemplateOutletContext]=\"getCustomOptionContext()\"\r\n />\r\n } @if (isLoading()) {\r\n <ng-template #defaultLoadingPlaceholderTemplate>\r\n <div class=\"ard-option ard-option-disabled\">{{ loadingPlaceholderText() }}</div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"loadingPlaceholderTemplate()?.template || defaultLoadingPlaceholderTemplate\"\r\n [ngTemplateOutletContext]=\"getSearchContext()\"\r\n />\r\n }\r\n </ard-dropdown-panel>\r\n</ng-template>\r\n", styles: [".ard-select .ard-select-container{display:flex;cursor:pointer}.ard-select .ard-placeholder,.ard-select .ard-value,.ard-select .ard-dropdown-arrow-wrapper,.ard-select .ard-clear-btn-wrapper{-webkit-user-select:none;user-select:none}.ard-select .ard-clear-btn,.ard-select .ard-dropdown-arrow{border:none;background:transparent;padding:0;box-sizing:content-box}.ard-select .ard-option-disabled{pointer-events:none}.ard-select .ard-select-value{display:block}.ard-select .ard-select-value[hidden=true]{display:none}.ard-select .ard-searchable .ard-select-value-container{cursor:text}.ard-select .ard-dropdown-arrow-wrapper{position:relative}.ard-select .ard-dropdown-arrow-wrapper .ard-hitbox{position:absolute;left:-4px;right:-4px;aspect-ratio:1}.ard-select-dropdown-panel .ard-optgroup,.ard-select-dropdown-panel .ard-option{-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: ArdiumDropdownPanelComponent, selector: "ard-dropdown-panel", inputs: ["panelId", "headerTemplate", "footerTemplate", "filterValue", "appearance", "variant", "compact", "isOpen"], outputs: ["scroll", "scrollToEnd"] }, { kind: "component", type: ArdiumDeletableChipComponent, selector: "ard-deletable-chip", inputs: ["deleteButtonTitle", "contentAlignment", "appearance", "variant", "color", "compact", "wrapperClasses"], outputs: ["delete"] }, { kind: "directive", type: i4.ClickOutsideDirective, selector: "[ardClickOutside]", outputs: ["ardClickOutside"] }, { kind: "component", type: _ClearButtonComponent, selector: "ard-clear-button" }, { kind: "directive", type: i4.ArdiumInnerHTMLDirective, selector: "[ardInnerHTML]", inputs: ["ardInnerHTML", "ardEscapeInnerHTML"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4256
|
+
], queries: [{ propertyName: "optionTemplate", first: true, predicate: ArdOptionTemplateDirective, descendants: true, isSignal: true }, { propertyName: "optgroupTemplate", first: true, predicate: ArdOptgroupTemplateDirective, descendants: true, isSignal: true }, { propertyName: "valueTemplate", first: true, predicate: ArdValueTemplateDirective, descendants: true, isSignal: true }, { propertyName: "placeholderTemplate", first: true, predicate: ArdSelectPlaceholderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "loadingSpinnerTemplate", first: true, predicate: ArdLoadingSpinnerTemplateDirective, descendants: true, isSignal: true }, { propertyName: "loadingPlaceholderTemplate", first: true, predicate: ArdLoadingPlaceholderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "dropdownHeaderTemplate", first: true, predicate: ArdDropdownHeaderTemplateDirective, descendants: true, isSignal: true }, { propertyName: "dropdownFooterTemplate", first: true, predicate: ArdDropdownFooterTemplateDirective, descendants: true, isSignal: true }, { propertyName: "noItemsFoundTemplate", first: true, predicate: ArdNoItemsFoundTemplateDirective, descendants: true, isSignal: true }, { propertyName: "addCustomTemplate", first: true, predicate: ArdAddCustomTemplateDirective, descendants: true, isSignal: true }, { propertyName: "itemLimitReachedTemplate", first: true, predicate: ArdItemLimitReachedTemplateDirective, descendants: true, isSignal: true }, { propertyName: "itemDisplayLimitTemplate", first: true, predicate: ArdItemDisplayLimitTemplateDirective, descendants: true, isSignal: true }, { propertyName: "prefixTemplate", first: true, predicate: ArdSelectPrefixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suffixTemplate", first: true, predicate: ArdSelectSuffixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "optionComponents", predicate: ArdiumOptionComponent }], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "dropdownPanel", first: true, predicate: ArdiumDropdownPanelComponent, descendants: true, isSignal: true }, { propertyName: "dropdownHost", first: true, predicate: ["dropdownHost"], descendants: true, read: ElementRef }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, read: TemplateRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-select\"\r\n #dropdownHost\r\n (click)=\"handleAnywhereClick($event)\"\r\n [class.ard-has-value]=\"itemStorage.isAnyItemSelected()\"\r\n [ngClass]=\"ngClasses()\"\r\n >\r\n <div class=\"ard-select-value-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\" />\r\n } @if (shouldDisplayValue()) { @for (item of itemStorage.selectedItems(); track item.index) {\r\n <div\r\n class=\"ard-select-value\"\r\n [class.ard-value-disabled]=\"item.disabled()\"\r\n [attr.hidden]=\"!isValueWithinDisplayLimit($index)\"\r\n >\r\n <ng-template\r\n *ngIf=\"isValueWithinDisplayLimit($index)\"\r\n [ngTemplateOutlet]=\"valueTemplate()?.template || (multiselectable() ? defaultMultiValueTemplate : defaultValueTemplate)\"\r\n [ngTemplateOutletContext]=\"getValueContext(item)\"\r\n />\r\n </div>\r\n }\r\n\r\n <ng-template\r\n #defaultValueTemplate\r\n let-item\r\n >\r\n <div\r\n [ardInnerHTML]=\"item.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></div>\r\n </ng-template>\r\n <ng-template\r\n #defaultMultiValueTemplate\r\n let-item\r\n let-unselect=\"unselect\"\r\n >\r\n <ard-deletable-chip\r\n (delete)=\"unselect(item)\"\r\n [variant]=\"variant()\"\r\n compact\r\n appearance=\"outlined-strong\"\r\n >\r\n <div\r\n [ardInnerHTML]=\"item.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></div>\r\n </ard-deletable-chip>\r\n </ng-template>\r\n } @if (itemStorage.isAnyItemSelected() && shouldShowItemDisplayLimit()) {\r\n <div class=\"ard-overflow-indicator\">\r\n <ng-template\r\n [ngTemplateOutlet]=\"itemDisplayLimitTemplate()?.template || defaultItemDisplayLimitTemplate\"\r\n [ngTemplateOutletContext]=\"getItemDisplayLimitContext()\"\r\n />\r\n\r\n <ng-template\r\n #defaultItemDisplayLimitTemplate\r\n let-count=\"overflowCount\"\r\n >\r\n <div>{{ count }} more...</div>\r\n </ng-template>\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"ard-search-input\"\r\n role=\"combobox\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-owns]=\"isOpen() ? htmlId() : null\"\r\n >\r\n <input\r\n #searchInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"searchInputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"isInputElementReadonly()\"\r\n [disabled]=\"disabled()\"\r\n [value]=\"searchTerm()\"\r\n aria-autocomplete=\"list\"\r\n [attr.aria-controls]=\"isOpen() ? htmlId() : null\"\r\n (input)=\"filter(searchInput.value)\"\r\n (change)=\"$event.stopPropagation()\"\r\n (focus)=\"onFocus($event)\"\r\n (focus)=\"onSearchInputFocus()\"\r\n (blur)=\"onBlur($event)\"\r\n (blur)=\"onSearchInputBlur()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"ard-select-controls\">\r\n @if (isLoading()) {\r\n <ng-template #defaultLoadingSpinnerTemplate>\r\n <div class=\"ard-simple-spinner\"></div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate()?.template || defaultLoadingSpinnerTemplate\" />\r\n } @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"handleClearButtonClick($event)\"\r\n />\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"ard-dropdown-arrow-wrapper\"\r\n (click)=\"handleDropdownArrowClick($event)\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n >\r\n <span class=\"ard-dropdown-arrow\"></span>\r\n <div class=\"ard-hitbox\"></div>\r\n </button>\r\n </div>\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<ng-template #dropdownTemplate>\r\n <ard-dropdown-panel\r\n class=\"ard-dropdown-panel ard-select-dropdown-panel\"\r\n role=\"listbox\"\r\n aria-label=\"Options list\"\r\n [headerTemplate]=\"dropdownHeaderTemplate()?.template ?? null\"\r\n [footerTemplate]=\"dropdownFooterTemplate()?.template ?? null\"\r\n [appearance]=\"dropdownAppearanceOrDefault()\"\r\n [variant]=\"dropdownVariantOrDefault()\"\r\n [isOpen]=\"true\"\r\n [filterValue]=\"searchTerm()\"\r\n [panelId]=\"htmlId()\"\r\n [compact]=\"compact()\"\r\n (ardClickOutside)=\"handleOutsideClick($event)\"\r\n (mousemove)=\"onMouseMove()\"\r\n (scroll)=\"scrollEvent.emit($event)\"\r\n (scrollToEnd)=\"scrollToEndEvent.emit($event)\"\r\n >\r\n @if (!shouldShowNoItemsFound()) { @for (group of itemStorage.groups(); track $index) {\r\n <div\r\n class=\"ard-optgroup\"\r\n role=\"group\"\r\n [class.ard-group-disabled]=\"group.disabled()\"\r\n [class.ard-group-selected]=\"group.selected()\"\r\n [class.ard-group-highlighted]=\"group.highlighted()\"\r\n (mouseover)=\"onGroupMouseover(group)\"\r\n (click)=\"onGroupClick(group)\"\r\n >\r\n @if (group.label() !== '' && group.label() !== undefined) {\r\n <ng-template\r\n #defaultOptgroupTemplate\r\n let-group\r\n >\r\n <span\r\n class=\"ard-optgroup-label\"\r\n [ardInnerHTML]=\"group.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></span>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"optgroupTemplate()?.template || defaultOptgroupTemplate\"\r\n [ngTemplateOutletContext]=\"getGroupContext(group)\"\r\n />\r\n }\r\n\r\n <div class=\"ard-optgroup-children\">\r\n @for (option of group.children(); track option.index) {\r\n <div\r\n class=\"ard-option\"\r\n role=\"option\"\r\n [class.ard-option-disabled]=\"option.disabled()\"\r\n [class.ard-option-selected]=\"option.selected()\"\r\n [class.ard-option-highlighted]=\"option.highlighted()\"\r\n [class.ard-option-highlighted-recent]=\"option.highlighted_recently()\"\r\n [attr.aria-selected]=\"option.selected()\"\r\n [attr.id]=\"htmlId() + '-' + option.index\"\r\n (click)=\"onItemClick(option, $event)\"\r\n (mouseover)=\"onItemMouseOver($event)\"\r\n (mouseenter)=\"onItemMouseEnter(option, $event)\"\r\n (mouseleave)=\"onItemMouseLeave(option, $event)\"\r\n >\r\n <div class=\"ard-option-label\">\r\n <ng-template\r\n #defaultOptionTemplate\r\n let-option\r\n >\r\n <span\r\n [ardInnerHTML]=\"option.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></span>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"optionTemplate()?.template || defaultOptionTemplate\"\r\n [ngTemplateOutletContext]=\"getOptionContext(option)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n } } @if (shouldShowNoItemsFound()) {\r\n <ng-template #defaultNoItemsFoundTemplate>\r\n <div class=\"ard-option ard-option-disabled\">{{ noItemsFoundText() }}</div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"noItemsFoundTemplate()?.template || defaultNoItemsFoundTemplate\"\r\n [ngTemplateOutletContext]=\"getSearchContext()\"\r\n />\r\n } @if (shouldShowAddCustom()) {\r\n <ng-template\r\n #defaultAddCustomTemplate\r\n let-searchTerm\r\n >\r\n <div\r\n class=\"ard-option ard-option-highlighted ard-add-custom\"\r\n (click)=\"addCustomOption(searchTerm)\"\r\n >\r\n <span class=\"ard-add-custom-label\">Add option</span>\r\n <span class=\"ard-add-custom-value\">\"{{ searchTerm }}\"</span>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"addCustomTemplate()?.template || defaultAddCustomTemplate\"\r\n [ngTemplateOutletContext]=\"getCustomOptionContext()\"\r\n />\r\n } @if (isLoading()) {\r\n <ng-template #defaultLoadingPlaceholderTemplate>\r\n <div class=\"ard-option ard-option-disabled\">{{ loadingPlaceholderText() }}</div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"loadingPlaceholderTemplate()?.template || defaultLoadingPlaceholderTemplate\"\r\n [ngTemplateOutletContext]=\"getSearchContext()\"\r\n />\r\n }\r\n </ard-dropdown-panel>\r\n</ng-template>\r\n", styles: [".ard-select .ard-select-container{display:flex;cursor:pointer}.ard-select .ard-placeholder,.ard-select .ard-value,.ard-select .ard-dropdown-arrow-wrapper,.ard-select .ard-clear-btn-wrapper{-webkit-user-select:none;user-select:none}.ard-select .ard-clear-btn,.ard-select .ard-dropdown-arrow{border:none;background:transparent;padding:0;box-sizing:content-box}.ard-select .ard-option-disabled{pointer-events:none}.ard-select .ard-select-value{display:block}.ard-select .ard-select-value[hidden=true]{display:none}.ard-select .ard-searchable .ard-select-value-container{cursor:text}.ard-select .ard-dropdown-arrow-wrapper{position:relative}.ard-select .ard-dropdown-arrow-wrapper .ard-hitbox{position:absolute;left:-4px;right:-4px;aspect-ratio:1}.ard-select-dropdown-panel .ard-optgroup,.ard-select-dropdown-panel .ard-option{-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isSuccess", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: ArdiumDropdownPanelComponent, selector: "ard-dropdown-panel", inputs: ["panelId", "headerTemplate", "footerTemplate", "filterValue", "appearance", "variant", "compact", "isOpen"], outputs: ["scroll", "scrollToEnd"] }, { kind: "component", type: ArdiumDeletableChipComponent, selector: "ard-deletable-chip", inputs: ["deleteButtonTitle", "contentAlignment", "appearance", "variant", "color", "compact", "wrapperClasses"], outputs: ["delete"] }, { kind: "directive", type: i4.ClickOutsideDirective, selector: "[ardClickOutside]", outputs: ["ardClickOutside"] }, { kind: "component", type: _ClearButtonComponent, selector: "ard-clear-button" }, { kind: "directive", type: i4.ArdiumInnerHTMLDirective, selector: "[ardInnerHTML]", inputs: ["ardInnerHTML", "ardEscapeInnerHTML"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4097
4257
|
}
|
|
4098
4258
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumSelectComponent, decorators: [{
|
|
4099
4259
|
type: Component,
|
|
@@ -4107,7 +4267,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
4107
4267
|
provide: _FormFieldComponentBase,
|
|
4108
4268
|
useExisting: ArdiumSelectComponent,
|
|
4109
4269
|
},
|
|
4110
|
-
], template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused\"\r\n [hasError]=\"hasError()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-select\"\r\n #dropdownHost\r\n (click)=\"handleAnywhereClick($event)\"\r\n [class.ard-has-value]=\"itemStorage.isAnyItemSelected()\"\r\n [ngClass]=\"ngClasses()\"\r\n >\r\n <div class=\"ard-select-value-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\" />\r\n } @if (shouldDisplayValue()) { @for (item of itemStorage.selectedItems(); track item.index) {\r\n <div\r\n class=\"ard-select-value\"\r\n [class.ard-value-disabled]=\"item.disabled()\"\r\n [attr.hidden]=\"!isValueWithinDisplayLimit($index)\"\r\n >\r\n <ng-template\r\n *ngIf=\"isValueWithinDisplayLimit($index)\"\r\n [ngTemplateOutlet]=\"valueTemplate()?.template || (multiselectable() ? defaultMultiValueTemplate : defaultValueTemplate)\"\r\n [ngTemplateOutletContext]=\"getValueContext(item)\"\r\n />\r\n </div>\r\n }\r\n\r\n <ng-template\r\n #defaultValueTemplate\r\n let-item\r\n >\r\n <div\r\n [ardInnerHTML]=\"item.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></div>\r\n </ng-template>\r\n <ng-template\r\n #defaultMultiValueTemplate\r\n let-item\r\n let-unselect=\"unselect\"\r\n >\r\n <ard-deletable-chip\r\n (delete)=\"unselect(item)\"\r\n [variant]=\"variant()\"\r\n compact\r\n appearance=\"outlined-strong\"\r\n >\r\n <div\r\n [ardInnerHTML]=\"item.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></div>\r\n <!-- TODO check if can remove div -->\r\n </ard-deletable-chip>\r\n </ng-template>\r\n } @if (itemStorage.isAnyItemSelected() && shouldShowItemDisplayLimit()) {\r\n <div class=\"ard-overflow-indicator\">\r\n <ng-template\r\n [ngTemplateOutlet]=\"itemDisplayLimitTemplate()?.template || defaultItemDisplayLimitTemplate\"\r\n [ngTemplateOutletContext]=\"getItemDisplayLimitContext()\"\r\n />\r\n\r\n <ng-template\r\n #defaultItemDisplayLimitTemplate\r\n let-count=\"overflowCount\"\r\n >\r\n <div>{{ count }} more...</div>\r\n </ng-template>\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"ard-search-input\"\r\n role=\"combobox\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-owns]=\"isOpen() ? htmlId() : null\"\r\n >\r\n <input\r\n #searchInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"searchInputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"isInputElementReadonly()\"\r\n [disabled]=\"disabled()\"\r\n [value]=\"searchTerm()\"\r\n aria-autocomplete=\"list\"\r\n [attr.aria-controls]=\"isOpen() ? htmlId() : null\"\r\n (input)=\"filter(searchInput.value)\"\r\n (change)=\"$event.stopPropagation()\"\r\n (focus)=\"onFocus($event)\"\r\n (focus)=\"onSearchInputFocus()\"\r\n (blur)=\"onBlur($event)\"\r\n (blur)=\"onSearchInputBlur()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"ard-select-controls\">\r\n @if (isLoading()) {\r\n <ng-template #defaultLoadingSpinnerTemplate>\r\n <div class=\"ard-simple-spinner\"></div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate()?.template || defaultLoadingSpinnerTemplate\" />\r\n } @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"handleClearButtonClick($event)\"\r\n />\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"ard-dropdown-arrow-wrapper\"\r\n (click)=\"handleDropdownArrowClick($event)\"\r\n >\r\n <span class=\"ard-dropdown-arrow\"></span>\r\n <div class=\"ard-hitbox\"></div>\r\n </button>\r\n </div>\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<ng-template #dropdownTemplate>\r\n <ard-dropdown-panel\r\n class=\"ard-dropdown-panel ard-select-dropdown-panel\"\r\n role=\"listbox\"\r\n aria-label=\"Options list\"\r\n [headerTemplate]=\"dropdownHeaderTemplate()?.template ?? null\"\r\n [footerTemplate]=\"dropdownFooterTemplate()?.template ?? null\"\r\n [appearance]=\"dropdownAppearanceOrDefault()\"\r\n [variant]=\"dropdownVariantOrDefault()\"\r\n [isOpen]=\"true\"\r\n [filterValue]=\"searchTerm()\"\r\n [panelId]=\"htmlId()\"\r\n [compact]=\"compact()\"\r\n (ardClickOutside)=\"handleOutsideClick($event)\"\r\n (mousemove)=\"onMouseMove()\"\r\n (scroll)=\"scrollEvent.emit($event)\"\r\n (scrollToEnd)=\"scrollToEndEvent.emit($event)\"\r\n >\r\n @if (!shouldShowNoItemsFound()) { @for (group of itemStorage.groups(); track $index) {\r\n <div\r\n class=\"ard-optgroup\"\r\n role=\"group\"\r\n [class.ard-group-disabled]=\"group.disabled()\"\r\n [class.ard-group-selected]=\"group.selected()\"\r\n [class.ard-group-highlighted]=\"group.highlighted()\"\r\n (mouseover)=\"onGroupMouseover(group)\"\r\n (click)=\"onGroupClick(group)\"\r\n >\r\n @if (group.label() !== '' && group.label() !== undefined) {\r\n <ng-template\r\n #defaultOptgroupTemplate\r\n let-group\r\n >\r\n <span\r\n class=\"ard-optgroup-label\"\r\n [ardInnerHTML]=\"group.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></span>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"optgroupTemplate()?.template || defaultOptgroupTemplate\"\r\n [ngTemplateOutletContext]=\"getGroupContext(group)\"\r\n />\r\n }\r\n\r\n <div class=\"ard-optgroup-children\">\r\n @for (option of group.children(); track option.index) {\r\n <div\r\n class=\"ard-option\"\r\n role=\"option\"\r\n [class.ard-option-disabled]=\"option.disabled()\"\r\n [class.ard-option-selected]=\"option.selected()\"\r\n [class.ard-option-highlighted]=\"option.highlighted()\"\r\n [class.ard-option-highlighted-recent]=\"option.highlighted_recently()\"\r\n [attr.aria-selected]=\"option.selected()\"\r\n [attr.id]=\"htmlId() + '-' + option.index\"\r\n (click)=\"onItemClick(option, $event)\"\r\n (mouseover)=\"onItemMouseOver($event)\"\r\n (mouseenter)=\"onItemMouseEnter(option, $event)\"\r\n (mouseleave)=\"onItemMouseLeave(option, $event)\"\r\n >\r\n <div class=\"ard-option-label\">\r\n <ng-template\r\n #defaultOptionTemplate\r\n let-option\r\n >\r\n <span\r\n [ardInnerHTML]=\"option.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></span>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"optionTemplate()?.template || defaultOptionTemplate\"\r\n [ngTemplateOutletContext]=\"getOptionContext(option)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n } } @if (shouldShowNoItemsFound()) {\r\n <ng-template #defaultNoItemsFoundTemplate>\r\n <div class=\"ard-option ard-option-disabled\">{{ noItemsFoundText() }}</div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"noItemsFoundTemplate()?.template || defaultNoItemsFoundTemplate\"\r\n [ngTemplateOutletContext]=\"getSearchContext()\"\r\n />\r\n } @if (shouldShowAddCustom()) {\r\n <ng-template\r\n #defaultAddCustomTemplate\r\n let-searchTerm\r\n >\r\n <div\r\n class=\"ard-option ard-option-highlighted ard-add-custom\"\r\n (click)=\"addCustomOption(searchTerm)\"\r\n >\r\n <span class=\"ard-add-custom-label\">Add option</span>\r\n <span class=\"ard-add-custom-value\">\"{{ searchTerm }}\"</span>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"addCustomTemplate()?.template || defaultAddCustomTemplate\"\r\n [ngTemplateOutletContext]=\"getCustomOptionContext()\"\r\n />\r\n } @if (isLoading()) {\r\n <ng-template #defaultLoadingPlaceholderTemplate>\r\n <div class=\"ard-option ard-option-disabled\">{{ loadingPlaceholderText() }}</div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"loadingPlaceholderTemplate()?.template || defaultLoadingPlaceholderTemplate\"\r\n [ngTemplateOutletContext]=\"getSearchContext()\"\r\n />\r\n }\r\n </ard-dropdown-panel>\r\n</ng-template>\r\n", styles: [".ard-select .ard-select-container{display:flex;cursor:pointer}.ard-select .ard-placeholder,.ard-select .ard-value,.ard-select .ard-dropdown-arrow-wrapper,.ard-select .ard-clear-btn-wrapper{-webkit-user-select:none;user-select:none}.ard-select .ard-clear-btn,.ard-select .ard-dropdown-arrow{border:none;background:transparent;padding:0;box-sizing:content-box}.ard-select .ard-option-disabled{pointer-events:none}.ard-select .ard-select-value{display:block}.ard-select .ard-select-value[hidden=true]{display:none}.ard-select .ard-searchable .ard-select-value-container{cursor:text}.ard-select .ard-dropdown-arrow-wrapper{position:relative}.ard-select .ard-dropdown-arrow-wrapper .ard-hitbox{position:absolute;left:-4px;right:-4px;aspect-ratio:1}.ard-select-dropdown-panel .ard-optgroup,.ard-select-dropdown-panel .ard-option{-webkit-user-select:none;user-select:none}\n"] }]
|
|
4270
|
+
], template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-select\"\r\n #dropdownHost\r\n (click)=\"handleAnywhereClick($event)\"\r\n [class.ard-has-value]=\"itemStorage.isAnyItemSelected()\"\r\n [ngClass]=\"ngClasses()\"\r\n >\r\n <div class=\"ard-select-value-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\" />\r\n } @if (shouldDisplayValue()) { @for (item of itemStorage.selectedItems(); track item.index) {\r\n <div\r\n class=\"ard-select-value\"\r\n [class.ard-value-disabled]=\"item.disabled()\"\r\n [attr.hidden]=\"!isValueWithinDisplayLimit($index)\"\r\n >\r\n <ng-template\r\n *ngIf=\"isValueWithinDisplayLimit($index)\"\r\n [ngTemplateOutlet]=\"valueTemplate()?.template || (multiselectable() ? defaultMultiValueTemplate : defaultValueTemplate)\"\r\n [ngTemplateOutletContext]=\"getValueContext(item)\"\r\n />\r\n </div>\r\n }\r\n\r\n <ng-template\r\n #defaultValueTemplate\r\n let-item\r\n >\r\n <div\r\n [ardInnerHTML]=\"item.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></div>\r\n </ng-template>\r\n <ng-template\r\n #defaultMultiValueTemplate\r\n let-item\r\n let-unselect=\"unselect\"\r\n >\r\n <ard-deletable-chip\r\n (delete)=\"unselect(item)\"\r\n [variant]=\"variant()\"\r\n compact\r\n appearance=\"outlined-strong\"\r\n >\r\n <div\r\n [ardInnerHTML]=\"item.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></div>\r\n </ard-deletable-chip>\r\n </ng-template>\r\n } @if (itemStorage.isAnyItemSelected() && shouldShowItemDisplayLimit()) {\r\n <div class=\"ard-overflow-indicator\">\r\n <ng-template\r\n [ngTemplateOutlet]=\"itemDisplayLimitTemplate()?.template || defaultItemDisplayLimitTemplate\"\r\n [ngTemplateOutletContext]=\"getItemDisplayLimitContext()\"\r\n />\r\n\r\n <ng-template\r\n #defaultItemDisplayLimitTemplate\r\n let-count=\"overflowCount\"\r\n >\r\n <div>{{ count }} more...</div>\r\n </ng-template>\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"ard-search-input\"\r\n role=\"combobox\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-owns]=\"isOpen() ? htmlId() : null\"\r\n >\r\n <input\r\n #searchInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"searchInputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"isInputElementReadonly()\"\r\n [disabled]=\"disabled()\"\r\n [value]=\"searchTerm()\"\r\n aria-autocomplete=\"list\"\r\n [attr.aria-controls]=\"isOpen() ? htmlId() : null\"\r\n (input)=\"filter(searchInput.value)\"\r\n (change)=\"$event.stopPropagation()\"\r\n (focus)=\"onFocus($event)\"\r\n (focus)=\"onSearchInputFocus()\"\r\n (blur)=\"onBlur($event)\"\r\n (blur)=\"onSearchInputBlur()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"ard-select-controls\">\r\n @if (isLoading()) {\r\n <ng-template #defaultLoadingSpinnerTemplate>\r\n <div class=\"ard-simple-spinner\"></div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"loadingSpinnerTemplate()?.template || defaultLoadingSpinnerTemplate\" />\r\n } @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"handleClearButtonClick($event)\"\r\n />\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"ard-dropdown-arrow-wrapper\"\r\n (click)=\"handleDropdownArrowClick($event)\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n >\r\n <span class=\"ard-dropdown-arrow\"></span>\r\n <div class=\"ard-hitbox\"></div>\r\n </button>\r\n </div>\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<ng-template #dropdownTemplate>\r\n <ard-dropdown-panel\r\n class=\"ard-dropdown-panel ard-select-dropdown-panel\"\r\n role=\"listbox\"\r\n aria-label=\"Options list\"\r\n [headerTemplate]=\"dropdownHeaderTemplate()?.template ?? null\"\r\n [footerTemplate]=\"dropdownFooterTemplate()?.template ?? null\"\r\n [appearance]=\"dropdownAppearanceOrDefault()\"\r\n [variant]=\"dropdownVariantOrDefault()\"\r\n [isOpen]=\"true\"\r\n [filterValue]=\"searchTerm()\"\r\n [panelId]=\"htmlId()\"\r\n [compact]=\"compact()\"\r\n (ardClickOutside)=\"handleOutsideClick($event)\"\r\n (mousemove)=\"onMouseMove()\"\r\n (scroll)=\"scrollEvent.emit($event)\"\r\n (scrollToEnd)=\"scrollToEndEvent.emit($event)\"\r\n >\r\n @if (!shouldShowNoItemsFound()) { @for (group of itemStorage.groups(); track $index) {\r\n <div\r\n class=\"ard-optgroup\"\r\n role=\"group\"\r\n [class.ard-group-disabled]=\"group.disabled()\"\r\n [class.ard-group-selected]=\"group.selected()\"\r\n [class.ard-group-highlighted]=\"group.highlighted()\"\r\n (mouseover)=\"onGroupMouseover(group)\"\r\n (click)=\"onGroupClick(group)\"\r\n >\r\n @if (group.label() !== '' && group.label() !== undefined) {\r\n <ng-template\r\n #defaultOptgroupTemplate\r\n let-group\r\n >\r\n <span\r\n class=\"ard-optgroup-label\"\r\n [ardInnerHTML]=\"group.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></span>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"optgroupTemplate()?.template || defaultOptgroupTemplate\"\r\n [ngTemplateOutletContext]=\"getGroupContext(group)\"\r\n />\r\n }\r\n\r\n <div class=\"ard-optgroup-children\">\r\n @for (option of group.children(); track option.index) {\r\n <div\r\n class=\"ard-option\"\r\n role=\"option\"\r\n [class.ard-option-disabled]=\"option.disabled()\"\r\n [class.ard-option-selected]=\"option.selected()\"\r\n [class.ard-option-highlighted]=\"option.highlighted()\"\r\n [class.ard-option-highlighted-recent]=\"option.highlighted_recently()\"\r\n [attr.aria-selected]=\"option.selected()\"\r\n [attr.id]=\"htmlId() + '-' + option.index\"\r\n (click)=\"onItemClick(option, $event)\"\r\n (mouseover)=\"onItemMouseOver($event)\"\r\n (mouseenter)=\"onItemMouseEnter(option, $event)\"\r\n (mouseleave)=\"onItemMouseLeave(option, $event)\"\r\n >\r\n <div class=\"ard-option-label\">\r\n <ng-template\r\n #defaultOptionTemplate\r\n let-option\r\n >\r\n <span\r\n [ardInnerHTML]=\"option.label()\"\r\n [ardEscapeInnerHTML]=\"isItemsInputUsed\"\r\n ></span>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"optionTemplate()?.template || defaultOptionTemplate\"\r\n [ngTemplateOutletContext]=\"getOptionContext(option)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n } } @if (shouldShowNoItemsFound()) {\r\n <ng-template #defaultNoItemsFoundTemplate>\r\n <div class=\"ard-option ard-option-disabled\">{{ noItemsFoundText() }}</div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"noItemsFoundTemplate()?.template || defaultNoItemsFoundTemplate\"\r\n [ngTemplateOutletContext]=\"getSearchContext()\"\r\n />\r\n } @if (shouldShowAddCustom()) {\r\n <ng-template\r\n #defaultAddCustomTemplate\r\n let-searchTerm\r\n >\r\n <div\r\n class=\"ard-option ard-option-highlighted ard-add-custom\"\r\n (click)=\"addCustomOption(searchTerm)\"\r\n >\r\n <span class=\"ard-add-custom-label\">Add option</span>\r\n <span class=\"ard-add-custom-value\">\"{{ searchTerm }}\"</span>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"addCustomTemplate()?.template || defaultAddCustomTemplate\"\r\n [ngTemplateOutletContext]=\"getCustomOptionContext()\"\r\n />\r\n } @if (isLoading()) {\r\n <ng-template #defaultLoadingPlaceholderTemplate>\r\n <div class=\"ard-option ard-option-disabled\">{{ loadingPlaceholderText() }}</div>\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"loadingPlaceholderTemplate()?.template || defaultLoadingPlaceholderTemplate\"\r\n [ngTemplateOutletContext]=\"getSearchContext()\"\r\n />\r\n }\r\n </ard-dropdown-panel>\r\n</ng-template>\r\n", styles: [".ard-select .ard-select-container{display:flex;cursor:pointer}.ard-select .ard-placeholder,.ard-select .ard-value,.ard-select .ard-dropdown-arrow-wrapper,.ard-select .ard-clear-btn-wrapper{-webkit-user-select:none;user-select:none}.ard-select .ard-clear-btn,.ard-select .ard-dropdown-arrow{border:none;background:transparent;padding:0;box-sizing:content-box}.ard-select .ard-option-disabled{pointer-events:none}.ard-select .ard-select-value{display:block}.ard-select .ard-select-value[hidden=true]{display:none}.ard-select .ard-searchable .ard-select-value-container{cursor:text}.ard-select .ard-dropdown-arrow-wrapper{position:relative}.ard-select .ard-dropdown-arrow-wrapper .ard-hitbox{position:absolute;left:-4px;right:-4px;aspect-ratio:1}.ard-select-dropdown-panel .ard-optgroup,.ard-select-dropdown-panel .ard-option{-webkit-user-select:none;user-select:none}\n"] }]
|
|
4111
4271
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
4112
4272
|
type: Inject,
|
|
4113
4273
|
args: [ARD_SELECT_DEFAULTS]
|
|
@@ -4440,7 +4600,6 @@ class _FileInputComponentBase extends _NgModelComponentBase {
|
|
|
4440
4600
|
constructor() {
|
|
4441
4601
|
super(...arguments);
|
|
4442
4602
|
this.fileInputEl = viewChild('fileInput');
|
|
4443
|
-
this.htmlId = input(TakeChance.id());
|
|
4444
4603
|
this.name = input('');
|
|
4445
4604
|
this._wasViewInit = false;
|
|
4446
4605
|
//! appearance
|
|
@@ -4462,6 +4621,7 @@ class _FileInputComponentBase extends _NgModelComponentBase {
|
|
|
4462
4621
|
this._beforeDragoverState = 'idle';
|
|
4463
4622
|
}
|
|
4464
4623
|
ngOnInit() {
|
|
4624
|
+
super.ngOnInit();
|
|
4465
4625
|
if (!(window.File && window.FileReader && window.Blob)) {
|
|
4466
4626
|
console.error(new Error(`ARD-${this.componentId}0: Cannot use Ardium UI file features because this browser does not support file handling!`));
|
|
4467
4627
|
}
|
|
@@ -4576,7 +4736,7 @@ class _FileInputComponentBase extends _NgModelComponentBase {
|
|
|
4576
4736
|
inputEl.files = dataTransfer.files;
|
|
4577
4737
|
}
|
|
4578
4738
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: _FileInputComponentBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4579
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "18.2.13", type: _FileInputComponentBase, inputs: {
|
|
4739
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "18.2.13", type: _FileInputComponentBase, inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, blockAfterUpload: { classPropertyName: "blockAfterUpload", publicName: "blockAfterUpload", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", changeEvent: "change", dragFilesEvent: "dragFiles" }, viewQueries: [{ propertyName: "fileInputEl", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 }); }
|
|
4580
4740
|
}
|
|
4581
4741
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: _FileInputComponentBase, decorators: [{
|
|
4582
4742
|
type: Directive
|
|
@@ -5076,7 +5236,7 @@ class ArdiumFileInputComponent extends _FileInputComponentBase {
|
|
|
5076
5236
|
useExisting: forwardRef(() => ArdiumFileInputComponent),
|
|
5077
5237
|
multi: true,
|
|
5078
5238
|
},
|
|
5079
|
-
], queries: [{ propertyName: "placeholderTemplate", first: true, predicate: ArdFileInputPlaceholderTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "prefixTemplate", first: true, predicate: ArdFileInputPrefixTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "suffixTemplate", first: true, predicate: ArdFileInputSuffixTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "idleTemplate", first: true, predicate: ArdiumFileInputIdleContentTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "dragoverTemplate", first: true, predicate: ArdiumFileInputDragoverContentTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "uploadedTemplate", first: true, predicate: ArdiumFileInputUploadedContentTemplateDirective, descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\n class=\"ard-file-input-form-field-frame\"\n [appearance]=\"appearance()\"\n [variant]=\"variant()\"\n [compact]=\"compact()\"\n [isFocused]=\"isFocused\"\n [prefixTemplate]=\"prefixTemplate\"\n [suffixTemplate]=\"suffixTemplate\"\n (dragover)=\"onDragover($event)\"\n (dragleave)=\"onDragleave()\"\n (drop)=\"onDrop($event)\"\n (ardClickOutside)=\"onDragleave()\"\n>\n <div\n class=\"ard-file-input\"\n [ngClass]=\"ngClasses()\"\n >\n <div class=\"ard-input-container\">\n @if (shouldDisplayPlaceholder) {\n <ng-template #defaultPlaceholderTemplate>\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\n </ng-template>\n\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\" />\n }\n\n <div class=\"ard-file-input__value\">\n @if (currentViewState() === 'idle') {\n <ng-template\n [ngTemplateOutlet]=\"idleTemplate ?? defaultIdleTemplate\"\n [ngTemplateOutletContext]=\"getIdleContext()\"\n />\n }\n @if (currentViewState() === 'dragover') {\n <ng-template\n [ngTemplateOutlet]=\"dragoverTemplate ?? defaultDragoverTemplate\"\n [ngTemplateOutletContext]=\"getDragoverContext()\"\n />\n }\n @if (currentViewState() === 'uploaded') {\n <ng-template\n [ngTemplateOutlet]=\"uploadedTemplate ?? defaultUploadedTemplate\"\n [ngTemplateOutletContext]=\"getUploadedContext()\"\n />\n }\n </div>\n </div>\n\n @if (shouldShowClearButton) {\n <ard-clear-button\n #focusableElement\n [title]=\"clearButtonTitle()\"\n (mouseup)=\"onClearButtonClick($event)\"\n />\n }\n @if (!shouldBeBlocked) {\n <button\n #focusableElement\n type=\"button\"\n class=\"ard-browse-button\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (click)=\"openBrowseDialog()\"\n >\n <div class=\"ard-focus-overlay\"></div>\n <ard-icon>folder</ard-icon>\n </button>\n }\n </div>\n</ard-form-field-frame>\n\n<input\n #fileInput\n class=\"ard-file-input__input\"\n type=\"file\"\n [name]=\"name()\"\n [multiple]=\"multiple()\"\n [attr.id]=\"htmlId()\"\n (change)=\"onInputChange()\"\n/>\n\n<ng-template\n #defaultIdleTemplate\n let-browse=\"browse\"\n>\n <span class=\"ard-file-input__idle\">\n @if (multiple()) {\n <span>Upload a file</span>\n } @else {\n <span>Upload files</span>\n }\n </span>\n</ng-template>\n\n<ng-template\n #defaultDragoverTemplate\n let-amount=\"amount\"\n>\n <span class=\"ard-file-input__dragover-text\">Drop </span>\n @if (multiple()) {\n <span class=\"ard-file-input__dragover-amount\">\n {{ amount }}\n <ng-container [ngPlural]=\"amount\">\n <ng-template ngPluralCase=\"=1\">file</ng-template>\n <ng-template ngPluralCase=\"other\">files</ng-template>\n </ng-container>\n </span>\n } @else {\n <span class=\"ard-file-input__dragover-amount\"> a file </span>\n }\n <span class=\"ard-file-input__dragover-text\"> here to upload </span>\n</ng-template>\n\n<ng-template\n #defaultUploadedTemplate\n let-amount=\"amount\"\n>\n <div class=\"ard-file-input__uploaded\">\n <span class=\"ard-file-input__uploaded-amount\">\n {{ amount }}\n <ng-container [ngPlural]=\"amount\">\n <ng-template ngPluralCase=\"=1\">file</ng-template>\n <ng-template ngPluralCase=\"other\">files</ng-template>\n </ng-container>\n </span>\n <span class=\"ard-file-input__uploaded-text\"> uploaded.</span>\n </div>\n</ng-template>\n", styles: [".ard-file-input__input{position:absolute;appearance:none;opacity:0;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgPlural, selector: "[ngPlural]", inputs: ["ngPlural"] }, { kind: "directive", type: i1.NgPluralCase, selector: "[ngPluralCase]" }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: _ClearButtonComponent, selector: "ard-clear-button" }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
5239
|
+
], queries: [{ propertyName: "placeholderTemplate", first: true, predicate: ArdFileInputPlaceholderTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "prefixTemplate", first: true, predicate: ArdFileInputPrefixTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "suffixTemplate", first: true, predicate: ArdFileInputSuffixTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "idleTemplate", first: true, predicate: ArdiumFileInputIdleContentTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "dragoverTemplate", first: true, predicate: ArdiumFileInputDragoverContentTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "uploadedTemplate", first: true, predicate: ArdiumFileInputUploadedContentTemplateDirective, descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\r\n class=\"ard-file-input-form-field-frame\"\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused()\"\r\n [prefixTemplate]=\"prefixTemplate\"\r\n [suffixTemplate]=\"suffixTemplate\"\r\n (dragover)=\"onDragover($event)\"\r\n (dragleave)=\"onDragleave()\"\r\n (drop)=\"onDrop($event)\"\r\n (ardClickOutside)=\"onDragleave()\"\r\n>\r\n <div\r\n class=\"ard-file-input\"\r\n [ngClass]=\"ngClasses()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\" />\r\n }\r\n\r\n <div class=\"ard-file-input__value\">\r\n @if (currentViewState() === 'idle') {\r\n <ng-template\r\n [ngTemplateOutlet]=\"idleTemplate ?? defaultIdleTemplate\"\r\n [ngTemplateOutletContext]=\"getIdleContext()\"\r\n />\r\n }\r\n @if (currentViewState() === 'dragover') {\r\n <ng-template\r\n [ngTemplateOutlet]=\"dragoverTemplate ?? defaultDragoverTemplate\"\r\n [ngTemplateOutletContext]=\"getDragoverContext()\"\r\n />\r\n }\r\n @if (currentViewState() === 'uploaded') {\r\n <ng-template\r\n [ngTemplateOutlet]=\"uploadedTemplate ?? defaultUploadedTemplate\"\r\n [ngTemplateOutletContext]=\"getUploadedContext()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (shouldShowClearButton) {\r\n <ard-clear-button\r\n #focusableElement\r\n [title]=\"clearButtonTitle()\"\r\n (mouseup)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n @if (!shouldBeBlocked) {\r\n <button\r\n #focusableElement\r\n type=\"button\"\r\n class=\"ard-browse-button\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (click)=\"openBrowseDialog()\"\r\n >\r\n <div class=\"ard-focus-overlay\"></div>\r\n <ard-icon>folder</ard-icon>\r\n </button>\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<input\r\n #fileInput\r\n class=\"ard-file-input__input\"\r\n type=\"file\"\r\n [name]=\"name()\"\r\n [multiple]=\"multiple()\"\r\n [attr.id]=\"htmlId()\"\r\n (change)=\"onInputChange()\"\r\n/>\r\n\r\n<ng-template\r\n #defaultIdleTemplate\r\n let-browse=\"browse\"\r\n>\r\n <span class=\"ard-file-input__idle\">\r\n @if (multiple()) {\r\n <span>Upload a file</span>\r\n } @else {\r\n <span>Upload files</span>\r\n }\r\n </span>\r\n</ng-template>\r\n\r\n<ng-template\r\n #defaultDragoverTemplate\r\n let-amount=\"amount\"\r\n>\r\n <span class=\"ard-file-input__dragover-text\">Drop </span>\r\n @if (multiple()) {\r\n <span class=\"ard-file-input__dragover-amount\">\r\n {{ amount }}\r\n <ng-container [ngPlural]=\"amount\">\r\n <ng-template ngPluralCase=\"=1\">file</ng-template>\r\n <ng-template ngPluralCase=\"other\">files</ng-template>\r\n </ng-container>\r\n </span>\r\n } @else {\r\n <span class=\"ard-file-input__dragover-amount\"> a file </span>\r\n }\r\n <span class=\"ard-file-input__dragover-text\"> here to upload </span>\r\n</ng-template>\r\n\r\n<ng-template\r\n #defaultUploadedTemplate\r\n let-amount=\"amount\"\r\n>\r\n <div class=\"ard-file-input__uploaded\">\r\n <span class=\"ard-file-input__uploaded-amount\">\r\n {{ amount }}\r\n <ng-container [ngPlural]=\"amount\">\r\n <ng-template ngPluralCase=\"=1\">file</ng-template>\r\n <ng-template ngPluralCase=\"other\">files</ng-template>\r\n </ng-container>\r\n </span>\r\n <span class=\"ard-file-input__uploaded-text\"> uploaded.</span>\r\n </div>\r\n</ng-template>\r\n", styles: [".ard-file-input__input{position:absolute;appearance:none;opacity:0;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgPlural, selector: "[ngPlural]", inputs: ["ngPlural"] }, { kind: "directive", type: i1.NgPluralCase, selector: "[ngPluralCase]" }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isSuccess", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: _ClearButtonComponent, selector: "ard-clear-button" }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
5080
5240
|
}
|
|
5081
5241
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumFileInputComponent, decorators: [{
|
|
5082
5242
|
type: Component,
|
|
@@ -5086,7 +5246,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
5086
5246
|
useExisting: forwardRef(() => ArdiumFileInputComponent),
|
|
5087
5247
|
multi: true,
|
|
5088
5248
|
},
|
|
5089
|
-
], template: "<ard-form-field-frame\n class=\"ard-file-input-form-field-frame\"\n [appearance]=\"appearance()\"\n [variant]=\"variant()\"\n [compact]=\"compact()\"\n [isFocused]=\"isFocused\"\n [prefixTemplate]=\"prefixTemplate\"\n [suffixTemplate]=\"suffixTemplate\"\n (dragover)=\"onDragover($event)\"\n (dragleave)=\"onDragleave()\"\n (drop)=\"onDrop($event)\"\n (ardClickOutside)=\"onDragleave()\"\n>\n <div\n class=\"ard-file-input\"\n [ngClass]=\"ngClasses()\"\n >\n <div class=\"ard-input-container\">\n @if (shouldDisplayPlaceholder) {\n <ng-template #defaultPlaceholderTemplate>\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\n </ng-template>\n\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\" />\n }\n\n <div class=\"ard-file-input__value\">\n @if (currentViewState() === 'idle') {\n <ng-template\n [ngTemplateOutlet]=\"idleTemplate ?? defaultIdleTemplate\"\n [ngTemplateOutletContext]=\"getIdleContext()\"\n />\n }\n @if (currentViewState() === 'dragover') {\n <ng-template\n [ngTemplateOutlet]=\"dragoverTemplate ?? defaultDragoverTemplate\"\n [ngTemplateOutletContext]=\"getDragoverContext()\"\n />\n }\n @if (currentViewState() === 'uploaded') {\n <ng-template\n [ngTemplateOutlet]=\"uploadedTemplate ?? defaultUploadedTemplate\"\n [ngTemplateOutletContext]=\"getUploadedContext()\"\n />\n }\n </div>\n </div>\n\n @if (shouldShowClearButton) {\n <ard-clear-button\n #focusableElement\n [title]=\"clearButtonTitle()\"\n (mouseup)=\"onClearButtonClick($event)\"\n />\n }\n @if (!shouldBeBlocked) {\n <button\n #focusableElement\n type=\"button\"\n class=\"ard-browse-button\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (click)=\"openBrowseDialog()\"\n >\n <div class=\"ard-focus-overlay\"></div>\n <ard-icon>folder</ard-icon>\n </button>\n }\n </div>\n</ard-form-field-frame>\n\n<input\n #fileInput\n class=\"ard-file-input__input\"\n type=\"file\"\n [name]=\"name()\"\n [multiple]=\"multiple()\"\n [attr.id]=\"htmlId()\"\n (change)=\"onInputChange()\"\n/>\n\n<ng-template\n #defaultIdleTemplate\n let-browse=\"browse\"\n>\n <span class=\"ard-file-input__idle\">\n @if (multiple()) {\n <span>Upload a file</span>\n } @else {\n <span>Upload files</span>\n }\n </span>\n</ng-template>\n\n<ng-template\n #defaultDragoverTemplate\n let-amount=\"amount\"\n>\n <span class=\"ard-file-input__dragover-text\">Drop </span>\n @if (multiple()) {\n <span class=\"ard-file-input__dragover-amount\">\n {{ amount }}\n <ng-container [ngPlural]=\"amount\">\n <ng-template ngPluralCase=\"=1\">file</ng-template>\n <ng-template ngPluralCase=\"other\">files</ng-template>\n </ng-container>\n </span>\n } @else {\n <span class=\"ard-file-input__dragover-amount\"> a file </span>\n }\n <span class=\"ard-file-input__dragover-text\"> here to upload </span>\n</ng-template>\n\n<ng-template\n #defaultUploadedTemplate\n let-amount=\"amount\"\n>\n <div class=\"ard-file-input__uploaded\">\n <span class=\"ard-file-input__uploaded-amount\">\n {{ amount }}\n <ng-container [ngPlural]=\"amount\">\n <ng-template ngPluralCase=\"=1\">file</ng-template>\n <ng-template ngPluralCase=\"other\">files</ng-template>\n </ng-container>\n </span>\n <span class=\"ard-file-input__uploaded-text\"> uploaded.</span>\n </div>\n</ng-template>\n", styles: [".ard-file-input__input{position:absolute;appearance:none;opacity:0;pointer-events:none}\n"] }]
|
|
5249
|
+
], template: "<ard-form-field-frame\r\n class=\"ard-file-input-form-field-frame\"\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [isFocused]=\"isFocused()\"\r\n [prefixTemplate]=\"prefixTemplate\"\r\n [suffixTemplate]=\"suffixTemplate\"\r\n (dragover)=\"onDragover($event)\"\r\n (dragleave)=\"onDragleave()\"\r\n (drop)=\"onDrop($event)\"\r\n (ardClickOutside)=\"onDragleave()\"\r\n>\r\n <div\r\n class=\"ard-file-input\"\r\n [ngClass]=\"ngClasses()\"\r\n >\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate || defaultPlaceholderTemplate\" />\r\n }\r\n\r\n <div class=\"ard-file-input__value\">\r\n @if (currentViewState() === 'idle') {\r\n <ng-template\r\n [ngTemplateOutlet]=\"idleTemplate ?? defaultIdleTemplate\"\r\n [ngTemplateOutletContext]=\"getIdleContext()\"\r\n />\r\n }\r\n @if (currentViewState() === 'dragover') {\r\n <ng-template\r\n [ngTemplateOutlet]=\"dragoverTemplate ?? defaultDragoverTemplate\"\r\n [ngTemplateOutletContext]=\"getDragoverContext()\"\r\n />\r\n }\r\n @if (currentViewState() === 'uploaded') {\r\n <ng-template\r\n [ngTemplateOutlet]=\"uploadedTemplate ?? defaultUploadedTemplate\"\r\n [ngTemplateOutletContext]=\"getUploadedContext()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (shouldShowClearButton) {\r\n <ard-clear-button\r\n #focusableElement\r\n [title]=\"clearButtonTitle()\"\r\n (mouseup)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n @if (!shouldBeBlocked) {\r\n <button\r\n #focusableElement\r\n type=\"button\"\r\n class=\"ard-browse-button\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (click)=\"openBrowseDialog()\"\r\n >\r\n <div class=\"ard-focus-overlay\"></div>\r\n <ard-icon>folder</ard-icon>\r\n </button>\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n\r\n<input\r\n #fileInput\r\n class=\"ard-file-input__input\"\r\n type=\"file\"\r\n [name]=\"name()\"\r\n [multiple]=\"multiple()\"\r\n [attr.id]=\"htmlId()\"\r\n (change)=\"onInputChange()\"\r\n/>\r\n\r\n<ng-template\r\n #defaultIdleTemplate\r\n let-browse=\"browse\"\r\n>\r\n <span class=\"ard-file-input__idle\">\r\n @if (multiple()) {\r\n <span>Upload a file</span>\r\n } @else {\r\n <span>Upload files</span>\r\n }\r\n </span>\r\n</ng-template>\r\n\r\n<ng-template\r\n #defaultDragoverTemplate\r\n let-amount=\"amount\"\r\n>\r\n <span class=\"ard-file-input__dragover-text\">Drop </span>\r\n @if (multiple()) {\r\n <span class=\"ard-file-input__dragover-amount\">\r\n {{ amount }}\r\n <ng-container [ngPlural]=\"amount\">\r\n <ng-template ngPluralCase=\"=1\">file</ng-template>\r\n <ng-template ngPluralCase=\"other\">files</ng-template>\r\n </ng-container>\r\n </span>\r\n } @else {\r\n <span class=\"ard-file-input__dragover-amount\"> a file </span>\r\n }\r\n <span class=\"ard-file-input__dragover-text\"> here to upload </span>\r\n</ng-template>\r\n\r\n<ng-template\r\n #defaultUploadedTemplate\r\n let-amount=\"amount\"\r\n>\r\n <div class=\"ard-file-input__uploaded\">\r\n <span class=\"ard-file-input__uploaded-amount\">\r\n {{ amount }}\r\n <ng-container [ngPlural]=\"amount\">\r\n <ng-template ngPluralCase=\"=1\">file</ng-template>\r\n <ng-template ngPluralCase=\"other\">files</ng-template>\r\n </ng-container>\r\n </span>\r\n <span class=\"ard-file-input__uploaded-text\"> uploaded.</span>\r\n </div>\r\n</ng-template>\r\n", styles: [".ard-file-input__input{position:absolute;appearance:none;opacity:0;pointer-events:none}\n"] }]
|
|
5090
5250
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
5091
5251
|
type: Inject,
|
|
5092
5252
|
args: [ARD_FILE_INPUT_DEFAULTS]
|
|
@@ -5433,7 +5593,7 @@ class ArdiumHexInputComponent extends _FormFieldComponentBase {
|
|
|
5433
5593
|
provide: _FormFieldComponentBase,
|
|
5434
5594
|
useExisting: forwardRef(() => ArdiumHexInputComponent),
|
|
5435
5595
|
},
|
|
5436
|
-
], queries: [{ propertyName: "prefixTemplate", first: true, predicate: ArdHexInputPrefixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suffixTemplate", first: true, predicate: ArdHexInputSuffixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "placeholderTemplate", first: true, predicate: ArdHexInputPlaceholderTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "textInputEl", first: true, predicate: ["textInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [hasError]=\"hasError()\"\r\n [isFocused]=\"isFocused\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-hex-input\"\r\n [class.ard-has-value]=\"value\"\r\n (mouseup)=\"onMouseup()\"\r\n >\r\n <div\r\n class=\"ard-hash-container\"\r\n *ngIf=\"showHash\"\r\n >\r\n #\r\n </div>\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value, $event)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (change)=\"onChange($event)\"\r\n (mouseup)=\"$event.stopPropagation()\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n\r\n @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n", styles: [".ard-input-container{position:relative}.ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: _ClearButtonComponent, selector: "ard-clear-button" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
5596
|
+
], queries: [{ propertyName: "prefixTemplate", first: true, predicate: ArdHexInputPrefixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "suffixTemplate", first: true, predicate: ArdHexInputSuffixTemplateDirective, descendants: true, isSignal: true }, { propertyName: "placeholderTemplate", first: true, predicate: ArdHexInputPlaceholderTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "textInputEl", first: true, predicate: ["textInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [isFocused]=\"isFocused()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-hex-input\"\r\n [class.ard-has-value]=\"value\"\r\n (mouseup)=\"onMouseup()\"\r\n >\r\n <div\r\n class=\"ard-hash-container\"\r\n *ngIf=\"showHash\"\r\n >\r\n #\r\n </div>\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value, $event)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (change)=\"onChange($event)\"\r\n (mouseup)=\"$event.stopPropagation()\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n\r\n @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n", styles: [".ard-input-container{position:relative}.ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumFormFieldFrameComponent, selector: "ard-form-field-frame", inputs: ["hasError", "isSuccess", "isFocused", "appearance", "variant", "compact", "prefixTemplate", "suffixTemplate"] }, { kind: "component", type: _ClearButtonComponent, selector: "ard-clear-button" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
5437
5597
|
}
|
|
5438
5598
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumHexInputComponent, decorators: [{
|
|
5439
5599
|
type: Component,
|
|
@@ -5447,7 +5607,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
5447
5607
|
provide: _FormFieldComponentBase,
|
|
5448
5608
|
useExisting: forwardRef(() => ArdiumHexInputComponent),
|
|
5449
5609
|
},
|
|
5450
|
-
], template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [hasError]=\"hasError()\"\r\n [isFocused]=\"isFocused\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-hex-input\"\r\n [class.ard-has-value]=\"value\"\r\n (mouseup)=\"onMouseup()\"\r\n >\r\n <div\r\n class=\"ard-hash-container\"\r\n *ngIf=\"showHash\"\r\n >\r\n #\r\n </div>\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value, $event)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (change)=\"onChange($event)\"\r\n (mouseup)=\"$event.stopPropagation()\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n\r\n @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n", styles: [".ard-input-container{position:relative}.ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}\n"] }]
|
|
5610
|
+
], template: "<ard-form-field-frame\r\n [appearance]=\"appearance()\"\r\n [variant]=\"variant()\"\r\n [compact]=\"compact()\"\r\n [hasError]=\"hasError()\"\r\n [isSuccess]=\"isSuccess()\"\r\n [isFocused]=\"isFocused()\"\r\n [prefixTemplate]=\"prefixTemplate()?.template\"\r\n [suffixTemplate]=\"suffixTemplate()?.template\"\r\n>\r\n <div\r\n class=\"ard-hex-input\"\r\n [class.ard-has-value]=\"value\"\r\n (mouseup)=\"onMouseup()\"\r\n >\r\n <div\r\n class=\"ard-hash-container\"\r\n *ngIf=\"showHash\"\r\n >\r\n #\r\n </div>\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template #defaultPlaceholderTemplate>\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value, $event)\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (change)=\"onChange($event)\"\r\n (mouseup)=\"$event.stopPropagation()\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n\r\n @if (shouldShowClearButton()) {\r\n <ard-clear-button\r\n [title]=\"clearButtonTitle()\"\r\n (click)=\"onClearButtonClick($event)\"\r\n />\r\n }\r\n </div>\r\n</ard-form-field-frame>\r\n", styles: [".ard-input-container{position:relative}.ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}\n"] }]
|
|
5451
5611
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
5452
5612
|
type: Inject,
|
|
5453
5613
|
args: [ARD_HEX_INPUT_DEFAULTS]
|
|
@@ -5718,7 +5878,7 @@ class ArdiumNumberInputComponent extends _FormFieldComponentBase {
|
|
|
5718
5878
|
provide: _FormFieldComponentBase,
|
|
5719
5879
|
useExisting: ArdiumNumberInputComponent,
|
|
5720
5880
|
},
|
|
5721
|
-
], queries: [{ propertyName: "placeholderTemplate", first: true, predicate: ArdNumberInputPlaceholderTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["textInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"ard-number-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-error]=\"hasError()\"\r\n [class.ard-has-value]=\"value\"\r\n (mousedown)=\"$event.preventDefault()\"\r\n (mouseup)=\"onMouseup()\"\r\n>\r\n @if (!noButtons()) {\r\n <ard-button\r\n class=\"ard-quick-change-button decrement\"\r\n [variant]=\"buttonVariant()\"\r\n [appearance]=\"buttonAppearance()\"\r\n color=\"none\"\r\n [disabled]=\"!canDecrement()\"\r\n [tabIndex]=\"!canDecrement() ? -1 : tabIndex()\"\r\n (click)=\"onQuickChangeButtonClick(-1, $event)\"\r\n (ardHold)=\"onQuickChangeButtonClick(-1)\"\r\n ardHoldSpaceKey\r\n >\r\n -\r\n </ard-button>\r\n }\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template\r\n #defaultPlaceholderTemplate\r\n let-plchldr\r\n >\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocusMaster($event)\"\r\n (blur)=\"onBlurMaster($event)\"\r\n (change)=\"onChange($event)\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (mouseup)=\"$event.stopPropagation()\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n @if (!noButtons()) {\r\n <ard-button\r\n class=\"ard-quick-change-button increment\"\r\n [variant]=\"buttonVariant()\"\r\n [appearance]=\"buttonAppearance()\"\r\n color=\"none\"\r\n [disabled]=\"!canIncrement()\"\r\n [tabIndex]=\"!canIncrement() ? -1 : tabIndex()\"\r\n (click)=\"onQuickChangeButtonClick(1, $event)\"\r\n (ardHold)=\"onQuickChangeButtonClick(1)\"\r\n ardHoldSpaceKey\r\n >\r\n +\r\n </ard-button>\r\n }\r\n</div>\r\n", styles: [".ard-number-input{display:flex;max-width:100%}.ard-number-input .ard-input-container{position:relative}.ard-number-input .ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}.ard-text-align-left input,.ard-text-align-left .ard-placeholder{text-align:left}.ard-text-align-middle input,.ard-text-align-middle .ard-placeholder{text-align:center}.ard-text-align-right input,.ard-text-align-right .ard-placeholder{text-align:right}.ard-quick-change-button{-webkit-user-select:none;user-select:none;height:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.HoldDirective, selector: "[ardHold]", inputs: ["disabled", "readonly", "ardHoldDelay", "ardHoldRepeat", "ardAllowSpaceKey", "ardAllowEnterKey"], outputs: ["ardHold"] }, { kind: "component", type: ArdiumButtonComponent, selector: "ard-button", inputs: ["icon", "variant", "alignIcon", "vertical"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
5881
|
+
], queries: [{ propertyName: "placeholderTemplate", first: true, predicate: ArdNumberInputPlaceholderTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["textInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"ard-number-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-error]=\"hasError()\"\r\n [class.ard-is-success]=\"isSuccess()\"\r\n [class.ard-has-value]=\"value\"\r\n (mousedown)=\"$event.preventDefault()\"\r\n (mouseup)=\"onMouseup()\"\r\n>\r\n @if (!noButtons()) {\r\n <ard-button\r\n class=\"ard-quick-change-button decrement\"\r\n [variant]=\"buttonVariant()\"\r\n [appearance]=\"buttonAppearance()\"\r\n color=\"none\"\r\n [disabled]=\"!canDecrement()\"\r\n [tabIndex]=\"!canDecrement() ? -1 : tabIndex()\"\r\n (click)=\"onQuickChangeButtonClick(-1, $event)\"\r\n (ardHold)=\"onQuickChangeButtonClick(-1)\"\r\n ardHoldSpaceKey\r\n >\r\n -\r\n </ard-button>\r\n }\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template\r\n #defaultPlaceholderTemplate\r\n let-plchldr\r\n >\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocusMaster($event)\"\r\n (blur)=\"onBlurMaster($event)\"\r\n (change)=\"onChange($event)\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (mouseup)=\"$event.stopPropagation()\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n @if (!noButtons()) {\r\n <ard-button\r\n class=\"ard-quick-change-button increment\"\r\n [variant]=\"buttonVariant()\"\r\n [appearance]=\"buttonAppearance()\"\r\n color=\"none\"\r\n [disabled]=\"!canIncrement()\"\r\n [tabIndex]=\"!canIncrement() ? -1 : tabIndex()\"\r\n (click)=\"onQuickChangeButtonClick(1, $event)\"\r\n (ardHold)=\"onQuickChangeButtonClick(1)\"\r\n ardHoldSpaceKey\r\n >\r\n +\r\n </ard-button>\r\n }\r\n</div>\r\n", styles: [".ard-number-input{display:flex;max-width:100%}.ard-number-input .ard-input-container{position:relative}.ard-number-input .ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}.ard-text-align-left input,.ard-text-align-left .ard-placeholder{text-align:left}.ard-text-align-middle input,.ard-text-align-middle .ard-placeholder{text-align:center}.ard-text-align-right input,.ard-text-align-right .ard-placeholder{text-align:right}.ard-quick-change-button{-webkit-user-select:none;user-select:none;height:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.HoldDirective, selector: "[ardHold]", inputs: ["disabled", "readonly", "ardHoldDelay", "ardHoldRepeat", "ardAllowSpaceKey", "ardAllowEnterKey"], outputs: ["ardHold"] }, { kind: "component", type: ArdiumButtonComponent, selector: "ard-button", inputs: ["icon", "variant", "alignIcon", "vertical"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
5722
5882
|
}
|
|
5723
5883
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumNumberInputComponent, decorators: [{
|
|
5724
5884
|
type: Component,
|
|
@@ -5732,7 +5892,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
5732
5892
|
provide: _FormFieldComponentBase,
|
|
5733
5893
|
useExisting: ArdiumNumberInputComponent,
|
|
5734
5894
|
},
|
|
5735
|
-
], template: "<div\r\n class=\"ard-number-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-error]=\"hasError()\"\r\n [class.ard-has-value]=\"value\"\r\n (mousedown)=\"$event.preventDefault()\"\r\n (mouseup)=\"onMouseup()\"\r\n>\r\n @if (!noButtons()) {\r\n <ard-button\r\n class=\"ard-quick-change-button decrement\"\r\n [variant]=\"buttonVariant()\"\r\n [appearance]=\"buttonAppearance()\"\r\n color=\"none\"\r\n [disabled]=\"!canDecrement()\"\r\n [tabIndex]=\"!canDecrement() ? -1 : tabIndex()\"\r\n (click)=\"onQuickChangeButtonClick(-1, $event)\"\r\n (ardHold)=\"onQuickChangeButtonClick(-1)\"\r\n ardHoldSpaceKey\r\n >\r\n -\r\n </ard-button>\r\n }\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template\r\n #defaultPlaceholderTemplate\r\n let-plchldr\r\n >\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocusMaster($event)\"\r\n (blur)=\"onBlurMaster($event)\"\r\n (change)=\"onChange($event)\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (mouseup)=\"$event.stopPropagation()\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n @if (!noButtons()) {\r\n <ard-button\r\n class=\"ard-quick-change-button increment\"\r\n [variant]=\"buttonVariant()\"\r\n [appearance]=\"buttonAppearance()\"\r\n color=\"none\"\r\n [disabled]=\"!canIncrement()\"\r\n [tabIndex]=\"!canIncrement() ? -1 : tabIndex()\"\r\n (click)=\"onQuickChangeButtonClick(1, $event)\"\r\n (ardHold)=\"onQuickChangeButtonClick(1)\"\r\n ardHoldSpaceKey\r\n >\r\n +\r\n </ard-button>\r\n }\r\n</div>\r\n", styles: [".ard-number-input{display:flex;max-width:100%}.ard-number-input .ard-input-container{position:relative}.ard-number-input .ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}.ard-text-align-left input,.ard-text-align-left .ard-placeholder{text-align:left}.ard-text-align-middle input,.ard-text-align-middle .ard-placeholder{text-align:center}.ard-text-align-right input,.ard-text-align-right .ard-placeholder{text-align:right}.ard-quick-change-button{-webkit-user-select:none;user-select:none;height:100%}\n"] }]
|
|
5895
|
+
], template: "<div\r\n class=\"ard-number-input\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-has-error]=\"hasError()\"\r\n [class.ard-is-success]=\"isSuccess()\"\r\n [class.ard-has-value]=\"value\"\r\n (mousedown)=\"$event.preventDefault()\"\r\n (mouseup)=\"onMouseup()\"\r\n>\r\n @if (!noButtons()) {\r\n <ard-button\r\n class=\"ard-quick-change-button decrement\"\r\n [variant]=\"buttonVariant()\"\r\n [appearance]=\"buttonAppearance()\"\r\n color=\"none\"\r\n [disabled]=\"!canDecrement()\"\r\n [tabIndex]=\"!canDecrement() ? -1 : tabIndex()\"\r\n (click)=\"onQuickChangeButtonClick(-1, $event)\"\r\n (ardHold)=\"onQuickChangeButtonClick(-1)\"\r\n ardHoldSpaceKey\r\n >\r\n -\r\n </ard-button>\r\n }\r\n <div class=\"ard-input-container\">\r\n @if (shouldDisplayPlaceholder()) {\r\n <ng-template\r\n #defaultPlaceholderTemplate\r\n let-plchldr\r\n >\r\n <div class=\"ard-placeholder\">{{ placeholder() }}</div>\r\n </ng-template>\r\n\r\n <ng-template [ngTemplateOutlet]=\"placeholderTemplate()?.template || defaultPlaceholderTemplate\"></ng-template>\r\n }\r\n\r\n <input\r\n #textInput\r\n #focusableElement\r\n type=\"text\"\r\n [attr.id]=\"inputId()\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n [readonly]=\"readonly()\"\r\n [disabled]=\"disabled()\"\r\n (input)=\"onInput(textInput.value)\"\r\n (focus)=\"onFocusMaster($event)\"\r\n (blur)=\"onBlurMaster($event)\"\r\n (change)=\"onChange($event)\"\r\n (mousedown)=\"$event.stopPropagation()\"\r\n (mouseup)=\"$event.stopPropagation()\"\r\n (copy)=\"onCopy($event)\"\r\n />\r\n </div>\r\n @if (!noButtons()) {\r\n <ard-button\r\n class=\"ard-quick-change-button increment\"\r\n [variant]=\"buttonVariant()\"\r\n [appearance]=\"buttonAppearance()\"\r\n color=\"none\"\r\n [disabled]=\"!canIncrement()\"\r\n [tabIndex]=\"!canIncrement() ? -1 : tabIndex()\"\r\n (click)=\"onQuickChangeButtonClick(1, $event)\"\r\n (ardHold)=\"onQuickChangeButtonClick(1)\"\r\n ardHoldSpaceKey\r\n >\r\n +\r\n </ard-button>\r\n }\r\n</div>\r\n", styles: [".ard-number-input{display:flex;max-width:100%}.ard-number-input .ard-input-container{position:relative}.ard-number-input .ard-placeholder{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;pointer-events:none}.ard-text-align-left input,.ard-text-align-left .ard-placeholder{text-align:left}.ard-text-align-middle input,.ard-text-align-middle .ard-placeholder{text-align:center}.ard-text-align-right input,.ard-text-align-right .ard-placeholder{text-align:right}.ard-quick-change-button{-webkit-user-select:none;user-select:none;height:100%}\n"] }]
|
|
5736
5896
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
5737
5897
|
type: Inject,
|
|
5738
5898
|
args: [ARD_NUMBER_INPUT_DEFAULTS]
|
|
@@ -5878,7 +6038,6 @@ const CheckboxState = {
|
|
|
5878
6038
|
class ArdiumCheckboxComponent extends _BooleanComponentBase {
|
|
5879
6039
|
constructor(defaults) {
|
|
5880
6040
|
super(defaults);
|
|
5881
|
-
this.htmlId = input('');
|
|
5882
6041
|
//! appearance
|
|
5883
6042
|
this.color = input(this._DEFAULTS.color);
|
|
5884
6043
|
this.unselectedColor = input(this._DEFAULTS.unselectedColor);
|
|
@@ -5902,7 +6061,7 @@ class ArdiumCheckboxComponent extends _BooleanComponentBase {
|
|
|
5902
6061
|
this._emitChange();
|
|
5903
6062
|
}
|
|
5904
6063
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumCheckboxComponent, deps: [{ token: ARD_CHECKBOX_DEFAULTS }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5905
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: ArdiumCheckboxComponent, selector: "ard-checkbox", inputs: {
|
|
6064
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: ArdiumCheckboxComponent, selector: "ard-checkbox", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, unselectedColor: { classPropertyName: "unselectedColor", publicName: "unselectedColor", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { state: "stateChange" }, providers: [
|
|
5906
6065
|
{
|
|
5907
6066
|
provide: NG_VALUE_ACCESSOR,
|
|
5908
6067
|
useExisting: forwardRef(() => ArdiumCheckboxComponent),
|
|
@@ -5939,7 +6098,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
5939
6098
|
}] });
|
|
5940
6099
|
|
|
5941
6100
|
const _radioDefaults = {
|
|
5942
|
-
...
|
|
6101
|
+
..._focusableComponentDefaults,
|
|
5943
6102
|
color: SimpleComponentColor.Primary,
|
|
5944
6103
|
};
|
|
5945
6104
|
const ARD_RADIO_DEFAULTS = new InjectionToken('ard-radio-defaults', {
|
|
@@ -5951,11 +6110,31 @@ function provideRadioDefaults(config) {
|
|
|
5951
6110
|
return { provide: ARD_RADIO_DEFAULTS, useValue: { ..._radioDefaults, ...config } };
|
|
5952
6111
|
}
|
|
5953
6112
|
|
|
5954
|
-
class ArdiumRadioComponent extends
|
|
6113
|
+
class ArdiumRadioComponent extends _FocusableComponentBase {
|
|
5955
6114
|
constructor(defaults) {
|
|
5956
6115
|
super(defaults);
|
|
5957
6116
|
this._changeDetector = inject(ChangeDetectorRef);
|
|
5958
6117
|
this.htmlId = input(TakeChance.id());
|
|
6118
|
+
//! events
|
|
6119
|
+
/**
|
|
6120
|
+
* The event emitter responsible for firing `select` events. Fired when the `selected` state is set to true.
|
|
6121
|
+
*/
|
|
6122
|
+
this.selectEvent = output({ alias: 'select' });
|
|
6123
|
+
/**
|
|
6124
|
+
* The event emitter responsible for firing `unselect` events. Fired when the `selected` state is set to false.
|
|
6125
|
+
*/
|
|
6126
|
+
this.unselectEvent = output({ alias: 'unselect' });
|
|
6127
|
+
/**
|
|
6128
|
+
* The event emitter responsible for firing `change` events. Fired when the `selected` state is changed.
|
|
6129
|
+
*/
|
|
6130
|
+
this.changeEvent = output({ alias: 'change' });
|
|
6131
|
+
//! [(selected)] two-way binding
|
|
6132
|
+
// can be set using a no-value argument
|
|
6133
|
+
this.selected = signal(false);
|
|
6134
|
+
/**
|
|
6135
|
+
* The event emitter responsible for firing `selectedChange` events. Fired when the `selected` state is changed.
|
|
6136
|
+
*/
|
|
6137
|
+
this.selectedChange = output();
|
|
5959
6138
|
this.value = input();
|
|
5960
6139
|
//! appearance
|
|
5961
6140
|
this.color = input(this._DEFAULTS.color);
|
|
@@ -5963,6 +6142,47 @@ class ArdiumRadioComponent extends _BooleanComponentBase {
|
|
|
5963
6142
|
//! radio-group access points
|
|
5964
6143
|
this.name = signal(null);
|
|
5965
6144
|
}
|
|
6145
|
+
/**
|
|
6146
|
+
* Emits all select-state-related events.
|
|
6147
|
+
*/
|
|
6148
|
+
_emitChange() {
|
|
6149
|
+
if (this.selected())
|
|
6150
|
+
this.selectEvent.emit(null);
|
|
6151
|
+
else
|
|
6152
|
+
this.unselectEvent.emit(null);
|
|
6153
|
+
this.selectedChange.emit(this.selected());
|
|
6154
|
+
this.changeEvent.emit(this.selected());
|
|
6155
|
+
}
|
|
6156
|
+
/**
|
|
6157
|
+
* The selection state of the component. Coercible into a boolean.
|
|
6158
|
+
*/
|
|
6159
|
+
set _selected(v) {
|
|
6160
|
+
this.selected.set(coerceBooleanProperty(v));
|
|
6161
|
+
}
|
|
6162
|
+
get _selectedHostAttribute() {
|
|
6163
|
+
return this.selected();
|
|
6164
|
+
}
|
|
6165
|
+
/**
|
|
6166
|
+
* Toggles the selected state. Emits all appropriate events.
|
|
6167
|
+
*/
|
|
6168
|
+
toggleSelected() {
|
|
6169
|
+
this.selected.update(v => !v);
|
|
6170
|
+
this._emitChange();
|
|
6171
|
+
}
|
|
6172
|
+
/**
|
|
6173
|
+
* Sets the state to "selected". Emits all appropriate events only if the state changes.
|
|
6174
|
+
*/
|
|
6175
|
+
select() {
|
|
6176
|
+
this.selected.set(true);
|
|
6177
|
+
this._emitChange();
|
|
6178
|
+
}
|
|
6179
|
+
/**
|
|
6180
|
+
* Sets the state to "unselected". Emits all appropriate events only if the state changes.
|
|
6181
|
+
*/
|
|
6182
|
+
unselect() {
|
|
6183
|
+
this.selected.set(false);
|
|
6184
|
+
this._emitChange();
|
|
6185
|
+
}
|
|
5966
6186
|
//! event handlers
|
|
5967
6187
|
onMousedown() {
|
|
5968
6188
|
this.focus();
|
|
@@ -5983,7 +6203,7 @@ class ArdiumRadioComponent extends _BooleanComponentBase {
|
|
|
5983
6203
|
this._changeDetector.markForCheck();
|
|
5984
6204
|
}
|
|
5985
6205
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumRadioComponent, deps: [{ token: ARD_RADIO_DEFAULTS }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5986
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: ArdiumRadioComponent, selector: "ard-radio", inputs: { htmlId: { classPropertyName: "htmlId", publicName: "htmlId", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<button\n #focusableElement\n class=\"ard-radio\"\n type=\"button\"\n [ngClass]=\"ngClasses()\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (mousedown)=\"onMousedown()\"\n (mouseup)=\"onMouseup()\"\n [tabindex]=\"tabIndex()\"\n>\n <div class=\"ard-radio-circles\">\n <div class=\"ard-radio-outer-circle\"></div>\n <div class=\"ard-radio-inner-circle\"></div>\n <div class=\"ard-focus-overlay\"></div>\n <div class=\"ard-hitbox\"></div>\n </div>\n <label [for]=\"htmlId()\">\n <ng-content></ng-content>\n </label>\n</button>\n\n<input\n class=\"ard-radio-input-element\"\n type=\"radio\"\n [name]=\"name()\"\n [id]=\"htmlId()\"\n [checked]=\"selected()\"\n #radio\n/>\n", styles: [".ard-radio{border:none;background:none}.ard-radio>label{pointer-events:none}ard-radio>.ard-radio-input-element{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
6206
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: ArdiumRadioComponent, selector: "ard-radio", inputs: { htmlId: { classPropertyName: "htmlId", publicName: "htmlId", isSignal: true, isRequired: false, transformFunction: null }, _selected: { classPropertyName: "_selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectEvent: "select", unselectEvent: "unselect", changeEvent: "change", selectedChange: "selectedChange" }, host: { properties: { "attr.selected": "this._selectedHostAttribute", "class.ard-selected": "this._selectedHostAttribute" } }, usesInheritance: true, ngImport: i0, template: "<button\n #focusableElement\n class=\"ard-radio\"\n type=\"button\"\n [ngClass]=\"ngClasses()\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (mousedown)=\"onMousedown()\"\n (mouseup)=\"onMouseup()\"\n [tabindex]=\"tabIndex()\"\n>\n <div class=\"ard-radio-circles\">\n <div class=\"ard-radio-outer-circle\"></div>\n <div class=\"ard-radio-inner-circle\"></div>\n <div class=\"ard-focus-overlay\"></div>\n <div class=\"ard-hitbox\"></div>\n </div>\n <label [for]=\"htmlId()\">\n <ng-content></ng-content>\n </label>\n</button>\n\n<input\n class=\"ard-radio-input-element\"\n type=\"radio\"\n [name]=\"name()\"\n [id]=\"htmlId()\"\n [checked]=\"selected()\"\n #radio\n/>\n", styles: [".ard-radio{border:none;background:none}.ard-radio>label{pointer-events:none}ard-radio>.ard-radio-input-element{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
5987
6207
|
}
|
|
5988
6208
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumRadioComponent, decorators: [{
|
|
5989
6209
|
type: Component,
|
|
@@ -5991,7 +6211,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
5991
6211
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
5992
6212
|
type: Inject,
|
|
5993
6213
|
args: [ARD_RADIO_DEFAULTS]
|
|
5994
|
-
}] }]
|
|
6214
|
+
}] }], propDecorators: { _selected: [{
|
|
6215
|
+
type: Input,
|
|
6216
|
+
args: ['selected']
|
|
6217
|
+
}], _selectedHostAttribute: [{
|
|
6218
|
+
type: HostBinding,
|
|
6219
|
+
args: ['attr.selected']
|
|
6220
|
+
}, {
|
|
6221
|
+
type: HostBinding,
|
|
6222
|
+
args: ['class.ard-selected']
|
|
6223
|
+
}] } });
|
|
5995
6224
|
|
|
5996
6225
|
class ArdiumRadioGroupComponent extends _NgModelComponentBase {
|
|
5997
6226
|
get _htmlIdHostAttribute() {
|
|
@@ -6000,7 +6229,6 @@ class ArdiumRadioGroupComponent extends _NgModelComponentBase {
|
|
|
6000
6229
|
constructor() {
|
|
6001
6230
|
super(_ngModelComponentDefaults); // no need for injecting a token with default values
|
|
6002
6231
|
this._radios = contentChildren(ArdiumRadioComponent, { descendants: true });
|
|
6003
|
-
this.htmlId = input('');
|
|
6004
6232
|
this.valueChange = output();
|
|
6005
6233
|
this.changeEvent = output({ alias: 'change' });
|
|
6006
6234
|
/**
|
|
@@ -6135,6 +6363,7 @@ class ArdiumRadioGroupComponent extends _NgModelComponentBase {
|
|
|
6135
6363
|
}
|
|
6136
6364
|
}
|
|
6137
6365
|
ngOnDestroy() {
|
|
6366
|
+
super.ngOnDestroy();
|
|
6138
6367
|
this._destroyChildSubscriptions();
|
|
6139
6368
|
}
|
|
6140
6369
|
_destroyChildSubscriptions() {
|
|
@@ -6144,7 +6373,7 @@ class ArdiumRadioGroupComponent extends _NgModelComponentBase {
|
|
|
6144
6373
|
this._childEventSubs = [];
|
|
6145
6374
|
}
|
|
6146
6375
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumRadioGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6147
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: ArdiumRadioGroupComponent, selector: "ard-radio-group", inputs: {
|
|
6376
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: ArdiumRadioGroupComponent, selector: "ard-radio-group", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", changeEvent: "change", selected: "selectedChange" }, host: { attributes: { "role": "radiogroup" }, properties: { "attr.tabindex": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null", "attr.id": "this._htmlIdHostAttribute" } }, providers: [
|
|
6148
6377
|
{
|
|
6149
6378
|
provide: NG_VALUE_ACCESSOR,
|
|
6150
6379
|
useExisting: forwardRef(() => ArdiumRadioGroupComponent),
|
|
@@ -6331,6 +6560,9 @@ class SimpleItemStorage {
|
|
|
6331
6560
|
* @returns true if all items are valid, otherwise false.
|
|
6332
6561
|
*/
|
|
6333
6562
|
_validateWriteValue(ngModel) {
|
|
6563
|
+
if (!isArray(ngModel)) {
|
|
6564
|
+
throw new Error(`ARD-FT${this._ardParentComp._componentId}0: <ard-${this._ardParentComp._componentName}> expects its value to be an array, got "${ngModel}".`);
|
|
6565
|
+
}
|
|
6334
6566
|
return ngModel.every(item => {
|
|
6335
6567
|
if (!isDefined(this._ardParentComp.compareWith()) && isObject(item) && this._ardParentComp.valueFrom()) {
|
|
6336
6568
|
console.warn(`ARD-FT${this._ardParentComp._componentId}0: Setting object(${JSON.stringify(item)}) as your model with [valueFrom] is not allowed unless [compareWith] is used.`);
|
|
@@ -6536,7 +6768,7 @@ class SimpleItemStorage {
|
|
|
6536
6768
|
}
|
|
6537
6769
|
|
|
6538
6770
|
const _selectableListComponentDefaults = {
|
|
6539
|
-
...
|
|
6771
|
+
..._formFieldComponentDefaults,
|
|
6540
6772
|
valueFrom: 'value',
|
|
6541
6773
|
labelFrom: 'label',
|
|
6542
6774
|
disabledFrom: 'disabled',
|
|
@@ -6546,12 +6778,11 @@ const _selectableListComponentDefaults = {
|
|
|
6546
6778
|
invertDisabled: false,
|
|
6547
6779
|
maxSelectedItems: undefined,
|
|
6548
6780
|
};
|
|
6549
|
-
class _SelectableListComponentBase extends
|
|
6781
|
+
class _SelectableListComponentBase extends _FormFieldComponentBase {
|
|
6550
6782
|
constructor() {
|
|
6551
6783
|
super(...arguments);
|
|
6552
6784
|
//! public constants
|
|
6553
6785
|
this.itemStorage = new SimpleItemStorage(this);
|
|
6554
|
-
this.htmlId = TakeChance.id();
|
|
6555
6786
|
this.DEFAULTS = this._DEFAULTS;
|
|
6556
6787
|
this._cd = inject(ChangeDetectorRef);
|
|
6557
6788
|
//! binding-related inputs
|
|
@@ -6615,7 +6846,7 @@ class _SelectableListComponentBase extends _NgModelComponentBase {
|
|
|
6615
6846
|
return this.touched();
|
|
6616
6847
|
}
|
|
6617
6848
|
_emitChange() {
|
|
6618
|
-
const value = this.itemStorage.value();
|
|
6849
|
+
const value = this.singleselectable() ? this.itemStorage.value()[0] : this.itemStorage.value();
|
|
6619
6850
|
this._onChangeRegistered?.(value);
|
|
6620
6851
|
this.changeEvent.emit(value);
|
|
6621
6852
|
this.valueChange.emit(value);
|
|
@@ -6731,7 +6962,7 @@ class _SelectableListComponentBase extends _NgModelComponentBase {
|
|
|
6731
6962
|
}
|
|
6732
6963
|
}
|
|
6733
6964
|
_toggleHighlightedItems(event) {
|
|
6734
|
-
if (!this.isFocused)
|
|
6965
|
+
if (!this.isFocused())
|
|
6735
6966
|
return;
|
|
6736
6967
|
event.preventDefault();
|
|
6737
6968
|
const highlightedItems = this.highlightedItems();
|
|
@@ -6743,28 +6974,28 @@ class _SelectableListComponentBase extends _NgModelComponentBase {
|
|
|
6743
6974
|
}
|
|
6744
6975
|
}
|
|
6745
6976
|
_highlightPrevious(event) {
|
|
6746
|
-
if (!this.isFocused)
|
|
6977
|
+
if (!this.isFocused())
|
|
6747
6978
|
return;
|
|
6748
6979
|
event.preventDefault();
|
|
6749
6980
|
this.isMouseBeingUsed.set(false);
|
|
6750
6981
|
this.itemStorage.highlightNextItem(-1, event.shiftKey);
|
|
6751
6982
|
}
|
|
6752
6983
|
_highlightNext(event) {
|
|
6753
|
-
if (!this.isFocused)
|
|
6984
|
+
if (!this.isFocused())
|
|
6754
6985
|
return;
|
|
6755
6986
|
event.preventDefault();
|
|
6756
6987
|
this.isMouseBeingUsed.set(false);
|
|
6757
6988
|
this.itemStorage.highlightNextItem(+1, event.shiftKey);
|
|
6758
6989
|
}
|
|
6759
6990
|
_highlightFirst(event) {
|
|
6760
|
-
if (!this.isFocused)
|
|
6991
|
+
if (!this.isFocused())
|
|
6761
6992
|
return;
|
|
6762
6993
|
event.preventDefault();
|
|
6763
6994
|
this.isMouseBeingUsed.set(false);
|
|
6764
6995
|
this.itemStorage.highlightFirstItem();
|
|
6765
6996
|
}
|
|
6766
6997
|
_highlightLast(event) {
|
|
6767
|
-
if (!this.isFocused)
|
|
6998
|
+
if (!this.isFocused())
|
|
6768
6999
|
return;
|
|
6769
7000
|
event.preventDefault();
|
|
6770
7001
|
this.isMouseBeingUsed.set(false);
|
|
@@ -6933,11 +7164,31 @@ class ArdiumSegmentComponent extends _SelectableListComponentBase {
|
|
|
6933
7164
|
this.itemStorage.unhighlightAll();
|
|
6934
7165
|
}
|
|
6935
7166
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumSegmentComponent, deps: [{ token: ARD_SEGMENT_DEFAULTS }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6936
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumSegmentComponent, selector: "ard-segment", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, iconBased: { classPropertyName: "iconBased", publicName: "iconBased", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, uniformWidths: { classPropertyName: "uniformWidths", publicName: "uniformWidths", isSignal: true, isRequired: false, transformFunction: null }, itemsPerRow: { classPropertyName: "itemsPerRow", publicName: "itemsPerRow", isSignal: true, isRequired: false, transformFunction: null } },
|
|
7167
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumSegmentComponent, selector: "ard-segment", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, iconBased: { classPropertyName: "iconBased", publicName: "iconBased", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, uniformWidths: { classPropertyName: "uniformWidths", publicName: "uniformWidths", isSignal: true, isRequired: false, transformFunction: null }, itemsPerRow: { classPropertyName: "itemsPerRow", publicName: "itemsPerRow", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
7168
|
+
{
|
|
7169
|
+
provide: NG_VALUE_ACCESSOR,
|
|
7170
|
+
useExisting: forwardRef(() => ArdiumSegmentComponent),
|
|
7171
|
+
multi: true,
|
|
7172
|
+
},
|
|
7173
|
+
{
|
|
7174
|
+
provide: _FormFieldComponentBase,
|
|
7175
|
+
useExisting: ArdiumSegmentComponent,
|
|
7176
|
+
},
|
|
7177
|
+
], queries: [{ propertyName: "optionTemplate", first: true, predicate: ArdSegmentOptionTemplateDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n #focusableElement\r\n class=\"ard-segment-container\"\r\n [class.ard-disabled]=\"disabled()\"\r\n [ariaDisabled]=\"disabled()\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-focus-visible]=\"isFocused() && !isMouseBeingUsed\"\r\n [class.ard-using-keyboard]=\"!isMouseBeingUsed\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n>\r\n @for (row of itemRows(); track $index) {\r\n <div\r\n class=\"ard-segment-row\"\r\n [class.ard-segment-row-partial]=\"row.isNotFull\"\r\n [class.ard-segment-row-uniform]=\"uniformWidths() || itemsPerRow() < items.length\"\r\n [style]=\"{ '--ard-_segment-row-items': itemsInActualRow }\"\r\n >\r\n @for (option of row.options; track $index) {\r\n <button\r\n type=\"button\"\r\n class=\"ard-segment-option\"\r\n tabindex=\"-1\"\r\n [class.ard-option-disabled]=\"option.disabled() || (isItemLimitReached() && !option.selected())\"\r\n [class.ard-option-selected]=\"option.selected()\"\r\n [class.ard-option-highlighted]=\"option.highlighted()\"\r\n [ariaSelected]=\"option.selected()\"\r\n (mouseenter)=\"onItemMouseEnter(option, $event)\"\r\n (mouseleave)=\"onItemMouseLeave(option, $event)\"\r\n (click)=\"onItemClick(option, $event)\"\r\n >\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <span class=\"ard-option-label\">\r\n <ng-template #defaultOptionTemplate>\r\n {{ option.label() }}\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"optionTemplate()?.template || defaultOptionTemplate\"\r\n [ngTemplateOutletContext]=\"getOptionContext(option)\"\r\n />\r\n </span>\r\n </div>\r\n </button>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".ard-segment-container{display:flex;flex-direction:column}.ard-segment-container.ard-align-left .ard-segment-option{justify-content:left}.ard-segment-container.ard-align-middle .ard-segment-option{justify-content:center}.ard-segment-container.ard-align-right .ard-segment-option{justify-content:right}.ard-segment-row{width:100%;display:flex;align-items:center}.ard-segment-row.ard-segment-row-uniform{display:grid;grid-template-columns:repeat(var(--ard-_segment-row-items),1fr)}.ard-segment-option{-webkit-user-select:none;user-select:none}.ard-option-disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
6937
7178
|
}
|
|
6938
7179
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumSegmentComponent, decorators: [{
|
|
6939
7180
|
type: Component,
|
|
6940
|
-
args: [{ selector: 'ard-segment', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7181
|
+
args: [{ selector: 'ard-segment', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
7182
|
+
{
|
|
7183
|
+
provide: NG_VALUE_ACCESSOR,
|
|
7184
|
+
useExisting: forwardRef(() => ArdiumSegmentComponent),
|
|
7185
|
+
multi: true,
|
|
7186
|
+
},
|
|
7187
|
+
{
|
|
7188
|
+
provide: _FormFieldComponentBase,
|
|
7189
|
+
useExisting: ArdiumSegmentComponent,
|
|
7190
|
+
},
|
|
7191
|
+
], template: "<div\r\n #focusableElement\r\n class=\"ard-segment-container\"\r\n [class.ard-disabled]=\"disabled()\"\r\n [ariaDisabled]=\"disabled()\"\r\n [ngClass]=\"ngClasses()\"\r\n [class.ard-focus-visible]=\"isFocused() && !isMouseBeingUsed\"\r\n [class.ard-using-keyboard]=\"!isMouseBeingUsed\"\r\n [attr.tabindex]=\"tabIndex()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n>\r\n @for (row of itemRows(); track $index) {\r\n <div\r\n class=\"ard-segment-row\"\r\n [class.ard-segment-row-partial]=\"row.isNotFull\"\r\n [class.ard-segment-row-uniform]=\"uniformWidths() || itemsPerRow() < items.length\"\r\n [style]=\"{ '--ard-_segment-row-items': itemsInActualRow }\"\r\n >\r\n @for (option of row.options; track $index) {\r\n <button\r\n type=\"button\"\r\n class=\"ard-segment-option\"\r\n tabindex=\"-1\"\r\n [class.ard-option-disabled]=\"option.disabled() || (isItemLimitReached() && !option.selected())\"\r\n [class.ard-option-selected]=\"option.selected()\"\r\n [class.ard-option-highlighted]=\"option.highlighted()\"\r\n [ariaSelected]=\"option.selected()\"\r\n (mouseenter)=\"onItemMouseEnter(option, $event)\"\r\n (mouseleave)=\"onItemMouseLeave(option, $event)\"\r\n (click)=\"onItemClick(option, $event)\"\r\n >\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-button-content\">\r\n <span class=\"ard-option-label\">\r\n <ng-template #defaultOptionTemplate>\r\n {{ option.label() }}\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"optionTemplate()?.template || defaultOptionTemplate\"\r\n [ngTemplateOutletContext]=\"getOptionContext(option)\"\r\n />\r\n </span>\r\n </div>\r\n </button>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".ard-segment-container{display:flex;flex-direction:column}.ard-segment-container.ard-align-left .ard-segment-option{justify-content:left}.ard-segment-container.ard-align-middle .ard-segment-option{justify-content:center}.ard-segment-container.ard-align-right .ard-segment-option{justify-content:right}.ard-segment-row{width:100%;display:flex;align-items:center}.ard-segment-row.ard-segment-row-uniform{display:grid;grid-template-columns:repeat(var(--ard-_segment-row-items),1fr)}.ard-segment-option{-webkit-user-select:none;user-select:none}.ard-option-disabled{pointer-events:none}\n"] }]
|
|
6941
7192
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
6942
7193
|
type: Inject,
|
|
6943
7194
|
args: [ARD_SEGMENT_DEFAULTS]
|
|
@@ -7318,6 +7569,7 @@ class ArdiumRangeSliderComponent extends _AbstractSlider {
|
|
|
7318
7569
|
this.currentHandle = signal(null);
|
|
7319
7570
|
}
|
|
7320
7571
|
ngOnInit() {
|
|
7572
|
+
super.ngOnInit();
|
|
7321
7573
|
if (this._value.low !== -Infinity && this._value.high !== Infinity)
|
|
7322
7574
|
return;
|
|
7323
7575
|
this.writeValue({ low: this.min(), high: this.max() });
|
|
@@ -8088,7 +8340,6 @@ function provideCheckboxListDefaults(config) {
|
|
|
8088
8340
|
class ArdiumCheckboxListComponent extends _NgModelComponentBase {
|
|
8089
8341
|
constructor(defaults) {
|
|
8090
8342
|
super(defaults);
|
|
8091
|
-
this.htmlId = input(TakeChance.id());
|
|
8092
8343
|
this.DEFAULTS = this._DEFAULTS;
|
|
8093
8344
|
// static values. Not meant to be changed.
|
|
8094
8345
|
this.multiselectable = signal(true);
|
|
@@ -8173,7 +8424,7 @@ class ArdiumCheckboxListComponent extends _NgModelComponentBase {
|
|
|
8173
8424
|
this.selectItem(v);
|
|
8174
8425
|
}
|
|
8175
8426
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumCheckboxListComponent, deps: [{ token: ARD_CHECKBOX_LIST_DEFAULTS }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8176
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumCheckboxListComponent, selector: "ard-checkbox-list", inputs: {
|
|
8427
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumCheckboxListComponent, selector: "ard-checkbox-list", inputs: { valueFrom: { classPropertyName: "valueFrom", publicName: "valueFrom", isSignal: true, isRequired: false, transformFunction: null }, labelFrom: { classPropertyName: "labelFrom", publicName: "labelFrom", isSignal: true, isRequired: false, transformFunction: null }, disabledFrom: { classPropertyName: "disabledFrom", publicName: "disabledFrom", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: false, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, invertDisabled: { classPropertyName: "invertDisabled", publicName: "invertDisabled", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedItems: { classPropertyName: "maxSelectedItems", publicName: "maxSelectedItems", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", changeEvent: "change" }, host: { properties: { "attr.id": "this._htmlIdHostAttribute" } }, usesInheritance: true, ngImport: i0, template: "<div\n class=\"ard-checkbox-list\"\n [ngClass]=\"ngClasses()\"\n>\n @for (item of items; track item.index) {\n <div\n class=\"ard-checkbox-list__item\"\n [class.ard-item-highlighted]=\"item.highlighted()\"\n [class.ard-item-disabled]=\"item.disabled()\"\n (mouseover)=\"onItemHighlight(item)\"\n (mouseleave)=\"onItemBlur()\"\n (click)=\"toggleItem(item)\"\n >\n <div class=\"ard-focus-overlay\"></div>\n <ard-checkbox\n [selected]=\"item.selected()\"\n [disabled]=\"item.disabled()\"\n [color]=\"color()\"\n [htmlId]=\"htmlId() + item.index\"\n [tabIndex]=\"tabIndex()\"\n (focus)=\"onFocus($event)\"\n (focus)=\"onItemFocus(item)\"\n (blur)=\"onBlur($event)\"\n (blur)=\"onItemBlur()\"\n (select)=\"selectItem(item)\"\n (unselect)=\"unselectItem(item)\"\n (click)=\"$event.stopPropagation()\"\n />\n <label [for]=\"htmlId() + item.index\">\n {{ item.label() }}\n </label>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ArdiumCheckboxComponent, selector: "ard-checkbox", inputs: ["color", "unselectedColor", "state"], outputs: ["stateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
8177
8428
|
}
|
|
8178
8429
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumCheckboxListComponent, decorators: [{
|
|
8179
8430
|
type: Component,
|
|
@@ -8685,6 +8936,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8685
8936
|
|
|
8686
8937
|
const _formFieldDefaults = {
|
|
8687
8938
|
defaultHintAlign: SimpleOneAxisAlignment.Left,
|
|
8939
|
+
reserveHintLine: false,
|
|
8688
8940
|
};
|
|
8689
8941
|
const ARD_FORM_FIELD_DEFAULTS = new InjectionToken('ard-form-field-defaults', {
|
|
8690
8942
|
factory: () => ({
|
|
@@ -8743,17 +8995,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8743
8995
|
class ArdiumFormFieldComponent {
|
|
8744
8996
|
constructor() {
|
|
8745
8997
|
this._DEFAULTS = inject(ARD_FORM_FIELD_DEFAULTS);
|
|
8746
|
-
this.
|
|
8998
|
+
this.alignHintToLeftByDefault = this._DEFAULTS.defaultHintAlign === SimpleOneAxisAlignment.Left;
|
|
8747
8999
|
this.control = contentChild(_FormFieldComponentBase);
|
|
8748
|
-
this.controlId = computed(() => this.control()?.htmlId());
|
|
8749
9000
|
this.label = contentChild(ArdiumLabelComponent);
|
|
8750
9001
|
this.hints = contentChildren(ArdiumHintDirective);
|
|
8751
|
-
// readonly leftHints = computed<ArdiumHintDirective[]>(() => this.hints().filter(v => v.left() && !v.right()));
|
|
8752
|
-
// readonly rightHints = computed<ArdiumHintDirective[]>(() => this.hints().filter(v => !v.left() && v.right()));
|
|
8753
9002
|
this.errors = contentChildren(ArdiumErrorDirective);
|
|
8754
|
-
// readonly leftErrors = computed<ArdiumErrorDirective[]>(() => this.errors().filter(v => v.left() && !v.right()));
|
|
8755
|
-
// readonly rightErrors = computed<ArdiumErrorDirective[]>(() => this.errors().filter(v => !v.left() && v.right()));
|
|
8756
9003
|
this.hasAnyError = computed(() => this.errors()?.length > 0);
|
|
9004
|
+
this.reserveHintLine = input(this._DEFAULTS.reserveHintLine, { transform: v => coerceBooleanProperty(v) });
|
|
8757
9005
|
}
|
|
8758
9006
|
ngOnInit() {
|
|
8759
9007
|
if (!this.control()) {
|
|
@@ -8761,11 +9009,11 @@ class ArdiumFormFieldComponent {
|
|
|
8761
9009
|
}
|
|
8762
9010
|
}
|
|
8763
9011
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8764
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumFormFieldComponent, selector: "ard-form-field", queries: [{ propertyName: "control", first: true, predicate: _FormFieldComponentBase, descendants: true, isSignal: true }, { propertyName: "label", first: true, predicate: ArdiumLabelComponent, descendants: true, isSignal: true }, { propertyName: "hints", predicate: ArdiumHintDirective, isSignal: true }, { propertyName: "errors", predicate: ArdiumErrorDirective, isSignal: true }], ngImport: i0, template: "<div
|
|
9012
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumFormFieldComponent, selector: "ard-form-field", inputs: { reserveHintLine: { classPropertyName: "reserveHintLine", publicName: "reserveHintLine", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "control", first: true, predicate: _FormFieldComponentBase, descendants: true, isSignal: true }, { propertyName: "label", first: true, predicate: ArdiumLabelComponent, descendants: true, isSignal: true }, { propertyName: "hints", predicate: ArdiumHintDirective, isSignal: true }, { propertyName: "errors", predicate: ArdiumErrorDirective, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"ard-form-field\"\r\n [class.ard-form-field__with-error]=\"control()?.hasError()\"\r\n [class.ard-form-field__is-success]=\"control()?.isSuccess()\"\r\n [class.ard-form-field__control-disabled]=\"control()?.disabled()\"\r\n>\r\n <label\r\n class=\"ard-label\"\r\n [attr.for]=\"control()?.htmlId()\"\r\n >\r\n <ng-content select=\"ard-label, [ard-label]\" />\r\n </label>\r\n <div class=\"ard-form-field__input\">\r\n <ng-content />\r\n </div>\r\n <div\r\n class=\"ard-form-field__hints\"\r\n [class.ard-form-field__reserve-hint-line]=\"reserveHintLine()\"\r\n [class.ard-form-field__hints-default-left]=\"alignHintToLeftByDefault\"\r\n >\r\n @if (hasAnyError()) {\r\n <div class=\"ard-form-field__error\">\r\n <ng-content select=\"ard-error, [ard-error]\" />\r\n </div>\r\n } @else {\r\n <div class=\"ard-form-field__hints-left\">\r\n <div class=\"ard-form-field__default-hint\">\r\n <ng-content select=\"ard-hint:not([left]):not([right]), [ard-hint]:not([left]):not([right])\" />\r\n </div>\r\n <ng-content select=\"ard-hint[left], [ard-hint][left]\" />\r\n </div>\r\n <div class=\"ard-form-field__hints-right\">\r\n <div class=\"ard-form-field__default-hint\">\r\n <ng-content select=\"ard-hint:not([left]):not([right]), [ard-hint]:not([left]):not([right])\" />\r\n </div>\r\n <ng-content select=\"ard-hint[right], [ard-hint][right]\" />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [":host{display:block}.ard-form-field__hints{display:flex;justify-content:space-between}.ard-form-field__hints>*{display:flex;flex-direction:column}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
8765
9013
|
}
|
|
8766
9014
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumFormFieldComponent, decorators: [{
|
|
8767
9015
|
type: Component,
|
|
8768
|
-
args: [{ selector: 'ard-form-field', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div
|
|
9016
|
+
args: [{ selector: 'ard-form-field', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"ard-form-field\"\r\n [class.ard-form-field__with-error]=\"control()?.hasError()\"\r\n [class.ard-form-field__is-success]=\"control()?.isSuccess()\"\r\n [class.ard-form-field__control-disabled]=\"control()?.disabled()\"\r\n>\r\n <label\r\n class=\"ard-label\"\r\n [attr.for]=\"control()?.htmlId()\"\r\n >\r\n <ng-content select=\"ard-label, [ard-label]\" />\r\n </label>\r\n <div class=\"ard-form-field__input\">\r\n <ng-content />\r\n </div>\r\n <div\r\n class=\"ard-form-field__hints\"\r\n [class.ard-form-field__reserve-hint-line]=\"reserveHintLine()\"\r\n [class.ard-form-field__hints-default-left]=\"alignHintToLeftByDefault\"\r\n >\r\n @if (hasAnyError()) {\r\n <div class=\"ard-form-field__error\">\r\n <ng-content select=\"ard-error, [ard-error]\" />\r\n </div>\r\n } @else {\r\n <div class=\"ard-form-field__hints-left\">\r\n <div class=\"ard-form-field__default-hint\">\r\n <ng-content select=\"ard-hint:not([left]):not([right]), [ard-hint]:not([left]):not([right])\" />\r\n </div>\r\n <ng-content select=\"ard-hint[left], [ard-hint][left]\" />\r\n </div>\r\n <div class=\"ard-form-field__hints-right\">\r\n <div class=\"ard-form-field__default-hint\">\r\n <ng-content select=\"ard-hint:not([left]):not([right]), [ard-hint]:not([left]):not([right])\" />\r\n </div>\r\n <ng-content select=\"ard-hint[right], [ard-hint][right]\" />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [":host{display:block}.ard-form-field__hints{display:flex;justify-content:space-between}.ard-form-field__hints>*{display:flex;flex-direction:column}\n"] }]
|
|
8769
9017
|
}] });
|
|
8770
9018
|
|
|
8771
9019
|
class ArdiumHintComponent {
|
|
@@ -8781,17 +9029,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8781
9029
|
}]
|
|
8782
9030
|
}] });
|
|
8783
9031
|
|
|
9032
|
+
class ArdiumHorizontalFormFieldComponent {
|
|
9033
|
+
constructor() {
|
|
9034
|
+
this._DEFAULTS = inject(ARD_FORM_FIELD_DEFAULTS);
|
|
9035
|
+
this.alignHintToLeftByDefault = this._DEFAULTS.defaultHintAlign === SimpleOneAxisAlignment.Left;
|
|
9036
|
+
this.control = contentChild(_FormFieldComponentBase);
|
|
9037
|
+
this.label = contentChild(ArdiumLabelComponent);
|
|
9038
|
+
this.hints = contentChildren(ArdiumHintDirective);
|
|
9039
|
+
this.errors = contentChildren(ArdiumErrorDirective);
|
|
9040
|
+
this.hasAnyError = computed(() => this.errors()?.length > 0);
|
|
9041
|
+
this.reserveHintLine = input(this._DEFAULTS.reserveHintLine, { transform: v => coerceBooleanProperty(v) });
|
|
9042
|
+
}
|
|
9043
|
+
ngOnInit() {
|
|
9044
|
+
if (!this.control()) {
|
|
9045
|
+
throw new Error(`ARD-FT5110: Form field component requires any control (input) to be present within the element. Found none.`);
|
|
9046
|
+
}
|
|
9047
|
+
}
|
|
9048
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumHorizontalFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9049
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumHorizontalFormFieldComponent, selector: "ard-horizontal-form-field", inputs: { reserveHintLine: { classPropertyName: "reserveHintLine", publicName: "reserveHintLine", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "control", first: true, predicate: _FormFieldComponentBase, descendants: true, isSignal: true }, { propertyName: "label", first: true, predicate: ArdiumLabelComponent, descendants: true, isSignal: true }, { propertyName: "hints", predicate: ArdiumHintDirective, isSignal: true }, { propertyName: "errors", predicate: ArdiumErrorDirective, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"ard-horizontal-form-field\"\r\n [class.ard-form-field__with-error]=\"control()?.hasError()\"\r\n [class.ard-form-field__is-success]=\"control()?.isSuccess()\"\r\n [class.ard-form-field__control-disabled]=\"control()?.disabled()\"\r\n>\r\n <div class=\"ard-form-field__label-container\">\r\n <label\r\n class=\"ard-label\"\r\n [attr.for]=\"control()?.htmlId()\"\r\n >\r\n <ng-content select=\"ard-label, [ard-label]\" />\r\n </label>\r\n </div>\r\n <div class=\"ard-form-field__non-label\">\r\n <div class=\"ard-form-field__input\">\r\n <ng-content />\r\n </div>\r\n <div\r\n class=\"ard-form-field__hints\"\r\n [class.ard-form-field__reserve-hint-line]=\"reserveHintLine()\"\r\n [class.ard-form-field__hints-default-left]=\"alignHintToLeftByDefault\"\r\n >\r\n @if (hasAnyError()) {\r\n <div class=\"ard-form-field__error\">\r\n <ng-content select=\"ard-error, [ard-error]\" />\r\n </div>\r\n } @else {\r\n <div class=\"ard-form-field__hints-left\">\r\n <div class=\"ard-form-field__default-hint\">\r\n <ng-content select=\"ard-hint:not([left]):not([right]), [ard-hint]:not([left]):not([right])\" />\r\n </div>\r\n <ng-content select=\"ard-hint[left], [ard-hint][left]\" />\r\n </div>\r\n <div class=\"ard-form-field__hints-right\">\r\n <div class=\"ard-form-field__default-hint\">\r\n <ng-content select=\"ard-hint:not([left]):not([right]), [ard-hint]:not([left]):not([right])\" />\r\n </div>\r\n <ng-content select=\"ard-hint[right], [ard-hint][right]\" />\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block}.ard-horizontal-form-field{display:flex}.ard-form-field__hints{display:flex;justify-content:space-between}.ard-form-field__hints>*{display:flex;flex-direction:column}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
9050
|
+
}
|
|
9051
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumHorizontalFormFieldComponent, decorators: [{
|
|
9052
|
+
type: Component,
|
|
9053
|
+
args: [{ selector: 'ard-horizontal-form-field', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"ard-horizontal-form-field\"\r\n [class.ard-form-field__with-error]=\"control()?.hasError()\"\r\n [class.ard-form-field__is-success]=\"control()?.isSuccess()\"\r\n [class.ard-form-field__control-disabled]=\"control()?.disabled()\"\r\n>\r\n <div class=\"ard-form-field__label-container\">\r\n <label\r\n class=\"ard-label\"\r\n [attr.for]=\"control()?.htmlId()\"\r\n >\r\n <ng-content select=\"ard-label, [ard-label]\" />\r\n </label>\r\n </div>\r\n <div class=\"ard-form-field__non-label\">\r\n <div class=\"ard-form-field__input\">\r\n <ng-content />\r\n </div>\r\n <div\r\n class=\"ard-form-field__hints\"\r\n [class.ard-form-field__reserve-hint-line]=\"reserveHintLine()\"\r\n [class.ard-form-field__hints-default-left]=\"alignHintToLeftByDefault\"\r\n >\r\n @if (hasAnyError()) {\r\n <div class=\"ard-form-field__error\">\r\n <ng-content select=\"ard-error, [ard-error]\" />\r\n </div>\r\n } @else {\r\n <div class=\"ard-form-field__hints-left\">\r\n <div class=\"ard-form-field__default-hint\">\r\n <ng-content select=\"ard-hint:not([left]):not([right]), [ard-hint]:not([left]):not([right])\" />\r\n </div>\r\n <ng-content select=\"ard-hint[left], [ard-hint][left]\" />\r\n </div>\r\n <div class=\"ard-form-field__hints-right\">\r\n <div class=\"ard-form-field__default-hint\">\r\n <ng-content select=\"ard-hint:not([left]):not([right]), [ard-hint]:not([left]):not([right])\" />\r\n </div>\r\n <ng-content select=\"ard-hint[right], [ard-hint][right]\" />\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block}.ard-horizontal-form-field{display:flex}.ard-form-field__hints{display:flex;justify-content:space-between}.ard-form-field__hints>*{display:flex;flex-direction:column}\n"] }]
|
|
9054
|
+
}] });
|
|
9055
|
+
|
|
8784
9056
|
class ArdiumFormFieldModule {
|
|
8785
9057
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
8786
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ArdiumFormFieldModule, declarations: [ArdiumFormFieldComponent,
|
|
9058
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: ArdiumFormFieldModule, declarations: [ArdiumFormFieldComponent,
|
|
9059
|
+
ArdiumHorizontalFormFieldComponent,
|
|
9060
|
+
ArdiumLabelComponent,
|
|
9061
|
+
ArdiumHintComponent,
|
|
9062
|
+
ArdiumErrorComponent], imports: [CommonModule, ArdiumHintDirective, ArdiumErrorDirective], exports: [ArdiumFormFieldComponent,
|
|
9063
|
+
ArdiumHorizontalFormFieldComponent,
|
|
9064
|
+
ArdiumLabelComponent,
|
|
9065
|
+
ArdiumHintComponent,
|
|
9066
|
+
ArdiumErrorComponent] }); }
|
|
8787
9067
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumFormFieldModule, imports: [CommonModule] }); }
|
|
8788
9068
|
}
|
|
8789
9069
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumFormFieldModule, decorators: [{
|
|
8790
9070
|
type: NgModule,
|
|
8791
9071
|
args: [{
|
|
8792
|
-
declarations: [
|
|
9072
|
+
declarations: [
|
|
9073
|
+
ArdiumFormFieldComponent,
|
|
9074
|
+
ArdiumHorizontalFormFieldComponent,
|
|
9075
|
+
ArdiumLabelComponent,
|
|
9076
|
+
ArdiumHintComponent,
|
|
9077
|
+
ArdiumErrorComponent,
|
|
9078
|
+
],
|
|
8793
9079
|
imports: [CommonModule, ArdiumHintDirective, ArdiumErrorDirective],
|
|
8794
|
-
exports: [
|
|
9080
|
+
exports: [
|
|
9081
|
+
ArdiumFormFieldComponent,
|
|
9082
|
+
ArdiumHorizontalFormFieldComponent,
|
|
9083
|
+
ArdiumLabelComponent,
|
|
9084
|
+
ArdiumHintComponent,
|
|
9085
|
+
ArdiumErrorComponent,
|
|
9086
|
+
],
|
|
8795
9087
|
}]
|
|
8796
9088
|
}] });
|
|
8797
9089
|
|
|
@@ -10299,7 +10591,7 @@ class ArdiumTableComponent extends _FocusableComponentBase {
|
|
|
10299
10591
|
};
|
|
10300
10592
|
}
|
|
10301
10593
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumTableComponent, deps: [{ token: ARD_TABLE_DEFAULTS }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10302
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumTableComponent, selector: "ard-table", inputs: { rowDisabledFrom: { classPropertyName: "rowDisabledFrom", publicName: "rowDisabledFrom", isSignal: true, isRequired: false, transformFunction: null }, rowBoldFrom: { classPropertyName: "rowBoldFrom", publicName: "rowBoldFrom", isSignal: true, isRequired: false, transformFunction: null }, invertRowDisabled: { classPropertyName: "invertRowDisabled", publicName: "invertRowDisabled", isSignal: true, isRequired: false, transformFunction: null }, invertRowBold: { classPropertyName: "invertRowBold", publicName: "invertRowBold", isSignal: true, isRequired: false, transformFunction: null }, selectableRows: { classPropertyName: "selectableRows", publicName: "selectableRows", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedItems: { classPropertyName: "maxSelectedItems", publicName: "maxSelectedItems", isSignal: true, isRequired: false, transformFunction: null }, clickableRows: { classPropertyName: "clickableRows", publicName: "clickableRows", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, loadingProgress: { classPropertyName: "loadingProgress", publicName: "loadingProgress", isSignal: true, isRequired: false, transformFunction: null }, loadingProgressBuffer: { classPropertyName: "loadingProgressBuffer", publicName: "loadingProgressBuffer", isSignal: true, isRequired: false, transformFunction: null }, loadingBarMode: { classPropertyName: "loadingBarMode", publicName: "loadingBarMode", isSignal: true, isRequired: false, transformFunction: null }, loadingBarColor: { classPropertyName: "loadingBarColor", publicName: "loadingBarColor", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, headerAlign: { classPropertyName: "headerAlign", publicName: "headerAlign", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "zebra", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, paginated: { classPropertyName: "paginated", publicName: "paginated", isSignal: true, isRequired: false, transformFunction: null }, paginationStrategy: { classPropertyName: "paginationStrategy", publicName: "paginationStrategy", isSignal: true, isRequired: false, transformFunction: null }, paginationOptions: { classPropertyName: "paginationOptions", publicName: "paginationOptions", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, paginationColor: { classPropertyName: "paginationColor", publicName: "paginationColor", isSignal: true, isRequired: false, transformFunction: null }, paginationAlign: { classPropertyName: "paginationAlign", publicName: "paginationAlign", isSignal: true, isRequired: false, transformFunction: null }, itemsPerPageText: { classPropertyName: "itemsPerPageText", publicName: "itemsPerPageText", isSignal: true, isRequired: false, transformFunction: null }, currentItemsFormatFn: { classPropertyName: "currentItemsFormatFn", publicName: "currentItemsFormatFn", isSignal: true, isRequired: false, transformFunction: null }, pageFillRemaining: { classPropertyName: "pageFillRemaining", publicName: "pageFillRemaining", isSignal: true, isRequired: false, transformFunction: null }, paginationDisabled: { classPropertyName: "paginationDisabled", publicName: "paginationDisabled", isSignal: true, isRequired: false, transformFunction: null }, useFirstLastButtons: { classPropertyName: "useFirstLastButtons", publicName: "useFirstLastButtons", isSignal: true, isRequired: false, transformFunction: null }, itemsPerPage: { classPropertyName: "itemsPerPage", publicName: "itemsPerPage", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: false, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: false, isRequired: false, transformFunction: null }, treatDataSourceAsString: { classPropertyName: "treatDataSourceAsString", publicName: "treatDataSourceAsString", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemsPerPage: "itemsPerPageChange", page: "pageChange", selectedRowsChangeEvent: "selectedRowsChange", failedSelectRowEvent: "failedSelectRow", selectRowEvent: "selectRow", unselectRowEvent: "unselectRow", clickRowEvent: "clickRow" }, queries: [{ propertyName: "checkboxTemplate", first: true, predicate: ArdiumTableCheckboxTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "headerCheckboxTemplate", first: true, predicate: ArdiumTableHeaderCheckboxTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "captionTemplate", first: true, predicate: ArdiumTableCaptionTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "templateChildren", predicate: ArdiumTableTemplateDirective, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<table\n class=\"ard-table\"\n [ngClass]=\"ngClasses()\"\n>\n @if (caption()) {\n <caption class=\"ard-table__caption\">\n <div class=\"ard-table__caption-container\">\n <ng-template\n #defaultCaptionTemplate\n let-captionText\n >\n {{ captionText }}\n </ng-template>\n\n <ng-template\n [ngTemplateOutlet]=\"captionTemplate() ?? defaultCaptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: caption() }\"\n />\n </div>\n </caption>\n }\n <thead class=\"ard-table__header\">\n @for (row of headerCells(); track $index) {\n <tr class=\"ard-table__header-row\">\n @for (cell of row; track $index) {\n <th\n class=\"ard-table__header-cell\"\n [ngClass]=\"cell.cell().cellClass\"\n [class.ard-table__checkbox-cell]=\"isHeaderCellCheckbox(cell)\"\n [attr.colspan]=\"cell.colspan()\"\n [attr.rowspan]=\"cell.rowspan()\"\n [scope]=\"cell.colspan() > 1 ? 'colgroup' : 'col'\"\n >\n <div\n class=\"ard-table__cell-container\"\n [class.ard-table__sortable]=\"isHeaderCellSortable(cell)\"\n [style.width]=\"cell.width\"\n [style.minWidth]=\"cell.minWidth\"\n >\n @if (isHeaderCellCheckbox(cell)) {\n <ng-template\n #defaultHeaderCheckboxTemplate\n let-state\n let-onChange=\"onChange\"\n >\n <ard-checkbox\n [tabIndex]=\"isLoading() ? -1 : tabIndex()\"\n [state]=\"state\"\n [color]=\"getHeaderCheckboxColor()\"\n unselectedColor=\"currentColor\"\n (change)=\"onChange()\"\n />\n </ng-template>\n\n <ng-template\n [ngTemplateOutlet]=\"headerCheckboxTemplate() ?? defaultHeaderCheckboxTemplate\"\n [ngTemplateOutletContext]=\"getHeaderCheckboxContext()\"\n />\n } @else {\n <ng-template\n #defaultHeaderCellTemplate\n let-content\n let-sortable=\"sortable\"\n let-sortType=\"sortType\"\n let-onTriggerSort=\"onTriggerSort\"\n let-onTriggerResetSort=\"onTriggerResetSort\"\n >\n <div\n class=\"ard-table__header-template-container\"\n [class.ard-sortable]=\"sortable\"\n [class.ard-nonsortable]=\"!sortable\"\n >\n @if (sortable) {\n <button\n type=\"button\"\n class=\"ard-table__header-content-container\"\n (click)=\"onTriggerSort($event)\"\n [tabindex]=\"tabIndex()\"\n (keydown.Esc)=\"onTriggerResetSort($event)\"\n >\n <div class=\"ard-table__header-content\">{{ content }}</div>\n @if (sortType !== null) {\n <div class=\"ard-table__header-sort-icon\">\n @if (sortType === 'ascending') {\n <ard-icon>south</ard-icon>\n } @else if (sortType === 'descending') {\n <ard-icon>north</ard-icon>\n }\n </div>\n }\n </button>\n } @else {\n <div class=\"ard-table__header-content-container\">\n <div class=\"ard-table__header-content\">{{ content }}</div>\n </div>\n }\n </div>\n </ng-template>\n\n <ng-template\n [ngTemplateOutlet]=\"getHeaderTemplate(cell.cell().header) ?? defaultHeaderCellTemplate\"\n [ngTemplateOutletContext]=\"getHeaderContext(cell.cell(), $index)\"\n />\n }\n </div>\n </th>\n }\n </tr>\n }\n <tr class=\"ard-table__progress-bar-row\">\n <th\n class=\"ard-table__progress-bar-cell\"\n colspan=\"9999\"\n >\n @if (isLoading()) {\n <ard-progress-bar\n [value]=\"loadingProgress()\"\n [bufferValue]=\"loadingProgressBuffer()\"\n [mode]=\"loadingBarMode()\"\n [color]=\"loadingBarColor()\"\n variant=\"sharp\"\n hideValue\n />\n }\n </th>\n </tr>\n </thead>\n <tbody class=\"ard-table__body\">\n @for (row of dataRows(); track $index) {\n @if (row.isEmpty()) {\n <tr class=\"ard-table__empty-row\">\n <td\n class=\"ard-table__empty-cell\"\n colspan=\"9999\"\n ></td>\n </tr>\n } @else {\n <tr\n class=\"ard-table__body-row\"\n [class.ard-table__selected-row]=\"row.selected()\"\n [class.ard-table__highlighted-row]=\"row.highlighted()\"\n [class.ard-table__disabled-row]=\"row.disabled()\"\n [class.ard-table__bold-row]=\"row.bold()\"\n (click)=\"onRowClick(row, $event)\"\n (mouseover)=\"onRowMouseOver($event)\"\n (mouseenter)=\"onRowMouseEnter(row.index(), $event)\"\n (mouseleave)=\"onRowMouseLeave(row.index(), $event)\"\n >\n @for (cell of row.data(); track $index) {\n <ng-template #cellTmp>\n <div\n class=\"ard-table__cell-container\"\n [style]=\"getCellStyle(row.dataColumns()[$index])\"\n >\n @if (isCellCheckbox(cell)) {\n <ng-template\n #defaultCheckboxTemplate\n let-isChecked\n let-onChange=\"onChange\"\n let-disabled=\"disabled\"\n >\n <ard-checkbox\n [tabIndex]=\"isLoading() ? -1 : tabIndex()\"\n [selected]=\"isChecked\"\n [color]=\"color()\"\n [disabled]=\"disabled\"\n (change)=\"onChange()\"\n (click)=\"$event.stopPropagation()\"\n />\n </ng-template>\n\n <ng-template\n [ngTemplateOutlet]=\"checkboxTemplate() ?? defaultCheckboxTemplate\"\n [ngTemplateOutletContext]=\"getCheckboxContext(row.index())\"\n />\n } @else {\n <ng-template\n #defaultCellTemplate\n let-content\n >\n {{ content }}\n </ng-template>\n\n <ng-template\n [ngTemplateOutlet]=\"getCellTemplate(row.dataColumns()[$index].template) ?? defaultCellTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: cell }\"\n />\n }\n </div>\n </ng-template>\n @if (!row.dataColumns()[$index].isRowHeader) {\n <td\n class=\"ard-table__body-cell\"\n [ngClass]=\"row.dataColumns()[$index].cellClass\"\n [class.ard-table__checkbox-cell]=\"isCellCheckbox(cell)\"\n >\n <ng-template [ngTemplateOutlet]=\"cellTmp\"></ng-template>\n </td>\n } @else {\n <th\n class=\"ard-table__body-cell ard-table__row-header\"\n scope=\"row\"\n [ngClass]=\"row.dataColumns()[$index].cellClass\"\n [class.ard-table__checkbox-cell]=\"isCellCheckbox(cell)\"\n >\n <ng-template [ngTemplateOutlet]=\"cellTmp\"></ng-template>\n </th>\n }\n }\n </tr>\n }\n }\n </tbody>\n @if (canDisplayPagination()) {\n <tfoot class=\"ard-table__foot\">\n <tr class=\"ard-table__foot-row\">\n <td\n class=\"ard-table__pagination-cell\"\n colspan=\"9999\"\n >\n <ard-table-pagination\n [options]=\"paginationOptions()\"\n [totalItems]=\"totalItems()!\"\n [disabled]=\"paginationDisabled()\"\n [(itemsPerPage)]=\"itemsPerPage\"\n [(page)]=\"page\"\n [align]=\"paginationAlign()\"\n [isLoading]=\"isLoading()\"\n [itemsPerPageText]=\"itemsPerPageText()\"\n [currentItemsFormatFn]=\"currentItemsFormatFn()\"\n />\n </td>\n </tr>\n </tfoot>\n }\n</table>\n", styles: [".ard-table__cell-container,.ard-table__header-template-container{width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumCheckboxComponent, selector: "ard-checkbox", inputs: ["htmlId", "color", "unselectedColor", "state"], outputs: ["stateChange"] }, { kind: "component", type: ArdiumTablePaginationComponent, selector: "ard-table-pagination", inputs: ["totalItems", "options", "itemsPerPage", "page", "color", "align", "compact", "useFirstLastButtons", "isLoading", "itemsPerPageText", "currentItemsFormatFn"], outputs: ["itemsPerPageChange", "pageChange"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }, { kind: "component", type: ArdiumProgressBarComponent, selector: "ard-progress-bar", inputs: ["value", "bufferValue", "color", "variant", "size", "mode", "hideValue"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
10594
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ArdiumTableComponent, selector: "ard-table", inputs: { rowDisabledFrom: { classPropertyName: "rowDisabledFrom", publicName: "rowDisabledFrom", isSignal: true, isRequired: false, transformFunction: null }, rowBoldFrom: { classPropertyName: "rowBoldFrom", publicName: "rowBoldFrom", isSignal: true, isRequired: false, transformFunction: null }, invertRowDisabled: { classPropertyName: "invertRowDisabled", publicName: "invertRowDisabled", isSignal: true, isRequired: false, transformFunction: null }, invertRowBold: { classPropertyName: "invertRowBold", publicName: "invertRowBold", isSignal: true, isRequired: false, transformFunction: null }, selectableRows: { classPropertyName: "selectableRows", publicName: "selectableRows", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedItems: { classPropertyName: "maxSelectedItems", publicName: "maxSelectedItems", isSignal: true, isRequired: false, transformFunction: null }, clickableRows: { classPropertyName: "clickableRows", publicName: "clickableRows", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, loadingProgress: { classPropertyName: "loadingProgress", publicName: "loadingProgress", isSignal: true, isRequired: false, transformFunction: null }, loadingProgressBuffer: { classPropertyName: "loadingProgressBuffer", publicName: "loadingProgressBuffer", isSignal: true, isRequired: false, transformFunction: null }, loadingBarMode: { classPropertyName: "loadingBarMode", publicName: "loadingBarMode", isSignal: true, isRequired: false, transformFunction: null }, loadingBarColor: { classPropertyName: "loadingBarColor", publicName: "loadingBarColor", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, headerAlign: { classPropertyName: "headerAlign", publicName: "headerAlign", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "zebra", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, paginated: { classPropertyName: "paginated", publicName: "paginated", isSignal: true, isRequired: false, transformFunction: null }, paginationStrategy: { classPropertyName: "paginationStrategy", publicName: "paginationStrategy", isSignal: true, isRequired: false, transformFunction: null }, paginationOptions: { classPropertyName: "paginationOptions", publicName: "paginationOptions", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, paginationColor: { classPropertyName: "paginationColor", publicName: "paginationColor", isSignal: true, isRequired: false, transformFunction: null }, paginationAlign: { classPropertyName: "paginationAlign", publicName: "paginationAlign", isSignal: true, isRequired: false, transformFunction: null }, itemsPerPageText: { classPropertyName: "itemsPerPageText", publicName: "itemsPerPageText", isSignal: true, isRequired: false, transformFunction: null }, currentItemsFormatFn: { classPropertyName: "currentItemsFormatFn", publicName: "currentItemsFormatFn", isSignal: true, isRequired: false, transformFunction: null }, pageFillRemaining: { classPropertyName: "pageFillRemaining", publicName: "pageFillRemaining", isSignal: true, isRequired: false, transformFunction: null }, paginationDisabled: { classPropertyName: "paginationDisabled", publicName: "paginationDisabled", isSignal: true, isRequired: false, transformFunction: null }, useFirstLastButtons: { classPropertyName: "useFirstLastButtons", publicName: "useFirstLastButtons", isSignal: true, isRequired: false, transformFunction: null }, itemsPerPage: { classPropertyName: "itemsPerPage", publicName: "itemsPerPage", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: false, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: false, isRequired: false, transformFunction: null }, treatDataSourceAsString: { classPropertyName: "treatDataSourceAsString", publicName: "treatDataSourceAsString", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemsPerPage: "itemsPerPageChange", page: "pageChange", selectedRowsChangeEvent: "selectedRowsChange", failedSelectRowEvent: "failedSelectRow", selectRowEvent: "selectRow", unselectRowEvent: "unselectRow", clickRowEvent: "clickRow" }, queries: [{ propertyName: "checkboxTemplate", first: true, predicate: ArdiumTableCheckboxTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "headerCheckboxTemplate", first: true, predicate: ArdiumTableHeaderCheckboxTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "captionTemplate", first: true, predicate: ArdiumTableCaptionTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "templateChildren", predicate: ArdiumTableTemplateDirective, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<table\n class=\"ard-table\"\n [ngClass]=\"ngClasses()\"\n>\n @if (caption()) {\n <caption class=\"ard-table__caption\">\n <div class=\"ard-table__caption-container\">\n <ng-template\n #defaultCaptionTemplate\n let-captionText\n >\n {{ captionText }}\n </ng-template>\n\n <ng-template\n [ngTemplateOutlet]=\"captionTemplate() ?? defaultCaptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: caption() }\"\n />\n </div>\n </caption>\n }\n <thead class=\"ard-table__header\">\n @for (row of headerCells(); track $index) {\n <tr class=\"ard-table__header-row\">\n @for (cell of row; track $index) {\n <th\n class=\"ard-table__header-cell\"\n [ngClass]=\"cell.cell().cellClass\"\n [class.ard-table__checkbox-cell]=\"isHeaderCellCheckbox(cell)\"\n [attr.colspan]=\"cell.colspan()\"\n [attr.rowspan]=\"cell.rowspan()\"\n [scope]=\"cell.colspan() > 1 ? 'colgroup' : 'col'\"\n >\n <div\n class=\"ard-table__cell-container\"\n [class.ard-table__sortable]=\"isHeaderCellSortable(cell)\"\n [style.width]=\"cell.width\"\n [style.minWidth]=\"cell.minWidth\"\n >\n @if (isHeaderCellCheckbox(cell)) {\n <ng-template\n #defaultHeaderCheckboxTemplate\n let-state\n let-onChange=\"onChange\"\n >\n <ard-checkbox\n [tabIndex]=\"isLoading() ? -1 : tabIndex()\"\n [state]=\"state\"\n [color]=\"getHeaderCheckboxColor()\"\n unselectedColor=\"currentColor\"\n (change)=\"onChange()\"\n />\n </ng-template>\n\n <ng-template\n [ngTemplateOutlet]=\"headerCheckboxTemplate() ?? defaultHeaderCheckboxTemplate\"\n [ngTemplateOutletContext]=\"getHeaderCheckboxContext()\"\n />\n } @else {\n <ng-template\n #defaultHeaderCellTemplate\n let-content\n let-sortable=\"sortable\"\n let-sortType=\"sortType\"\n let-onTriggerSort=\"onTriggerSort\"\n let-onTriggerResetSort=\"onTriggerResetSort\"\n >\n <div\n class=\"ard-table__header-template-container\"\n [class.ard-sortable]=\"sortable\"\n [class.ard-nonsortable]=\"!sortable\"\n >\n @if (sortable) {\n <button\n type=\"button\"\n class=\"ard-table__header-content-container\"\n (click)=\"onTriggerSort($event)\"\n [tabindex]=\"tabIndex()\"\n (keydown.Esc)=\"onTriggerResetSort($event)\"\n >\n <div class=\"ard-table__header-content\">{{ content }}</div>\n @if (sortType !== null) {\n <div class=\"ard-table__header-sort-icon\">\n @if (sortType === 'ascending') {\n <ard-icon>south</ard-icon>\n } @else if (sortType === 'descending') {\n <ard-icon>north</ard-icon>\n }\n </div>\n }\n </button>\n } @else {\n <div class=\"ard-table__header-content-container\">\n <div class=\"ard-table__header-content\">{{ content }}</div>\n </div>\n }\n </div>\n </ng-template>\n\n <ng-template\n [ngTemplateOutlet]=\"getHeaderTemplate(cell.cell().header) ?? defaultHeaderCellTemplate\"\n [ngTemplateOutletContext]=\"getHeaderContext(cell.cell(), $index)\"\n />\n }\n </div>\n </th>\n }\n </tr>\n }\n <tr class=\"ard-table__progress-bar-row\">\n <th\n class=\"ard-table__progress-bar-cell\"\n colspan=\"9999\"\n >\n @if (isLoading()) {\n <ard-progress-bar\n [value]=\"loadingProgress()\"\n [bufferValue]=\"loadingProgressBuffer()\"\n [mode]=\"loadingBarMode()\"\n [color]=\"loadingBarColor()\"\n variant=\"sharp\"\n hideValue\n />\n }\n </th>\n </tr>\n </thead>\n <tbody class=\"ard-table__body\">\n @for (row of dataRows(); track $index) {\n @if (row.isEmpty()) {\n <tr class=\"ard-table__empty-row\">\n <td\n class=\"ard-table__empty-cell\"\n colspan=\"9999\"\n ></td>\n </tr>\n } @else {\n <tr\n class=\"ard-table__body-row\"\n [class.ard-table__selected-row]=\"row.selected()\"\n [class.ard-table__highlighted-row]=\"row.highlighted()\"\n [class.ard-table__disabled-row]=\"row.disabled()\"\n [class.ard-table__bold-row]=\"row.bold()\"\n (click)=\"onRowClick(row, $event)\"\n (mouseover)=\"onRowMouseOver($event)\"\n (mouseenter)=\"onRowMouseEnter(row.index(), $event)\"\n (mouseleave)=\"onRowMouseLeave(row.index(), $event)\"\n >\n @for (cell of row.data(); track $index) {\n <ng-template #cellTmp>\n <div\n class=\"ard-table__cell-container\"\n [style]=\"getCellStyle(row.dataColumns()[$index])\"\n >\n @if (isCellCheckbox(cell)) {\n <ng-template\n #defaultCheckboxTemplate\n let-isChecked\n let-onChange=\"onChange\"\n let-disabled=\"disabled\"\n >\n <ard-checkbox\n [tabIndex]=\"isLoading() ? -1 : tabIndex()\"\n [selected]=\"isChecked\"\n [color]=\"color()\"\n [disabled]=\"disabled\"\n (change)=\"onChange()\"\n (click)=\"$event.stopPropagation()\"\n />\n </ng-template>\n\n <ng-template\n [ngTemplateOutlet]=\"checkboxTemplate() ?? defaultCheckboxTemplate\"\n [ngTemplateOutletContext]=\"getCheckboxContext(row.index())\"\n />\n } @else {\n <ng-template\n #defaultCellTemplate\n let-content\n >\n {{ content }}\n </ng-template>\n\n <ng-template\n [ngTemplateOutlet]=\"getCellTemplate(row.dataColumns()[$index].template) ?? defaultCellTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: cell }\"\n />\n }\n </div>\n </ng-template>\n @if (!row.dataColumns()[$index].isRowHeader) {\n <td\n class=\"ard-table__body-cell\"\n [ngClass]=\"row.dataColumns()[$index].cellClass\"\n [class.ard-table__checkbox-cell]=\"isCellCheckbox(cell)\"\n >\n <ng-template [ngTemplateOutlet]=\"cellTmp\"></ng-template>\n </td>\n } @else {\n <th\n class=\"ard-table__body-cell ard-table__row-header\"\n scope=\"row\"\n [ngClass]=\"row.dataColumns()[$index].cellClass\"\n [class.ard-table__checkbox-cell]=\"isCellCheckbox(cell)\"\n >\n <ng-template [ngTemplateOutlet]=\"cellTmp\"></ng-template>\n </th>\n }\n }\n </tr>\n }\n }\n </tbody>\n @if (canDisplayPagination()) {\n <tfoot class=\"ard-table__foot\">\n <tr class=\"ard-table__foot-row\">\n <td\n class=\"ard-table__pagination-cell\"\n colspan=\"9999\"\n >\n <ard-table-pagination\n [options]=\"paginationOptions()\"\n [totalItems]=\"totalItems()!\"\n [disabled]=\"paginationDisabled()\"\n [(itemsPerPage)]=\"itemsPerPage\"\n [(page)]=\"page\"\n [align]=\"paginationAlign()\"\n [isLoading]=\"isLoading()\"\n [itemsPerPageText]=\"itemsPerPageText()\"\n [currentItemsFormatFn]=\"currentItemsFormatFn()\"\n />\n </td>\n </tr>\n </tfoot>\n }\n</table>\n", styles: [".ard-table__cell-container,.ard-table__header-template-container{width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumCheckboxComponent, selector: "ard-checkbox", inputs: ["color", "unselectedColor", "state"], outputs: ["stateChange"] }, { kind: "component", type: ArdiumTablePaginationComponent, selector: "ard-table-pagination", inputs: ["totalItems", "options", "itemsPerPage", "page", "color", "align", "compact", "useFirstLastButtons", "isLoading", "itemsPerPageText", "currentItemsFormatFn"], outputs: ["itemsPerPageChange", "pageChange"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }, { kind: "component", type: ArdiumProgressBarComponent, selector: "ard-progress-bar", inputs: ["value", "bufferValue", "color", "variant", "size", "mode", "hideValue"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
10303
10595
|
}
|
|
10304
10596
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ArdiumTableComponent, decorators: [{
|
|
10305
10597
|
type: Component,
|
|
@@ -11603,5 +11895,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
11603
11895
|
* Generated bundle index. Do not edit.
|
|
11604
11896
|
*/
|
|
11605
11897
|
|
|
11606
|
-
export { ARD_BADGE_DEFAULTS, ARD_BUTTON_DEFAULTS, ARD_CARD_DEFAULTS, ARD_CHECKBOX_DEFAULTS, ARD_CHECKBOX_LIST_DEFAULTS, ARD_CHIP_DEFAULTS, ARD_COLOR_DISPLAY_DEFAULTS, ARD_DELETABLE_CHIP_DEFAULTS, ARD_DIALOG_DEFAULTS, ARD_DIGIT_INPUT_DEFAULTS, ARD_DIVIDER_DEFAULTS, ARD_DROPDOWN_PANEL_DEFAULTS, ARD_FAB_DEFAULTS, ARD_FILE_DROP_AREA_DEFAULTS, ARD_FILE_INPUT_DEFAULTS, ARD_FORM_FIELD_FRAME_DEFAULTS, ARD_HEX_INPUT_DEFAULTS, ARD_ICON_BUTTON_DEFAULTS, ARD_ICON_DEFAULTS, ARD_KBD_DEFAULTS, ARD_KBD_SHORTCUT_DEFAULTS, ARD_MODAL_DEFAULTS, ARD_NUMBER_INPUT_DEFAULTS, ARD_PASSWORD_INPUT_DEFAULTS, ARD_PROGRESS_BAR_DEFAULTS, ARD_PROGRESS_CIRCLE_DEFAULTS, ARD_RADIO_DEFAULTS, ARD_SEGMENT_DEFAULTS, ARD_SELECTABLE_CHIP_DEFAULTS, ARD_SELECT_DEFAULTS, ARD_SIMPLE_INPUT_DEFAULTS, ARD_SLIDER_DEFAULTS, ARD_SLIDE_TOGGLE_DEFAULTS, ARD_SNACKBAR_ANIMATION_LENGTH, ARD_SNACKBAR_DATA, ARD_SNACKBAR_DEFAULTS, ARD_SPINNER_DEFAULTS, ARD_STAR_BUTTON_DEFAULTS, ARD_STAR_DEFAULTS, ARD_STAR_DISPLAY_DEFAULTS, ARD_STAR_INPUT_DEFAULTS, ARD_STATEBOX_DEFAULTS, ARD_TABBER_DEFAULTS, ARD_TABLE_DEFAULTS, ARD_TABLE_FROM_CSV_DEFAULTS, ARD_TABLE_PAGINATION_DEFAULTS, ARD_TAB_DEFAULTS, ArdAddCustomTemplateDirective, ArdDialogButtonsTemplateDirective, ArdDropdownFooterTemplateDirective, ArdDropdownHeaderTemplateDirective, ArdFileInputPlaceholderTemplateDirective, ArdFileInputPrefixTemplateDirective, ArdFileInputSuffixTemplateDirective, ArdFormFieldPrefixTemplateDirective, ArdFormFieldSuffixTemplateDirective, ArdHexInputPlaceholderTemplateDirective, ArdHexInputPrefixTemplateDirective, ArdHexInputSuffixTemplateDirective, ArdInputLoadingTemplateDirective, ArdInputPlaceholderTemplateDirective, ArdInputPrefixTemplateDirective, ArdInputSuffixTemplateDirective, ArdInputSuggestionTemplateDirective, ArdItemDisplayLimitTemplateDirective, ArdItemLimitReachedTemplateDirective, ArdLoadingPlaceholderTemplateDirective, ArdLoadingSpinnerTemplateDirective, ArdNoItemsFoundTemplateDirective, ArdNumberInputPlaceholderTemplateDirective, ArdOptgroupTemplateDirective, ArdOptionTemplateDirective, ArdPanelPosition, ArdPasswordInputPlaceholderTemplateDirective, ArdPasswordInputPrefixTemplateDirective, ArdPasswordInputRevealButtonTemplateDirective, ArdPasswordInputSuffixTemplateDirective, ArdProgressBarValueTemplateDirective, ArdProgressCircleValueTemplateDirective, searchFunctions as ArdSearchFunction, ArdSegmentOptionTemplateDirective, ArdSelectPlaceholderTemplateDirective, ArdSelectPrefixTemplateDirective, ArdSelectSuffixTemplateDirective, ArdSimpleInputPlaceholderTemplateDirective, ArdSimpleInputPrefixTemplateDirective, ArdSimpleInputSuffixTemplateDirective, ArdSlideToggleAppearance, ArdSliderTooltipDirective, ArdSnackbarAlignment, ArdSnackbarOriginRelation, ArdSnackbarQueueHandling, ArdSnackbarRef, ArdSnackbarType, ArdValueChipTemplateDirective, ArdValueTemplateDirective, ArdiumBadgeDirective, ArdiumBadgeModule, ArdiumButtonComponent, ArdiumButtonModule, ArdiumCardActionButtonsDirective, ArdiumCardAvatarDirective, ArdiumCardComponent, ArdiumCardContentDirective, ArdiumCardDirective, ArdiumCardFooterDirective, ArdiumCardHeaderComponent, ArdiumCardImageDirective, ArdiumCardModule, ArdiumCardSubtitleDirective, ArdiumCardTitleDirective, ArdiumCheckboxComponent, ArdiumCheckboxListComponent, ArdiumCheckboxListModule, ArdiumCheckboxModule, ArdiumChipComponent, ArdiumChipModule, ArdiumColorDisplayComponent, ArdiumColorDisplayModule, ArdiumDeletableChipComponent, ArdiumDialogComponent, ArdiumDialogModule, ArdiumDigitInputComponent, ArdiumDigitInputModule, ArdiumDividerComponent, ArdiumDividerModule, ArdiumDropdownPanelComponent, ArdiumDropdownPanelModule, ArdiumErrorComponent, ArdiumErrorDirective, ArdiumFabComponent, ArdiumFabModule, ArdiumFileDropAreaComponent, ArdiumFileDropAreaDragoverContentTemplateDirective, ArdiumFileDropAreaIdleContentTemplateDirective, ArdiumFileDropAreaModule, ArdiumFileDropAreaUploadedContentTemplateDirective, ArdiumFileInputComponent, ArdiumFileInputDragoverContentTemplateDirective, ArdiumFileInputIdleContentTemplateDirective, ArdiumFileInputModule, ArdiumFileInputUploadedContentTemplateDirective, ArdiumFormFieldComponent, ArdiumFormFieldFrameComponent, ArdiumFormFieldFrameModule, ArdiumFormFieldModule, ArdiumHexInputComponent, ArdiumHexInputModule, ArdiumHintComponent, ArdiumHintDirective, ArdiumIconButtonComponent, ArdiumIconButtonModule, ArdiumIconComponent, ArdiumIconModule, ArdiumIconPipe, ArdiumInputComponent, ArdiumInputModule, ArdiumKbdComponent, ArdiumKbdDirective, ArdiumKbdModule, ArdiumKbdPipe, ArdiumKbdShortcutComponent, ArdiumKbdShortcutModule, ArdiumLabelComponent, ArdiumModalComponent, ArdiumModalModule, ArdiumNumberInputComponent, ArdiumNumberInputModule, ArdiumOptionComponent, ArdiumOptionModule, ArdiumPasswordInputComponent, ArdiumPasswordInputModule, ArdiumProgressBarComponent, ArdiumProgressBarModule, ArdiumProgressCircleComponent, ArdiumProgressCircleModule, ArdiumRadioComponent, ArdiumRadioGroupComponent, ArdiumRadioModule, ArdiumRangeSliderComponent, ArdiumRangeSliderModule, ArdiumSegmentComponent, ArdiumSegmentModule, ArdiumSelectComponent, ArdiumSelectModule, ArdiumSelectableChipComponent, ArdiumSimpleInputComponent, ArdiumSimpleInputModule, ArdiumSlideToggleComponent, ArdiumSlideToggleModule, ArdiumSliderComponent, ArdiumSliderModule, ArdiumSnackbarService, ArdiumSpinnerComponent, ArdiumSpinnerModule, ArdiumStarButtonComponent, ArdiumStarButtonModule, ArdiumStarComponent, ArdiumStarDisplayComponent, ArdiumStarDisplayModule, ArdiumStarInputComponent, ArdiumStarInputModule, ArdiumStarModule, ArdiumStateboxComponent, ArdiumStateboxModule, ArdiumTabComponent, ArdiumTabberComponent, ArdiumTabberModule, ArdiumTableCaptionTemplateDirective, ArdiumTableCheckboxTemplateDirective, ArdiumTableComponent, ArdiumTableFromCsvComponent, ArdiumTableFromCsvModule, ArdiumTableHeaderCheckboxTemplateDirective, ArdiumTableModule, ArdiumTablePaginationComponent, ArdiumTablePaginationModule, ArdiumTablePaginationTemplateDirective, ArdiumTableTemplateDirective, ArdiumTextListComponent, ArdiumTextListModule, ArdiumTextListPipe, BadgePosition, BadgeSize, ButtonAppearance, ButtonVariant, CardAppearance, CardVariant, CheckboxListAlignType, CheckboxState, ClickStrategy, ColorDisplayAppearance, ComponentColor, DecorationElementAppearance, DialogResult, DigitInputPrimitiveOption, DigitInputShape, DropdownPanelAppearance, DropdownPanelVariant, FabSize, FormElementAppearance, FormElementVariant, OneAxisAlignment, OutlinedAppearance, PaginationAlign, PanelAppearance, PanelVariant, ProgressBarAppearance, ProgressBarMode, ProgressBarSize, ProgressBarVariant, ProgressCircleAppearance, ProgressCircleVariant, SegmentAppearance, SegmentVariant, SimpleComponentColor, SimpleOneAxisAlignment, SliderDecorationPosition, SliderTooltipBehavior, SortType, StarColor, StarFillMode, TableAlignType, TableAppearance, TablePaginationStrategy, TableVariant, TransformType, _chipDefaults, _modalDefaults, provideBadgeDefaults, provideButtonDefaults, provideCardDefaults, provideCheckboxDefaults, provideCheckboxListDefaults, provideChipDefaults, provideColorDisplayDefaults, provideDeletableChipDefaults, provideDialogDefaults, provideDigitInputDefaults, provideDividerDefaults, provideDropdownPanelDefaults, provideFabDefaults, provideFileDropAreaDefaults, provideFileInputDefaults, provideFormFieldFrameDefaults, provideHexInputDefaults, provideIconButtonDefaults, provideIconDefaults, provideKbdDefaults, provideKbdShortcutDefaults, provideModalDefaults, provideNumberInputDefaults, providePasswordInputDefaults, provideProgressBarDefaults, provideProgressCircleDefaults, provideRadioDefaults, provideSegmentDefaults, provideSelectDefaults, provideSelectableChipDefaults, provideSimpleInputDefaults, provideSlideToggleDefaults, provideSliderDefaults, provideSnackbarDefaults, provideSpinnerDefaults, provideStarButtonDefaults, provideStarDefaults, provideStarDisplayDefaults, provideStarInputDefaults, provideStateboxDefaults, provideTabDefaults, provideTabberDefaults, provideTableDefaults, provideTableFromCsvDefaults, provideTablePaginationDefaults, searchInString };
|
|
11898
|
+
export { ARD_BADGE_DEFAULTS, ARD_BUTTON_DEFAULTS, ARD_CARD_DEFAULTS, ARD_CHECKBOX_DEFAULTS, ARD_CHECKBOX_LIST_DEFAULTS, ARD_CHIP_DEFAULTS, ARD_COLOR_DISPLAY_DEFAULTS, ARD_DELETABLE_CHIP_DEFAULTS, ARD_DIALOG_DEFAULTS, ARD_DIGIT_INPUT_DEFAULTS, ARD_DIVIDER_DEFAULTS, ARD_DROPDOWN_PANEL_DEFAULTS, ARD_FAB_DEFAULTS, ARD_FILE_DROP_AREA_DEFAULTS, ARD_FILE_INPUT_DEFAULTS, ARD_FORM_FIELD_FRAME_DEFAULTS, ARD_HEX_INPUT_DEFAULTS, ARD_ICON_BUTTON_DEFAULTS, ARD_ICON_DEFAULTS, ARD_KBD_DEFAULTS, ARD_KBD_SHORTCUT_DEFAULTS, ARD_MODAL_DEFAULTS, ARD_NUMBER_INPUT_DEFAULTS, ARD_PASSWORD_INPUT_DEFAULTS, ARD_PROGRESS_BAR_DEFAULTS, ARD_PROGRESS_CIRCLE_DEFAULTS, ARD_RADIO_DEFAULTS, ARD_SEGMENT_DEFAULTS, ARD_SELECTABLE_CHIP_DEFAULTS, ARD_SELECT_DEFAULTS, ARD_SIMPLE_INPUT_DEFAULTS, ARD_SLIDER_DEFAULTS, ARD_SLIDE_TOGGLE_DEFAULTS, ARD_SNACKBAR_ANIMATION_LENGTH, ARD_SNACKBAR_DATA, ARD_SNACKBAR_DEFAULTS, ARD_SPINNER_DEFAULTS, ARD_STAR_BUTTON_DEFAULTS, ARD_STAR_DEFAULTS, ARD_STAR_DISPLAY_DEFAULTS, ARD_STAR_INPUT_DEFAULTS, ARD_STATEBOX_DEFAULTS, ARD_TABBER_DEFAULTS, ARD_TABLE_DEFAULTS, ARD_TABLE_FROM_CSV_DEFAULTS, ARD_TABLE_PAGINATION_DEFAULTS, ARD_TAB_DEFAULTS, ArdAddCustomTemplateDirective, ArdDialogButtonsTemplateDirective, ArdDropdownFooterTemplateDirective, ArdDropdownHeaderTemplateDirective, ArdFileInputPlaceholderTemplateDirective, ArdFileInputPrefixTemplateDirective, ArdFileInputSuffixTemplateDirective, ArdFormFieldPrefixTemplateDirective, ArdFormFieldSuffixTemplateDirective, ArdHexInputPlaceholderTemplateDirective, ArdHexInputPrefixTemplateDirective, ArdHexInputSuffixTemplateDirective, ArdInputLoadingTemplateDirective, ArdInputPlaceholderTemplateDirective, ArdInputPrefixTemplateDirective, ArdInputSuffixTemplateDirective, ArdInputSuggestionTemplateDirective, ArdItemDisplayLimitTemplateDirective, ArdItemLimitReachedTemplateDirective, ArdLoadingPlaceholderTemplateDirective, ArdLoadingSpinnerTemplateDirective, ArdNoItemsFoundTemplateDirective, ArdNumberInputPlaceholderTemplateDirective, ArdOptgroupTemplateDirective, ArdOptionTemplateDirective, ArdPanelPosition, ArdPasswordInputPlaceholderTemplateDirective, ArdPasswordInputPrefixTemplateDirective, ArdPasswordInputRevealButtonTemplateDirective, ArdPasswordInputSuffixTemplateDirective, ArdProgressBarValueTemplateDirective, ArdProgressCircleValueTemplateDirective, searchFunctions as ArdSearchFunction, ArdSegmentOptionTemplateDirective, ArdSelectPlaceholderTemplateDirective, ArdSelectPrefixTemplateDirective, ArdSelectSuffixTemplateDirective, ArdSimpleInputPlaceholderTemplateDirective, ArdSimpleInputPrefixTemplateDirective, ArdSimpleInputSuffixTemplateDirective, ArdSlideToggleAppearance, ArdSliderTooltipDirective, ArdSnackbarAlignment, ArdSnackbarOriginRelation, ArdSnackbarQueueHandling, ArdSnackbarRef, ArdSnackbarType, ArdValueChipTemplateDirective, ArdValueTemplateDirective, ArdiumBadgeDirective, ArdiumBadgeModule, ArdiumButtonComponent, ArdiumButtonModule, ArdiumCardActionButtonsDirective, ArdiumCardAvatarDirective, ArdiumCardComponent, ArdiumCardContentDirective, ArdiumCardDirective, ArdiumCardFooterDirective, ArdiumCardHeaderComponent, ArdiumCardImageDirective, ArdiumCardModule, ArdiumCardSubtitleDirective, ArdiumCardTitleDirective, ArdiumCheckboxComponent, ArdiumCheckboxListComponent, ArdiumCheckboxListModule, ArdiumCheckboxModule, ArdiumChipComponent, ArdiumChipModule, ArdiumColorDisplayComponent, ArdiumColorDisplayModule, ArdiumDeletableChipComponent, ArdiumDialogComponent, ArdiumDialogModule, ArdiumDigitInputComponent, ArdiumDigitInputModule, ArdiumDividerComponent, ArdiumDividerModule, ArdiumDropdownPanelComponent, ArdiumDropdownPanelModule, ArdiumErrorComponent, ArdiumErrorDirective, ArdiumFabComponent, ArdiumFabModule, ArdiumFileDropAreaComponent, ArdiumFileDropAreaDragoverContentTemplateDirective, ArdiumFileDropAreaIdleContentTemplateDirective, ArdiumFileDropAreaModule, ArdiumFileDropAreaUploadedContentTemplateDirective, ArdiumFileInputComponent, ArdiumFileInputDragoverContentTemplateDirective, ArdiumFileInputIdleContentTemplateDirective, ArdiumFileInputModule, ArdiumFileInputUploadedContentTemplateDirective, ArdiumFormFieldComponent, ArdiumFormFieldFrameComponent, ArdiumFormFieldFrameModule, ArdiumFormFieldModule, ArdiumHexInputComponent, ArdiumHexInputModule, ArdiumHintComponent, ArdiumHintDirective, ArdiumHorizontalFormFieldComponent, ArdiumIconButtonComponent, ArdiumIconButtonModule, ArdiumIconComponent, ArdiumIconModule, ArdiumIconPipe, ArdiumInputComponent, ArdiumInputModule, ArdiumKbdComponent, ArdiumKbdDirective, ArdiumKbdModule, ArdiumKbdPipe, ArdiumKbdShortcutComponent, ArdiumKbdShortcutModule, ArdiumLabelComponent, ArdiumModalComponent, ArdiumModalModule, ArdiumNumberInputComponent, ArdiumNumberInputModule, ArdiumOptionComponent, ArdiumOptionModule, ArdiumPasswordInputComponent, ArdiumPasswordInputModule, ArdiumProgressBarComponent, ArdiumProgressBarModule, ArdiumProgressCircleComponent, ArdiumProgressCircleModule, ArdiumRadioComponent, ArdiumRadioGroupComponent, ArdiumRadioModule, ArdiumRangeSliderComponent, ArdiumRangeSliderModule, ArdiumSegmentComponent, ArdiumSegmentModule, ArdiumSelectComponent, ArdiumSelectModule, ArdiumSelectableChipComponent, ArdiumSimpleInputComponent, ArdiumSimpleInputModule, ArdiumSlideToggleComponent, ArdiumSlideToggleModule, ArdiumSliderComponent, ArdiumSliderModule, ArdiumSnackbarService, ArdiumSpinnerComponent, ArdiumSpinnerModule, ArdiumStarButtonComponent, ArdiumStarButtonModule, ArdiumStarComponent, ArdiumStarDisplayComponent, ArdiumStarDisplayModule, ArdiumStarInputComponent, ArdiumStarInputModule, ArdiumStarModule, ArdiumStateboxComponent, ArdiumStateboxModule, ArdiumTabComponent, ArdiumTabberComponent, ArdiumTabberModule, ArdiumTableCaptionTemplateDirective, ArdiumTableCheckboxTemplateDirective, ArdiumTableComponent, ArdiumTableFromCsvComponent, ArdiumTableFromCsvModule, ArdiumTableHeaderCheckboxTemplateDirective, ArdiumTableModule, ArdiumTablePaginationComponent, ArdiumTablePaginationModule, ArdiumTablePaginationTemplateDirective, ArdiumTableTemplateDirective, ArdiumTextListComponent, ArdiumTextListModule, ArdiumTextListPipe, BadgePosition, BadgeSize, ButtonAppearance, ButtonVariant, CardAppearance, CardVariant, CheckboxListAlignType, CheckboxState, ClickStrategy, ColorDisplayAppearance, ComponentColor, DecorationElementAppearance, DialogResult, DigitInputPrimitiveOption, DigitInputShape, DropdownPanelAppearance, DropdownPanelVariant, FabSize, FormElementAppearance, FormElementVariant, OneAxisAlignment, OutlinedAppearance, PaginationAlign, PanelAppearance, PanelVariant, ProgressBarAppearance, ProgressBarMode, ProgressBarSize, ProgressBarVariant, ProgressCircleAppearance, ProgressCircleVariant, SegmentAppearance, SegmentVariant, SimpleComponentColor, SimpleOneAxisAlignment, SliderDecorationPosition, SliderTooltipBehavior, SortType, StarColor, StarFillMode, TableAlignType, TableAppearance, TablePaginationStrategy, TableVariant, TransformType, _chipDefaults, _modalDefaults, provideBadgeDefaults, provideButtonDefaults, provideCardDefaults, provideCheckboxDefaults, provideCheckboxListDefaults, provideChipDefaults, provideColorDisplayDefaults, provideDeletableChipDefaults, provideDialogDefaults, provideDigitInputDefaults, provideDividerDefaults, provideDropdownPanelDefaults, provideFabDefaults, provideFileDropAreaDefaults, provideFileInputDefaults, provideFormFieldFrameDefaults, provideHexInputDefaults, provideIconButtonDefaults, provideIconDefaults, provideKbdDefaults, provideKbdShortcutDefaults, provideModalDefaults, provideNumberInputDefaults, providePasswordInputDefaults, provideProgressBarDefaults, provideProgressCircleDefaults, provideRadioDefaults, provideSegmentDefaults, provideSelectDefaults, provideSelectableChipDefaults, provideSimpleInputDefaults, provideSlideToggleDefaults, provideSliderDefaults, provideSnackbarDefaults, provideSpinnerDefaults, provideStarButtonDefaults, provideStarDefaults, provideStarDisplayDefaults, provideStarInputDefaults, provideStateboxDefaults, provideTabDefaults, provideTabberDefaults, provideTableDefaults, provideTableFromCsvDefaults, provideTablePaginationDefaults, searchInString };
|
|
11607
11899
|
//# sourceMappingURL=ardium-ui-ui.mjs.map
|