@unipin/angular-applet 21.0.0 → 21.1.0
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/common/assets/styles/theme.css +3 -0
- package/fesm2022/unipin-angular-applet-accordion.mjs +30 -30
- package/fesm2022/unipin-angular-applet-accordion.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-alert-dialog.mjs +25 -23
- package/fesm2022/unipin-angular-applet-alert-dialog.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-alert.mjs +16 -16
- package/fesm2022/unipin-angular-applet-alert.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-auth.mjs +24 -24
- package/fesm2022/unipin-angular-applet-auth.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-avatar.mjs +6 -6
- package/fesm2022/unipin-angular-applet-avatar.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-badge.mjs +6 -6
- package/fesm2022/unipin-angular-applet-badge.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-buttons.mjs +13 -17
- package/fesm2022/unipin-angular-applet-buttons.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-calendar.mjs +23 -23
- package/fesm2022/unipin-angular-applet-calendar.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-collapsible.mjs +17 -17
- package/fesm2022/unipin-angular-applet-collapsible.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-common.mjs +22 -22
- package/fesm2022/unipin-angular-applet-common.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-containers.mjs +22 -22
- package/fesm2022/unipin-angular-applet-containers.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-dialog.mjs +61 -71
- package/fesm2022/unipin-angular-applet-dialog.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-forms.mjs +249 -152
- package/fesm2022/unipin-angular-applet-forms.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-froala.mjs +10 -12
- package/fesm2022/unipin-angular-applet-froala.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-infinite-scroll.mjs +5 -5
- package/fesm2022/unipin-angular-applet-infinite-scroll.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-json-viewer.mjs +8 -8
- package/fesm2022/unipin-angular-applet-json-viewer.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-kbd.mjs +32 -0
- package/fesm2022/unipin-angular-applet-kbd.mjs.map +1 -0
- package/fesm2022/unipin-angular-applet-loading-dialog.mjs +8 -8
- package/fesm2022/unipin-angular-applet-loading-dialog.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-markdown.mjs +19 -21
- package/fesm2022/unipin-angular-applet-markdown.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-popover.mjs +21 -25
- package/fesm2022/unipin-angular-applet-popover.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-progress-bar.mjs +8 -8
- package/fesm2022/unipin-angular-applet-progress-bar.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-skeleton.mjs +5 -5
- package/fesm2022/unipin-angular-applet-skeleton.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-spinner.mjs +6 -6
- package/fesm2022/unipin-angular-applet-spinner.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-swipeable.mjs +26 -26
- package/fesm2022/unipin-angular-applet-swipeable.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-tabs.mjs +22 -22
- package/fesm2022/unipin-angular-applet-tabs.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-tooltip.mjs +5 -5
- package/fesm2022/unipin-angular-applet-tooltip.mjs.map +1 -1
- package/package.json +6 -2
- package/types/unipin-angular-applet-alert-dialog.d.ts +3 -1
- package/types/unipin-angular-applet-forms.d.ts +32 -1
- package/types/unipin-angular-applet-kbd.d.ts +11 -0
|
@@ -32,7 +32,7 @@ class UpFieldControl {
|
|
|
32
32
|
}
|
|
33
33
|
class UpFieldControlComponent {
|
|
34
34
|
constructor() {
|
|
35
|
-
this.error = signal('', ...(ngDevMode ?
|
|
35
|
+
this.error = signal('', { ...(ngDevMode ? { debugName: "error" } : {}) });
|
|
36
36
|
this.injector = inject(Injector);
|
|
37
37
|
this.ngControl = this.injector.get(NgControl, null);
|
|
38
38
|
this._parentForm = inject(NgForm, { optional: true });
|
|
@@ -62,30 +62,30 @@ class UpFieldControlComponent {
|
|
|
62
62
|
this.error.set(newState);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
66
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.
|
|
65
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpFieldControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
66
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpFieldControlComponent }); }
|
|
67
67
|
}
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpFieldControlComponent, decorators: [{
|
|
69
69
|
type: Injectable
|
|
70
70
|
}] });
|
|
71
71
|
|
|
72
72
|
class UpInputDirective extends UpFieldControlComponent {
|
|
73
73
|
constructor() {
|
|
74
74
|
super(...arguments);
|
|
75
|
-
this.inlineClass = input('', ...(ngDevMode ?
|
|
75
|
+
this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
|
|
76
76
|
this._computedClass = computed(() => {
|
|
77
77
|
return up('peer file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-medium file:h-7 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:outline-none', this.error() ? 'ring-destructive/20 dark:ring-destructive/40 border-destructive focus-visible:ring-destructive/50' : '', this.inlineClass());
|
|
78
|
-
}, ...(ngDevMode ?
|
|
78
|
+
}, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
|
|
79
79
|
}
|
|
80
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
81
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.
|
|
80
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpInputDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
81
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: UpInputDirective, isStandalone: true, selector: "[upInput]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, providers: [
|
|
82
82
|
{
|
|
83
83
|
provide: UpFieldControl,
|
|
84
84
|
useExisting: forwardRef(() => UpInputDirective)
|
|
85
85
|
}
|
|
86
86
|
], exportAs: ["upInput"], usesInheritance: true, ngImport: i0 }); }
|
|
87
87
|
}
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpInputDirective, decorators: [{
|
|
89
89
|
type: Directive,
|
|
90
90
|
args: [{
|
|
91
91
|
standalone: true,
|
|
@@ -108,7 +108,7 @@ class UpNumberDirective extends UpInputDirective {
|
|
|
108
108
|
super();
|
|
109
109
|
this.renderer = renderer;
|
|
110
110
|
this.el = el;
|
|
111
|
-
this.magnifyValue = input(1, ...(ngDevMode ?
|
|
111
|
+
this.magnifyValue = input(1, { ...(ngDevMode ? { debugName: "magnifyValue" } : {}) });
|
|
112
112
|
this.maxDecimalDigits = computed(() => {
|
|
113
113
|
if (!this.magnifyValue() ||
|
|
114
114
|
this.magnifyValue() === 1) {
|
|
@@ -116,7 +116,7 @@ class UpNumberDirective extends UpInputDirective {
|
|
|
116
116
|
}
|
|
117
117
|
const floatPoint = Math.log10(this.magnifyValue());
|
|
118
118
|
return floatPoint % 1 !== 0 ? 0 : floatPoint;
|
|
119
|
-
}, ...(ngDevMode ?
|
|
119
|
+
}, { ...(ngDevMode ? { debugName: "maxDecimalDigits" } : {}) });
|
|
120
120
|
this.lastCaretPos = 0;
|
|
121
121
|
this.lastRawValue = '';
|
|
122
122
|
this.lastKey = null;
|
|
@@ -270,15 +270,15 @@ class UpNumberDirective extends UpInputDirective {
|
|
|
270
270
|
decimal: decimalPart?.slice(0, this.maxDecimalDigits()),
|
|
271
271
|
};
|
|
272
272
|
}
|
|
273
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
274
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.
|
|
273
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpNumberDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
274
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: UpNumberDirective, isStandalone: true, selector: "[upNumber]", inputs: { magnifyValue: { classPropertyName: "magnifyValue", publicName: "magnifyValue", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "blur": "onBlur()", "input": "onInput($event)", "keydown": "onKeyDown($event)" }, properties: { "class": "_computedClass()" } }, providers: [
|
|
275
275
|
{
|
|
276
276
|
provide: UpFieldControl,
|
|
277
277
|
useExisting: forwardRef(() => UpNumberDirective),
|
|
278
278
|
},
|
|
279
279
|
], exportAs: ["upNumber"], usesInheritance: true, ngImport: i0 }); }
|
|
280
280
|
}
|
|
281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpNumberDirective, decorators: [{
|
|
282
282
|
type: Directive,
|
|
283
283
|
args: [{
|
|
284
284
|
standalone: true,
|
|
@@ -308,20 +308,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
|
|
|
308
308
|
class UpCheckboxDirective extends UpFieldControlComponent {
|
|
309
309
|
constructor() {
|
|
310
310
|
super(...arguments);
|
|
311
|
-
this.inlineClass = input('', ...(ngDevMode ?
|
|
311
|
+
this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
|
|
312
312
|
this._computedClass = computed(() => {
|
|
313
313
|
return up('peer dark:bg-input/30 border-input size-5 min-w-0 rounded-md border bg-transparent shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-border/40 relative cursor-pointer', 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:outline-none', 'appearance-none checked:border-primary checked:bg-primary', 'checked:after:content-[\'\'] checked:after:absolute checked:after:border-white checked:after:border-b-2 checked:after:border-r-2 checked:after:w-1.5 checked:after:h-2.5 checked:after:rounded-br-xs checked:after:rotate-45 checked:after:left-1.5 checked:after:top-0.75', this.error() ? 'ring-destructive/20 dark:ring-destructive/40 border-destructive focus-visible:ring-destructive/50' : '', this.inlineClass());
|
|
314
|
-
}, ...(ngDevMode ?
|
|
314
|
+
}, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
|
|
315
315
|
}
|
|
316
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
317
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.
|
|
316
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpCheckboxDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
317
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.1", type: UpCheckboxDirective, isStandalone: true, selector: "[upCheckbox]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "checkbox" }, properties: { "class": "_computedClass()" } }, providers: [
|
|
318
318
|
{
|
|
319
319
|
provide: UpFieldControl,
|
|
320
320
|
useExisting: forwardRef(() => UpCheckboxDirective)
|
|
321
321
|
}
|
|
322
322
|
], exportAs: ["upCheckbox"], usesInheritance: true, ngImport: i0 }); }
|
|
323
323
|
}
|
|
324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpCheckboxDirective, decorators: [{
|
|
325
325
|
type: Directive,
|
|
326
326
|
args: [{
|
|
327
327
|
standalone: true,
|
|
@@ -343,14 +343,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
|
|
|
343
343
|
class UpSwitchComponent extends UpFieldControlComponent {
|
|
344
344
|
constructor() {
|
|
345
345
|
super();
|
|
346
|
-
this.checked = model(false, ...(ngDevMode ?
|
|
347
|
-
this.inlineClass = input('', ...(ngDevMode ?
|
|
348
|
-
this.required = input(false, ...(ngDevMode ?
|
|
349
|
-
|
|
350
|
-
}]));
|
|
351
|
-
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{
|
|
352
|
-
transform: booleanAttribute
|
|
353
|
-
}]));
|
|
346
|
+
this.checked = model(false, { ...(ngDevMode ? { debugName: "checked" } : {}) });
|
|
347
|
+
this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
|
|
348
|
+
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : {}), transform: booleanAttribute });
|
|
349
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
354
350
|
this.isTouched = false;
|
|
355
351
|
this._computedClass = computed(() => {
|
|
356
352
|
return up(`
|
|
@@ -363,7 +359,7 @@ class UpSwitchComponent extends UpFieldControlComponent {
|
|
|
363
359
|
peer-checked:after:translate-x-[15px]
|
|
364
360
|
peer-focus-visible:ring-2 peer-focus-visible:ring-primary peer-focus-visible:ring-offset-2
|
|
365
361
|
`, this.inlineClass());
|
|
366
|
-
}, ...(ngDevMode ?
|
|
362
|
+
}, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
|
|
367
363
|
this._onChange = (_val) => { };
|
|
368
364
|
this._onTouched = () => { };
|
|
369
365
|
if (this.ngControl !== null) {
|
|
@@ -393,8 +389,8 @@ class UpSwitchComponent extends UpFieldControlComponent {
|
|
|
393
389
|
this._onChange(this.checked());
|
|
394
390
|
this._onTouched();
|
|
395
391
|
}
|
|
396
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
397
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.
|
|
392
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpSwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
393
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.1", type: UpSwitchComponent, isStandalone: true, selector: "up-switch", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, host: { classAttribute: "inline-flex items-center cursor-pointer" }, providers: [
|
|
398
394
|
{
|
|
399
395
|
provide: UpFieldControl,
|
|
400
396
|
useExisting: forwardRef(() => UpSwitchComponent),
|
|
@@ -416,7 +412,7 @@ class UpSwitchComponent extends UpFieldControlComponent {
|
|
|
416
412
|
</span>
|
|
417
413
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
418
414
|
}
|
|
419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
415
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpSwitchComponent, decorators: [{
|
|
420
416
|
type: Component,
|
|
421
417
|
args: [{
|
|
422
418
|
standalone: true,
|
|
@@ -453,19 +449,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
|
|
|
453
449
|
class UpPasswordComponent extends UpFieldControlComponent {
|
|
454
450
|
constructor() {
|
|
455
451
|
super();
|
|
456
|
-
this.placeholder = input(...(ngDevMode ?
|
|
457
|
-
this.inlineClass = input('', ...(ngDevMode ?
|
|
458
|
-
this.autocomplete = input('off', ...(ngDevMode ?
|
|
459
|
-
this.required = input(false, ...(ngDevMode ?
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
this.
|
|
463
|
-
this.value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
464
|
-
this.type = signal('password', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
452
|
+
this.placeholder = input(undefined, { ...(ngDevMode ? { debugName: "placeholder" } : {}) });
|
|
453
|
+
this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
|
|
454
|
+
this.autocomplete = input('off', { ...(ngDevMode ? { debugName: "autocomplete" } : {}) });
|
|
455
|
+
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : {}), transform: booleanAttribute });
|
|
456
|
+
this.disabled = model(false, { ...(ngDevMode ? { debugName: "disabled" } : {}) });
|
|
457
|
+
this.value = signal('', { ...(ngDevMode ? { debugName: "value" } : {}) });
|
|
458
|
+
this.type = signal('password', { ...(ngDevMode ? { debugName: "type" } : {}) });
|
|
465
459
|
this.isTouched = false;
|
|
466
460
|
this._computedClass = computed(() => {
|
|
467
461
|
return up('pr-10 peer', this.inlineClass());
|
|
468
|
-
}, ...(ngDevMode ?
|
|
462
|
+
}, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
|
|
469
463
|
/**
|
|
470
464
|
* Callback function to handle value changes in the password input.
|
|
471
465
|
* @type {(_val: any) => void}
|
|
@@ -542,8 +536,8 @@ class UpPasswordComponent extends UpFieldControlComponent {
|
|
|
542
536
|
this.value.set(value);
|
|
543
537
|
this._onChange(this.value());
|
|
544
538
|
}
|
|
545
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
546
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.
|
|
539
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
540
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.1", type: UpPasswordComponent, isStandalone: true, selector: "up-password", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange" }, host: { classAttribute: "block relative" }, providers: [
|
|
547
541
|
{
|
|
548
542
|
provide: UpFieldControl,
|
|
549
543
|
useExisting: forwardRef(() => UpPasswordComponent)
|
|
@@ -574,7 +568,7 @@ class UpPasswordComponent extends UpFieldControlComponent {
|
|
|
574
568
|
/>
|
|
575
569
|
`, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: UpInputDirective, selector: "[upInput]", inputs: ["class"], exportAs: ["upInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
576
570
|
}
|
|
577
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
571
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpPasswordComponent, decorators: [{
|
|
578
572
|
type: Component,
|
|
579
573
|
args: [{
|
|
580
574
|
standalone: true,
|
|
@@ -624,27 +618,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
|
|
|
624
618
|
class UpSelectComponent extends UpFieldControlComponent {
|
|
625
619
|
constructor() {
|
|
626
620
|
super();
|
|
627
|
-
this.items = input.required(...(ngDevMode ?
|
|
628
|
-
this.label = input('', ...(ngDevMode ?
|
|
629
|
-
this.appendTo = input('', ...(ngDevMode ?
|
|
630
|
-
this.placeholder = input('', ...(ngDevMode ?
|
|
631
|
-
this.bindLabel = input('label', ...(ngDevMode ?
|
|
632
|
-
this.bindValue = input('value', ...(ngDevMode ?
|
|
633
|
-
this.value = model(null, ...(ngDevMode ?
|
|
634
|
-
this.inlineClass = input('', ...(ngDevMode ?
|
|
635
|
-
this.loading = input(false, ...(ngDevMode ?
|
|
636
|
-
this.multiple = input(false, ...(ngDevMode ?
|
|
637
|
-
this.required = input(false, ...(ngDevMode ?
|
|
638
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
639
|
-
this.clearable = input(true, ...(ngDevMode ?
|
|
640
|
-
this.addTag = input(false, ...(ngDevMode ?
|
|
641
|
-
this.searchable = input(false, ...(ngDevMode ?
|
|
642
|
-
this.virtualScroll = input(false, ...(ngDevMode ?
|
|
621
|
+
this.items = input.required({ ...(ngDevMode ? { debugName: "items" } : {}) });
|
|
622
|
+
this.label = input('', { ...(ngDevMode ? { debugName: "label" } : {}) });
|
|
623
|
+
this.appendTo = input('', { ...(ngDevMode ? { debugName: "appendTo" } : {}) });
|
|
624
|
+
this.placeholder = input('', { ...(ngDevMode ? { debugName: "placeholder" } : {}) });
|
|
625
|
+
this.bindLabel = input('label', { ...(ngDevMode ? { debugName: "bindLabel" } : {}) });
|
|
626
|
+
this.bindValue = input('value', { ...(ngDevMode ? { debugName: "bindValue" } : {}) });
|
|
627
|
+
this.value = model(null, { ...(ngDevMode ? { debugName: "value" } : {}) });
|
|
628
|
+
this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
|
|
629
|
+
this.loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : {}) });
|
|
630
|
+
this.multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : {}) });
|
|
631
|
+
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : {}) });
|
|
632
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}) });
|
|
633
|
+
this.clearable = input(true, { ...(ngDevMode ? { debugName: "clearable" } : {}) });
|
|
634
|
+
this.addTag = input(false, { ...(ngDevMode ? { debugName: "addTag" } : {}), transform: booleanAttribute });
|
|
635
|
+
this.searchable = input(false, { ...(ngDevMode ? { debugName: "searchable" } : {}), transform: booleanAttribute });
|
|
636
|
+
this.virtualScroll = input(false, { ...(ngDevMode ? { debugName: "virtualScroll" } : {}), transform: booleanAttribute });
|
|
643
637
|
this.changed = output();
|
|
644
|
-
this.control = contentChild(UpFieldControl, ...(ngDevMode ?
|
|
638
|
+
this.control = contentChild(UpFieldControl, { ...(ngDevMode ? { debugName: "control" } : {}) });
|
|
645
639
|
this._computedClass = computed(() => {
|
|
646
640
|
return up('w-full min-w-0 h-9', 'data-[disabled=true]:[&>.ng-select-container]:cursor-not-allowed! data-[disabled=true]:[&>.ng-select-container]:opacity-50! data-[disabled=true]:[&>.ng-select-container]:bg-transparent!', '[&>.ng-select-container]:border! [&>.ng-select-container]:border-input! [&>.ng-select-container]:rounded-md! [&>.ng-select-container]:cursor-pointer! [&>.ng-select-container]:shadow-xs! [&>.ng-select-container]:items-center!', '[&>.ng-select-container>.ng-value-container>.ng-placeholder]:text-base! md:[&>.ng-select-container>.ng-value-container>.ng-placeholder]:text-sm!', '[&>.ng-select-container>.ng-value-container>.ng-value]:text-base! md:[&>.ng-select-container>.ng-value-container>.ng-value]:text-sm! [&>.ng-select-container>.ng-value-container>.ng-value]:text-black!', '[&.ng-select-focused>.ng-select-container]:border-ring! [&.ng-select-focused>.ng-select-container]:ring-ring/50! [&.ng-select-focused>.ng-select-container]:ring-[3px]!', this.inlineClass());
|
|
647
|
-
}, ...(ngDevMode ?
|
|
641
|
+
}, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
|
|
648
642
|
this.isTouched = false;
|
|
649
643
|
this._onTouched = () => { };
|
|
650
644
|
this._onChange = (_val) => { };
|
|
@@ -707,8 +701,8 @@ class UpSelectComponent extends UpFieldControlComponent {
|
|
|
707
701
|
this.changed.emit(this.value());
|
|
708
702
|
}
|
|
709
703
|
}
|
|
710
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
711
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.
|
|
704
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
705
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.1", type: UpSelectComponent, isStandalone: true, selector: "up-select", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, bindLabel: { classPropertyName: "bindLabel", publicName: "bindLabel", isSignal: true, isRequired: false, transformFunction: null }, bindValue: { classPropertyName: "bindValue", publicName: "bindValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, addTag: { classPropertyName: "addTag", publicName: "addTag", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", changed: "changed" }, host: { classAttribute: "block relative" }, providers: [
|
|
712
706
|
{
|
|
713
707
|
provide: UpFieldControl,
|
|
714
708
|
useExisting: forwardRef(() => UpSelectComponent)
|
|
@@ -735,7 +729,7 @@ class UpSelectComponent extends UpFieldControlComponent {
|
|
|
735
729
|
/>
|
|
736
730
|
`, isInline: true, styles: [".ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background-color:var(--accent)!important}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.left{border-right-color:color-mix(in oklab,var(--primary) 50%,transparent)!important}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.left:hover{background-color:color-mix(in oklab,var(--primary) 40%,transparent)!important}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{top:50%!important;padding-bottom:0!important;transform:translateY(-50%)!important}.ng-select .ng-select-container{transition:all .2s ease}.ng-select .ng-select-container .ng-value-container{align-items:center;padding-left:.75rem}.ng-select .ng-select-container .ng-value-container .ng-placeholder{color:var(--muted-foreground)}.ng-select .ng-select-container .ng-arrow-wrapper{padding-right:.75rem}.ng-select .ng-select-container .ng-clear-wrapper{margin-right:.25rem;transition:color .2s ease}.ng-select .ng-select-container .ng-clear-wrapper:hover .ng-clear{color:var(--destructive)}.ng-dropdown-panel{overflow:hidden;margin-top:.25rem!important;border-color:var(--border)!important;border-radius:calc(var(--radius) - 2px)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.ng-dropdown-panel .ng-option-label{color:#000;font-size:1rem}@media screen and (min-width:48rem){.ng-dropdown-panel .ng-option-label{font-size:.875rem}}.ng-dropdown-panel .ng-option:hover,.ng-dropdown-panel .ng-option-marked{background-color:var(--accent)!important}.ng-dropdown-panel .ng-option-selected{color:#000!important;background-color:color-mix(in oklab,var(--primary) 15%,transparent)!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "dropdownPosition", "appendTo", "outsideClickEvent", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "tabFocusOnClearButton", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "deselectOnClick", "clearSearchOnAdd", "compareWith", "keyDownFn", "bindLabel", "bindValue", "appearance", "isOpen", "items"], outputs: ["bindLabelChange", "bindValueChange", "appearanceChange", "isOpenChange", "itemsChange", "blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"], exportAs: ["ngSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
737
731
|
}
|
|
738
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
732
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpSelectComponent, decorators: [{
|
|
739
733
|
type: Component,
|
|
740
734
|
args: [{ standalone: true, selector: 'up-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
741
735
|
class: 'block relative',
|
|
@@ -774,16 +768,16 @@ class UpCountrySelectComponent extends UpFieldControlComponent {
|
|
|
774
768
|
constructor(service) {
|
|
775
769
|
super();
|
|
776
770
|
this.service = service;
|
|
777
|
-
this.multiple = input(false, ...(ngDevMode ?
|
|
778
|
-
this.clearable = input(true, ...(ngDevMode ?
|
|
779
|
-
this.placeholder = input('Select country', ...(ngDevMode ?
|
|
780
|
-
this.inlineClass = input('', ...(ngDevMode ?
|
|
781
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
782
|
-
this.value = model(null, ...(ngDevMode ?
|
|
771
|
+
this.multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : {}) });
|
|
772
|
+
this.clearable = input(true, { ...(ngDevMode ? { debugName: "clearable" } : {}) });
|
|
773
|
+
this.placeholder = input('Select country', { ...(ngDevMode ? { debugName: "placeholder" } : {}) });
|
|
774
|
+
this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
|
|
775
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
776
|
+
this.value = model(null, { ...(ngDevMode ? { debugName: "value" } : {}) });
|
|
783
777
|
this.changed = output();
|
|
784
|
-
this.countries = signal([], ...(ngDevMode ?
|
|
785
|
-
this.isLoading = signal(true, ...(ngDevMode ?
|
|
786
|
-
this._disabled = signal(false, ...(ngDevMode ?
|
|
778
|
+
this.countries = signal([], { ...(ngDevMode ? { debugName: "countries" } : {}) });
|
|
779
|
+
this.isLoading = signal(true, { ...(ngDevMode ? { debugName: "isLoading" } : {}) });
|
|
780
|
+
this._disabled = signal(false, { ...(ngDevMode ? { debugName: "_disabled" } : {}) });
|
|
787
781
|
this.isTouched = false;
|
|
788
782
|
this._onTouched = () => { };
|
|
789
783
|
this._onChange = (_val) => { };
|
|
@@ -835,8 +829,8 @@ class UpCountrySelectComponent extends UpFieldControlComponent {
|
|
|
835
829
|
this.changed.emit(this.countries().find(c => c.code === value));
|
|
836
830
|
}
|
|
837
831
|
}
|
|
838
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
839
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.
|
|
832
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpCountrySelectComponent, deps: [{ token: i1$1.CountryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
833
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.1", type: UpCountrySelectComponent, isStandalone: true, selector: "up-country-select", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", changed: "changed" }, host: { classAttribute: "block" }, providers: [
|
|
840
834
|
{
|
|
841
835
|
provide: UpFieldControl,
|
|
842
836
|
useExisting: forwardRef(() => UpCountrySelectComponent),
|
|
@@ -861,7 +855,7 @@ class UpCountrySelectComponent extends UpFieldControlComponent {
|
|
|
861
855
|
/>
|
|
862
856
|
`, isInline: true, dependencies: [{ kind: "component", type: UpSelectComponent, selector: "up-select", inputs: ["items", "label", "appendTo", "placeholder", "bindLabel", "bindValue", "value", "class", "loading", "multiple", "required", "disabled", "clearable", "addTag", "searchable", "virtualScroll"], outputs: ["valueChange", "changed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
863
857
|
}
|
|
864
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
858
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpCountrySelectComponent, decorators: [{
|
|
865
859
|
type: Component,
|
|
866
860
|
args: [{
|
|
867
861
|
standalone: true,
|
|
@@ -905,16 +899,16 @@ class UpCurrencySelectComponent extends UpFieldControlComponent {
|
|
|
905
899
|
constructor(service) {
|
|
906
900
|
super();
|
|
907
901
|
this.service = service;
|
|
908
|
-
this.multiple = input(false, ...(ngDevMode ?
|
|
909
|
-
this.clearable = input(true, ...(ngDevMode ?
|
|
910
|
-
this.placeholder = input('Select currency', ...(ngDevMode ?
|
|
911
|
-
this.inlineClass = input('', ...(ngDevMode ?
|
|
912
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
913
|
-
this.value = model(null, ...(ngDevMode ?
|
|
902
|
+
this.multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : {}) });
|
|
903
|
+
this.clearable = input(true, { ...(ngDevMode ? { debugName: "clearable" } : {}) });
|
|
904
|
+
this.placeholder = input('Select currency', { ...(ngDevMode ? { debugName: "placeholder" } : {}) });
|
|
905
|
+
this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
|
|
906
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
907
|
+
this.value = model(null, { ...(ngDevMode ? { debugName: "value" } : {}) });
|
|
914
908
|
this.changed = output();
|
|
915
|
-
this.isLoading = signal(true, ...(ngDevMode ?
|
|
916
|
-
this._disabled = signal(false, ...(ngDevMode ?
|
|
917
|
-
this.currencies = signal([], ...(ngDevMode ?
|
|
909
|
+
this.isLoading = signal(true, { ...(ngDevMode ? { debugName: "isLoading" } : {}) });
|
|
910
|
+
this._disabled = signal(false, { ...(ngDevMode ? { debugName: "_disabled" } : {}) });
|
|
911
|
+
this.currencies = signal([], { ...(ngDevMode ? { debugName: "currencies" } : {}) });
|
|
918
912
|
this.isTouched = false;
|
|
919
913
|
this._onTouched = () => { };
|
|
920
914
|
this._onChange = (_val) => { };
|
|
@@ -973,8 +967,8 @@ class UpCurrencySelectComponent extends UpFieldControlComponent {
|
|
|
973
967
|
this.changed.emit(this.currencies().find(c => c.code === value));
|
|
974
968
|
}
|
|
975
969
|
}
|
|
976
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
977
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.
|
|
970
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpCurrencySelectComponent, deps: [{ token: i1$1.CurrencyService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
971
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.1", type: UpCurrencySelectComponent, isStandalone: true, selector: "up-currency-select", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", changed: "changed" }, host: { classAttribute: "block" }, providers: [
|
|
978
972
|
{
|
|
979
973
|
provide: UpFieldControl,
|
|
980
974
|
useExisting: forwardRef(() => UpCurrencySelectComponent)
|
|
@@ -999,7 +993,7 @@ class UpCurrencySelectComponent extends UpFieldControlComponent {
|
|
|
999
993
|
/>
|
|
1000
994
|
`, isInline: true, dependencies: [{ kind: "component", type: UpSelectComponent, selector: "up-select", inputs: ["items", "label", "appendTo", "placeholder", "bindLabel", "bindValue", "value", "class", "loading", "multiple", "required", "disabled", "clearable", "addTag", "searchable", "virtualScroll"], outputs: ["valueChange", "changed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1001
995
|
}
|
|
1002
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpCurrencySelectComponent, decorators: [{
|
|
1003
997
|
type: Component,
|
|
1004
998
|
args: [{
|
|
1005
999
|
standalone: true,
|
|
@@ -1042,31 +1036,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
|
|
|
1042
1036
|
class UpSearchableSelectComponent extends UpFieldControlComponent {
|
|
1043
1037
|
constructor() {
|
|
1044
1038
|
super();
|
|
1045
|
-
this.query = input.required(...(ngDevMode ?
|
|
1046
|
-
this.label = input('', ...(ngDevMode ?
|
|
1047
|
-
this.appendTo = input('', ...(ngDevMode ?
|
|
1048
|
-
this.placeholder = input('', ...(ngDevMode ?
|
|
1049
|
-
this.initialItems = input([], ...(ngDevMode ?
|
|
1050
|
-
this.bindLabel = input('label', ...(ngDevMode ?
|
|
1051
|
-
this.bindValue = input('value', ...(ngDevMode ?
|
|
1052
|
-
this.inlineClass = input('', ...(ngDevMode ?
|
|
1053
|
-
this.addTag = input(false, ...(ngDevMode ?
|
|
1054
|
-
this.multiple = input(false, ...(ngDevMode ?
|
|
1055
|
-
this.required = input(false, ...(ngDevMode ?
|
|
1056
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
1057
|
-
this.clearable = input(true, ...(ngDevMode ?
|
|
1058
|
-
this.virtualScroll = input(false, ...(ngDevMode ?
|
|
1059
|
-
this.loading = model(false, ...(ngDevMode ?
|
|
1060
|
-
this.value = model(null, ...(ngDevMode ?
|
|
1039
|
+
this.query = input.required({ ...(ngDevMode ? { debugName: "query" } : {}) });
|
|
1040
|
+
this.label = input('', { ...(ngDevMode ? { debugName: "label" } : {}) });
|
|
1041
|
+
this.appendTo = input('', { ...(ngDevMode ? { debugName: "appendTo" } : {}) });
|
|
1042
|
+
this.placeholder = input('', { ...(ngDevMode ? { debugName: "placeholder" } : {}) });
|
|
1043
|
+
this.initialItems = input([], { ...(ngDevMode ? { debugName: "initialItems" } : {}) });
|
|
1044
|
+
this.bindLabel = input('label', { ...(ngDevMode ? { debugName: "bindLabel" } : {}) });
|
|
1045
|
+
this.bindValue = input('value', { ...(ngDevMode ? { debugName: "bindValue" } : {}) });
|
|
1046
|
+
this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
|
|
1047
|
+
this.addTag = input(false, { ...(ngDevMode ? { debugName: "addTag" } : {}), transform: booleanAttribute });
|
|
1048
|
+
this.multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : {}), transform: booleanAttribute });
|
|
1049
|
+
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : {}), transform: booleanAttribute });
|
|
1050
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
1051
|
+
this.clearable = input(true, { ...(ngDevMode ? { debugName: "clearable" } : {}), transform: booleanAttribute });
|
|
1052
|
+
this.virtualScroll = input(false, { ...(ngDevMode ? { debugName: "virtualScroll" } : {}), transform: booleanAttribute });
|
|
1053
|
+
this.loading = model(false, { ...(ngDevMode ? { debugName: "loading" } : {}) });
|
|
1054
|
+
this.value = model(null, { ...(ngDevMode ? { debugName: "value" } : {}) });
|
|
1061
1055
|
this.changed = output();
|
|
1062
|
-
this.control = contentChild(UpFieldControl, ...(ngDevMode ?
|
|
1056
|
+
this.control = contentChild(UpFieldControl, { ...(ngDevMode ? { debugName: "control" } : {}) });
|
|
1063
1057
|
this._computedClass = computed(() => {
|
|
1064
1058
|
return up('w-full min-w-0 h-9', 'data-[disabled=true]:[&>.ng-select-container]:cursor-not-allowed! data-[disabled=true]:[&>.ng-select-container]:opacity-50! data-[disabled=true]:[&>.ng-select-container]:bg-transparent!', '[&>.ng-select-container]:border! [&>.ng-select-container]:border-input! [&>.ng-select-container]:rounded-md! [&>.ng-select-container]:cursor-pointer! [&>.ng-select-container]:shadow-xs! [&>.ng-select-container]:items-center!', '[&>.ng-select-container>.ng-value-container>.ng-placeholder]:text-base! md:[&>.ng-select-container>.ng-value-container>.ng-placeholder]:text-sm!', '[&>.ng-select-container>.ng-value-container>.ng-value]:text-base! md:[&>.ng-select-container>.ng-value-container>.ng-value]:text-sm! [&>.ng-select-container>.ng-value-container>.ng-value]:text-black!', '[&.ng-select-focused>.ng-select-container]:border-ring! [&.ng-select-focused>.ng-select-container]:ring-ring/50! [&.ng-select-focused>.ng-select-container]:ring-[3px]!', this.inlineClass());
|
|
1065
|
-
}, ...(ngDevMode ?
|
|
1059
|
+
}, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
|
|
1066
1060
|
this.items = computed(() => {
|
|
1067
1061
|
const results = this._queryResults();
|
|
1068
1062
|
return results.length > 0 ? results : this.initialItems();
|
|
1069
|
-
}, ...(ngDevMode ?
|
|
1063
|
+
}, { ...(ngDevMode ? { debugName: "items" } : {}) });
|
|
1070
1064
|
this.typeahead = new Subject();
|
|
1071
1065
|
this.query$ = this.typeahead.pipe(distinctUntilChanged(), debounceTime(300), tap(() => this.loading.set(true)), switchMap((k) => {
|
|
1072
1066
|
return this.query()(k).pipe(map((result) => !result.length ? this.initialItems() : result), catchError(() => of(this.initialItems())));
|
|
@@ -1113,8 +1107,8 @@ class UpSearchableSelectComponent extends UpFieldControlComponent {
|
|
|
1113
1107
|
this.changed.emit(this.value());
|
|
1114
1108
|
}
|
|
1115
1109
|
}
|
|
1116
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1117
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.
|
|
1110
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpSearchableSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1111
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.1", type: UpSearchableSelectComponent, isStandalone: true, selector: "up-searchable-select", inputs: { query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, initialItems: { classPropertyName: "initialItems", publicName: "initialItems", isSignal: true, isRequired: false, transformFunction: null }, bindLabel: { classPropertyName: "bindLabel", publicName: "bindLabel", isSignal: true, isRequired: false, transformFunction: null }, bindValue: { classPropertyName: "bindValue", publicName: "bindValue", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, addTag: { classPropertyName: "addTag", publicName: "addTag", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loading: "loadingChange", value: "valueChange", changed: "changed" }, host: { classAttribute: "block relative" }, providers: [
|
|
1118
1112
|
{
|
|
1119
1113
|
provide: UpFieldControl,
|
|
1120
1114
|
useExisting: forwardRef(() => UpSearchableSelectComponent)
|
|
@@ -1148,7 +1142,7 @@ class UpSearchableSelectComponent extends UpFieldControlComponent {
|
|
|
1148
1142
|
/>
|
|
1149
1143
|
`, isInline: true, styles: [".ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background-color:var(--accent)!important}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.left{border-right-color:color-mix(in oklab,var(--primary) 50%,transparent)!important}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.left:hover{background-color:color-mix(in oklab,var(--primary) 40%,transparent)!important}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{top:50%!important;padding-bottom:0!important;transform:translateY(-50%)!important}.ng-select .ng-select-container{transition:all .2s ease}.ng-select .ng-select-container .ng-value-container{align-items:center;padding-left:.75rem}.ng-select .ng-select-container .ng-value-container .ng-placeholder{color:var(--muted-foreground)}.ng-select .ng-select-container .ng-arrow-wrapper{padding-right:.75rem}.ng-select .ng-select-container .ng-clear-wrapper{margin-right:.25rem;transition:color .2s ease}.ng-select .ng-select-container .ng-clear-wrapper:hover .ng-clear{color:var(--destructive)}.ng-dropdown-panel{overflow:hidden;margin-top:.25rem!important;border-color:var(--border)!important;border-radius:calc(var(--radius) - 2px)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.ng-dropdown-panel .ng-option-label{color:#000;font-size:1rem}@media screen and (min-width:48rem){.ng-dropdown-panel .ng-option-label{font-size:.875rem}}.ng-dropdown-panel .ng-option:hover,.ng-dropdown-panel .ng-option-marked{background-color:var(--accent)!important}.ng-dropdown-panel .ng-option-selected{color:#000!important;background-color:color-mix(in oklab,var(--primary) 15%,transparent)!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "dropdownPosition", "appendTo", "outsideClickEvent", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "tabFocusOnClearButton", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "deselectOnClick", "clearSearchOnAdd", "compareWith", "keyDownFn", "bindLabel", "bindValue", "appearance", "isOpen", "items"], outputs: ["bindLabelChange", "bindValueChange", "appearanceChange", "isOpenChange", "itemsChange", "blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"], exportAs: ["ngSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1150
1144
|
}
|
|
1151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpSearchableSelectComponent, decorators: [{
|
|
1152
1146
|
type: Component,
|
|
1153
1147
|
args: [{ standalone: true, selector: 'up-searchable-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1154
1148
|
class: 'block relative',
|
|
@@ -1193,23 +1187,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
|
|
|
1193
1187
|
class UpDatepickerComponent extends UpFieldControlComponent {
|
|
1194
1188
|
constructor() {
|
|
1195
1189
|
super();
|
|
1196
|
-
this.placeholder = input('', ...(ngDevMode ?
|
|
1197
|
-
this.minDate = input(null, ...(ngDevMode ?
|
|
1198
|
-
this.maxDate = input(null, ...(ngDevMode ?
|
|
1199
|
-
this.inlineClass = input('', ...(ngDevMode ?
|
|
1200
|
-
this.dateFormat = input('dd LLL yyyy', ...(ngDevMode ?
|
|
1201
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
this.
|
|
1205
|
-
this.value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1206
|
-
this._disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
1190
|
+
this.placeholder = input('', { ...(ngDevMode ? { debugName: "placeholder" } : {}) });
|
|
1191
|
+
this.minDate = input(null, { ...(ngDevMode ? { debugName: "minDate" } : {}) });
|
|
1192
|
+
this.maxDate = input(null, { ...(ngDevMode ? { debugName: "maxDate" } : {}) });
|
|
1193
|
+
this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
|
|
1194
|
+
this.dateFormat = input('dd LLL yyyy', { ...(ngDevMode ? { debugName: "dateFormat" } : {}), alias: 'format' });
|
|
1195
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
1196
|
+
this.btnTrigger = viewChild('btnTrigger', { ...(ngDevMode ? { debugName: "btnTrigger" } : {}) });
|
|
1197
|
+
this.value = signal(null, { ...(ngDevMode ? { debugName: "value" } : {}) });
|
|
1198
|
+
this._disabled = signal(false, { ...(ngDevMode ? { debugName: "_disabled" } : {}) });
|
|
1207
1199
|
this.formattedDate = computed(() => {
|
|
1208
1200
|
return this.value() ? format(this.value(), this.dateFormat()) : '';
|
|
1209
|
-
}, ...(ngDevMode ?
|
|
1201
|
+
}, { ...(ngDevMode ? { debugName: "formattedDate" } : {}) });
|
|
1210
1202
|
this._computedClass = computed(() => {
|
|
1211
1203
|
return up('flex justify-between px-3 border border-border min-w-48 w-full font-normal hover:not-disabled:text-primary! data-[has-value=false]:text-muted-foreground', this.inlineClass());
|
|
1212
|
-
}, ...(ngDevMode ?
|
|
1204
|
+
}, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
|
|
1213
1205
|
this._isTouched = false;
|
|
1214
1206
|
this._onTouched = () => { };
|
|
1215
1207
|
this._onChange = () => { };
|
|
@@ -1244,8 +1236,8 @@ class UpDatepickerComponent extends UpFieldControlComponent {
|
|
|
1244
1236
|
this._onTouched();
|
|
1245
1237
|
this._isTouched = true;
|
|
1246
1238
|
}
|
|
1247
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1248
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.
|
|
1239
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1240
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.1", type: UpDatepickerComponent, isStandalone: true, selector: "up-datepicker", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1249
1241
|
{
|
|
1250
1242
|
provide: UpFieldControl,
|
|
1251
1243
|
useExisting: forwardRef(() => UpDatepickerComponent),
|
|
@@ -1289,7 +1281,7 @@ class UpDatepickerComponent extends UpFieldControlComponent {
|
|
|
1289
1281
|
</up-popover>
|
|
1290
1282
|
`, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: UpButtonDirective, selector: "[upButton]", inputs: ["size", "variant", "class"], exportAs: ["upButton"] }, { kind: "component", type: UpPopoverComponent, selector: "up-popover", inputs: ["placement", "alignment", "placementOffset", "alignmentOffset"] }, { kind: "component", type: UpCalendarComponent, selector: "up-calendar", inputs: ["minDate", "maxDate", "variant", "activeDay", "activeRangeDay"], outputs: ["selected", "rangeSelected", "activeDayChange", "activeRangeDayChange"] }, { kind: "directive", type: UpPopoverTriggerDirective, selector: "[upPopoverTrigger]", exportAs: ["upPopoverTrigger"] }, { kind: "directive", type: UpPopoverContentRefDirective, selector: "[upPopoverContentRef]", exportAs: ["upPopoverContentRef"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1291
1283
|
}
|
|
1292
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1284
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpDatepickerComponent, decorators: [{
|
|
1293
1285
|
type: Component,
|
|
1294
1286
|
args: [{
|
|
1295
1287
|
standalone: true,
|
|
@@ -1353,22 +1345,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
|
|
|
1353
1345
|
class UpDateRangePickerComponent extends UpFieldControlComponent {
|
|
1354
1346
|
constructor() {
|
|
1355
1347
|
super();
|
|
1356
|
-
this.placeholder = input('', ...(ngDevMode ?
|
|
1357
|
-
this.minDate = input(null, ...(ngDevMode ?
|
|
1358
|
-
this.maxDate = input(null, ...(ngDevMode ?
|
|
1359
|
-
this.inlineClass = input('', ...(ngDevMode ?
|
|
1360
|
-
this.dateFormat = input('dd LLL yyyy', ...(ngDevMode ?
|
|
1361
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
this._disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
1365
|
-
this.value = signal({ from: null, to: null }, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1348
|
+
this.placeholder = input('', { ...(ngDevMode ? { debugName: "placeholder" } : {}) });
|
|
1349
|
+
this.minDate = input(null, { ...(ngDevMode ? { debugName: "minDate" } : {}) });
|
|
1350
|
+
this.maxDate = input(null, { ...(ngDevMode ? { debugName: "maxDate" } : {}) });
|
|
1351
|
+
this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
|
|
1352
|
+
this.dateFormat = input('dd LLL yyyy', { ...(ngDevMode ? { debugName: "dateFormat" } : {}), alias: 'format' });
|
|
1353
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
1354
|
+
this._disabled = signal(false, { ...(ngDevMode ? { debugName: "_disabled" } : {}) });
|
|
1355
|
+
this.value = signal({ from: null, to: null }, { ...(ngDevMode ? { debugName: "value" } : {}) });
|
|
1366
1356
|
this.formattedDate = computed(() => {
|
|
1367
1357
|
return this.value().from && this.value().to ? `${format(this.value().from, this.dateFormat())} - ${format(this.value().to, this.dateFormat())}` : '';
|
|
1368
|
-
}, ...(ngDevMode ?
|
|
1358
|
+
}, { ...(ngDevMode ? { debugName: "formattedDate" } : {}) });
|
|
1369
1359
|
this._computedClass = computed(() => {
|
|
1370
1360
|
return up('flex justify-between px-3 border border-border min-w-60 w-full font-normal hover:not-disabled:text-primary! data-[has-value=false]:text-muted-foreground', this.inlineClass());
|
|
1371
|
-
}, ...(ngDevMode ?
|
|
1361
|
+
}, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
|
|
1372
1362
|
this._isTouched = false;
|
|
1373
1363
|
this._onTouched = () => { };
|
|
1374
1364
|
this._onChange = () => { };
|
|
@@ -1402,8 +1392,8 @@ class UpDateRangePickerComponent extends UpFieldControlComponent {
|
|
|
1402
1392
|
this._onTouched();
|
|
1403
1393
|
this._isTouched = true;
|
|
1404
1394
|
}
|
|
1405
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1406
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.
|
|
1395
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpDateRangePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1396
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.1", type: UpDateRangePickerComponent, isStandalone: true, selector: "up-date-range-picker", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1407
1397
|
{
|
|
1408
1398
|
provide: UpFieldControl,
|
|
1409
1399
|
useExisting: forwardRef(() => UpDateRangePickerComponent)
|
|
@@ -1448,7 +1438,7 @@ class UpDateRangePickerComponent extends UpFieldControlComponent {
|
|
|
1448
1438
|
</up-popover>
|
|
1449
1439
|
`, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: UpButtonDirective, selector: "[upButton]", inputs: ["size", "variant", "class"], exportAs: ["upButton"] }, { kind: "component", type: UpPopoverComponent, selector: "up-popover", inputs: ["placement", "alignment", "placementOffset", "alignmentOffset"] }, { kind: "component", type: UpCalendarComponent, selector: "up-calendar", inputs: ["minDate", "maxDate", "variant", "activeDay", "activeRangeDay"], outputs: ["selected", "rangeSelected", "activeDayChange", "activeRangeDayChange"] }, { kind: "directive", type: UpPopoverTriggerDirective, selector: "[upPopoverTrigger]", exportAs: ["upPopoverTrigger"] }, { kind: "directive", type: UpPopoverContentRefDirective, selector: "[upPopoverContentRef]", exportAs: ["upPopoverContentRef"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1450
1440
|
}
|
|
1451
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpDateRangePickerComponent, decorators: [{
|
|
1452
1442
|
type: Component,
|
|
1453
1443
|
args: [{
|
|
1454
1444
|
standalone: true,
|
|
@@ -1512,14 +1502,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
|
|
|
1512
1502
|
|
|
1513
1503
|
class UpFormFieldComponent {
|
|
1514
1504
|
constructor() {
|
|
1515
|
-
this.name = input('', ...(ngDevMode ?
|
|
1516
|
-
this.hint = input('', ...(ngDevMode ?
|
|
1517
|
-
this.label = input('', ...(ngDevMode ?
|
|
1518
|
-
this.inlineClass = input('', ...(ngDevMode ?
|
|
1519
|
-
this.control = contentChild(UpFieldControl, ...(ngDevMode ?
|
|
1505
|
+
this.name = input('', { ...(ngDevMode ? { debugName: "name" } : {}) });
|
|
1506
|
+
this.hint = input('', { ...(ngDevMode ? { debugName: "hint" } : {}) });
|
|
1507
|
+
this.label = input('', { ...(ngDevMode ? { debugName: "label" } : {}) });
|
|
1508
|
+
this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
|
|
1509
|
+
this.control = contentChild(UpFieldControl, { ...(ngDevMode ? { debugName: "control" } : {}) });
|
|
1520
1510
|
this._computedClass = computed(() => {
|
|
1521
1511
|
return up('block space-y-2', this.inlineClass());
|
|
1522
|
-
}, ...(ngDevMode ?
|
|
1512
|
+
}, { ...(ngDevMode ? { debugName: "_computedClass" } : {}) });
|
|
1523
1513
|
effect(() => {
|
|
1524
1514
|
if (!this.control()) {
|
|
1525
1515
|
throw new Error('Form field must contain a field control, eg: input, checkbox, textarea, etc.');
|
|
@@ -1527,8 +1517,8 @@ class UpFormFieldComponent {
|
|
|
1527
1517
|
this.control().setControlName(this.label());
|
|
1528
1518
|
});
|
|
1529
1519
|
}
|
|
1530
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1531
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1520
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1521
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.1", type: UpFormFieldComponent, isStandalone: true, selector: "up-form-field", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, queries: [{ propertyName: "control", first: true, predicate: UpFieldControl, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1532
1522
|
<div
|
|
1533
1523
|
class="
|
|
1534
1524
|
group flex flex-col gap-2
|
|
@@ -1560,7 +1550,7 @@ class UpFormFieldComponent {
|
|
|
1560
1550
|
}
|
|
1561
1551
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1562
1552
|
}
|
|
1563
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.1", ngImport: i0, type: UpFormFieldComponent, decorators: [{
|
|
1564
1554
|
type: Component,
|
|
1565
1555
|
args: [{
|
|
1566
1556
|
standalone: true,
|
|
@@ -1691,9 +1681,116 @@ function validRangeValidator(fromKey, toKey) {
|
|
|
1691
1681
|
};
|
|
1692
1682
|
}
|
|
1693
1683
|
|
|
1684
|
+
/**
|
|
1685
|
+
* Validator that requires all specified form controls to have the same value.
|
|
1686
|
+
*
|
|
1687
|
+
* @param {string[]} controlNames - The names of the controls that must match
|
|
1688
|
+
* @param {string} [message] - Optional custom error message
|
|
1689
|
+
* @returns {ValidatorFn} A validator function producing an `isEqual` error if values do not match
|
|
1690
|
+
*
|
|
1691
|
+
* @example
|
|
1692
|
+
* this.form = new FormGroup({
|
|
1693
|
+
* password: new FormControl(''),
|
|
1694
|
+
* confirmPassword: new FormControl(''),
|
|
1695
|
+
* }, { validators: isEqualValidator(['password', 'confirmPassword']) });
|
|
1696
|
+
*/
|
|
1697
|
+
function isEqualValidator(controlNames, message) {
|
|
1698
|
+
return (group) => {
|
|
1699
|
+
if (!group ||
|
|
1700
|
+
controlNames.length < 2) {
|
|
1701
|
+
return null;
|
|
1702
|
+
}
|
|
1703
|
+
let isEmpty = false;
|
|
1704
|
+
const values = controlNames.reduce((acc, name) => {
|
|
1705
|
+
const control = group.get(name);
|
|
1706
|
+
if (!control) {
|
|
1707
|
+
return acc;
|
|
1708
|
+
}
|
|
1709
|
+
if (!control.value) {
|
|
1710
|
+
isEmpty = true;
|
|
1711
|
+
return acc;
|
|
1712
|
+
}
|
|
1713
|
+
acc.push(control.value);
|
|
1714
|
+
return acc;
|
|
1715
|
+
}, []);
|
|
1716
|
+
if (isEmpty) {
|
|
1717
|
+
return null;
|
|
1718
|
+
}
|
|
1719
|
+
if (!values.every(v => v === values[0])) {
|
|
1720
|
+
const labels = controlNames.map((name) => {
|
|
1721
|
+
return name
|
|
1722
|
+
.replace(/([a-z])([A-Z])/g, '$1 $2')
|
|
1723
|
+
.replace(/_/g, ' ')
|
|
1724
|
+
.replace(/\b\w/g, char => char.toUpperCase());
|
|
1725
|
+
});
|
|
1726
|
+
return {
|
|
1727
|
+
isEqual: {
|
|
1728
|
+
fields: controlNames,
|
|
1729
|
+
message: message || `${labels.join(', ')} should have the same value`
|
|
1730
|
+
}
|
|
1731
|
+
};
|
|
1732
|
+
}
|
|
1733
|
+
return null;
|
|
1734
|
+
};
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
/**
|
|
1738
|
+
* Validator that requires all specified form controls to have different values.
|
|
1739
|
+
*
|
|
1740
|
+
* @param {string[]} controlNames - The names of the controls that must all be unique
|
|
1741
|
+
* @param {string} [message] - Optional custom error message
|
|
1742
|
+
* @returns {ValidatorFn} A validator function producing an `isNotEqual` error if duplicate values exist
|
|
1743
|
+
*
|
|
1744
|
+
* @example
|
|
1745
|
+
* this.form = new FormGroup({
|
|
1746
|
+
* primaryEmail: new FormControl(''),
|
|
1747
|
+
* secondaryEmail: new FormControl(''),
|
|
1748
|
+
* backupEmail: new FormControl(''),
|
|
1749
|
+
* }, { validators: isNotEqualValidator(['primaryEmail', 'secondaryEmail', 'backupEmail']) });
|
|
1750
|
+
*/
|
|
1751
|
+
function isNotEqualValidator(controlNames, message) {
|
|
1752
|
+
return (group) => {
|
|
1753
|
+
if (!group ||
|
|
1754
|
+
controlNames.length < 2) {
|
|
1755
|
+
return null;
|
|
1756
|
+
}
|
|
1757
|
+
let isEmpty = false;
|
|
1758
|
+
const values = controlNames.reduce((acc, name) => {
|
|
1759
|
+
const control = group.get(name);
|
|
1760
|
+
if (!control) {
|
|
1761
|
+
return acc;
|
|
1762
|
+
}
|
|
1763
|
+
if (!control.value) {
|
|
1764
|
+
isEmpty = true;
|
|
1765
|
+
return acc;
|
|
1766
|
+
}
|
|
1767
|
+
acc.push(control.value);
|
|
1768
|
+
return acc;
|
|
1769
|
+
}, []);
|
|
1770
|
+
if (isEmpty) {
|
|
1771
|
+
return null;
|
|
1772
|
+
}
|
|
1773
|
+
if (new Set(values).size !== values.length) {
|
|
1774
|
+
const labels = controlNames.map((name) => {
|
|
1775
|
+
return name
|
|
1776
|
+
.replace(/([a-z])([A-Z])/g, '$1 $2')
|
|
1777
|
+
.replace(/_/g, ' ')
|
|
1778
|
+
.replace(/\b\w/g, char => char.toUpperCase());
|
|
1779
|
+
});
|
|
1780
|
+
return {
|
|
1781
|
+
isNotEqual: {
|
|
1782
|
+
fields: controlNames,
|
|
1783
|
+
message: message || `${labels.join(', ')} should have different values`
|
|
1784
|
+
}
|
|
1785
|
+
};
|
|
1786
|
+
}
|
|
1787
|
+
return null;
|
|
1788
|
+
};
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1694
1791
|
/**
|
|
1695
1792
|
* Generated bundle index. Do not edit.
|
|
1696
1793
|
*/
|
|
1697
1794
|
|
|
1698
|
-
export { UpCheckboxDirective, UpCountrySelectComponent, UpCurrencySelectComponent, UpDateRangePickerComponent, UpDatepickerComponent, UpFieldControl, UpFieldControlComponent, UpFormFieldComponent, UpInputDirective, UpNumberDirective, UpPasswordComponent, UpSearchableSelectComponent, UpSelectComponent, UpSwitchComponent, setValidator, toggleFormControls, validRangeValidator };
|
|
1795
|
+
export { UpCheckboxDirective, UpCountrySelectComponent, UpCurrencySelectComponent, UpDateRangePickerComponent, UpDatepickerComponent, UpFieldControl, UpFieldControlComponent, UpFormFieldComponent, UpInputDirective, UpNumberDirective, UpPasswordComponent, UpSearchableSelectComponent, UpSelectComponent, UpSwitchComponent, isEqualValidator, isNotEqualValidator, setValidator, toggleFormControls, validRangeValidator };
|
|
1699
1796
|
//# sourceMappingURL=unipin-angular-applet-forms.mjs.map
|