@cuby-ui/core 0.0.56 → 0.0.57
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/dialog/dialog.component.d.ts +18 -4
- package/esm2020/components/dialog/dialog.component.mjs +24 -6
- package/fesm2015/cuby-ui-core.mjs +24 -6
- package/fesm2015/cuby-ui-core.mjs.map +1 -1
- package/fesm2020/cuby-ui-core.mjs +24 -6
- package/fesm2020/cuby-ui-core.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
import type { Type } from '@angular/core';
|
|
1
|
+
import type { OnInit, Type } from '@angular/core';
|
|
2
2
|
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import type { CuiValueOf } from '@cuby-ui/cdk';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare
|
|
5
|
+
export declare const ContentType: {
|
|
6
|
+
readonly String: "string";
|
|
7
|
+
readonly Template: "template";
|
|
8
|
+
readonly Component: "component";
|
|
9
|
+
};
|
|
10
|
+
export type IContentType = CuiValueOf<typeof ContentType>;
|
|
11
|
+
export declare class CuiDialogComponent implements OnInit {
|
|
5
12
|
protected readonly context: import("@cuby-ui/cdk").CuiPopover<import("./dialog.interfaces").CuiDialogOptions>;
|
|
6
|
-
protected
|
|
13
|
+
protected readonly ContentType: {
|
|
14
|
+
readonly String: "string";
|
|
15
|
+
readonly Template: "template";
|
|
16
|
+
readonly Component: "component";
|
|
17
|
+
};
|
|
18
|
+
protected contentType: IContentType;
|
|
19
|
+
ngOnInit(): void;
|
|
7
20
|
protected get contentTemplateRef(): TemplateRef<unknown>;
|
|
8
|
-
protected get
|
|
21
|
+
protected get componentType(): Type<unknown>;
|
|
9
22
|
protected onClose(): void;
|
|
23
|
+
private initContentType;
|
|
10
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<CuiDialogComponent, never>;
|
|
11
25
|
static ɵcmp: i0.ɵɵComponentDeclaration<CuiDialogComponent, "cui-dialog", never, {}, {}, never, never, false, never>;
|
|
12
26
|
}
|
|
@@ -3,27 +3,45 @@ import { CUI_DIALOG_CONTEXT } from './dialog.tokens';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "@angular/common";
|
|
5
5
|
import * as i2 from "../button/button.component";
|
|
6
|
+
export const ContentType = {
|
|
7
|
+
String: 'string',
|
|
8
|
+
Template: 'template',
|
|
9
|
+
Component: 'component'
|
|
10
|
+
};
|
|
6
11
|
export class CuiDialogComponent {
|
|
7
12
|
constructor() {
|
|
8
13
|
this.context = inject(CUI_DIALOG_CONTEXT);
|
|
14
|
+
this.ContentType = ContentType;
|
|
15
|
+
this.contentType = ContentType.Component;
|
|
9
16
|
}
|
|
10
|
-
|
|
11
|
-
|
|
17
|
+
ngOnInit() {
|
|
18
|
+
this.initContentType();
|
|
12
19
|
}
|
|
13
20
|
get contentTemplateRef() {
|
|
14
21
|
return this.context.content;
|
|
15
22
|
}
|
|
16
|
-
get
|
|
23
|
+
get componentType() {
|
|
17
24
|
return this.context.content;
|
|
18
25
|
}
|
|
19
26
|
onClose() {
|
|
20
27
|
this.context.$implicit.complete();
|
|
21
28
|
}
|
|
29
|
+
initContentType() {
|
|
30
|
+
const content = this.context.content;
|
|
31
|
+
switch (true) {
|
|
32
|
+
case (typeof content === 'string'):
|
|
33
|
+
this.contentType = ContentType.String;
|
|
34
|
+
return;
|
|
35
|
+
case (content instanceof TemplateRef):
|
|
36
|
+
this.contentType = ContentType.Template;
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
22
40
|
}
|
|
23
41
|
CuiDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
24
|
-
CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", ngImport: i0, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div
|
|
42
|
+
CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", ngImport: i0, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div\n [ngSwitch]=\"contentType\"\n class=\"\u0441-content\"\n>\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:12px;background:var(--cui-base-0);font-family:var(--cui-main-font)}.c-header{padding:24px 24px 16px;display:flex;justify-content:space-between;gap:8px}.c-heading{font-weight:500;font-size:20px;line-height:30px;min-height:36px;margin:0;overflow-wrap:anywhere}.\\441-content{padding:16px 24px}.c-footer{padding:16px 24px 24px}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2.CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, decorators: [{
|
|
26
44
|
type: Component,
|
|
27
|
-
args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div
|
|
45
|
+
args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div\n [ngSwitch]=\"contentType\"\n class=\"\u0441-content\"\n>\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:12px;background:var(--cui-base-0);font-family:var(--cui-main-font)}.c-header{padding:24px 24px 16px;display:flex;justify-content:space-between;gap:8px}.c-heading{font-weight:500;font-size:20px;line-height:30px;min-height:36px;margin:0;overflow-wrap:anywhere}.\\441-content{padding:16px 24px}.c-footer{padding:16px 24px 24px}\n"] }]
|
|
28
46
|
}] });
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvY29tcG9uZW50cy9kaWFsb2cvZGlhbG9nLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvY29tcG9uZW50cy9kaWFsb2cvZGlhbG9nLnRlbXBsYXRlLmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsV0FBVyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBR3hGLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLGlCQUFpQixDQUFDOzs7O0FBRXJELE1BQU0sQ0FBQyxNQUFNLFdBQVcsR0FBRztJQUN6QixNQUFNLEVBQUUsUUFBUTtJQUNoQixRQUFRLEVBQUUsVUFBVTtJQUNwQixTQUFTLEVBQUUsV0FBVztDQUNkLENBQUM7QUFVWCxNQUFNLE9BQU8sa0JBQWtCO0lBTi9CO1FBT3FCLFlBQU8sR0FBRyxNQUFNLENBQUMsa0JBQWtCLENBQUMsQ0FBQztRQUVyQyxnQkFBVyxHQUFHLFdBQVcsQ0FBQztRQUVuQyxnQkFBVyxHQUF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5jZT1cImdob3N0XCJcbiAgICBpY29uPVwiY3VpSWNvblhcIlxuICAgIChjbGljayk9XCJvbkNsb3NlKClcIlxuICA+PC9idXR0b24+XG48L2hlYWRlcj5cbjxkaXZcbiAgW25nU3dpdGNoXT1cImNvbnRlbnRUeXBlXCJcbiAgY2xhc3M9XCLRgS1jb250ZW50XCJcbj5cbiAgPG5nLWNvbnRhaW5lciAqbmdTd2l0Y2hDYXNlPVwiQ29udGVudFR5cGUuU3RyaW5nXCI+XG4gICAge3sgY29udGV4dC5jb250ZW50IH19XG4gIDwvbmctY29udGFpbmVyPlxuICA8bmctY29udGFpbmVyICpuZ1N3aXRjaENhc2U9XCJDb250ZW50VHlwZS5UZW1wbGF0ZVwiPlxuICAgIDxuZy1jb250YWluZXIgKm5nVGVtcGxhdGVPdXRsZXQ9XCJjb250ZW50VGVtcGxhdGVSZWY7IGNvbnRleHQ6IGNvbnRleHRcIj48L25nLWNvbnRhaW5lcj5cbiAgPC9uZy1jb250YWluZXI+XG4gIDxuZy1jb250YWluZXIgKm5nU3dpdGNoQ2FzZT1cIkNvbnRlbnRUeXBlLkNvbXBvbmVudFwiPlxuICAgIDxuZy1jb250YWluZXIgKm5nQ29tcG9uZW50T3V0bGV0PVwiY29tcG9uZW50VHlwZVwiPjwvbmctY29udGFpbmVyPlxuICA8L25nLWNvbnRhaW5lcj5cbjwvZGl2PlxuIl19
|
|
@@ -856,28 +856,46 @@ const CUI_DIALOG_DEFAULT_OPTIONS = {
|
|
|
856
856
|
const CUI_DIALOG_OPTIONS = cuiCreateToken(CUI_DIALOG_DEFAULT_OPTIONS);
|
|
857
857
|
const CUI_DIALOG_CONTEXT = new InjectionToken('');
|
|
858
858
|
|
|
859
|
+
const ContentType = {
|
|
860
|
+
String: 'string',
|
|
861
|
+
Template: 'template',
|
|
862
|
+
Component: 'component'
|
|
863
|
+
};
|
|
859
864
|
class CuiDialogComponent {
|
|
860
865
|
constructor() {
|
|
861
866
|
this.context = inject(CUI_DIALOG_CONTEXT);
|
|
867
|
+
this.ContentType = ContentType;
|
|
868
|
+
this.contentType = ContentType.Component;
|
|
862
869
|
}
|
|
863
|
-
|
|
864
|
-
|
|
870
|
+
ngOnInit() {
|
|
871
|
+
this.initContentType();
|
|
865
872
|
}
|
|
866
873
|
get contentTemplateRef() {
|
|
867
874
|
return this.context.content;
|
|
868
875
|
}
|
|
869
|
-
get
|
|
876
|
+
get componentType() {
|
|
870
877
|
return this.context.content;
|
|
871
878
|
}
|
|
872
879
|
onClose() {
|
|
873
880
|
this.context.$implicit.complete();
|
|
874
881
|
}
|
|
882
|
+
initContentType() {
|
|
883
|
+
const content = this.context.content;
|
|
884
|
+
switch (true) {
|
|
885
|
+
case (typeof content === 'string'):
|
|
886
|
+
this.contentType = ContentType.String;
|
|
887
|
+
return;
|
|
888
|
+
case (content instanceof TemplateRef):
|
|
889
|
+
this.contentType = ContentType.Template;
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
875
893
|
}
|
|
876
894
|
CuiDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
877
|
-
CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", ngImport: i0, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div
|
|
895
|
+
CuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CuiDialogComponent, selector: "cui-dialog", ngImport: i0, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div\n [ngSwitch]=\"contentType\"\n class=\"\u0441-content\"\n>\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:12px;background:var(--cui-base-0);font-family:var(--cui-main-font)}.c-header{padding:24px 24px 16px;display:flex;justify-content:space-between;gap:8px}.c-heading{font-weight:500;font-size:20px;line-height:30px;min-height:36px;margin:0;overflow-wrap:anywhere}.\\441-content{padding:16px 24px}.c-footer{padding:16px 24px 24px}\n"], dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: CuiButtonComponent, selector: "button[cuiButton], a[cuiButton]", inputs: ["shape", "disabled", "isLoaderShown", "icon", "iconRight", "appearance", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
878
896
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CuiDialogComponent, decorators: [{
|
|
879
897
|
type: Component,
|
|
880
|
-
args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div
|
|
898
|
+
args: [{ selector: 'cui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header *ngIf=\"context.label\" class=\"c-header\">\n <h2 class=\"c-heading\">{{ context.label }}</h2>\n <button\n cuiButton\n appearance=\"ghost\"\n icon=\"cuiIconX\"\n (click)=\"onClose()\"\n ></button>\n</header>\n<div\n [ngSwitch]=\"contentType\"\n class=\"\u0441-content\"\n>\n <ng-container *ngSwitchCase=\"ContentType.String\">\n {{ context.content }}\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Template\">\n <ng-container *ngTemplateOutlet=\"contentTemplateRef; context: context\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"ContentType.Component\">\n <ng-container *ngComponentOutlet=\"componentType\"></ng-container>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{box-shadow:0 2px 4px -1px #0000000f,0 4px 6px -1px #0000001a;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:12px;background:var(--cui-base-0);font-family:var(--cui-main-font)}.c-header{padding:24px 24px 16px;display:flex;justify-content:space-between;gap:8px}.c-heading{font-weight:500;font-size:20px;line-height:30px;min-height:36px;margin:0;overflow-wrap:anywhere}.\\441-content{padding:16px 24px}.c-footer{padding:16px 24px 24px}\n"] }]
|
|
881
899
|
}] });
|
|
882
900
|
|
|
883
901
|
class CuiDialogsComponent {
|
|
@@ -2138,5 +2156,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2138
2156
|
* Generated bundle index. Do not edit.
|
|
2139
2157
|
*/
|
|
2140
2158
|
|
|
2141
|
-
export { CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_OPTIONS, CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FIELD_ICON_LEFT, CUI_TEXT_FIELD_ID, CUI_TEXT_FIELD_IS_ERROR, CUI_TEXT_FIELD_PLACEHOLDER, CUI_TEXT_FIELD_SIZE, CUI_TEXT_FILED_CONTROLLER_PROVIDER, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, CuiAccordionComponent, CuiAccordionItemComponent, CuiAccordionModule, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCheckboxComponent, CuiCheckboxModule, CuiContextMenuComponent, CuiContextMenuModule, CuiDialogComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiEditorComponent, CuiEditorModule, CuiFormFieldComponent, CuiFormFieldModule, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiLabelComponent, CuiLabelModule, CuiNotificationComponent, CuiNotificationModule, CuiRadioComponent, CuiRadioModule, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModule, CuiSvgComponent, CuiSvgModule, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, cuiRemoveSpaces, cuiReplace };
|
|
2159
|
+
export { CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_OPTIONS, CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FIELD_ICON_LEFT, CUI_TEXT_FIELD_ID, CUI_TEXT_FIELD_IS_ERROR, CUI_TEXT_FIELD_PLACEHOLDER, CUI_TEXT_FIELD_SIZE, CUI_TEXT_FILED_CONTROLLER_PROVIDER, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, ContentType, CuiAccordionComponent, CuiAccordionItemComponent, CuiAccordionModule, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCheckboxComponent, CuiCheckboxModule, CuiContextMenuComponent, CuiContextMenuModule, CuiDialogComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiEditorComponent, CuiEditorModule, CuiFormFieldComponent, CuiFormFieldModule, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiLabelComponent, CuiLabelModule, CuiNotificationComponent, CuiNotificationModule, CuiRadioComponent, CuiRadioModule, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModule, CuiSvgComponent, CuiSvgModule, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, cuiRemoveSpaces, cuiReplace };
|
|
2142
2160
|
//# sourceMappingURL=cuby-ui-core.mjs.map
|