@taiga-ui/core 5.11.0 → 5.12.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/components/calendar/calendar-sheet.component.d.ts +1 -1
- package/components/calendar/calendar-year.component.d.ts +1 -1
- package/components/calendar/calendar.component.d.ts +4 -8
- package/components/calendar/calendar.d.ts +14 -0
- package/components/calendar/index.d.ts +1 -0
- package/components/error/error.directive.d.ts +2 -3
- package/components/input/input.directive.d.ts +2 -1
- package/components/root/root.component.d.ts +1 -0
- package/components/textfield/textfield.component.d.ts +0 -2
- package/fesm2022/taiga-ui-core-classes.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-button.mjs +7 -7
- package/fesm2022/taiga-ui-core-components-calendar.mjs +54 -37
- package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-carousel.mjs +6 -6
- package/fesm2022/taiga-ui-core-components-cell.mjs +13 -13
- package/fesm2022/taiga-ui-core-components-checkbox.mjs +4 -4
- package/fesm2022/taiga-ui-core-components-data-list.mjs +20 -20
- package/fesm2022/taiga-ui-core-components-error.mjs +15 -17
- package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-expand.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-icon.mjs +7 -7
- package/fesm2022/taiga-ui-core-components-input.mjs +9 -8
- package/fesm2022/taiga-ui-core-components-input.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-label.mjs +7 -7
- package/fesm2022/taiga-ui-core-components-link.mjs +7 -7
- package/fesm2022/taiga-ui-core-components-loader.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-notification.mjs +16 -16
- package/fesm2022/taiga-ui-core-components-radio.mjs +7 -7
- package/fesm2022/taiga-ui-core-components-root.mjs +8 -6
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs +21 -21
- package/fesm2022/taiga-ui-core-components-slider.mjs +15 -15
- package/fesm2022/taiga-ui-core-components-spin-button.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-textfield.mjs +26 -30
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-title.mjs +7 -7
- package/fesm2022/taiga-ui-core-directives-appearance.mjs +10 -10
- package/fesm2022/taiga-ui-core-directives-button-x.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-date-format.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-group.mjs +7 -7
- package/fesm2022/taiga-ui-core-directives-icons.mjs +10 -10
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +9 -9
- package/fesm2022/taiga-ui-core-directives-number-format.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-filter-by-input.mjs +3 -3
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs +3 -3
- package/fesm2022/taiga-ui-core-portals-alert.mjs +10 -10
- package/fesm2022/taiga-ui-core-portals-dialog.mjs +13 -13
- package/fesm2022/taiga-ui-core-portals-dropdown.mjs +56 -56
- package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-portals-hint.mjs +36 -36
- package/fesm2022/taiga-ui-core-portals-modal.mjs +8 -8
- package/fesm2022/taiga-ui-core-portals-popup.mjs +9 -9
- package/fesm2022/taiga-ui-core-services.mjs +6 -6
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +19 -12
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
- package/package.json +16 -16
- package/utils/miscellaneous/index.d.ts +1 -0
- package/utils/miscellaneous/liquid-glass.d.ts +2 -0
- package/utils/miscellaneous/provide-taiga.d.ts +1 -0
|
@@ -36,10 +36,10 @@ class TuiWithOptionContent {
|
|
|
36
36
|
get content() {
|
|
37
37
|
return this.global ?? this.local;
|
|
38
38
|
}
|
|
39
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
40
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiWithOptionContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
40
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: TuiWithOptionContent, isStandalone: true, queries: [{ propertyName: "local", first: true, predicate: TUI_OPTION_CONTENT, descendants: true }], ngImport: i0 }); }
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiWithOptionContent, decorators: [{
|
|
43
43
|
type: Directive
|
|
44
44
|
}], propDecorators: { local: [{
|
|
45
45
|
type: ContentChild,
|
|
@@ -61,10 +61,10 @@ class TuiOptionWithContent {
|
|
|
61
61
|
this.ref.changeDetectorRef.detectChanges();
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
65
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
64
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiOptionWithContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
65
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: TuiOptionWithContent, isStandalone: true, ngImport: i0 }); }
|
|
66
66
|
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiOptionWithContent, decorators: [{
|
|
68
68
|
type: Directive
|
|
69
69
|
}], ctorParameters: () => [] });
|
|
70
70
|
|
|
@@ -79,10 +79,10 @@ class TuiOptionWithValue {
|
|
|
79
79
|
this.host?.handleOption?.(value);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
83
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.
|
|
82
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiOptionWithValue, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
83
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: TuiOptionWithValue, isStandalone: true, selector: "button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick()" } }, hostDirectives: [{ directive: TuiOptionWithContent }], ngImport: i0 }); }
|
|
84
84
|
}
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiOptionWithValue, decorators: [{
|
|
86
86
|
type: Directive,
|
|
87
87
|
args: [{
|
|
88
88
|
selector: 'button[tuiOption][value], a[tuiOption][value], label[tuiOption][value]',
|
|
@@ -143,8 +143,8 @@ class TuiDataListComponent {
|
|
|
143
143
|
get elements() {
|
|
144
144
|
return Array.from(this.el.querySelectorAll('[tuiOption]:not(.t-empty)'));
|
|
145
145
|
}
|
|
146
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
147
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
146
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDataListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
147
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TuiDataListComponent, isStandalone: true, selector: "tui-data-list", inputs: { emptyContent: { classPropertyName: "emptyContent", publicName: "emptyContent", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-tui-version": "5.12.0", "role": "listbox" }, listeners: { "focusin": "onFocusIn($event.relatedTarget, $event.currentTarget)", "keydown.arrowDown.prevent": "onKeyDownArrow($event.target, 1)", "keydown.arrowUp.prevent": "onKeyDownArrow($event.target, -1)", "keydown.shift.tab": "handleFocusLossIfNecessary()", "keydown.tab": "handleFocusLossIfNecessary()", "mousedown.prevent": "(0)", "mouseleave": "handleFocusLossIfNecessary($event.target)", "wheel.zoneless.passive": "handleFocusLossIfNecessary()" }, properties: { "attr.data-size": "size()", "attr.role": "role" } }, providers: [
|
|
148
148
|
tuiCellOptionsProvider(() => ({ size: inject(TuiDataListComponent).size() })),
|
|
149
149
|
tuiAsAuxiliary(TuiDataListComponent),
|
|
150
150
|
{
|
|
@@ -152,9 +152,9 @@ class TuiDataListComponent {
|
|
|
152
152
|
useFactory: () => inject(TuiWithOptionContent, { optional: true })?.content ??
|
|
153
153
|
inject(TUI_OPTION_CONTENT, { skipSelf: true, optional: true }),
|
|
154
154
|
},
|
|
155
|
-
], queries: [{ propertyName: "optionsQuery", predicate: i0.forwardRef(() => TuiOptionWithValue), descendants: true, isSignal: true }], ngImport: i0, template: "<ng-content />\n@if (empty()) {\n <!-- tuiOption selector purely for cosmetics, do not import -->\n <span\n tuiCell\n tuiOption\n class=\"t-empty\"\n >\n <ng-container *polymorpheusOutlet=\"emptyContent() || fallback() as text\">\n {{ text }}\n </ng-container>\n </span>\n}\n", styles: ["tui-data-list:where(*[data-tui-version=\"5.
|
|
155
|
+
], queries: [{ propertyName: "optionsQuery", predicate: i0.forwardRef(() => TuiOptionWithValue), descendants: true, isSignal: true }], ngImport: i0, template: "<ng-content />\n@if (empty()) {\n <!-- tuiOption selector purely for cosmetics, do not import -->\n <span\n tuiCell\n tuiOption\n class=\"t-empty\"\n >\n <ng-container *polymorpheusOutlet=\"emptyContent() || fallback() as text\">\n {{ text }}\n </ng-container>\n </span>\n}\n", styles: ["tui-data-list:where(*[data-tui-version=\"5.12.0\"]){display:flex;flex-direction:column;padding:.25rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"]):focus-within [tuiOption]._with-dropdown:not(:focus){background:transparent}tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=s] [tuiOption]{min-block-size:0;font:var(--tui-typography-ui-s);padding:.375rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=s] [tuiOption]:before,tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=s] [tuiOption]:after{font-size:1rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=m] [tuiOption]{min-block-size:2.25rem;font:var(--tui-typography-ui-s);padding:.5rem .375rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=l]{gap:.125rem;padding:.5rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=l] [tuiOption]{font:var(--tui-typography-ui-m);padding-inline:.5rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=l] hr{block-size:1rem;border-inline-width:.5rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;box-sizing:border-box;border-radius:var(--tui-radius-s);outline:none!important;cursor:pointer;word-break:break-word;text-transform:inherit}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]:disabled{opacity:var(--tui-disabled-opacity);cursor:default}@media(hover:hover)and (pointer:fine){tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]:hover:not(:disabled){background:var(--tui-background-neutral-1)}}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]:active:not(:disabled),tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]:focus-within,tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]._with-dropdown{background:var(--tui-background-neutral-1)}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]:after{margin-inline-start:auto}tui-data-list:where(*[data-tui-version=\"5.12.0\"])>.t-empty{pointer-events:none;color:var(--tui-text-tertiary)}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) hr{position:relative;margin:0;block-size:.75rem;border:.375rem solid transparent;border-block:0}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) hr+hr,tui-data-list:where(*[data-tui-version=\"5.12.0\"]) hr:first-child,tui-data-list:where(*[data-tui-version=\"5.12.0\"]) hr:last-child{display:none}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) hr:before{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);content:\"\";block-size:1px;inline-size:100%;background:var(--tui-border-normal)}tui-opt-group:where(*[data-tui-version=\"5.12.0\"]){position:relative;display:flex;font-weight:700!important;gap:inherit;color:var(--tui-text-primary);flex-direction:column}tui-data-list[data-size=s] tui-opt-group:where(*[data-tui-version=\"5.12.0\"]){font:var(--tui-typography-body-s)}tui-data-list[data-size=s] tui-opt-group:where(*[data-tui-version=\"5.12.0\"]):before{padding:.1875rem .375rem}tui-data-list[data-size=m] tui-opt-group:where(*[data-tui-version=\"5.12.0\"]){font:var(--tui-typography-ui-m)}tui-data-list[data-size=m] tui-opt-group:where(*[data-tui-version=\"5.12.0\"]):before{padding:.375rem}tui-data-list[data-size=l] tui-opt-group:where(*[data-tui-version=\"5.12.0\"]){font:var(--tui-typography-ui-l)}tui-data-list[data-size=l] tui-opt-group:where(*[data-tui-version=\"5.12.0\"]):before{padding:.5rem}tui-opt-group:where(*[data-tui-version=\"5.12.0\"]):empty:before,tui-opt-group:where(*[data-tui-version=\"5.12.0\"])[data-label=\"\"]:before{display:none}tui-opt-group:where(*[data-tui-version=\"5.12.0\"]):before{content:attr(data-label);word-break:break-word}tui-sheet-dialog tui-opt-group:where(*[data-tui-version=\"5.12.0\"]):before{font:var(--tui-typography-heading-h6);padding:.5rem 0!important}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiCell, selector: "[tuiCell]:not(ng-template)", inputs: ["tuiCell", "tuiCellHeight"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
156
156
|
}
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDataListComponent, decorators: [{
|
|
158
158
|
type: Component,
|
|
159
159
|
args: [{ selector: 'tui-data-list', imports: [PolymorpheusOutlet, TuiCell], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
160
160
|
tuiCellOptionsProvider(() => ({ size: inject(TuiDataListComponent).size() })),
|
|
@@ -177,17 +177,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImpo
|
|
|
177
177
|
'(mousedown.prevent)': '(0)',
|
|
178
178
|
'(mouseleave)': 'handleFocusLossIfNecessary($event.target)',
|
|
179
179
|
'(wheel.zoneless.passive)': 'handleFocusLossIfNecessary()',
|
|
180
|
-
}, template: "<ng-content />\n@if (empty()) {\n <!-- tuiOption selector purely for cosmetics, do not import -->\n <span\n tuiCell\n tuiOption\n class=\"t-empty\"\n >\n <ng-container *polymorpheusOutlet=\"emptyContent() || fallback() as text\">\n {{ text }}\n </ng-container>\n </span>\n}\n", styles: ["tui-data-list:where(*[data-tui-version=\"5.
|
|
180
|
+
}, template: "<ng-content />\n@if (empty()) {\n <!-- tuiOption selector purely for cosmetics, do not import -->\n <span\n tuiCell\n tuiOption\n class=\"t-empty\"\n >\n <ng-container *polymorpheusOutlet=\"emptyContent() || fallback() as text\">\n {{ text }}\n </ng-container>\n </span>\n}\n", styles: ["tui-data-list:where(*[data-tui-version=\"5.12.0\"]){display:flex;flex-direction:column;padding:.25rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"]):focus-within [tuiOption]._with-dropdown:not(:focus){background:transparent}tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=s] [tuiOption]{min-block-size:0;font:var(--tui-typography-ui-s);padding:.375rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=s] [tuiOption]:before,tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=s] [tuiOption]:after{font-size:1rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=m] [tuiOption]{min-block-size:2.25rem;font:var(--tui-typography-ui-s);padding:.5rem .375rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=l]{gap:.125rem;padding:.5rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=l] [tuiOption]{font:var(--tui-typography-ui-m);padding-inline:.5rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"])[data-size=l] hr{block-size:1rem;border-inline-width:.5rem}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;box-sizing:border-box;border-radius:var(--tui-radius-s);outline:none!important;cursor:pointer;word-break:break-word;text-transform:inherit}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]:disabled{opacity:var(--tui-disabled-opacity);cursor:default}@media(hover:hover)and (pointer:fine){tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]:hover:not(:disabled){background:var(--tui-background-neutral-1)}}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]:active:not(:disabled),tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]:focus-within,tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]._with-dropdown{background:var(--tui-background-neutral-1)}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) [tuiOption]:after{margin-inline-start:auto}tui-data-list:where(*[data-tui-version=\"5.12.0\"])>.t-empty{pointer-events:none;color:var(--tui-text-tertiary)}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) hr{position:relative;margin:0;block-size:.75rem;border:.375rem solid transparent;border-block:0}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) hr+hr,tui-data-list:where(*[data-tui-version=\"5.12.0\"]) hr:first-child,tui-data-list:where(*[data-tui-version=\"5.12.0\"]) hr:last-child{display:none}tui-data-list:where(*[data-tui-version=\"5.12.0\"]) hr:before{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);content:\"\";block-size:1px;inline-size:100%;background:var(--tui-border-normal)}tui-opt-group:where(*[data-tui-version=\"5.12.0\"]){position:relative;display:flex;font-weight:700!important;gap:inherit;color:var(--tui-text-primary);flex-direction:column}tui-data-list[data-size=s] tui-opt-group:where(*[data-tui-version=\"5.12.0\"]){font:var(--tui-typography-body-s)}tui-data-list[data-size=s] tui-opt-group:where(*[data-tui-version=\"5.12.0\"]):before{padding:.1875rem .375rem}tui-data-list[data-size=m] tui-opt-group:where(*[data-tui-version=\"5.12.0\"]){font:var(--tui-typography-ui-m)}tui-data-list[data-size=m] tui-opt-group:where(*[data-tui-version=\"5.12.0\"]):before{padding:.375rem}tui-data-list[data-size=l] tui-opt-group:where(*[data-tui-version=\"5.12.0\"]){font:var(--tui-typography-ui-l)}tui-data-list[data-size=l] tui-opt-group:where(*[data-tui-version=\"5.12.0\"]):before{padding:.5rem}tui-opt-group:where(*[data-tui-version=\"5.12.0\"]):empty:before,tui-opt-group:where(*[data-tui-version=\"5.12.0\"])[data-label=\"\"]:before{display:none}tui-opt-group:where(*[data-tui-version=\"5.12.0\"]):before{content:attr(data-label);word-break:break-word}tui-sheet-dialog tui-opt-group:where(*[data-tui-version=\"5.12.0\"]):before{font:var(--tui-typography-heading-h6);padding:.5rem 0!important}\n"] }]
|
|
181
181
|
}] });
|
|
182
182
|
|
|
183
183
|
class TuiOptGroup {
|
|
184
184
|
constructor() {
|
|
185
185
|
this.label = input();
|
|
186
186
|
}
|
|
187
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
188
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.
|
|
187
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiOptGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
188
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: TuiOptGroup, isStandalone: true, selector: "tui-opt-group", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-tui-version": "5.12.0", "role": "group" }, properties: { "attr.data-label": "label() || \"\"" } }, ngImport: i0 }); }
|
|
189
189
|
}
|
|
190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiOptGroup, decorators: [{
|
|
191
191
|
type: Directive,
|
|
192
192
|
args: [{
|
|
193
193
|
selector: 'tui-opt-group',
|
|
@@ -222,10 +222,10 @@ class TuiOption {
|
|
|
222
222
|
this.el.focus({ preventScroll: true });
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
226
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.
|
|
225
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiOption, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
226
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: TuiOption, isStandalone: true, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "option", "type": "button" }, listeners: { "mousemove.zoneless": "onMouseMove()" }, properties: { "attr.disabled": "disabled() || null", "class._with-dropdown": "dropdown?.()" } }, hostDirectives: [{ directive: i1.TuiWithIcons }, { directive: i2.TuiCell }], ngImport: i0 }); }
|
|
227
227
|
}
|
|
228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiOption, decorators: [{
|
|
229
229
|
type: Directive,
|
|
230
230
|
args: [{
|
|
231
231
|
selector: 'button[tuiOption], a[tuiOption], label[tuiOption]',
|
|
@@ -2,11 +2,13 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { inject, computed, input, ChangeDetectionStrategy, Component, isSignal, Directive, TemplateRef, untracked, Pipe } from '@angular/core';
|
|
3
3
|
import { TuiValidationError } from '@taiga-ui/cdk/classes';
|
|
4
4
|
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
5
|
-
import { tuiIsString,
|
|
5
|
+
import { tuiIsString, tuiSetSignal } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
6
6
|
import { TUI_DEFAULT_ERROR_MESSAGE, TUI_VALIDATION_ERRORS } from '@taiga-ui/core/tokens';
|
|
7
7
|
import { PolymorpheusOutlet, PolymorpheusTemplate, PolymorpheusComponent } from '@taiga-ui/polymorpheus';
|
|
8
8
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
9
9
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControl } from '@angular/forms';
|
|
10
|
+
import * as i1 from '@taiga-ui/cdk/directives/id';
|
|
11
|
+
import { TuiId } from '@taiga-ui/cdk/directives/id';
|
|
10
12
|
import { tuiDirectiveBinding, tuiProvide } from '@taiga-ui/cdk/utils/di';
|
|
11
13
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
12
14
|
import { BehaviorSubject, filter, distinctUntilChanged, switchMap, startWith, map } from 'rxjs';
|
|
@@ -17,10 +19,10 @@ class TuiErrorComponent {
|
|
|
17
19
|
this.content = computed((error = this.error()) => tuiIsString(error) ? new TuiValidationError(error) : error);
|
|
18
20
|
this.error = input(null);
|
|
19
21
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
21
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TuiErrorComponent, isStandalone: true, selector: "tui-error", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class._error": "content()" } }, ngImport: i0, template: "@if (content(); as error) {\n <span\n tuiAnimated\n class=\"t-message-text\"\n >\n <span\n *polymorpheusOutlet=\"error.message || default() as text; context: error.context || {}\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n}\n", styles: [":host{transition-property:grid-template-rows;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:grid;font:var(--tui-typography-body-s);color:var(--tui-text-negative);overflow-wrap:break-word;grid-template-rows:0fr}:host._error{grid-template-rows:1fr}.t-message-text{white-space:pre-line;grid-area:1 / 1 / span 2;overflow:hidden}.t-message-text.tui-enter,.t-message-text.tui-leave{animation-name:tuiFade}.t-message-text:before{content:\"\";line-height:calc(24 / 14);vertical-align:bottom}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiAnimated, selector: "[tuiAnimated]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
22
24
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiErrorComponent, decorators: [{
|
|
24
26
|
type: Component,
|
|
25
27
|
args: [{ selector: 'tui-error', imports: [PolymorpheusOutlet, TuiAnimated], changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class._error]': 'content()' }, template: "@if (content(); as error) {\n <span\n tuiAnimated\n class=\"t-message-text\"\n >\n <span\n *polymorpheusOutlet=\"error.message || default() as text; context: error.context || {}\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n}\n", styles: [":host{transition-property:grid-template-rows;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:grid;font:var(--tui-typography-body-s);color:var(--tui-text-negative);overflow-wrap:break-word;grid-template-rows:0fr}:host._error{grid-template-rows:1fr}.t-message-text{white-space:pre-line;grid-area:1 / 1 / span 2;overflow:hidden}.t-message-text.tui-enter,.t-message-text.tui-leave{animation-name:tuiFade}.t-message-text:before{content:\"\";line-height:calc(24 / 14);vertical-align:bottom}\n"] }]
|
|
26
28
|
}] });
|
|
@@ -28,7 +30,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImpo
|
|
|
28
30
|
class TuiErrorDirective {
|
|
29
31
|
constructor() {
|
|
30
32
|
this.el = tuiInjectElement();
|
|
31
|
-
this.autoId = tuiGenerateId();
|
|
32
33
|
this.content = inject(TUI_VALIDATION_ERRORS);
|
|
33
34
|
this.control = new BehaviorSubject(null);
|
|
34
35
|
this.errors = toSignal(this.control.pipe(filter(Boolean), distinctUntilChanged(), switchMap((control) => control.events.pipe(startWith(null), map(() => !control.disabled && control.touched && control.errors)))));
|
|
@@ -36,9 +37,6 @@ class TuiErrorDirective {
|
|
|
36
37
|
this.order = input([]);
|
|
37
38
|
this.error = tuiDirectiveBinding(TuiErrorComponent, 'error', computed((errors = this.errors() || null) => errors && this.getError(errors[this.key()], this.content[this.key()])), { self: true, optional: true });
|
|
38
39
|
}
|
|
39
|
-
get id() {
|
|
40
|
-
return this.el.id || this.autoId;
|
|
41
|
-
}
|
|
42
40
|
registerOnChange() { }
|
|
43
41
|
registerOnTouched() { }
|
|
44
42
|
writeValue() { }
|
|
@@ -48,7 +46,7 @@ class TuiErrorDirective {
|
|
|
48
46
|
}
|
|
49
47
|
onValidator(validator) {
|
|
50
48
|
if (this.control.value && validator.control === this.control.value) {
|
|
51
|
-
validator.id = this.id;
|
|
49
|
+
validator.id = this.el.id;
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
getError(context, content) {
|
|
@@ -68,13 +66,13 @@ class TuiErrorDirective {
|
|
|
68
66
|
}
|
|
69
67
|
return getError(content, context);
|
|
70
68
|
}
|
|
71
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
72
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.
|
|
69
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
70
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: TuiErrorDirective, isStandalone: true, selector: "tui-error[ngModel], tui-error[formControlName], tui-error[formControl], tui-error[formGroup], tui-error[formGroupName], tui-error[formArrayName], tui-error[formArray]", inputs: { order: { classPropertyName: "order", publicName: "order", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-live": "polite" }, listeners: { "document:tui-validator.zoneless": "onValidator($event.detail)" } }, providers: [
|
|
73
71
|
tuiProvide(NG_VALUE_ACCESSOR, TuiErrorDirective, true),
|
|
74
72
|
tuiProvide(NG_VALIDATORS, TuiErrorDirective, true),
|
|
75
|
-
], ngImport: i0 }); }
|
|
73
|
+
], hostDirectives: [{ directive: i1.TuiId }], ngImport: i0 }); }
|
|
76
74
|
}
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiErrorDirective, decorators: [{
|
|
78
76
|
type: Directive,
|
|
79
77
|
args: [{
|
|
80
78
|
selector: 'tui-error[ngModel], tui-error[formControlName], tui-error[formControl], tui-error[formGroup], tui-error[formGroupName], tui-error[formArrayName], tui-error[formArray]',
|
|
@@ -82,9 +80,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImpo
|
|
|
82
80
|
tuiProvide(NG_VALUE_ACCESSOR, TuiErrorDirective, true),
|
|
83
81
|
tuiProvide(NG_VALIDATORS, TuiErrorDirective, true),
|
|
84
82
|
],
|
|
83
|
+
hostDirectives: [TuiId],
|
|
85
84
|
host: {
|
|
86
85
|
'aria-live': 'polite',
|
|
87
|
-
'[id]': 'id',
|
|
88
86
|
'(document:tui-validator.zoneless)': 'onValidator($event.detail)',
|
|
89
87
|
},
|
|
90
88
|
}]
|
|
@@ -117,10 +115,10 @@ class TuiErrorPipe {
|
|
|
117
115
|
? error.message(error.context)
|
|
118
116
|
: error.message;
|
|
119
117
|
}
|
|
120
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
121
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
118
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiErrorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
119
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.25", ngImport: i0, type: TuiErrorPipe, isStandalone: true, name: "tuiError", pure: false }); }
|
|
122
120
|
}
|
|
123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiErrorPipe, decorators: [{
|
|
124
122
|
type: Pipe,
|
|
125
123
|
args: [{
|
|
126
124
|
name: 'tuiError',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-error.mjs","sources":["../../../projects/core/components/error/error.component.ts","../../../projects/core/components/error/error.template.html","../../../projects/core/components/error/error.directive.ts","../../../projects/core/components/error/error.pipe.ts","../../../projects/core/components/error/error.ts","../../../projects/core/components/error/taiga-ui-core-components-error.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, computed, inject, input} from '@angular/core';\nimport {TuiValidationError} from '@taiga-ui/cdk/classes';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DEFAULT_ERROR_MESSAGE} from '@taiga-ui/core/tokens';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\n@Component({\n selector: 'tui-error',\n imports: [PolymorpheusOutlet, TuiAnimated],\n templateUrl: './error.template.html',\n styleUrl: './error.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {'[class._error]': 'content()'},\n})\nexport class TuiErrorComponent {\n protected readonly default = inject(TUI_DEFAULT_ERROR_MESSAGE);\n\n protected readonly content = computed((error = this.error()) =>\n tuiIsString(error) ? new TuiValidationError(error) : error,\n );\n\n public readonly error = input<TuiValidationError | string | null>(null);\n}\n","@if (content(); as error) {\n <span\n tuiAnimated\n class=\"t-message-text\"\n >\n <span\n *polymorpheusOutlet=\"error.message || default() as text; context: error.context || {}\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n}\n","import {\n computed,\n Directive,\n inject,\n input,\n isSignal,\n type Signal,\n TemplateRef,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {\n type AbstractControl,\n type ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n type ValidationErrors,\n type Validator,\n} from '@angular/forms';\nimport {TuiValidationError} from '@taiga-ui/cdk/classes';\nimport {type TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {tuiDirectiveBinding, tuiProvide} from '@taiga-ui/cdk/utils/di';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGenerateId, tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_VALIDATION_ERRORS} from '@taiga-ui/core/tokens';\nimport {\n PolymorpheusComponent,\n type PolymorpheusContent,\n PolymorpheusTemplate,\n} from '@taiga-ui/polymorpheus';\nimport {\n BehaviorSubject,\n distinctUntilChanged,\n filter,\n map,\n startWith,\n switchMap,\n} from 'rxjs';\n\nimport {TuiErrorComponent} from './error.component';\n\n@Directive({\n selector:\n 'tui-error[ngModel], tui-error[formControlName], tui-error[formControl], tui-error[formGroup], tui-error[formGroupName], tui-error[formArrayName], tui-error[formArray]',\n providers: [\n tuiProvide(NG_VALUE_ACCESSOR, TuiErrorDirective, true),\n tuiProvide(NG_VALIDATORS, TuiErrorDirective, true),\n ],\n host: {\n 'aria-live': 'polite',\n '[id]': 'id',\n '(document:tui-validator.zoneless)': 'onValidator($event.detail)',\n },\n})\nexport class TuiErrorDirective implements ControlValueAccessor, Validator {\n private readonly el = tuiInjectElement();\n private readonly autoId = tuiGenerateId();\n private readonly content = inject(TUI_VALIDATION_ERRORS);\n private readonly control = new BehaviorSubject<AbstractControl | null>(null);\n\n private readonly errors = toSignal(\n this.control.pipe(\n filter(Boolean),\n distinctUntilChanged(),\n switchMap((control) =>\n control.events.pipe(\n startWith(null),\n map(() => !control.disabled && control.touched && control.errors),\n ),\n ),\n ),\n );\n\n private readonly key = computed(\n (errors = this.errors() || {}) =>\n this.order().find((id) => errors[id]) || Object.keys(errors)[0] || '',\n );\n\n public readonly order = input<readonly string[]>([]);\n\n public readonly error = tuiDirectiveBinding(\n TuiErrorComponent,\n 'error',\n computed(\n (errors = this.errors() || null) =>\n errors && this.getError(errors[this.key()], this.content[this.key()]),\n ),\n {self: true, optional: true},\n );\n\n public get id(): string {\n return this.el.id || this.autoId;\n }\n\n public registerOnChange(): void {}\n public registerOnTouched(): void {}\n public writeValue(): void {}\n public validate(control: AbstractControl): ValidationErrors | null {\n this.control.next(control);\n\n return null;\n }\n\n protected onValidator(validator: TuiNativeValidator): void {\n if (this.control.value && validator.control === this.control.value) {\n validator.id = this.id;\n }\n }\n\n private getError(\n context: unknown,\n content?: PolymorpheusContent | Signal<PolymorpheusContent>,\n ): TuiValidationError {\n context = isSignal(context) ? context() : context;\n\n if (context instanceof TuiValidationError) {\n return context;\n }\n\n if (content === undefined && isContent(context)) {\n return getError(context);\n }\n\n if (isSignal(content)) {\n return getError(content(), context);\n }\n\n if (content instanceof Function) {\n const message = content(context);\n\n return getError(isSignal(message) ? message() : message, context);\n }\n\n return getError(content, context);\n }\n}\n\nfunction getError(content: unknown = '', context?: any): TuiValidationError {\n return new TuiValidationError(content as PolymorpheusContent, context);\n}\n\nfunction isContent(value: unknown): value is PolymorpheusContent {\n return (\n tuiIsString(value) ||\n value instanceof TemplateRef ||\n value instanceof PolymorpheusTemplate ||\n value instanceof PolymorpheusComponent\n );\n}\n","import {inject, Pipe, type PipeTransform, untracked} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {tuiSetSignal} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nimport {TuiErrorDirective} from './error.directive';\n\n@Pipe({\n name: 'tuiError',\n pure: false,\n})\nexport class TuiErrorPipe implements PipeTransform {\n private readonly control = inject(NgControl);\n private readonly directive = new TuiErrorDirective();\n\n public transform(order: readonly string[]): PolymorpheusContent {\n untracked(() => {\n this.directive.validate(this.control.control!);\n tuiSetSignal(this.directive.order, order);\n });\n\n const error = this.directive.error();\n\n if (!error) {\n return '';\n }\n\n return typeof error.message === 'function'\n ? error.message(error.context)\n : error.message;\n }\n}\n","import {TuiErrorComponent} from './error.component';\nimport {TuiErrorDirective} from './error.directive';\nimport {TuiErrorPipe} from './error.pipe';\n\nexport const TuiError = [TuiErrorComponent, TuiErrorDirective, TuiErrorPipe] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAea,iBAAiB,CAAA;AAR9B,IAAA,WAAA,GAAA;AASuB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAE3C,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,KACvD,WAAW,CAAC,KAAK,CAAC,GAAG,IAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG,KAAK,CAC7D;AAEe,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAqC,IAAI,CAAC;AAC1E,IAAA;+G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,CAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,UAAU;AAChB,oBAAA,IAAI,EAAE,KAAK;AACd,iBAAA;;;ACNM,MAAM,QAAQ,GAAG,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,YAAY;;ACJ3E;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-error.mjs","sources":["../../../projects/core/components/error/error.component.ts","../../../projects/core/components/error/error.template.html","../../../projects/core/components/error/error.directive.ts","../../../projects/core/components/error/error.pipe.ts","../../../projects/core/components/error/error.ts","../../../projects/core/components/error/taiga-ui-core-components-error.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, computed, inject, input} from '@angular/core';\nimport {TuiValidationError} from '@taiga-ui/cdk/classes';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DEFAULT_ERROR_MESSAGE} from '@taiga-ui/core/tokens';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\n@Component({\n selector: 'tui-error',\n imports: [PolymorpheusOutlet, TuiAnimated],\n templateUrl: './error.template.html',\n styleUrl: './error.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {'[class._error]': 'content()'},\n})\nexport class TuiErrorComponent {\n protected readonly default = inject(TUI_DEFAULT_ERROR_MESSAGE);\n\n protected readonly content = computed((error = this.error()) =>\n tuiIsString(error) ? new TuiValidationError(error) : error,\n );\n\n public readonly error = input<TuiValidationError | string | null>(null);\n}\n","@if (content(); as error) {\n <span\n tuiAnimated\n class=\"t-message-text\"\n >\n <span\n *polymorpheusOutlet=\"error.message || default() as text; context: error.context || {}\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n}\n","import {\n computed,\n Directive,\n inject,\n input,\n isSignal,\n type Signal,\n TemplateRef,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {\n type AbstractControl,\n type ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n type ValidationErrors,\n type Validator,\n} from '@angular/forms';\nimport {TuiValidationError} from '@taiga-ui/cdk/classes';\nimport {TuiId} from '@taiga-ui/cdk/directives/id';\nimport {type TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {tuiDirectiveBinding, tuiProvide} from '@taiga-ui/cdk/utils/di';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_VALIDATION_ERRORS} from '@taiga-ui/core/tokens';\nimport {\n PolymorpheusComponent,\n type PolymorpheusContent,\n PolymorpheusTemplate,\n} from '@taiga-ui/polymorpheus';\nimport {\n BehaviorSubject,\n distinctUntilChanged,\n filter,\n map,\n startWith,\n switchMap,\n} from 'rxjs';\n\nimport {TuiErrorComponent} from './error.component';\n\n@Directive({\n selector:\n 'tui-error[ngModel], tui-error[formControlName], tui-error[formControl], tui-error[formGroup], tui-error[formGroupName], tui-error[formArrayName], tui-error[formArray]',\n providers: [\n tuiProvide(NG_VALUE_ACCESSOR, TuiErrorDirective, true),\n tuiProvide(NG_VALIDATORS, TuiErrorDirective, true),\n ],\n hostDirectives: [TuiId],\n host: {\n 'aria-live': 'polite',\n '(document:tui-validator.zoneless)': 'onValidator($event.detail)',\n },\n})\nexport class TuiErrorDirective implements ControlValueAccessor, Validator {\n private readonly el = tuiInjectElement();\n private readonly content = inject(TUI_VALIDATION_ERRORS);\n private readonly control = new BehaviorSubject<AbstractControl | null>(null);\n\n private readonly errors = toSignal(\n this.control.pipe(\n filter(Boolean),\n distinctUntilChanged(),\n switchMap((control) =>\n control.events.pipe(\n startWith(null),\n map(() => !control.disabled && control.touched && control.errors),\n ),\n ),\n ),\n );\n\n private readonly key = computed(\n (errors = this.errors() || {}) =>\n this.order().find((id) => errors[id]) || Object.keys(errors)[0] || '',\n );\n\n public readonly order = input<readonly string[]>([]);\n\n public readonly error = tuiDirectiveBinding(\n TuiErrorComponent,\n 'error',\n computed(\n (errors = this.errors() || null) =>\n errors && this.getError(errors[this.key()], this.content[this.key()]),\n ),\n {self: true, optional: true},\n );\n\n public registerOnChange(): void {}\n\n public registerOnTouched(): void {}\n\n public writeValue(): void {}\n\n public validate(control: AbstractControl): ValidationErrors | null {\n this.control.next(control);\n\n return null;\n }\n\n protected onValidator(validator: TuiNativeValidator): void {\n if (this.control.value && validator.control === this.control.value) {\n validator.id = this.el.id;\n }\n }\n\n private getError(\n context: unknown,\n content?: PolymorpheusContent | Signal<PolymorpheusContent>,\n ): TuiValidationError {\n context = isSignal(context) ? context() : context;\n\n if (context instanceof TuiValidationError) {\n return context;\n }\n\n if (content === undefined && isContent(context)) {\n return getError(context);\n }\n\n if (isSignal(content)) {\n return getError(content(), context);\n }\n\n if (content instanceof Function) {\n const message = content(context);\n\n return getError(isSignal(message) ? message() : message, context);\n }\n\n return getError(content, context);\n }\n}\n\nfunction getError(content: unknown = '', context?: any): TuiValidationError {\n return new TuiValidationError(content as PolymorpheusContent, context);\n}\n\nfunction isContent(value: unknown): value is PolymorpheusContent {\n return (\n tuiIsString(value) ||\n value instanceof TemplateRef ||\n value instanceof PolymorpheusTemplate ||\n value instanceof PolymorpheusComponent\n );\n}\n","import {inject, Pipe, type PipeTransform, untracked} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {tuiSetSignal} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nimport {TuiErrorDirective} from './error.directive';\n\n@Pipe({\n name: 'tuiError',\n pure: false,\n})\nexport class TuiErrorPipe implements PipeTransform {\n private readonly control = inject(NgControl);\n private readonly directive = new TuiErrorDirective();\n\n public transform(order: readonly string[]): PolymorpheusContent {\n untracked(() => {\n this.directive.validate(this.control.control!);\n tuiSetSignal(this.directive.order, order);\n });\n\n const error = this.directive.error();\n\n if (!error) {\n return '';\n }\n\n return typeof error.message === 'function'\n ? error.message(error.context)\n : error.message;\n }\n}\n","import {TuiErrorComponent} from './error.component';\nimport {TuiErrorDirective} from './error.directive';\nimport {TuiErrorPipe} from './error.pipe';\n\nexport const TuiError = [TuiErrorComponent, TuiErrorDirective, TuiErrorPipe] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAea,iBAAiB,CAAA;AAR9B,IAAA,WAAA,GAAA;AASuB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAE3C,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,KACvD,WAAW,CAAC,KAAK,CAAC,GAAG,IAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG,KAAK,CAC7D;AAEe,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAqC,IAAI,CAAC;AAC1E,IAAA;+GARY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,cAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA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AAQ,CAAC;YAC9C,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;AAC7C,QAAA,CAAC,CAAC;QAEF,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;QAEpC,IAAI,CAAC,KAAK,EAAE;AACR,YAAA,OAAO,EAAE;QACb;AAEA,QAAA,OAAO,OAAO,KAAK,CAAC,OAAO,KAAK;cAC1B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO;AAC7B,cAAE,KAAK,CAAC,OAAO;IACvB;+GAnBS,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,UAAU;AAChB,oBAAA,IAAI,EAAE,KAAK;AACd,iBAAA;;;ACNM,MAAM,QAAQ,GAAG,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,YAAY;;ACJ3E;;AAEG;;;;"}
|
|
@@ -17,8 +17,8 @@ class TuiExpand {
|
|
|
17
17
|
this.open.set(this.expanded());
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
21
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiExpand, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TuiExpand, isStandalone: true, selector: "tui-expand", inputs: { expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "transitionend.self": "onTransitionEnd($event)" }, properties: { "class._expanded": "expanded()", "class._open": "open()" } }, queries: [{ propertyName: "content", first: true, predicate: TuiItem, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: `
|
|
22
22
|
<div class="t-wrapper">
|
|
23
23
|
@if (expanded() || open()) {
|
|
24
24
|
<ng-container [ngTemplateOutlet]="content() || null" />
|
|
@@ -27,7 +27,7 @@ class TuiExpand {
|
|
|
27
27
|
</div>
|
|
28
28
|
`, isInline: true, styles: [":host{transition-property:grid-template-rows,padding;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:grid;grid-template-rows:0fr;transition-delay:1ms}:host:not(._expanded){padding-block:0}:host._expanded{visibility:visible;grid-template-rows:1fr}:host._expanded>.t-wrapper{opacity:1;visibility:visible}:host._expanded._open>.t-wrapper{overflow:visible}.t-wrapper{transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;grid-row:1 / span 2;overflow:hidden;opacity:0;visibility:hidden}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
29
29
|
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiExpand, decorators: [{
|
|
31
31
|
type: Component,
|
|
32
32
|
args: [{ selector: 'tui-expand', imports: [NgTemplateOutlet], template: `
|
|
33
33
|
<div class="t-wrapper">
|
|
@@ -11,27 +11,27 @@ class TuiIcon {
|
|
|
11
11
|
this.mask = computed(() => this.icons.resolve(this.background()));
|
|
12
12
|
this.background = input('');
|
|
13
13
|
}
|
|
14
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
15
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.
|
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiIcon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", type: TuiIcon, isStandalone: true, selector: "tui-icon:not([tuiBadge])", inputs: { background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--t-icon-bg": "mask()" } }, hostDirectives: [{ directive: i1.TuiIcons, inputs: ["iconStart", "icon", "iconEnd", "badge"] }], ngImport: i0, template: '', isInline: true, styles: ["tui-icon:where(*[data-tui-version=\"5.12.0\"]){--tui-icon-size: 1em;position:relative;display:inline-flex;inline-size:1em;block-size:1em;font-size:1.5rem;flex-shrink:0;border:0 solid transparent;vertical-align:middle;box-sizing:border-box;-webkit-mask-image:var(--t-icon-bg);mask-image:var(--t-icon-bg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:calc(100% + 10 * var(--tui-stroke-width)) 100%;mask-size:calc(100% + 10 * var(--tui-stroke-width)) 100%;zoom:calc(100%*clamp(0px,var(--tui-font-offset) - 10px,1px)/.8px)}@media(hover:hover)and (pointer:fine){tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-appearance=icon]:hover{color:var(--tui-text-secondary)}}tui-icon:where(*[data-tui-version=\"5.12.0\"])[tuiIcons]:before,tui-icon:where(*[data-tui-version=\"5.12.0\"])[tuiIcons]:after{zoom:1}tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-end]:before{-webkit-mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);-webkit-mask-composite:source-in;mask-composite:intersect}tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-end][data-icon-start=img]:before,tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-end][data-icon-start=font]:before{-webkit-mask-image:radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);mask-image:radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em)}tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-end]:after{position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%}tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-start]:before{position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%}tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-start]:after{transform:translate(36%,36%);--tui-icon-size: .5715em}tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-start=font]:before,tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-end=font]:after{zoom:.667}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
16
16
|
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiIcon, decorators: [{
|
|
18
18
|
type: Component,
|
|
19
19
|
args: [{ selector: 'tui-icon:not([tuiBadge])', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
|
|
20
20
|
{
|
|
21
21
|
directive: TuiIcons,
|
|
22
22
|
inputs: ['iconStart: icon', 'iconEnd: badge'],
|
|
23
23
|
},
|
|
24
|
-
], host: { '[style.--t-icon-bg]': 'mask()' }, styles: ["tui-icon:where(*[data-tui-version=\"5.
|
|
24
|
+
], host: { '[style.--t-icon-bg]': 'mask()' }, styles: ["tui-icon:where(*[data-tui-version=\"5.12.0\"]){--tui-icon-size: 1em;position:relative;display:inline-flex;inline-size:1em;block-size:1em;font-size:1.5rem;flex-shrink:0;border:0 solid transparent;vertical-align:middle;box-sizing:border-box;-webkit-mask-image:var(--t-icon-bg);mask-image:var(--t-icon-bg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:calc(100% + 10 * var(--tui-stroke-width)) 100%;mask-size:calc(100% + 10 * var(--tui-stroke-width)) 100%;zoom:calc(100%*clamp(0px,var(--tui-font-offset) - 10px,1px)/.8px)}@media(hover:hover)and (pointer:fine){tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-appearance=icon]:hover{color:var(--tui-text-secondary)}}tui-icon:where(*[data-tui-version=\"5.12.0\"])[tuiIcons]:before,tui-icon:where(*[data-tui-version=\"5.12.0\"])[tuiIcons]:after{zoom:1}tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-end]:before{-webkit-mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);-webkit-mask-composite:source-in;mask-composite:intersect}tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-end][data-icon-start=img]:before,tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-end][data-icon-start=font]:before{-webkit-mask-image:radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);mask-image:radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em)}tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-end]:after{position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%}tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-start]:before{position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%}tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-start]:after{transform:translate(36%,36%);--tui-icon-size: .5715em}tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-start=font]:before,tui-icon:where(*[data-tui-version=\"5.12.0\"])[data-icon-end=font]:after{zoom:.667}\n"] }]
|
|
25
25
|
}] });
|
|
26
26
|
|
|
27
27
|
class TuiIconPipe {
|
|
28
28
|
constructor() {
|
|
29
29
|
this.transform = tuiInjectIconResolver();
|
|
30
30
|
}
|
|
31
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
32
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiIconPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
32
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.25", ngImport: i0, type: TuiIconPipe, isStandalone: true, name: "tuiIcon" }); }
|
|
33
33
|
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiIconPipe, decorators: [{
|
|
35
35
|
type: Pipe,
|
|
36
36
|
args: [{ name: 'tuiIcon' }]
|
|
37
37
|
}] });
|
|
@@ -4,6 +4,8 @@ import { TuiDropdownDirective, TuiDropdownContent } from '@taiga-ui/core/portals
|
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { inject, computed, input, Directive } from '@angular/core';
|
|
6
6
|
import { NgControl } from '@angular/forms';
|
|
7
|
+
import * as i2 from '@taiga-ui/cdk/directives/id';
|
|
8
|
+
import { TuiId } from '@taiga-ui/cdk/directives/id';
|
|
7
9
|
import * as i1 from '@taiga-ui/cdk/directives/native-validator';
|
|
8
10
|
import { TuiNativeValidator } from '@taiga-ui/cdk/directives/native-validator';
|
|
9
11
|
import { tuiInjectElement, tuiValue } from '@taiga-ui/cdk/utils/dom';
|
|
@@ -49,20 +51,19 @@ class TuiInputDirective {
|
|
|
49
51
|
this.el.ownerDocument.execCommand('insertText', false, this.handlers.stringify()(value));
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
53
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.
|
|
54
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
55
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: TuiInputDirective, isStandalone: true, selector: "input[tuiInput]", inputs: { readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, focused: { classPropertyName: "focused", publicName: "focused", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiInput": "" }, listeners: { "focusin": "0", "focusout": "0", "input": "0" }, properties: { "attr.role": "dropdown.content() && !el.matches(\"select\") ? \"combobox\" : null", "class._empty": "value() === \"\"", "readOnly": "readOnly()" } }, providers: [tuiAsTextfieldAccessor(TuiInputDirective)], hostDirectives: [{ directive: i1.TuiNativeValidator }, { directive: i2.TuiId }], ngImport: i0 }); }
|
|
54
56
|
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiInputDirective, decorators: [{
|
|
56
58
|
type: Directive,
|
|
57
59
|
args: [{
|
|
58
60
|
selector: 'input[tuiInput]',
|
|
59
61
|
providers: [tuiAsTextfieldAccessor(TuiInputDirective)],
|
|
60
|
-
hostDirectives: [TuiNativeValidator],
|
|
62
|
+
hostDirectives: [TuiNativeValidator, TuiId],
|
|
61
63
|
host: {
|
|
62
64
|
tuiInput: '',
|
|
63
65
|
'[attr.role]': 'dropdown.content() && !el.matches("select") ? "combobox" : null',
|
|
64
66
|
'[class._empty]': 'value() === ""',
|
|
65
|
-
'[id]': 'textfield.id',
|
|
66
67
|
'[readOnly]': 'readOnly()',
|
|
67
68
|
'(focusin)': '0',
|
|
68
69
|
'(focusout)': '0',
|
|
@@ -71,10 +72,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.24", ngImpo
|
|
|
71
72
|
}]
|
|
72
73
|
}] });
|
|
73
74
|
class TuiWithInput {
|
|
74
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
75
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
75
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiWithInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
76
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: TuiWithInput, isStandalone: true, hostDirectives: [{ directive: TuiInputDirective, inputs: ["invalid", "invalid", "focused", "focused", "readOnly", "readOnly", "state", "state"] }], ngImport: i0 }); }
|
|
76
77
|
}
|
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiWithInput, decorators: [{
|
|
78
79
|
type: Directive,
|
|
79
80
|
args: [{
|
|
80
81
|
hostDirectives: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-input.mjs","sources":["../../../projects/core/components/input/input.directive.ts","../../../projects/core/components/input/input.ts","../../../projects/core/components/input/taiga-ui-core-components-input.ts"],"sourcesContent":["import {computed, Directive, inject, input} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {tuiInjectElement, tuiValue} from '@taiga-ui/cdk/utils/dom';\nimport {\n TUI_TEXTFIELD_OPTIONS,\n tuiAsTextfieldAccessor,\n type TuiTextfieldAccessor,\n TuiTextfieldComponent,\n} from '@taiga-ui/core/components/textfield';\nimport {\n tuiAppearance,\n tuiAppearanceFocus,\n tuiAppearanceMode,\n tuiAppearanceState,\n} from '@taiga-ui/core/directives/appearance';\nimport {\n TUI_ITEMS_HANDLERS,\n type TuiItemsHandlers,\n} from '@taiga-ui/core/directives/items-handlers';\nimport {TuiDropdownDirective} from '@taiga-ui/core/portals/dropdown';\nimport {type TuiInteractiveState} from '@taiga-ui/core/types';\n\n@Directive({\n selector: 'input[tuiInput]',\n providers: [tuiAsTextfieldAccessor(TuiInputDirective)],\n hostDirectives: [TuiNativeValidator],\n host: {\n tuiInput: '',\n '[attr.role]': 'dropdown.content() && !el.matches(\"select\") ? \"combobox\" : null',\n '[class._empty]': 'value() === \"\"',\n '[
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-input.mjs","sources":["../../../projects/core/components/input/input.directive.ts","../../../projects/core/components/input/input.ts","../../../projects/core/components/input/taiga-ui-core-components-input.ts"],"sourcesContent":["import {computed, Directive, inject, input} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {TuiId} from '@taiga-ui/cdk/directives/id';\nimport {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {tuiInjectElement, tuiValue} from '@taiga-ui/cdk/utils/dom';\nimport {\n TUI_TEXTFIELD_OPTIONS,\n tuiAsTextfieldAccessor,\n type TuiTextfieldAccessor,\n TuiTextfieldComponent,\n} from '@taiga-ui/core/components/textfield';\nimport {\n tuiAppearance,\n tuiAppearanceFocus,\n tuiAppearanceMode,\n tuiAppearanceState,\n} from '@taiga-ui/core/directives/appearance';\nimport {\n TUI_ITEMS_HANDLERS,\n type TuiItemsHandlers,\n} from '@taiga-ui/core/directives/items-handlers';\nimport {TuiDropdownDirective} from '@taiga-ui/core/portals/dropdown';\nimport {type TuiInteractiveState} from '@taiga-ui/core/types';\n\n@Directive({\n selector: 'input[tuiInput]',\n providers: [tuiAsTextfieldAccessor(TuiInputDirective)],\n hostDirectives: [TuiNativeValidator, TuiId],\n host: {\n tuiInput: '',\n '[attr.role]': 'dropdown.content() && !el.matches(\"select\") ? \"combobox\" : null',\n '[class._empty]': 'value() === \"\"',\n '[readOnly]': 'readOnly()',\n '(focusin)': '0',\n '(focusout)': '0',\n '(input)': '0',\n },\n})\nexport class TuiInputDirective<T> implements TuiTextfieldAccessor<T> {\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly control = inject(NgControl, {optional: true});\n protected readonly handlers: TuiItemsHandlers<T> = inject(TUI_ITEMS_HANDLERS);\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected readonly dropdown = inject(TuiDropdownDirective);\n protected readonly a = tuiAppearance(inject(TUI_TEXTFIELD_OPTIONS).appearance);\n protected readonly s = tuiAppearanceState(computed(() => this.state()));\n protected readonly m = tuiAppearanceMode(computed(() => this.mode()));\n\n protected readonly f = tuiAppearanceFocus(\n computed(() => this.focused() ?? this.textfield.focused()),\n );\n\n public readonly readOnly = input(false);\n public readonly invalid = input<boolean | null>(null);\n public readonly focused = input<boolean | null>(null);\n public readonly state = input<TuiInteractiveState | null>(null);\n public readonly value = tuiValue(this.el);\n\n public readonly mode = computed<string | null>(() => {\n if (this.readOnly()) {\n return 'readonly';\n }\n\n if (this.invalid() === false) {\n return 'valid';\n }\n\n return this.invalid() ? 'invalid' : null;\n });\n\n public setValue(value: T | null): void {\n this.el.focus();\n this.el.select();\n\n if (value == null) {\n this.el.ownerDocument.execCommand('delete');\n\n // see https://github.com/taiga-family/taiga-ui/issues/11634\n // ensure non-erasable affixes actually deleted\n this.el.value = '';\n } else {\n this.el.ownerDocument.execCommand(\n 'insertText',\n false,\n this.handlers.stringify()(value),\n );\n }\n }\n}\n\n@Directive({\n hostDirectives: [\n {\n directive: TuiInputDirective,\n inputs: ['invalid', 'focused', 'readOnly', 'state'],\n },\n ],\n})\nexport class TuiWithInput {}\n","import {TuiLabel} from '@taiga-ui/core/components/label';\nimport {\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiDropdownContent} from '@taiga-ui/core/portals/dropdown';\n\nimport {TuiInputDirective} from './input.directive';\n\nexport const TuiInput = [\n TuiLabel,\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n TuiDropdownContent,\n TuiInputDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAsCa,iBAAiB,CAAA;AAd9B,IAAA,WAAA,GAAA;QAeuB,IAAA,CAAA,EAAE,GAAG,gBAAgB,EAAoB;QACzC,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,SAAS,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAC7C,QAAA,IAAA,CAAA,QAAQ,GAAwB,MAAM,CAAC,kBAAkB,CAAC;AAC1D,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACzC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC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AChB,wBAAA,YAAY,EAAE,GAAG;AACjB,wBAAA,SAAS,EAAE,GAAG;AACjB,qBAAA;AACJ,iBAAA;;MA6DY,YAAY,CAAA;+GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,YAAY,oDA5DZ,iBAAiB,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,SAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,EAAA,UAAA,EAAA,OAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FA4DjB,YAAY,EAAA,UAAA,EAAA,CAAA;kBARxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,iBAAiB;4BAC5B,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC;AACtD,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;ACxFM,MAAM,QAAQ,GAAG;IACpB,QAAQ;IACR,qBAAqB;IACrB,4BAA4B;IAC5B,kBAAkB;IAClB,iBAAiB;;;ACdrB;;AAEG;;;;"}
|
|
@@ -6,12 +6,12 @@ import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
|
6
6
|
import { TUI_DATA_LIST_HOST } from '@taiga-ui/core/components/data-list';
|
|
7
7
|
|
|
8
8
|
class Styles {
|
|
9
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
10
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: Styles, isStandalone: true, selector: "ng-component", exportAs: ["tui-label-5.12.0"], ngImport: i0, template: '', isInline: true, styles: ["[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]){display:flex;gap:.25rem;flex-direction:column;font:var(--tui-typography-body-s);color:var(--tui-text-primary)}[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]):not([data-orientation=vertical]){flex-direction:row;inline-size:fit-content;font:var(--tui-typography-body-m)}[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) input[type=checkbox],[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) input[type=radio]{font:inherit;inset-block-start:calc(var(--tui-lh) / 2);transform:translateY(-50%);margin-inline-end:.5rem}[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) input[type=checkbox][data-size=s],[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) input[type=radio][data-size=s]{line-height:1.3;margin-inline-end:.25rem}[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) small{font:var(--tui-typography-body-s)}[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) [tuiTitle]{margin-block-start:.125rem}[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) [tuiSubtitle]{color:var(--tui-text-secondary)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: Styles, decorators: [{
|
|
13
13
|
type: Component,
|
|
14
|
-
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: `tui-label-${TUI_VERSION}`, styles: ["[tuiLabel]:where(*[data-tui-version=\"5.
|
|
14
|
+
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: `tui-label-${TUI_VERSION}`, styles: ["[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]){display:flex;gap:.25rem;flex-direction:column;font:var(--tui-typography-body-s);color:var(--tui-text-primary)}[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]):not([data-orientation=vertical]){flex-direction:row;inline-size:fit-content;font:var(--tui-typography-body-m)}[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) input[type=checkbox],[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) input[type=radio]{font:inherit;inset-block-start:calc(var(--tui-lh) / 2);transform:translateY(-50%);margin-inline-end:.5rem}[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) input[type=checkbox][data-size=s],[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) input[type=radio][data-size=s]{line-height:1.3;margin-inline-end:.25rem}[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) small{font:var(--tui-typography-body-s)}[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) [tuiTitle]{margin-block-start:.125rem}[tuiLabel]:where(*[data-tui-version=\"5.12.0\"]) [tuiSubtitle]{color:var(--tui-text-secondary)}\n"] }]
|
|
15
15
|
}] });
|
|
16
16
|
// TODO: Replace TUI_DATA_LIST_HOST with proper token once we refactor textfields
|
|
17
17
|
class TuiLabel {
|
|
@@ -21,10 +21,10 @@ class TuiLabel {
|
|
|
21
21
|
this.nothing = tuiWithStyles(Styles);
|
|
22
22
|
this.parent = inject(forwardRef(() => TUI_DATA_LIST_HOST), { optional: true });
|
|
23
23
|
}
|
|
24
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
25
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
25
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.25", type: TuiLabel, isStandalone: true, selector: "label[tuiLabel]", host: { attributes: { "data-tui-version": "5.12.0" }, properties: { "attr.data-orientation": "textfield() ? \"vertical\" : \"horizontal\"", "attr.for": "el.htmlFor || parent?.id" } }, queries: [{ propertyName: "textfield", first: true, predicate: i0.forwardRef(() => TUI_DATA_LIST_HOST), descendants: true, isSignal: true }], ngImport: i0 }); }
|
|
26
26
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiLabel, decorators: [{
|
|
28
28
|
type: Directive,
|
|
29
29
|
args: [{
|
|
30
30
|
selector: 'label[tuiLabel]',
|