@unipin/angular-applet 21.1.3 → 21.3.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 +8 -0
- package/fesm2022/unipin-angular-applet-accordion.mjs +12 -12
- package/fesm2022/unipin-angular-applet-alert-dialog.mjs +10 -7
- package/fesm2022/unipin-angular-applet-alert-dialog.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-alert.mjs +9 -9
- package/fesm2022/unipin-angular-applet-approval.mjs +6 -6
- package/fesm2022/unipin-angular-applet-audit-audit-modal.component-3a2P0bZr.mjs +280 -0
- package/fesm2022/unipin-angular-applet-audit-audit-modal.component-3a2P0bZr.mjs.map +1 -0
- package/fesm2022/unipin-angular-applet-audit.mjs +220 -0
- package/fesm2022/unipin-angular-applet-audit.mjs.map +1 -0
- package/fesm2022/unipin-angular-applet-auth.mjs +21 -21
- package/fesm2022/unipin-angular-applet-avatar.mjs +25 -8
- package/fesm2022/unipin-angular-applet-avatar.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-badge.mjs +3 -3
- package/fesm2022/unipin-angular-applet-buttons.mjs +6 -6
- package/fesm2022/unipin-angular-applet-calendar.mjs +26 -12
- package/fesm2022/unipin-angular-applet-calendar.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-collapsible.mjs +9 -9
- package/fesm2022/unipin-angular-applet-common.mjs +24 -24
- package/fesm2022/unipin-angular-applet-containers.mjs +12 -12
- package/fesm2022/unipin-angular-applet-dialog.mjs +30 -45
- package/fesm2022/unipin-angular-applet-dialog.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-forms.mjs +710 -61
- package/fesm2022/unipin-angular-applet-forms.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-froala.mjs +4 -4
- package/fesm2022/unipin-angular-applet-froala.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-grids.mjs +17 -1
- package/fesm2022/unipin-angular-applet-grids.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-infinite-scroll.mjs +3 -3
- package/fesm2022/unipin-angular-applet-json-viewer.mjs +3 -3
- package/fesm2022/unipin-angular-applet-kbd.mjs +3 -3
- package/fesm2022/unipin-angular-applet-loading-dialog.mjs +6 -6
- package/fesm2022/unipin-angular-applet-markdown.mjs +10 -10
- package/fesm2022/unipin-angular-applet-markdown.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-popover.mjs +18 -18
- package/fesm2022/unipin-angular-applet-popover.mjs.map +1 -1
- package/fesm2022/unipin-angular-applet-progress-bar.mjs +3 -3
- package/fesm2022/unipin-angular-applet-skeleton.mjs +3 -3
- package/fesm2022/unipin-angular-applet-spinner.mjs +3 -3
- package/fesm2022/unipin-angular-applet-stepper.mjs +6 -6
- package/fesm2022/unipin-angular-applet-swipeable.mjs +12 -12
- package/fesm2022/unipin-angular-applet-tabs.mjs +9 -9
- package/fesm2022/unipin-angular-applet-tooltip.mjs +3 -3
- package/package.json +5 -1
- package/types/unipin-angular-applet-audit.d.ts +49 -0
- package/types/unipin-angular-applet-avatar.d.ts +3 -2
- package/types/unipin-angular-applet-containers.d.ts +1 -1
- package/types/unipin-angular-applet-dialog.d.ts +13 -13
- package/types/unipin-angular-applet-forms.d.ts +82 -1
- package/types/unipin-angular-applet-grids.d.ts +17 -1
- package/types/unipin-angular-applet-popover.d.ts +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, inject, Injector, Injectable, input, computed, forwardRef, Directive, HostListener, booleanAttribute, model, ChangeDetectionStrategy, Component, contentChildren, output, contentChild, ViewEncapsulation, viewChild, effect } from '@angular/core';
|
|
2
|
+
import { signal, inject, Injector, Injectable, input, computed, forwardRef, Directive, HostListener, booleanAttribute, model, ChangeDetectionStrategy, Component, contentChildren, output, contentChild, ViewEncapsulation, viewChild, Pipe, afterNextRender, effect } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@unipin/angular-applet/common';
|
|
4
4
|
import { up, compressImage, UpFileDragNDropDirective } from '@unipin/angular-applet/common';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { NgControl, NgForm, FormGroupDirective, FormsModule } from '@angular/forms';
|
|
7
7
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
8
|
-
import { matVisibilityOffRound, matVisibilityRound, matCalendarMonthRound } from '@ng-icons/material-icons/round';
|
|
8
|
+
import { matVisibilityOffRound, matVisibilityRound, matCalendarMonthRound, matWatchLaterRound } from '@ng-icons/material-icons/round';
|
|
9
9
|
import { NgSelectComponent } from '@ng-select/ng-select';
|
|
10
10
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
11
11
|
import { Subject, distinctUntilChanged, debounceTime, tap, switchMap, map, catchError, of } from 'rxjs';
|
|
@@ -13,6 +13,7 @@ import { format } from 'date-fns';
|
|
|
13
13
|
import { UpButtonDirective } from '@unipin/angular-applet/buttons';
|
|
14
14
|
import { UpCalendarComponent } from '@unipin/angular-applet/calendar';
|
|
15
15
|
import { UpPopoverComponent, UpPopoverTriggerDirective, UpPopoverContentRefDirective } from '@unipin/angular-applet/popover';
|
|
16
|
+
import { DecimalPipe } from '@angular/common';
|
|
16
17
|
import { matDelete, matUpload } from '@ng-icons/material-icons/baseline';
|
|
17
18
|
|
|
18
19
|
const errMessage = {
|
|
@@ -21,7 +22,7 @@ const errMessage = {
|
|
|
21
22
|
minlength: (label, length) => `${label} must be at least ${length} characters`,
|
|
22
23
|
maxlength: (label, length) => `${label} must not exceed ${length} characters`,
|
|
23
24
|
max: (label, max) => `${label} value must be lower than ${max}`,
|
|
24
|
-
min: (label, min) => `${label} value must be larger than ${min}
|
|
25
|
+
min: (label, min) => `${label} value must be larger than ${min}`
|
|
25
26
|
};
|
|
26
27
|
const extraParamKey = {
|
|
27
28
|
max: 'max',
|
|
@@ -58,15 +59,23 @@ class UpFieldControlComponent {
|
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
60
61
|
const errKey = Object.keys(control.errors)[0];
|
|
61
|
-
const
|
|
62
|
+
const errorData = control.errors[errKey];
|
|
63
|
+
if (errorData?.message) {
|
|
64
|
+
const newState = errorData.message;
|
|
65
|
+
if (newState !== this.error()) {
|
|
66
|
+
this.error.set(newState);
|
|
67
|
+
}
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const newState = errMessage[errKey](this._controlName ?? 'Field', errorData[extraParamKey[errKey]]);
|
|
62
71
|
if (newState !== this.error()) {
|
|
63
72
|
this.error.set(newState);
|
|
64
73
|
}
|
|
65
74
|
}
|
|
66
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
67
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
75
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpFieldControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
76
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpFieldControlComponent }); }
|
|
68
77
|
}
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpFieldControlComponent, decorators: [{
|
|
70
79
|
type: Injectable
|
|
71
80
|
}] });
|
|
72
81
|
|
|
@@ -75,18 +84,18 @@ class UpInputDirective extends UpFieldControlComponent {
|
|
|
75
84
|
super(...arguments);
|
|
76
85
|
this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
|
|
77
86
|
this._computedClass = computed(() => {
|
|
78
|
-
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());
|
|
87
|
+
return up('peer file:text-foreground placeholder:text-muted-foreground/30 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());
|
|
79
88
|
}, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
80
89
|
}
|
|
81
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
82
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
90
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpInputDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
91
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: UpInputDirective, isStandalone: true, selector: "[upInput]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, providers: [
|
|
83
92
|
{
|
|
84
93
|
provide: UpFieldControl,
|
|
85
94
|
useExisting: forwardRef(() => UpInputDirective)
|
|
86
95
|
}
|
|
87
96
|
], exportAs: ["upInput"], usesInheritance: true, ngImport: i0 }); }
|
|
88
97
|
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpInputDirective, decorators: [{
|
|
90
99
|
type: Directive,
|
|
91
100
|
args: [{
|
|
92
101
|
standalone: true,
|
|
@@ -271,15 +280,15 @@ class UpNumberDirective extends UpInputDirective {
|
|
|
271
280
|
decimal: decimalPart?.slice(0, this.maxDecimalDigits()),
|
|
272
281
|
};
|
|
273
282
|
}
|
|
274
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
275
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
283
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpNumberDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
284
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", 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: [
|
|
276
285
|
{
|
|
277
286
|
provide: UpFieldControl,
|
|
278
287
|
useExisting: forwardRef(() => UpNumberDirective),
|
|
279
288
|
},
|
|
280
289
|
], exportAs: ["upNumber"], usesInheritance: true, ngImport: i0 }); }
|
|
281
290
|
}
|
|
282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpNumberDirective, decorators: [{
|
|
283
292
|
type: Directive,
|
|
284
293
|
args: [{
|
|
285
294
|
standalone: true,
|
|
@@ -396,8 +405,8 @@ class UpPasswordComponent extends UpFieldControlComponent {
|
|
|
396
405
|
this.value.set(value);
|
|
397
406
|
this._onChange(this.value());
|
|
398
407
|
}
|
|
399
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
400
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
408
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
409
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", 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: [
|
|
401
410
|
{
|
|
402
411
|
provide: UpFieldControl,
|
|
403
412
|
useExisting: forwardRef(() => UpPasswordComponent)
|
|
@@ -428,7 +437,7 @@ class UpPasswordComponent extends UpFieldControlComponent {
|
|
|
428
437
|
/>
|
|
429
438
|
`, 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 }); }
|
|
430
439
|
}
|
|
431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpPasswordComponent, decorators: [{
|
|
432
441
|
type: Component,
|
|
433
442
|
args: [{
|
|
434
443
|
standalone: true,
|
|
@@ -483,15 +492,15 @@ class UpRadioDirective extends UpFieldControlComponent {
|
|
|
483
492
|
return up('peer dark:bg-input/30 border-input size-4 min-w-0 rounded-full 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:after:content-[\'\'] checked:after:absolute checked:after:bg-primary checked:after:rounded-full checked:after:size-2 checked:after:left-1/2 checked:after:top-1/2 checked:after:-translate-x-1/2 checked:after:-translate-y-1/2', this.error() ? 'ring-destructive/20 dark:ring-destructive/40 border-destructive focus-visible:ring-destructive/50' : '', this.inlineClass());
|
|
484
493
|
}, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
485
494
|
}
|
|
486
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
487
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
495
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpRadioDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
496
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", type: UpRadioDirective, isStandalone: true, selector: "[upRadio]", inputs: { inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "radio" }, properties: { "class": "_computedClass()" } }, providers: [
|
|
488
497
|
{
|
|
489
498
|
provide: UpFieldControl,
|
|
490
499
|
useExisting: forwardRef(() => UpRadioDirective)
|
|
491
500
|
}
|
|
492
501
|
], exportAs: ["upRadio"], usesInheritance: true, ngImport: i0 }); }
|
|
493
502
|
}
|
|
494
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpRadioDirective, decorators: [{
|
|
495
504
|
type: Directive,
|
|
496
505
|
args: [{
|
|
497
506
|
exportAs: 'upRadio',
|
|
@@ -558,8 +567,8 @@ class UpSwitchComponent extends UpFieldControlComponent {
|
|
|
558
567
|
this._onChange(this.checked());
|
|
559
568
|
this._onTouched();
|
|
560
569
|
}
|
|
561
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
562
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
570
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpSwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
571
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", 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: [
|
|
563
572
|
{
|
|
564
573
|
provide: UpFieldControl,
|
|
565
574
|
useExisting: forwardRef(() => UpSwitchComponent),
|
|
@@ -581,7 +590,7 @@ class UpSwitchComponent extends UpFieldControlComponent {
|
|
|
581
590
|
</span>
|
|
582
591
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
583
592
|
}
|
|
584
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpSwitchComponent, decorators: [{
|
|
585
594
|
type: Component,
|
|
586
595
|
args: [{
|
|
587
596
|
standalone: true,
|
|
@@ -623,15 +632,15 @@ class UpCheckboxDirective extends UpFieldControlComponent {
|
|
|
623
632
|
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());
|
|
624
633
|
}, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
625
634
|
}
|
|
626
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
627
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
635
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpCheckboxDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
636
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.5", 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: [
|
|
628
637
|
{
|
|
629
638
|
provide: UpFieldControl,
|
|
630
639
|
useExisting: forwardRef(() => UpCheckboxDirective)
|
|
631
640
|
}
|
|
632
641
|
], exportAs: ["upCheckbox"], usesInheritance: true, ngImport: i0 }); }
|
|
633
642
|
}
|
|
634
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
643
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpCheckboxDirective, decorators: [{
|
|
635
644
|
type: Directive,
|
|
636
645
|
args: [{
|
|
637
646
|
standalone: true,
|
|
@@ -657,12 +666,12 @@ class UpOptionComponent {
|
|
|
657
666
|
this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
658
667
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
659
668
|
}
|
|
660
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
661
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
669
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpOptionComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
670
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: UpOptionComponent, isStandalone: true, selector: "up-option", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
662
671
|
<ng-content />
|
|
663
672
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
664
673
|
}
|
|
665
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
674
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpOptionComponent, decorators: [{
|
|
666
675
|
type: Component,
|
|
667
676
|
args: [{
|
|
668
677
|
standalone: true,
|
|
@@ -773,8 +782,8 @@ class UpSelectComponent extends UpFieldControlComponent {
|
|
|
773
782
|
this.changed.emit(this.value());
|
|
774
783
|
}
|
|
775
784
|
}
|
|
776
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
777
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
785
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
786
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.5", type: UpSelectComponent, isStandalone: true, selector: "up-select", inputs: { label: { classPropertyName: "label", publicName: "label", 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 }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", 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 }, items: { classPropertyName: "items", publicName: "items", 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 relative" }, providers: [
|
|
778
787
|
{
|
|
779
788
|
provide: UpFieldControl,
|
|
780
789
|
useExisting: forwardRef(() => UpSelectComponent)
|
|
@@ -800,9 +809,9 @@ class UpSelectComponent extends UpFieldControlComponent {
|
|
|
800
809
|
(blur)="touch()"
|
|
801
810
|
(ngModelChange)="change($event)"
|
|
802
811
|
/>
|
|
803
|
-
`, 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 }); }
|
|
812
|
+
`, 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{opacity:30%;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", "clearKeepsDisabledOptions", "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 }); }
|
|
804
813
|
}
|
|
805
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
814
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpSelectComponent, decorators: [{
|
|
806
815
|
type: Component,
|
|
807
816
|
args: [{ standalone: true, selector: 'up-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
808
817
|
class: 'block relative',
|
|
@@ -835,7 +844,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
835
844
|
(blur)="touch()"
|
|
836
845
|
(ngModelChange)="change($event)"
|
|
837
846
|
/>
|
|
838
|
-
`, 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"] }]
|
|
847
|
+
`, 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{opacity:30%;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"] }]
|
|
839
848
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => UpOptionComponent), { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], bindLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "bindLabel", required: false }] }], bindValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "bindValue", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], inlineClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], addTag: [{ type: i0.Input, args: [{ isSignal: true, alias: "addTag", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], changed: [{ type: i0.Output, args: ["changed"] }], control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UpFieldControl), { isSignal: true }] }] } });
|
|
840
849
|
|
|
841
850
|
class UpCountrySelectComponent extends UpFieldControlComponent {
|
|
@@ -903,8 +912,8 @@ class UpCountrySelectComponent extends UpFieldControlComponent {
|
|
|
903
912
|
this.changed.emit(this.countries().find(c => c.code === value));
|
|
904
913
|
}
|
|
905
914
|
}
|
|
906
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
907
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
915
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpCountrySelectComponent, deps: [{ token: i1$1.CountryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
916
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", 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: [
|
|
908
917
|
{
|
|
909
918
|
provide: UpFieldControl,
|
|
910
919
|
useExisting: forwardRef(() => UpCountrySelectComponent),
|
|
@@ -929,7 +938,7 @@ class UpCountrySelectComponent extends UpFieldControlComponent {
|
|
|
929
938
|
/>
|
|
930
939
|
`, isInline: true, dependencies: [{ kind: "component", type: UpSelectComponent, selector: "up-select", inputs: ["label", "placeholder", "bindLabel", "bindValue", "appendTo", "class", "loading", "multiple", "required", "disabled", "clearable", "addTag", "searchable", "virtualScroll", "items", "value"], outputs: ["valueChange", "changed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
931
940
|
}
|
|
932
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
941
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpCountrySelectComponent, decorators: [{
|
|
933
942
|
type: Component,
|
|
934
943
|
args: [{
|
|
935
944
|
standalone: true,
|
|
@@ -1041,8 +1050,8 @@ class UpCurrencySelectComponent extends UpFieldControlComponent {
|
|
|
1041
1050
|
this.changed.emit(this.currencies().find(c => c.code === value));
|
|
1042
1051
|
}
|
|
1043
1052
|
}
|
|
1044
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1045
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1053
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpCurrencySelectComponent, deps: [{ token: i1$1.CurrencyService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1054
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", 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: [
|
|
1046
1055
|
{
|
|
1047
1056
|
provide: UpFieldControl,
|
|
1048
1057
|
useExisting: forwardRef(() => UpCurrencySelectComponent)
|
|
@@ -1067,7 +1076,7 @@ class UpCurrencySelectComponent extends UpFieldControlComponent {
|
|
|
1067
1076
|
/>
|
|
1068
1077
|
`, isInline: true, dependencies: [{ kind: "component", type: UpSelectComponent, selector: "up-select", inputs: ["label", "placeholder", "bindLabel", "bindValue", "appendTo", "class", "loading", "multiple", "required", "disabled", "clearable", "addTag", "searchable", "virtualScroll", "items", "value"], outputs: ["valueChange", "changed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1069
1078
|
}
|
|
1070
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1079
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpCurrencySelectComponent, decorators: [{
|
|
1071
1080
|
type: Component,
|
|
1072
1081
|
args: [{
|
|
1073
1082
|
standalone: true,
|
|
@@ -1181,8 +1190,8 @@ class UpSearchableSelectComponent extends UpFieldControlComponent {
|
|
|
1181
1190
|
this.changed.emit(this.value());
|
|
1182
1191
|
}
|
|
1183
1192
|
}
|
|
1184
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1185
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
1193
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpSearchableSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1194
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.5", 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 }, 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 }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", 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: [
|
|
1186
1195
|
{
|
|
1187
1196
|
provide: UpFieldControl,
|
|
1188
1197
|
useExisting: forwardRef(() => UpSearchableSelectComponent)
|
|
@@ -1215,9 +1224,9 @@ class UpSearchableSelectComponent extends UpFieldControlComponent {
|
|
|
1215
1224
|
(blur)="touch()"
|
|
1216
1225
|
(change)="change($event)"
|
|
1217
1226
|
/>
|
|
1218
|
-
`, 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 }); }
|
|
1227
|
+
`, 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{opacity:30%;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", "clearKeepsDisabledOptions", "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 }); }
|
|
1219
1228
|
}
|
|
1220
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpSearchableSelectComponent, decorators: [{
|
|
1221
1230
|
type: Component,
|
|
1222
1231
|
args: [{ standalone: true, selector: 'up-searchable-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1223
1232
|
class: 'block relative',
|
|
@@ -1257,7 +1266,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1257
1266
|
(blur)="touch()"
|
|
1258
1267
|
(change)="change($event)"
|
|
1259
1268
|
/>
|
|
1260
|
-
`, 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"] }]
|
|
1269
|
+
`, 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{opacity:30%;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"] }]
|
|
1261
1270
|
}], ctorParameters: () => [], propDecorators: { query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], initialItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialItems", required: false }] }], bindLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "bindLabel", required: false }] }], bindValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "bindValue", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], inlineClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], addTag: [{ type: i0.Input, args: [{ isSignal: true, alias: "addTag", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }, { type: i0.Output, args: ["loadingChange"] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], changed: [{ type: i0.Output, args: ["changed"] }], control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => UpFieldControl), { isSignal: true }] }] } });
|
|
1262
1271
|
|
|
1263
1272
|
class UpRateGroupCodeSelectComponent extends UpFieldControlComponent {
|
|
@@ -1335,8 +1344,8 @@ class UpRateGroupCodeSelectComponent extends UpFieldControlComponent {
|
|
|
1335
1344
|
this.changed.emit(value);
|
|
1336
1345
|
}
|
|
1337
1346
|
}
|
|
1338
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1339
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1347
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpRateGroupCodeSelectComponent, deps: [{ token: i1$1.RateGroupCodeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1348
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: UpRateGroupCodeSelectComponent, isStandalone: true, selector: "up-rate-group-code-select", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", 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: [
|
|
1340
1349
|
{
|
|
1341
1350
|
provide: UpFieldControl,
|
|
1342
1351
|
useExisting: forwardRef(() => UpRateGroupCodeSelectComponent),
|
|
@@ -1361,7 +1370,7 @@ class UpRateGroupCodeSelectComponent extends UpFieldControlComponent {
|
|
|
1361
1370
|
/>
|
|
1362
1371
|
`, isInline: true, dependencies: [{ kind: "component", type: UpSearchableSelectComponent, selector: "up-searchable-select", inputs: ["query", "label", "placeholder", "initialItems", "bindLabel", "bindValue", "appendTo", "class", "addTag", "multiple", "required", "disabled", "clearable", "virtualScroll", "loading", "value"], outputs: ["loadingChange", "valueChange", "changed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1363
1372
|
}
|
|
1364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpRateGroupCodeSelectComponent, decorators: [{
|
|
1365
1374
|
type: Component,
|
|
1366
1375
|
args: [{
|
|
1367
1376
|
standalone: true,
|
|
@@ -1453,8 +1462,8 @@ class UpDatepickerComponent extends UpFieldControlComponent {
|
|
|
1453
1462
|
this._onTouched();
|
|
1454
1463
|
this._isTouched = true;
|
|
1455
1464
|
}
|
|
1456
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1457
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
1465
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1466
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.5", 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: [
|
|
1458
1467
|
{
|
|
1459
1468
|
provide: UpFieldControl,
|
|
1460
1469
|
useExisting: forwardRef(() => UpDatepickerComponent),
|
|
@@ -1498,7 +1507,7 @@ class UpDatepickerComponent extends UpFieldControlComponent {
|
|
|
1498
1507
|
</up-popover>
|
|
1499
1508
|
`, 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 }); }
|
|
1500
1509
|
}
|
|
1501
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpDatepickerComponent, decorators: [{
|
|
1502
1511
|
type: Component,
|
|
1503
1512
|
args: [{
|
|
1504
1513
|
standalone: true,
|
|
@@ -1609,8 +1618,8 @@ class UpDateRangePickerComponent extends UpFieldControlComponent {
|
|
|
1609
1618
|
this._onTouched();
|
|
1610
1619
|
this._isTouched = true;
|
|
1611
1620
|
}
|
|
1612
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1613
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1621
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpDateRangePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1622
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", 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: [
|
|
1614
1623
|
{
|
|
1615
1624
|
provide: UpFieldControl,
|
|
1616
1625
|
useExisting: forwardRef(() => UpDateRangePickerComponent)
|
|
@@ -1655,7 +1664,7 @@ class UpDateRangePickerComponent extends UpFieldControlComponent {
|
|
|
1655
1664
|
</up-popover>
|
|
1656
1665
|
`, 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 }); }
|
|
1657
1666
|
}
|
|
1658
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1667
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpDateRangePickerComponent, decorators: [{
|
|
1659
1668
|
type: Component,
|
|
1660
1669
|
args: [{
|
|
1661
1670
|
standalone: true,
|
|
@@ -1717,6 +1726,644 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1717
1726
|
}]
|
|
1718
1727
|
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], inlineClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
1719
1728
|
|
|
1729
|
+
function updateScrollSelection(el, itemHeight, maxIndex, setIndex) {
|
|
1730
|
+
if (!el) {
|
|
1731
|
+
return;
|
|
1732
|
+
}
|
|
1733
|
+
const index = Math.round(el.scrollTop / itemHeight);
|
|
1734
|
+
setIndex(Math.max(0, Math.min(maxIndex, index)));
|
|
1735
|
+
}
|
|
1736
|
+
function snapScroll(el, itemHeight, index) {
|
|
1737
|
+
if (!el) {
|
|
1738
|
+
return;
|
|
1739
|
+
}
|
|
1740
|
+
el.scrollTo({
|
|
1741
|
+
behavior: 'smooth',
|
|
1742
|
+
top: index * itemHeight,
|
|
1743
|
+
});
|
|
1744
|
+
}
|
|
1745
|
+
function scrollImmediate(el, itemHeight, index) {
|
|
1746
|
+
if (!el) {
|
|
1747
|
+
return;
|
|
1748
|
+
}
|
|
1749
|
+
el.scrollTop = index * itemHeight;
|
|
1750
|
+
}
|
|
1751
|
+
function findClosestIndex(values, target) {
|
|
1752
|
+
let closestIdx = 0;
|
|
1753
|
+
let minDiff = Math.abs(values[0] - target);
|
|
1754
|
+
for (let i = 1; i < values.length; i++) {
|
|
1755
|
+
const diff = Math.abs(values[i] - target);
|
|
1756
|
+
if (diff < minDiff) {
|
|
1757
|
+
minDiff = diff;
|
|
1758
|
+
closestIdx = i;
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
return closestIdx;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
class OpacityPipe {
|
|
1765
|
+
transform(itemIndex, selectedIndex) {
|
|
1766
|
+
const distance = Math.abs(itemIndex - selectedIndex);
|
|
1767
|
+
switch (distance) {
|
|
1768
|
+
case 0:
|
|
1769
|
+
return 'opacity-100';
|
|
1770
|
+
case 1:
|
|
1771
|
+
return 'opacity-20';
|
|
1772
|
+
case 2:
|
|
1773
|
+
return 'opacity-10';
|
|
1774
|
+
default:
|
|
1775
|
+
return 'opacity-15';
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: OpacityPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1779
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.5", ngImport: i0, type: OpacityPipe, isStandalone: true, name: "opacity" }); }
|
|
1780
|
+
}
|
|
1781
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: OpacityPipe, decorators: [{
|
|
1782
|
+
type: Pipe,
|
|
1783
|
+
args: [{
|
|
1784
|
+
name: 'opacity',
|
|
1785
|
+
pure: true,
|
|
1786
|
+
}]
|
|
1787
|
+
}] });
|
|
1788
|
+
|
|
1789
|
+
class UpTimeComponent {
|
|
1790
|
+
constructor() {
|
|
1791
|
+
this.hoursScroll = viewChild('hoursScroll', ...(ngDevMode ? [{ debugName: "hoursScroll" }] : []));
|
|
1792
|
+
this.minutesScroll = viewChild('minutesScroll', ...(ngDevMode ? [{ debugName: "minutesScroll" }] : []));
|
|
1793
|
+
this.minuteInterval = input(1, ...(ngDevMode ? [{ debugName: "minuteInterval" }] : []));
|
|
1794
|
+
this.minTime = input(...(ngDevMode ? [undefined, { debugName: "minTime" }] : []));
|
|
1795
|
+
this.maxTime = input(...(ngDevMode ? [undefined, { debugName: "maxTime" }] : []));
|
|
1796
|
+
this.value = input({ hour: 0, minute: 0 }, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
1797
|
+
this.timeChanged = output();
|
|
1798
|
+
this.selectedHourIndex = signal(0, ...(ngDevMode ? [{ debugName: "selectedHourIndex" }] : []));
|
|
1799
|
+
this.selectedMinuteIndex = signal(0, ...(ngDevMode ? [{ debugName: "selectedMinuteIndex" }] : []));
|
|
1800
|
+
this.minHour = computed(() => this.minTime()?.hour ?? 0, ...(ngDevMode ? [{ debugName: "minHour" }] : []));
|
|
1801
|
+
this.maxHour = computed(() => this.maxTime()?.hour ?? 23, ...(ngDevMode ? [{ debugName: "maxHour" }] : []));
|
|
1802
|
+
this.minMinute = computed(() => this.minTime()?.minute ?? 0, ...(ngDevMode ? [{ debugName: "minMinute" }] : []));
|
|
1803
|
+
this.maxMinute = computed(() => this.maxTime()?.minute ?? 59, ...(ngDevMode ? [{ debugName: "maxMinute" }] : []));
|
|
1804
|
+
this.hours = Array.from({ length: 24 }, (_, i) => i);
|
|
1805
|
+
this.minutes = computed(() => {
|
|
1806
|
+
const interval = Math.max(1, Math.min(60, this.minuteInterval()));
|
|
1807
|
+
const count = Math.ceil(60 / interval);
|
|
1808
|
+
return Array.from({ length: count }, (_, i) => i * interval).filter((m) => m < 60);
|
|
1809
|
+
}, ...(ngDevMode ? [{ debugName: "minutes" }] : []));
|
|
1810
|
+
this.hourInvisible = computed(() => {
|
|
1811
|
+
return this.hours.map((hour) => {
|
|
1812
|
+
return hour < (this.minTime()?.hour ?? 0) ||
|
|
1813
|
+
hour > (this.maxTime()?.hour ?? 23);
|
|
1814
|
+
});
|
|
1815
|
+
}, ...(ngDevMode ? [{ debugName: "hourInvisible" }] : []));
|
|
1816
|
+
this.minuteInvisible = computed(() => {
|
|
1817
|
+
const selectedHour = this.hours[this.selectedHourIndex()] ?? 0;
|
|
1818
|
+
return this.minutes().map((minute) => (selectedHour === this.minHour() && minute < this.minMinute()) ||
|
|
1819
|
+
(selectedHour === this.maxHour() && minute > this.maxMinute()));
|
|
1820
|
+
}, ...(ngDevMode ? [{ debugName: "minuteInvisible" }] : []));
|
|
1821
|
+
this.validMinuteRange = computed(() => {
|
|
1822
|
+
const selectedHour = this.hours[this.selectedHourIndex()] ?? 0;
|
|
1823
|
+
let min = 0;
|
|
1824
|
+
let max = 59;
|
|
1825
|
+
if (selectedHour === this.minHour()) {
|
|
1826
|
+
min = this.minMinute();
|
|
1827
|
+
}
|
|
1828
|
+
if (selectedHour === this.maxHour()) {
|
|
1829
|
+
max = this.maxMinute();
|
|
1830
|
+
}
|
|
1831
|
+
return { min, max };
|
|
1832
|
+
}, ...(ngDevMode ? [{ debugName: "validMinuteRange" }] : []));
|
|
1833
|
+
this.itemHeight = 40;
|
|
1834
|
+
this.visibleItems = 5;
|
|
1835
|
+
this.containerHeight = this.itemHeight * this.visibleItems;
|
|
1836
|
+
this.padding = (this.itemHeight * this.visibleItems - this.itemHeight) / 2;
|
|
1837
|
+
this.highlightTop = this.padding;
|
|
1838
|
+
this.scrollTimeout = null;
|
|
1839
|
+
this.lastEmittedTime = null;
|
|
1840
|
+
afterNextRender(() => this.initializeScrollPosition());
|
|
1841
|
+
}
|
|
1842
|
+
initializeScrollPosition() {
|
|
1843
|
+
const hourIdx = this.hours.indexOf(this.value().hour);
|
|
1844
|
+
const minuteIdx = findClosestIndex(this.minutes(), this.value().minute);
|
|
1845
|
+
if (hourIdx !== -1) {
|
|
1846
|
+
this.selectedHourIndex.set(hourIdx);
|
|
1847
|
+
}
|
|
1848
|
+
this.selectedMinuteIndex.set(minuteIdx);
|
|
1849
|
+
this.scrollToHourImmediate(hourIdx);
|
|
1850
|
+
this.scrollToMinuteImmediate(minuteIdx);
|
|
1851
|
+
this.emitTime();
|
|
1852
|
+
}
|
|
1853
|
+
onHoursScroll() {
|
|
1854
|
+
this.updateHourSelection();
|
|
1855
|
+
this.debounceEmit();
|
|
1856
|
+
}
|
|
1857
|
+
onMinutesScroll() {
|
|
1858
|
+
this.updateMinuteSelection();
|
|
1859
|
+
this.debounceEmit();
|
|
1860
|
+
}
|
|
1861
|
+
debounceEmit() {
|
|
1862
|
+
clearTimeout(this.scrollTimeout);
|
|
1863
|
+
this.scrollTimeout = setTimeout(() => {
|
|
1864
|
+
this.clampSelectionToValidRange();
|
|
1865
|
+
this.emitTime();
|
|
1866
|
+
}, 150);
|
|
1867
|
+
}
|
|
1868
|
+
clampSelectionToValidRange() {
|
|
1869
|
+
const hours = this.hours;
|
|
1870
|
+
const minutes = this.minutes();
|
|
1871
|
+
let hourIdx = this.selectedHourIndex();
|
|
1872
|
+
const currentHour = hours[hourIdx] ?? 0;
|
|
1873
|
+
if (currentHour < this.minHour()) {
|
|
1874
|
+
hourIdx = hours.indexOf(this.minHour());
|
|
1875
|
+
if (hourIdx === -1) {
|
|
1876
|
+
for (let i = 0; i < hours.length; i++) {
|
|
1877
|
+
if (hours[i] >= this.minHour()) {
|
|
1878
|
+
hourIdx = i;
|
|
1879
|
+
break;
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
this.selectedHourIndex.set(hourIdx);
|
|
1884
|
+
this.scrollToHourImmediate(hourIdx);
|
|
1885
|
+
}
|
|
1886
|
+
else if (currentHour > this.maxHour()) {
|
|
1887
|
+
hourIdx = hours.indexOf(this.maxHour());
|
|
1888
|
+
if (hourIdx === -1) {
|
|
1889
|
+
for (let i = hours.length - 1; i >= 0; i--) {
|
|
1890
|
+
if (hours[i] <= this.maxHour()) {
|
|
1891
|
+
hourIdx = i;
|
|
1892
|
+
break;
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
this.selectedHourIndex.set(hourIdx);
|
|
1897
|
+
this.scrollToHourImmediate(hourIdx);
|
|
1898
|
+
}
|
|
1899
|
+
const { min: minMinute, max: maxMinute } = this.validMinuteRange();
|
|
1900
|
+
let minuteIdx = this.selectedMinuteIndex();
|
|
1901
|
+
const currentMinute = minutes[minuteIdx] ?? 0;
|
|
1902
|
+
if (currentMinute < minMinute) {
|
|
1903
|
+
let newIdx = -1;
|
|
1904
|
+
for (let i = 0; i < minutes.length; i++) {
|
|
1905
|
+
if (minutes[i] >= minMinute) {
|
|
1906
|
+
newIdx = i;
|
|
1907
|
+
break;
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
if (newIdx !== -1) {
|
|
1911
|
+
this.selectedMinuteIndex.set(newIdx);
|
|
1912
|
+
this.scrollToMinuteImmediate(newIdx);
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
else if (currentMinute > maxMinute) {
|
|
1916
|
+
let newIdx = -1;
|
|
1917
|
+
for (let i = minutes.length - 1; i >= 0; i--) {
|
|
1918
|
+
if (minutes[i] <= maxMinute) {
|
|
1919
|
+
newIdx = i;
|
|
1920
|
+
break;
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
if (newIdx !== -1) {
|
|
1924
|
+
this.selectedMinuteIndex.set(newIdx);
|
|
1925
|
+
this.scrollToMinuteImmediate(newIdx);
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
updateHourSelection() {
|
|
1930
|
+
updateScrollSelection(this.hoursScroll().nativeElement, this.itemHeight, this.hours.length - 1, (v) => this.selectedHourIndex.set(v));
|
|
1931
|
+
}
|
|
1932
|
+
updateMinuteSelection() {
|
|
1933
|
+
updateScrollSelection(this.minutesScroll().nativeElement, this.itemHeight, this.minutes().length - 1, (v) => this.selectedMinuteIndex.set(v));
|
|
1934
|
+
}
|
|
1935
|
+
snapHours() {
|
|
1936
|
+
snapScroll(this.hoursScroll().nativeElement, this.itemHeight, this.selectedHourIndex());
|
|
1937
|
+
}
|
|
1938
|
+
snapMinutes() {
|
|
1939
|
+
snapScroll(this.minutesScroll().nativeElement, this.itemHeight, this.selectedMinuteIndex());
|
|
1940
|
+
}
|
|
1941
|
+
scrollToHour(index) {
|
|
1942
|
+
const clamped = Math.max(0, Math.min(23, index));
|
|
1943
|
+
this.selectedHourIndex.set(clamped);
|
|
1944
|
+
this.scrollToHourImmediate(clamped);
|
|
1945
|
+
this.emitTime();
|
|
1946
|
+
}
|
|
1947
|
+
scrollToMinute(index) {
|
|
1948
|
+
const maxIdx = this.minutes().length - 1;
|
|
1949
|
+
const clamped = Math.max(0, Math.min(maxIdx, index));
|
|
1950
|
+
this.selectedMinuteIndex.set(clamped);
|
|
1951
|
+
this.scrollToMinuteImmediate(clamped);
|
|
1952
|
+
this.emitTime();
|
|
1953
|
+
}
|
|
1954
|
+
scrollToHourImmediate(index) {
|
|
1955
|
+
scrollImmediate(this.hoursScroll().nativeElement, this.itemHeight, index);
|
|
1956
|
+
}
|
|
1957
|
+
scrollToMinuteImmediate(index) {
|
|
1958
|
+
scrollImmediate(this.minutesScroll().nativeElement, this.itemHeight, index);
|
|
1959
|
+
}
|
|
1960
|
+
clampTime(time) {
|
|
1961
|
+
let { hour, minute } = time;
|
|
1962
|
+
const min = this.minTime();
|
|
1963
|
+
const max = this.maxTime();
|
|
1964
|
+
if (min) {
|
|
1965
|
+
if (hour < (min.hour ?? 0)) {
|
|
1966
|
+
hour = min.hour;
|
|
1967
|
+
minute = min.minute ?? 0;
|
|
1968
|
+
}
|
|
1969
|
+
else if (hour === (min.hour ?? 0) && min.minute !== undefined) {
|
|
1970
|
+
minute = Math.max(min.minute, minute);
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
if (max) {
|
|
1974
|
+
if (hour > (max.hour ?? 23)) {
|
|
1975
|
+
hour = max.hour;
|
|
1976
|
+
minute = max.minute ?? 59;
|
|
1977
|
+
}
|
|
1978
|
+
else if (hour === (max.hour ?? 23) && max.minute !== undefined) {
|
|
1979
|
+
minute = Math.min(max.minute, minute);
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
const minuteValues = this.minutes();
|
|
1983
|
+
if (!minuteValues.includes(minute)) {
|
|
1984
|
+
let closest = minuteValues[0];
|
|
1985
|
+
let minDiff = Math.abs(minuteValues[0] - minute);
|
|
1986
|
+
for (let m of minuteValues) {
|
|
1987
|
+
const diff = Math.abs(m - minute);
|
|
1988
|
+
if (diff < minDiff) {
|
|
1989
|
+
closest = m;
|
|
1990
|
+
minDiff = diff;
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
minute = closest;
|
|
1994
|
+
}
|
|
1995
|
+
return { hour, minute };
|
|
1996
|
+
}
|
|
1997
|
+
emitTime() {
|
|
1998
|
+
let time = {
|
|
1999
|
+
hour: this.hours[this.selectedHourIndex()],
|
|
2000
|
+
minute: this.minutes()[this.selectedMinuteIndex()],
|
|
2001
|
+
};
|
|
2002
|
+
time = this.clampTime(time);
|
|
2003
|
+
if (!this.lastEmittedTime ||
|
|
2004
|
+
this.lastEmittedTime.hour !== time.hour ||
|
|
2005
|
+
this.lastEmittedTime.minute !== time.minute) {
|
|
2006
|
+
this.lastEmittedTime = time;
|
|
2007
|
+
this.timeChanged.emit(time);
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpTimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2011
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: UpTimeComponent, isStandalone: true, selector: "up-time", inputs: { minuteInterval: { classPropertyName: "minuteInterval", publicName: "minuteInterval", isSignal: true, isRequired: false, transformFunction: null }, minTime: { classPropertyName: "minTime", publicName: "minTime", isSignal: true, isRequired: false, transformFunction: null }, maxTime: { classPropertyName: "maxTime", publicName: "maxTime", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { timeChanged: "timeChanged" }, viewQueries: [{ propertyName: "hoursScroll", first: true, predicate: ["hoursScroll"], descendants: true, isSignal: true }, { propertyName: "minutesScroll", first: true, predicate: ["minutesScroll"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2012
|
+
<div
|
|
2013
|
+
class="relative w-37 flex gap-2 rounded-xl border border-border bg-white p-3 shadow-lg"
|
|
2014
|
+
[style.height.px]="containerHeight"
|
|
2015
|
+
>
|
|
2016
|
+
<!-- Hours scroll wheel -->
|
|
2017
|
+
<div class="flex-1 relative overflow-hidden">
|
|
2018
|
+
<div
|
|
2019
|
+
class="
|
|
2020
|
+
h-full overflow-y-scroll snap-y snap-mandatory overscroll-contain
|
|
2021
|
+
[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]
|
|
2022
|
+
"
|
|
2023
|
+
(scroll)="onHoursScroll()"
|
|
2024
|
+
|
|
2025
|
+
#hoursScroll
|
|
2026
|
+
>
|
|
2027
|
+
<!-- Top padding -->
|
|
2028
|
+
<div [style.height.px]="padding"></div>
|
|
2029
|
+
|
|
2030
|
+
<!-- Hour items -->
|
|
2031
|
+
@for (hour of hours; track $index) {
|
|
2032
|
+
<div
|
|
2033
|
+
[class.invisible]="hourInvisible()[$index]"
|
|
2034
|
+
[class]="
|
|
2035
|
+
'h-10 flex items-center justify-center cursor-pointer transition-opacity duration-200 snap-center ' +
|
|
2036
|
+
($index | opacity: selectedHourIndex())
|
|
2037
|
+
"
|
|
2038
|
+
(click)="scrollToHour($index)"
|
|
2039
|
+
>
|
|
2040
|
+
<span class="text-xl font-medium">
|
|
2041
|
+
{{ hour | number:'2.0-0' }}
|
|
2042
|
+
</span>
|
|
2043
|
+
</div>
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
<!-- Bottom padding -->
|
|
2047
|
+
<div [style.height.px]="padding"></div>
|
|
2048
|
+
</div>
|
|
2049
|
+
</div>
|
|
2050
|
+
|
|
2051
|
+
<!-- Minutes scroll wheel -->
|
|
2052
|
+
<div class="flex-1 relative overflow-hidden">
|
|
2053
|
+
<div
|
|
2054
|
+
#minutesScroll
|
|
2055
|
+
class="
|
|
2056
|
+
h-full overflow-y-scroll snap-y snap-mandatory overscroll-contain
|
|
2057
|
+
[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]
|
|
2058
|
+
"
|
|
2059
|
+
(scroll)="onMinutesScroll()"
|
|
2060
|
+
>
|
|
2061
|
+
<!-- Top padding -->
|
|
2062
|
+
<div [style.height.px]="padding"></div>
|
|
2063
|
+
|
|
2064
|
+
<!-- Minute items -->
|
|
2065
|
+
@for (minute of minutes(); track $index) {
|
|
2066
|
+
<div
|
|
2067
|
+
[class.invisible]="minuteInvisible()[$index]"
|
|
2068
|
+
[class]="
|
|
2069
|
+
'h-10 flex items-center justify-center cursor-pointer transition-opacity duration-200 snap-center ' +
|
|
2070
|
+
($index | opacity: selectedMinuteIndex())
|
|
2071
|
+
"
|
|
2072
|
+
(click)="scrollToMinute($index)"
|
|
2073
|
+
>
|
|
2074
|
+
<span class="text-xl font-medium">
|
|
2075
|
+
{{ minute | number:'2.0-0' }}
|
|
2076
|
+
</span>
|
|
2077
|
+
</div>
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
<!-- Bottom padding -->
|
|
2081
|
+
<div [style.height.px]="padding"></div>
|
|
2082
|
+
</div>
|
|
2083
|
+
</div>
|
|
2084
|
+
|
|
2085
|
+
<!-- Center highlight -->
|
|
2086
|
+
<div
|
|
2087
|
+
class="absolute inset-x-0 left-3 right-3 pointer-events-none flex items-center justify-center"
|
|
2088
|
+
[style.top.px]="highlightTop"
|
|
2089
|
+
[style.height.px]="itemHeight"
|
|
2090
|
+
>
|
|
2091
|
+
<div class="flex items-center justify-center font-medium w-full h-full bg-accent/30 border border-primary rounded-md shadow-inner">
|
|
2092
|
+
:
|
|
2093
|
+
</div>
|
|
2094
|
+
</div>
|
|
2095
|
+
</div>
|
|
2096
|
+
`, isInline: true, dependencies: [{ kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: OpacityPipe, name: "opacity" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2097
|
+
}
|
|
2098
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpTimeComponent, decorators: [{
|
|
2099
|
+
type: Component,
|
|
2100
|
+
args: [{
|
|
2101
|
+
selector: 'up-time',
|
|
2102
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2103
|
+
imports: [
|
|
2104
|
+
DecimalPipe,
|
|
2105
|
+
OpacityPipe,
|
|
2106
|
+
],
|
|
2107
|
+
template: `
|
|
2108
|
+
<div
|
|
2109
|
+
class="relative w-37 flex gap-2 rounded-xl border border-border bg-white p-3 shadow-lg"
|
|
2110
|
+
[style.height.px]="containerHeight"
|
|
2111
|
+
>
|
|
2112
|
+
<!-- Hours scroll wheel -->
|
|
2113
|
+
<div class="flex-1 relative overflow-hidden">
|
|
2114
|
+
<div
|
|
2115
|
+
class="
|
|
2116
|
+
h-full overflow-y-scroll snap-y snap-mandatory overscroll-contain
|
|
2117
|
+
[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]
|
|
2118
|
+
"
|
|
2119
|
+
(scroll)="onHoursScroll()"
|
|
2120
|
+
|
|
2121
|
+
#hoursScroll
|
|
2122
|
+
>
|
|
2123
|
+
<!-- Top padding -->
|
|
2124
|
+
<div [style.height.px]="padding"></div>
|
|
2125
|
+
|
|
2126
|
+
<!-- Hour items -->
|
|
2127
|
+
@for (hour of hours; track $index) {
|
|
2128
|
+
<div
|
|
2129
|
+
[class.invisible]="hourInvisible()[$index]"
|
|
2130
|
+
[class]="
|
|
2131
|
+
'h-10 flex items-center justify-center cursor-pointer transition-opacity duration-200 snap-center ' +
|
|
2132
|
+
($index | opacity: selectedHourIndex())
|
|
2133
|
+
"
|
|
2134
|
+
(click)="scrollToHour($index)"
|
|
2135
|
+
>
|
|
2136
|
+
<span class="text-xl font-medium">
|
|
2137
|
+
{{ hour | number:'2.0-0' }}
|
|
2138
|
+
</span>
|
|
2139
|
+
</div>
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
<!-- Bottom padding -->
|
|
2143
|
+
<div [style.height.px]="padding"></div>
|
|
2144
|
+
</div>
|
|
2145
|
+
</div>
|
|
2146
|
+
|
|
2147
|
+
<!-- Minutes scroll wheel -->
|
|
2148
|
+
<div class="flex-1 relative overflow-hidden">
|
|
2149
|
+
<div
|
|
2150
|
+
#minutesScroll
|
|
2151
|
+
class="
|
|
2152
|
+
h-full overflow-y-scroll snap-y snap-mandatory overscroll-contain
|
|
2153
|
+
[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]
|
|
2154
|
+
"
|
|
2155
|
+
(scroll)="onMinutesScroll()"
|
|
2156
|
+
>
|
|
2157
|
+
<!-- Top padding -->
|
|
2158
|
+
<div [style.height.px]="padding"></div>
|
|
2159
|
+
|
|
2160
|
+
<!-- Minute items -->
|
|
2161
|
+
@for (minute of minutes(); track $index) {
|
|
2162
|
+
<div
|
|
2163
|
+
[class.invisible]="minuteInvisible()[$index]"
|
|
2164
|
+
[class]="
|
|
2165
|
+
'h-10 flex items-center justify-center cursor-pointer transition-opacity duration-200 snap-center ' +
|
|
2166
|
+
($index | opacity: selectedMinuteIndex())
|
|
2167
|
+
"
|
|
2168
|
+
(click)="scrollToMinute($index)"
|
|
2169
|
+
>
|
|
2170
|
+
<span class="text-xl font-medium">
|
|
2171
|
+
{{ minute | number:'2.0-0' }}
|
|
2172
|
+
</span>
|
|
2173
|
+
</div>
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
<!-- Bottom padding -->
|
|
2177
|
+
<div [style.height.px]="padding"></div>
|
|
2178
|
+
</div>
|
|
2179
|
+
</div>
|
|
2180
|
+
|
|
2181
|
+
<!-- Center highlight -->
|
|
2182
|
+
<div
|
|
2183
|
+
class="absolute inset-x-0 left-3 right-3 pointer-events-none flex items-center justify-center"
|
|
2184
|
+
[style.top.px]="highlightTop"
|
|
2185
|
+
[style.height.px]="itemHeight"
|
|
2186
|
+
>
|
|
2187
|
+
<div class="flex items-center justify-center font-medium w-full h-full bg-accent/30 border border-primary rounded-md shadow-inner">
|
|
2188
|
+
:
|
|
2189
|
+
</div>
|
|
2190
|
+
</div>
|
|
2191
|
+
</div>
|
|
2192
|
+
`,
|
|
2193
|
+
}]
|
|
2194
|
+
}], ctorParameters: () => [], propDecorators: { hoursScroll: [{ type: i0.ViewChild, args: ['hoursScroll', { isSignal: true }] }], minutesScroll: [{ type: i0.ViewChild, args: ['minutesScroll', { isSignal: true }] }], minuteInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteInterval", required: false }] }], minTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "minTime", required: false }] }], maxTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxTime", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], timeChanged: [{ type: i0.Output, args: ["timeChanged"] }] } });
|
|
2195
|
+
|
|
2196
|
+
class UpTimepickerComponent extends UpFieldControlComponent {
|
|
2197
|
+
constructor() {
|
|
2198
|
+
super();
|
|
2199
|
+
this.minTime = input(...(ngDevMode ? [undefined, { debugName: "minTime" }] : []));
|
|
2200
|
+
this.maxTime = input(...(ngDevMode ? [undefined, { debugName: "maxTime" }] : []));
|
|
2201
|
+
this.inlineClass = input('', { ...(ngDevMode ? { debugName: "inlineClass" } : {}), alias: 'class' });
|
|
2202
|
+
this.initialHour = input(0, ...(ngDevMode ? [{ debugName: "initialHour" }] : []));
|
|
2203
|
+
this.initialMinute = input(0, ...(ngDevMode ? [{ debugName: "initialMinute" }] : []));
|
|
2204
|
+
this.minuteInterval = input(1, ...(ngDevMode ? [{ debugName: "minuteInterval" }] : []));
|
|
2205
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
2206
|
+
this._disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
2207
|
+
this.value = signal({ hour: 0, minute: 0 }, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
2208
|
+
this.formattedTime = computed(() => {
|
|
2209
|
+
const time = this.value();
|
|
2210
|
+
if (!time) {
|
|
2211
|
+
return '--:--';
|
|
2212
|
+
}
|
|
2213
|
+
const hour = time.hour ?? 0;
|
|
2214
|
+
const minute = time.minute ?? 0;
|
|
2215
|
+
return `${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`;
|
|
2216
|
+
}, ...(ngDevMode ? [{ debugName: "formattedTime" }] : []));
|
|
2217
|
+
this._computedClass = computed(() => {
|
|
2218
|
+
return up('flex justify-between px-3 border border-border min-w-40 w-full font-normal hover:not-disabled:text-primary! data-[has-value=false]:text-muted-foreground', this.inlineClass());
|
|
2219
|
+
}, ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
2220
|
+
this._isTouched = false;
|
|
2221
|
+
this._onTouched = () => { };
|
|
2222
|
+
this._onChange = () => { };
|
|
2223
|
+
if (this.ngControl !== null) {
|
|
2224
|
+
this.ngControl.valueAccessor = this;
|
|
2225
|
+
}
|
|
2226
|
+
effect(() => {
|
|
2227
|
+
if (!this.ngControl) {
|
|
2228
|
+
this.value.set({
|
|
2229
|
+
hour: this.initialHour(),
|
|
2230
|
+
minute: this.initialMinute(),
|
|
2231
|
+
});
|
|
2232
|
+
}
|
|
2233
|
+
});
|
|
2234
|
+
}
|
|
2235
|
+
registerOnChange(fn) {
|
|
2236
|
+
this._onChange = fn;
|
|
2237
|
+
}
|
|
2238
|
+
registerOnTouched(fn) {
|
|
2239
|
+
this._onTouched = fn;
|
|
2240
|
+
}
|
|
2241
|
+
touch() {
|
|
2242
|
+
this._markTouched();
|
|
2243
|
+
}
|
|
2244
|
+
setDisabledState(isDisabled) {
|
|
2245
|
+
this._disabled.set(isDisabled);
|
|
2246
|
+
}
|
|
2247
|
+
writeValue(value) {
|
|
2248
|
+
this.value.set(value);
|
|
2249
|
+
}
|
|
2250
|
+
selectedTime(time) {
|
|
2251
|
+
this._markTouched();
|
|
2252
|
+
this.value.set(time);
|
|
2253
|
+
this._onChange(time);
|
|
2254
|
+
}
|
|
2255
|
+
_markTouched() {
|
|
2256
|
+
if (this._isTouched) {
|
|
2257
|
+
return;
|
|
2258
|
+
}
|
|
2259
|
+
this._onTouched();
|
|
2260
|
+
this._isTouched = true;
|
|
2261
|
+
}
|
|
2262
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpTimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2263
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.5", type: UpTimepickerComponent, isStandalone: true, selector: "up-timepicker", inputs: { minTime: { classPropertyName: "minTime", publicName: "minTime", isSignal: true, isRequired: false, transformFunction: null }, maxTime: { classPropertyName: "maxTime", publicName: "maxTime", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, initialHour: { classPropertyName: "initialHour", publicName: "initialHour", isSignal: true, isRequired: false, transformFunction: null }, initialMinute: { classPropertyName: "initialMinute", publicName: "initialMinute", isSignal: true, isRequired: false, transformFunction: null }, minuteInterval: { classPropertyName: "minuteInterval", publicName: "minuteInterval", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
2264
|
+
{
|
|
2265
|
+
provide: UpFieldControl,
|
|
2266
|
+
useExisting: forwardRef(() => UpTimepickerComponent),
|
|
2267
|
+
},
|
|
2268
|
+
provideIcons({
|
|
2269
|
+
matWatchLaterRound,
|
|
2270
|
+
}),
|
|
2271
|
+
], usesInheritance: true, ngImport: i0, template: `
|
|
2272
|
+
<up-popover placementOffset="4">
|
|
2273
|
+
<button
|
|
2274
|
+
upButton
|
|
2275
|
+
upPopoverTrigger
|
|
2276
|
+
type="button"
|
|
2277
|
+
variant="ghost"
|
|
2278
|
+
|
|
2279
|
+
[class]="_computedClass()"
|
|
2280
|
+
[disabled]="disabled() || _disabled()"
|
|
2281
|
+
[attr.data-has-value]="value() ? true : false"
|
|
2282
|
+
|
|
2283
|
+
(blur)="touch()"
|
|
2284
|
+
>
|
|
2285
|
+
{{ formattedTime() }}
|
|
2286
|
+
|
|
2287
|
+
<ng-icon size="16" class="ml-auto" name="matWatchLaterRound" />
|
|
2288
|
+
</button>
|
|
2289
|
+
|
|
2290
|
+
<ng-container *upPopoverContentRef>
|
|
2291
|
+
<div
|
|
2292
|
+
animate.enter="animate-in fade-in"
|
|
2293
|
+
animate.leave="animate-out fade-out"
|
|
2294
|
+
>
|
|
2295
|
+
<up-time
|
|
2296
|
+
[value]="value()"
|
|
2297
|
+
[minTime]="minTime()"
|
|
2298
|
+
[maxTime]="maxTime()"
|
|
2299
|
+
[minuteInterval]="minuteInterval()"
|
|
2300
|
+
(timeChanged)="selectedTime($event)"
|
|
2301
|
+
/>
|
|
2302
|
+
</div>
|
|
2303
|
+
</ng-container>
|
|
2304
|
+
</up-popover>
|
|
2305
|
+
`, 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: "directive", type: UpPopoverTriggerDirective, selector: "[upPopoverTrigger]", exportAs: ["upPopoverTrigger"] }, { kind: "directive", type: UpPopoverContentRefDirective, selector: "[upPopoverContentRef]", exportAs: ["upPopoverContentRef"] }, { kind: "component", type: UpTimeComponent, selector: "up-time", inputs: ["minuteInterval", "minTime", "maxTime", "value"], outputs: ["timeChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2306
|
+
}
|
|
2307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpTimepickerComponent, decorators: [{
|
|
2308
|
+
type: Component,
|
|
2309
|
+
args: [{
|
|
2310
|
+
selector: 'up-timepicker',
|
|
2311
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2312
|
+
providers: [
|
|
2313
|
+
{
|
|
2314
|
+
provide: UpFieldControl,
|
|
2315
|
+
useExisting: forwardRef(() => UpTimepickerComponent),
|
|
2316
|
+
},
|
|
2317
|
+
provideIcons({
|
|
2318
|
+
matWatchLaterRound,
|
|
2319
|
+
}),
|
|
2320
|
+
],
|
|
2321
|
+
imports: [
|
|
2322
|
+
NgIcon,
|
|
2323
|
+
UpButtonDirective,
|
|
2324
|
+
UpPopoverComponent,
|
|
2325
|
+
UpPopoverTriggerDirective,
|
|
2326
|
+
UpPopoverContentRefDirective,
|
|
2327
|
+
UpTimeComponent,
|
|
2328
|
+
],
|
|
2329
|
+
template: `
|
|
2330
|
+
<up-popover placementOffset="4">
|
|
2331
|
+
<button
|
|
2332
|
+
upButton
|
|
2333
|
+
upPopoverTrigger
|
|
2334
|
+
type="button"
|
|
2335
|
+
variant="ghost"
|
|
2336
|
+
|
|
2337
|
+
[class]="_computedClass()"
|
|
2338
|
+
[disabled]="disabled() || _disabled()"
|
|
2339
|
+
[attr.data-has-value]="value() ? true : false"
|
|
2340
|
+
|
|
2341
|
+
(blur)="touch()"
|
|
2342
|
+
>
|
|
2343
|
+
{{ formattedTime() }}
|
|
2344
|
+
|
|
2345
|
+
<ng-icon size="16" class="ml-auto" name="matWatchLaterRound" />
|
|
2346
|
+
</button>
|
|
2347
|
+
|
|
2348
|
+
<ng-container *upPopoverContentRef>
|
|
2349
|
+
<div
|
|
2350
|
+
animate.enter="animate-in fade-in"
|
|
2351
|
+
animate.leave="animate-out fade-out"
|
|
2352
|
+
>
|
|
2353
|
+
<up-time
|
|
2354
|
+
[value]="value()"
|
|
2355
|
+
[minTime]="minTime()"
|
|
2356
|
+
[maxTime]="maxTime()"
|
|
2357
|
+
[minuteInterval]="minuteInterval()"
|
|
2358
|
+
(timeChanged)="selectedTime($event)"
|
|
2359
|
+
/>
|
|
2360
|
+
</div>
|
|
2361
|
+
</ng-container>
|
|
2362
|
+
</up-popover>
|
|
2363
|
+
`,
|
|
2364
|
+
}]
|
|
2365
|
+
}], ctorParameters: () => [], propDecorators: { minTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "minTime", required: false }] }], maxTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxTime", required: false }] }], inlineClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], initialHour: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialHour", required: false }] }], initialMinute: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialMinute", required: false }] }], minuteInterval: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteInterval", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
2366
|
+
|
|
1720
2367
|
class UpFormFieldComponent {
|
|
1721
2368
|
constructor() {
|
|
1722
2369
|
this.name = input('', ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
@@ -1734,14 +2381,15 @@ class UpFormFieldComponent {
|
|
|
1734
2381
|
this.control().setControlName(this.label());
|
|
1735
2382
|
});
|
|
1736
2383
|
}
|
|
1737
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1738
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
2384
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2385
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", 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: `
|
|
1739
2386
|
<div
|
|
1740
2387
|
class="
|
|
1741
2388
|
group flex flex-col gap-2
|
|
1742
2389
|
has-[input[type='radio']]:flex-row has-[input[type='radio']]:items-center
|
|
1743
2390
|
has-[input[type='checkbox']]:flex-row has-[input[type='checkbox']]:items-center
|
|
1744
2391
|
"
|
|
2392
|
+
[attr.data-state]="control()?.error()? 'error' : 'default'"
|
|
1745
2393
|
>
|
|
1746
2394
|
@if (label()) {
|
|
1747
2395
|
<label
|
|
@@ -1771,7 +2419,7 @@ class UpFormFieldComponent {
|
|
|
1771
2419
|
}
|
|
1772
2420
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1773
2421
|
}
|
|
1774
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpFormFieldComponent, decorators: [{
|
|
1775
2423
|
type: Component,
|
|
1776
2424
|
args: [{
|
|
1777
2425
|
standalone: true,
|
|
@@ -1787,6 +2435,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1787
2435
|
has-[input[type='radio']]:flex-row has-[input[type='radio']]:items-center
|
|
1788
2436
|
has-[input[type='checkbox']]:flex-row has-[input[type='checkbox']]:items-center
|
|
1789
2437
|
"
|
|
2438
|
+
[attr.data-state]="control()?.error()? 'error' : 'default'"
|
|
1790
2439
|
>
|
|
1791
2440
|
@if (label()) {
|
|
1792
2441
|
<label
|
|
@@ -1879,8 +2528,8 @@ class UpImagePickerComponent extends UpFieldControlComponent {
|
|
|
1879
2528
|
this._onChange(compressedFile);
|
|
1880
2529
|
}
|
|
1881
2530
|
}
|
|
1882
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1883
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
2531
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpImagePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2532
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: UpImagePickerComponent, isStandalone: true, selector: "up-image-picker", inputs: { ratio: { classPropertyName: "ratio", publicName: "ratio", isSignal: true, isRequired: false, transformFunction: null }, imgSrc: { classPropertyName: "imgSrc", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, inlineClass: { classPropertyName: "inlineClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { imgSrc: "srcChange", changed: "changed" }, providers: [
|
|
1884
2533
|
{
|
|
1885
2534
|
provide: UpFieldControl,
|
|
1886
2535
|
useExisting: forwardRef(() => UpImagePickerComponent)
|
|
@@ -1891,7 +2540,7 @@ class UpImagePickerComponent extends UpFieldControlComponent {
|
|
|
1891
2540
|
})
|
|
1892
2541
|
], viewQueries: [{ propertyName: "file", first: true, predicate: ["file"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div \n upFileDragNDrop \n draggedClass=\"border-dashed border-2 border-foreground/20\"\n [class]=\"_computedClass()\"\n [style.aspect-ratio]=\"ratio()\"\n (fileDropped)=\"selectPhoto($event)\"\n>\n @if (imgSrc()) {\n <img \n class=\"overflow-hidden object-cover size-full\"\n [alt]=\"fileName\" \n [src]=\"imgSrc()\" \n [style.aspect-ratio]=\"ratio()\"\n />\n }\n \n <div \n class=\"absolute inset-0 p-2 flex flex-col items-center justify-center text-muted-foreground cursor-pointer opacity-80 group-hover:opacity-100 transition\"\n [style.aspect-ratio]=\"ratio()\"\n >\n @if (imgSrc() === '') {\n <div \n class=\"flex flex-col items-center\"\n (click)=\"file.click()\"\n >\n <ng-icon\n size=\"24px\"\n name=\"matUpload\"\n />\n <span>Choose Image or Drag here.</span>\n </div>\n }\n @else {\n <div \n class=\"absolute flex items-center ustify-center opacity-0 group-hover:opacity-100 transition text-destructive\"\n (click)=\"clear($event)\"\n >\n <ng-icon\n size=\"24px\"\n name=\"matDelete\"\n />\n </div>\n }\n </div>\n\n <input \n type=\"file\" \n hidden \n accept=\"image/png, image/jpeg, image/jpg\" \n (change)=\"selectPhoto($event)\" \n #file\n />\n</div>\n", dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: UpFileDragNDropDirective, selector: "[upFileDragNDrop]", inputs: ["draggedClass"], outputs: ["fileDropped"], exportAs: ["upFileDragNDrop"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1893
2542
|
}
|
|
1894
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2543
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: UpImagePickerComponent, decorators: [{
|
|
1895
2544
|
type: Component,
|
|
1896
2545
|
args: [{ standalone: true, selector: 'up-image-picker', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1897
2546
|
{
|
|
@@ -2107,5 +2756,5 @@ function isNotEqualValidator(controlNames, message) {
|
|
|
2107
2756
|
* Generated bundle index. Do not edit.
|
|
2108
2757
|
*/
|
|
2109
2758
|
|
|
2110
|
-
export { UpCheckboxDirective, UpCountrySelectComponent, UpCurrencySelectComponent, UpDateRangePickerComponent, UpDatepickerComponent, UpFieldControl, UpFieldControlComponent, UpFormFieldComponent, UpImagePickerComponent, UpInputDirective, UpNumberDirective, UpOptionComponent, UpPasswordComponent, UpRadioDirective, UpRateGroupCodeSelectComponent, UpSearchableSelectComponent, UpSelectComponent, UpSwitchComponent, isEqualValidator, isNotEqualValidator, setValidator, toggleFormControls, validRangeValidator };
|
|
2759
|
+
export { UpCheckboxDirective, UpCountrySelectComponent, UpCurrencySelectComponent, UpDateRangePickerComponent, UpDatepickerComponent, UpFieldControl, UpFieldControlComponent, UpFormFieldComponent, UpImagePickerComponent, UpInputDirective, UpNumberDirective, UpOptionComponent, UpPasswordComponent, UpRadioDirective, UpRateGroupCodeSelectComponent, UpSearchableSelectComponent, UpSelectComponent, UpSwitchComponent, UpTimeComponent, UpTimepickerComponent, isEqualValidator, isNotEqualValidator, setValidator, toggleFormControls, validRangeValidator };
|
|
2111
2760
|
//# sourceMappingURL=unipin-angular-applet-forms.mjs.map
|