@corp-products/ui-components 0.0.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/corp-products-ui-components.mjs +5 -0
- package/esm2022/index.mjs +14 -0
- package/esm2022/lib/app-accordion/app-accordion.component.mjs +35 -0
- package/esm2022/lib/app-button/app-button.component.mjs +43 -0
- package/esm2022/lib/app-button/app-button.mjs +2 -0
- package/esm2022/lib/app-button/index.mjs +3 -0
- package/esm2022/lib/app-dropdown-menu/app-dropdown-menu.component.mjs +54 -0
- package/esm2022/lib/app-dropdown-menu/app-dropdown-menu.mjs +2 -0
- package/esm2022/lib/app-dropdown-menu/index.mjs +3 -0
- package/esm2022/lib/app-dropdown-menu/menu-popup.pipe.mjs +23 -0
- package/esm2022/lib/app-tabs/app-tab.interface.mjs +2 -0
- package/esm2022/lib/app-tabs/app-tabs.component.mjs +57 -0
- package/esm2022/lib/app-tabs/index.mjs +3 -0
- package/esm2022/lib/confirmation-dialog/confirmation-dialog.component.mjs +44 -0
- package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +31 -0
- package/esm2022/lib/dynamic-form/dynamic-form.interface.mjs +6 -0
- package/esm2022/lib/form-components/@utils/form-utils.mjs +11 -0
- package/esm2022/lib/form-components/@utils/validations/error-keys.enum.mjs +27 -0
- package/esm2022/lib/form-components/@utils/validations/form-validation.service.mjs +50 -0
- package/esm2022/lib/form-components/@utils/validations/index.mjs +4 -0
- package/esm2022/lib/form-components/@utils/validations/validation-message.pipe.mjs +30 -0
- package/esm2022/lib/form-components/components/auto-complete/auto-complete.component.mjs +59 -0
- package/esm2022/lib/form-components/components/base-input.component.mjs +57 -0
- package/esm2022/lib/form-components/components/date-picker/date-picker.component.mjs +58 -0
- package/esm2022/lib/form-components/components/input/input.component.mjs +48 -0
- package/esm2022/lib/form-components/components/select/select.component.mjs +72 -0
- package/esm2022/lib/form-components/components/select-button/select-button.component.mjs +29 -0
- package/esm2022/lib/form-components/components/switcher/switch.component.mjs +34 -0
- package/esm2022/lib/form-components/index.mjs +10 -0
- package/esm2022/lib/form-components/interfaces/index.mjs +2 -0
- package/esm2022/lib/form-components/interfaces/label-value.mjs +2 -0
- package/esm2022/lib/ico-moon-icon/ico-moon-icon.component.mjs +41 -0
- package/esm2022/lib/read-more/read-more.component.mjs +30 -0
- package/esm2022/lib/side-bar/side-bar.component.mjs +51 -0
- package/esm2022/lib/user-autocomplete-card/user-autocomplete-card.component.mjs +32 -0
- package/esm2022/lib/user-info/user-info.component.mjs +15 -0
- package/fesm2022/corp-products-ui-components.mjs +840 -0
- package/fesm2022/corp-products-ui-components.mjs.map +1 -0
- package/{src/index.ts → index.d.ts} +13 -13
- package/lib/app-accordion/app-accordion.component.d.ts +11 -0
- package/lib/app-button/app-button.component.d.ts +18 -0
- package/{src/lib/app-button/app-button.ts → lib/app-button/app-button.d.ts} +4 -15
- package/{src/lib/app-button/index.ts → lib/app-button/index.d.ts} +2 -2
- package/lib/app-dropdown-menu/app-dropdown-menu.component.d.ts +20 -0
- package/lib/app-dropdown-menu/app-dropdown-menu.d.ts +15 -0
- package/{src/lib/app-dropdown-menu/index.ts → lib/app-dropdown-menu/index.d.ts} +2 -2
- package/lib/app-dropdown-menu/menu-popup.pipe.d.ts +8 -0
- package/lib/app-tabs/app-tab.interface.d.ts +23 -0
- package/lib/app-tabs/app-tabs.component.d.ts +18 -0
- package/{src/lib/app-tabs/index.ts → lib/app-tabs/index.d.ts} +2 -2
- package/lib/confirmation-dialog/confirmation-dialog.component.d.ts +19 -0
- package/lib/dynamic-form/dynamic-form.component.d.ts +16 -0
- package/lib/dynamic-form/dynamic-form.interface.d.ts +44 -0
- package/lib/form-components/@utils/form-utils.d.ts +4 -0
- package/lib/form-components/@utils/validations/error-keys.enum.d.ts +24 -0
- package/lib/form-components/@utils/validations/form-validation.service.d.ts +11 -0
- package/{src/lib/form-components/@utils/validations/index.ts → lib/form-components/@utils/validations/index.d.ts} +3 -3
- package/lib/form-components/@utils/validations/validation-message.pipe.d.ts +9 -0
- package/lib/form-components/components/auto-complete/auto-complete.component.d.ts +18 -0
- package/lib/form-components/components/base-input.component.d.ts +21 -0
- package/lib/form-components/components/date-picker/date-picker.component.d.ts +21 -0
- package/lib/form-components/components/input/input.component.d.ts +17 -0
- package/lib/form-components/components/select/select.component.d.ts +23 -0
- package/lib/form-components/components/select-button/select-button.component.d.ts +13 -0
- package/lib/form-components/components/switcher/switch.component.d.ts +11 -0
- package/{src/lib/form-components/index.ts → lib/form-components/index.d.ts} +9 -9
- package/{src/lib/form-components/interfaces/index.ts → lib/form-components/interfaces/index.d.ts} +1 -1
- package/lib/form-components/interfaces/label-value.d.ts +4 -0
- package/lib/ico-moon-icon/ico-moon-icon.component.d.ts +9 -0
- package/lib/read-more/read-more.component.d.ts +10 -0
- package/lib/side-bar/side-bar.component.d.ts +18 -0
- package/lib/user-autocomplete-card/user-autocomplete-card.component.d.ts +12 -0
- package/lib/user-info/user-info.component.d.ts +7 -0
- package/package.json +36 -19
- package/eslint.config.js +0 -34
- package/ng-package.json +0 -7
- package/project.json +0 -29
- package/src/lib/app-accordion/app-accordion.component.html +0 -15
- package/src/lib/app-accordion/app-accordion.component.scss +0 -0
- package/src/lib/app-accordion/app-accordion.component.spec.ts +0 -21
- package/src/lib/app-accordion/app-accordion.component.ts +0 -21
- package/src/lib/app-accordion/index.ts +0 -2
- package/src/lib/app-button/app-button.component.html +0 -13
- package/src/lib/app-button/app-button.component.scss +0 -0
- package/src/lib/app-button/app-button.component.ts +0 -28
- package/src/lib/app-dropdown-menu/app-dropdown-menu.component.html +0 -25
- package/src/lib/app-dropdown-menu/app-dropdown-menu.component.scss +0 -39
- package/src/lib/app-dropdown-menu/app-dropdown-menu.component.spec.ts +0 -21
- package/src/lib/app-dropdown-menu/app-dropdown-menu.component.ts +0 -43
- package/src/lib/app-dropdown-menu/app-dropdown-menu.ts +0 -17
- package/src/lib/app-dropdown-menu/menu-popup.pipe.ts +0 -18
- package/src/lib/app-tabs/app-tab.interface.ts +0 -26
- package/src/lib/app-tabs/app-tabs.component.html +0 -35
- package/src/lib/app-tabs/app-tabs.component.scss +0 -103
- package/src/lib/app-tabs/app-tabs.component.spec.ts +0 -21
- package/src/lib/app-tabs/app-tabs.component.ts +0 -48
- package/src/lib/confirmation-dialog/confirmation-dialog.component.html +0 -54
- package/src/lib/confirmation-dialog/confirmation-dialog.component.scss +0 -0
- package/src/lib/confirmation-dialog/confirmation-dialog.component.spec.ts +0 -22
- package/src/lib/confirmation-dialog/confirmation-dialog.component.ts +0 -51
- package/src/lib/dynamic-form/dynamic-form.component.html +0 -39
- package/src/lib/dynamic-form/dynamic-form.component.scss +0 -0
- package/src/lib/dynamic-form/dynamic-form.component.spec.ts +0 -21
- package/src/lib/dynamic-form/dynamic-form.component.ts +0 -29
- package/src/lib/dynamic-form/dynamic-form.interface.ts +0 -56
- package/src/lib/form-components/@utils/form-utils.ts +0 -12
- package/src/lib/form-components/@utils/validations/error-keys.enum.ts +0 -24
- package/src/lib/form-components/@utils/validations/form-validation.service.ts +0 -53
- package/src/lib/form-components/@utils/validations/validation-message.pipe.ts +0 -24
- package/src/lib/form-components/components/auto-complete/auto-complete.component.html +0 -48
- package/src/lib/form-components/components/auto-complete/auto-complete.component.scss +0 -0
- package/src/lib/form-components/components/auto-complete/auto-complete.component.spec.ts +0 -21
- package/src/lib/form-components/components/auto-complete/auto-complete.component.ts +0 -48
- package/src/lib/form-components/components/base-input.component.ts +0 -41
- package/src/lib/form-components/components/date-picker/date-picker.component.html +0 -53
- package/src/lib/form-components/components/date-picker/date-picker.component.scss +0 -4
- package/src/lib/form-components/components/date-picker/date-picker.component.spec.ts +0 -23
- package/src/lib/form-components/components/date-picker/date-picker.component.ts +0 -45
- package/src/lib/form-components/components/input/input.component.html +0 -59
- package/src/lib/form-components/components/input/input.component.scss +0 -3
- package/src/lib/form-components/components/input/input.component.spec.ts +0 -21
- package/src/lib/form-components/components/input/input.component.ts +0 -32
- package/src/lib/form-components/components/select/select.component.html +0 -90
- package/src/lib/form-components/components/select/select.component.scss +0 -0
- package/src/lib/form-components/components/select/select.component.spec.ts +0 -21
- package/src/lib/form-components/components/select/select.component.ts +0 -51
- package/src/lib/form-components/components/select-button/select-button.component.html +0 -21
- package/src/lib/form-components/components/select-button/select-button.component.scss +0 -0
- package/src/lib/form-components/components/select-button/select-button.component.spec.ts +0 -21
- package/src/lib/form-components/components/select-button/select-button.component.ts +0 -22
- package/src/lib/form-components/components/switcher/switch.component.html +0 -5
- package/src/lib/form-components/components/switcher/switch.component.scss +0 -0
- package/src/lib/form-components/components/switcher/switch.component.spec.ts +0 -21
- package/src/lib/form-components/components/switcher/switch.component.ts +0 -25
- package/src/lib/form-components/interfaces/label-value.ts +0 -4
- package/src/lib/ico-moon-icon/ico-moon-icon.component.ts +0 -23
- package/src/lib/read-more/read-more.component.html +0 -17
- package/src/lib/read-more/read-more.component.scss +0 -0
- package/src/lib/read-more/read-more.component.spec.ts +0 -21
- package/src/lib/read-more/read-more.component.ts +0 -21
- package/src/lib/side-bar/side-bar.component.html +0 -25
- package/src/lib/side-bar/side-bar.component.scss +0 -5
- package/src/lib/side-bar/side-bar.component.spec.ts +0 -21
- package/src/lib/side-bar/side-bar.component.ts +0 -32
- package/src/lib/side-bar-dynamic/data-injector.pipe.ts +0 -15
- package/src/lib/side-bar-dynamic/dynamic-sidebar.service.ts +0 -116
- package/src/lib/side-bar-dynamic/side-bar-dynamic.component.html +0 -51
- package/src/lib/side-bar-dynamic/side-bar-dynamic.component.scss +0 -5
- package/src/lib/side-bar-dynamic/side-bar-dynamic.component.spec.ts +0 -21
- package/src/lib/side-bar-dynamic/side-bar-dynamic.component.ts +0 -37
- package/src/lib/side-bar-dynamic/side-bar-utils.ts +0 -30
- package/src/lib/side-bar-dynamic/sidebar-config.ts +0 -48
- package/src/lib/user-autocomplete-card/user-autocomplete-card.component.html +0 -20
- package/src/lib/user-autocomplete-card/user-autocomplete-card.component.scss +0 -0
- package/src/lib/user-autocomplete-card/user-autocomplete-card.component.spec.ts +0 -21
- package/src/lib/user-autocomplete-card/user-autocomplete-card.component.ts +0 -21
- package/src/lib/user-info/user-info.component.html +0 -10
- package/src/lib/user-info/user-info.component.ts +0 -11
- package/tsconfig.json +0 -25
- package/tsconfig.lib.json +0 -12
- package/tsconfig.lib.prod.json +0 -9
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from "@angular/core";
|
|
2
|
+
import { FormControl } from "@angular/forms";
|
|
3
|
+
import { Subject } from "rxjs";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare abstract class BaseInputComponent implements OnInit, OnDestroy {
|
|
6
|
+
control: FormControl;
|
|
7
|
+
name: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
placeholder: string;
|
|
10
|
+
inputId: string;
|
|
11
|
+
readonly: boolean;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
hint?: string;
|
|
14
|
+
protected destroy$: Subject<void>;
|
|
15
|
+
get required(): boolean;
|
|
16
|
+
get isInvalid(): boolean;
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
ngOnDestroy(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseInputComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseInputComponent, "ng-component", never, { "control": { "alias": "control"; "required": true; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; }, {}, never, never, false, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
|
+
import { BaseInputComponent } from "../base-input.component";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DatePickerComponent extends BaseInputComponent {
|
|
5
|
+
showIcon: boolean;
|
|
6
|
+
showClear: boolean;
|
|
7
|
+
basicInput: boolean;
|
|
8
|
+
isTimeOnly: boolean;
|
|
9
|
+
minDate: Date | undefined | null;
|
|
10
|
+
maxDate: Date | undefined | null;
|
|
11
|
+
hourFormat: "12" | "24";
|
|
12
|
+
nowTime: Date;
|
|
13
|
+
selectionMode: "single" | "range";
|
|
14
|
+
onAfterClearDate: EventEmitter<void>;
|
|
15
|
+
constructor();
|
|
16
|
+
selectCurrentTime(e: any): void;
|
|
17
|
+
clearButtonClick(e: any): void;
|
|
18
|
+
afterClearDate(): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "stc-date-picker", never, { "showIcon": { "alias": "showIcon"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "basicInput": { "alias": "basicInput"; "required": false; }; "isTimeOnly": { "alias": "isTimeOnly"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "hourFormat": { "alias": "hourFormat"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; }, { "onAfterClearDate": "onAfterClearDate"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseInputComponent } from "../base-input.component";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class InputComponent extends BaseInputComponent {
|
|
4
|
+
type: "text" | "textarea";
|
|
5
|
+
contentType: "text" | "email" | "number";
|
|
6
|
+
prefix: string;
|
|
7
|
+
rows: number;
|
|
8
|
+
cols: number;
|
|
9
|
+
autoResize: boolean;
|
|
10
|
+
basicInput: boolean;
|
|
11
|
+
noStyle: boolean;
|
|
12
|
+
hideOptionalLabel: boolean;
|
|
13
|
+
inputDirection: "ltr" | "rtl" | "inherit";
|
|
14
|
+
constructor();
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "stc-input", never, { "type": { "alias": "type"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "prefix": { "alias": "prefix"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "autoResize": { "alias": "autoResize"; "required": false; }; "basicInput": { "alias": "basicInput"; "required": false; }; "noStyle": { "alias": "noStyle"; "required": false; }; "hideOptionalLabel": { "alias": "hideOptionalLabel"; "required": false; }; "inputDirection": { "alias": "inputDirection"; "required": false; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
+
import { SelectChangeEvent } from "primeng/select";
|
|
3
|
+
import { BaseInputComponent } from "../base-input.component";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SelectComponent extends BaseInputComponent {
|
|
6
|
+
selectedItemTemplate: TemplateRef<unknown> | null;
|
|
7
|
+
optionTemplate: TemplateRef<unknown> | null;
|
|
8
|
+
options: unknown[];
|
|
9
|
+
optionLabel: string;
|
|
10
|
+
checkmark: boolean;
|
|
11
|
+
showClear: boolean;
|
|
12
|
+
editable: boolean;
|
|
13
|
+
filter: boolean;
|
|
14
|
+
multiple: boolean;
|
|
15
|
+
filterBy: string;
|
|
16
|
+
selectedItemsLabel: string;
|
|
17
|
+
basicInput: boolean;
|
|
18
|
+
change: EventEmitter<any>;
|
|
19
|
+
constructor();
|
|
20
|
+
onChange(e: SelectChangeEvent): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "stc-select", never, { "selectedItemTemplate": { "alias": "selectedItemTemplate"; "required": false; }; "optionTemplate": { "alias": "optionTemplate"; "required": false; }; "options": { "alias": "options"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "checkmark": { "alias": "checkmark"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "filterBy": { "alias": "filterBy"; "required": false; }; "selectedItemsLabel": { "alias": "selectedItemsLabel"; "required": false; }; "basicInput": { "alias": "basicInput"; "required": false; }; }, { "change": "change"; }, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
|
+
import { SelectButtonChangeEvent } from 'primeng/selectbutton';
|
|
3
|
+
import { BaseInputComponent } from "../base-input.component";
|
|
4
|
+
import { LabelValue } from "../../interfaces";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class SelectButtonComponent extends BaseInputComponent {
|
|
7
|
+
onChange: EventEmitter<any>;
|
|
8
|
+
options: LabelValue<any>[];
|
|
9
|
+
title: string;
|
|
10
|
+
changeValue(e: SelectButtonChangeEvent): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectButtonComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectButtonComponent, "stc-select-button", never, { "options": { "alias": "options"; "required": false; }; "title": { "alias": "title"; "required": false; }; }, { "onChange": "onChange"; }, never, never, true, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SwitchComponent {
|
|
4
|
+
label: string;
|
|
5
|
+
key: string;
|
|
6
|
+
checked: boolean;
|
|
7
|
+
onChange: EventEmitter<string>;
|
|
8
|
+
sendUpdatedValue(value: any): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SwitchComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SwitchComponent, "stc-switch", never, { "label": { "alias": "label"; "required": false; }; "key": { "alias": "key"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; }, { "onChange": "onChange"; }, never, never, true, never>;
|
|
11
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from "./components/input/input.component";
|
|
2
|
-
export * from "./components/select/select.component";
|
|
3
|
-
export * from "./components/date-picker/date-picker.component";
|
|
4
|
-
export * from "./components/auto-complete/auto-complete.component";
|
|
5
|
-
export * from "./components/select-button/select-button.component";
|
|
6
|
-
export * from "./components/switcher/switch.component";
|
|
7
|
-
export * from "./@utils/form-utils";
|
|
8
|
-
export * from "./@utils/validations";
|
|
9
|
-
export * from "./interfaces";
|
|
1
|
+
export * from "./components/input/input.component";
|
|
2
|
+
export * from "./components/select/select.component";
|
|
3
|
+
export * from "./components/date-picker/date-picker.component";
|
|
4
|
+
export * from "./components/auto-complete/auto-complete.component";
|
|
5
|
+
export * from "./components/select-button/select-button.component";
|
|
6
|
+
export * from "./components/switcher/switch.component";
|
|
7
|
+
export * from "./@utils/form-utils";
|
|
8
|
+
export * from "./@utils/validations";
|
|
9
|
+
export * from "./interfaces";
|
package/{src/lib/form-components/interfaces/index.ts → lib/form-components/interfaces/index.d.ts}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./label-value";
|
|
1
|
+
export * from "./label-value";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class IcoMoonIconComponent {
|
|
3
|
+
iconName: string;
|
|
4
|
+
iconClass: string;
|
|
5
|
+
iconPathCount: number;
|
|
6
|
+
get getPathCount(): number[];
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IcoMoonIconComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IcoMoonIconComponent, "app-ico-moon-card", never, { "iconName": { "alias": "iconName"; "required": true; }; "iconClass": { "alias": "iconClass"; "required": false; }; "iconPathCount": { "alias": "iconPathCount"; "required": false; }; }, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ReadMoreComponent {
|
|
3
|
+
text: string;
|
|
4
|
+
styleClass: string;
|
|
5
|
+
maxCharacters: number;
|
|
6
|
+
isExpanded: boolean;
|
|
7
|
+
toggleReadMore(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReadMoreComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ReadMoreComponent, "app-read-more", never, { "text": { "alias": "text"; "required": true; }; "styleClass": { "alias": "styleClass"; "required": false; }; "maxCharacters": { "alias": "maxCharacters"; "required": false; }; }, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EventEmitter, TemplateRef } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SideBarComponent {
|
|
4
|
+
show: boolean;
|
|
5
|
+
title: string;
|
|
6
|
+
closable: boolean;
|
|
7
|
+
dismissible: boolean;
|
|
8
|
+
closeOnEscape: boolean;
|
|
9
|
+
sidebarSize: "sm" | "md" | "lg" | "xl";
|
|
10
|
+
styleClass: string;
|
|
11
|
+
hide: EventEmitter<boolean>;
|
|
12
|
+
onShow: EventEmitter<boolean>;
|
|
13
|
+
contentTemplate: TemplateRef<unknown>;
|
|
14
|
+
footerTemplate: TemplateRef<unknown>;
|
|
15
|
+
hideSidebar(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SideBarComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SideBarComponent, "app-side-bar", never, { "show": { "alias": "show"; "required": false; }; "title": { "alias": "title"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "dismissible": { "alias": "dismissible"; "required": false; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; }; "sidebarSize": { "alias": "sidebarSize"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "contentTemplate": { "alias": "contentTemplate"; "required": false; }; "footerTemplate": { "alias": "footerTemplate"; "required": false; }; }, { "hide": "hide"; "onShow": "onShow"; }, never, ["*"], true, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class UserAutocompleteCardComponent {
|
|
4
|
+
select: EventEmitter<any>;
|
|
5
|
+
delete: EventEmitter<any>;
|
|
6
|
+
userData: any;
|
|
7
|
+
explicitRole: string;
|
|
8
|
+
showDeleteAction: boolean;
|
|
9
|
+
onDelete(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserAutocompleteCardComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserAutocompleteCardComponent, "app-user-autocomplete-card", never, { "userData": { "alias": "userData"; "required": true; }; "explicitRole": { "alias": "explicitRole"; "required": false; }; "showDeleteAction": { "alias": "showDeleteAction"; "required": false; }; }, { "select": "select"; "delete": "delete"; }, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class UserInfoComponent {
|
|
3
|
+
profileImage: string;
|
|
4
|
+
name: string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserInfoComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserInfoComponent, "user-info", never, { "profileImage": { "alias": "profileImage"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@corp-products/ui-components",
|
|
3
|
-
"version": "
|
|
4
|
-
"author": "shireen Omar",
|
|
5
|
-
"description": "shared UI components across our apps",
|
|
6
|
-
"peerDependencies": {
|
|
7
|
-
"@angular/common": "^18.2.0",
|
|
8
|
-
"@angular/core": "^18.2.0"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@corp-products/ui-components",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"author": "shireen Omar",
|
|
5
|
+
"description": "shared UI components across our apps",
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"@angular/common": "^18.2.0",
|
|
8
|
+
"@angular/core": "^18.2.0",
|
|
9
|
+
"primeng": "^18.0.2"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"angular",
|
|
13
|
+
"library"
|
|
14
|
+
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"module": "fesm2022/corp-products-ui-components.mjs",
|
|
21
|
+
"typings": "index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
"./package.json": {
|
|
24
|
+
"default": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./index.d.ts",
|
|
28
|
+
"esm2022": "./esm2022/corp-products-ui-components.mjs",
|
|
29
|
+
"esm": "./esm2022/corp-products-ui-components.mjs",
|
|
30
|
+
"default": "./fesm2022/corp-products-ui-components.mjs"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"tslib": "^2.3.0"
|
|
35
|
+
}
|
|
36
|
+
}
|
package/eslint.config.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
const nx = require('@nx/eslint-plugin');
|
|
2
|
-
const baseConfig = require('../../eslint.config.js');
|
|
3
|
-
|
|
4
|
-
module.exports = [
|
|
5
|
-
...baseConfig,
|
|
6
|
-
...nx.configs['flat/angular'],
|
|
7
|
-
...nx.configs['flat/angular-template'],
|
|
8
|
-
{
|
|
9
|
-
files: ['**/*.ts'],
|
|
10
|
-
rules: {
|
|
11
|
-
'@angular-eslint/directive-selector': [
|
|
12
|
-
'error',
|
|
13
|
-
{
|
|
14
|
-
type: 'attribute',
|
|
15
|
-
prefix: 'app',
|
|
16
|
-
style: 'camelCase',
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
'@angular-eslint/component-selector': [
|
|
20
|
-
'error',
|
|
21
|
-
{
|
|
22
|
-
type: 'element',
|
|
23
|
-
prefix: 'app',
|
|
24
|
-
style: 'kebab-case',
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
files: ['**/*.html'],
|
|
31
|
-
// Override or add rules here
|
|
32
|
-
rules: {},
|
|
33
|
-
},
|
|
34
|
-
];
|
package/ng-package.json
DELETED
package/project.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ui-components",
|
|
3
|
-
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
-
"sourceRoot": "libs/ui-components/src",
|
|
5
|
-
"prefix": "",
|
|
6
|
-
"projectType": "library",
|
|
7
|
-
"tags": [],
|
|
8
|
-
"targets": {
|
|
9
|
-
"build": {
|
|
10
|
-
"executor": "@nx/angular:package",
|
|
11
|
-
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
|
|
12
|
-
"options": {
|
|
13
|
-
"project": "libs/ui-components/ng-package.json"
|
|
14
|
-
},
|
|
15
|
-
"configurations": {
|
|
16
|
-
"production": {
|
|
17
|
-
"tsConfig": "libs/ui-components/tsconfig.lib.prod.json"
|
|
18
|
-
},
|
|
19
|
-
"development": {
|
|
20
|
-
"tsConfig": "libs/ui-components/tsconfig.lib.json"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"defaultConfiguration": "production"
|
|
24
|
-
},
|
|
25
|
-
"lint": {
|
|
26
|
-
"executor": "@nx/eslint:lint"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<p-accordion value="0">
|
|
2
|
-
<p-accordion-panel value="0" [class.!border-0]="!accordionPanelBorder">
|
|
3
|
-
<p-accordion-header>
|
|
4
|
-
<span class="flex items-center gap-2 w-full">
|
|
5
|
-
<app-ico-moon-card [iconClass]="'text-[24px] text-secondary'" [iconName]="'font-icon-'+iconName" />
|
|
6
|
-
<span class="font-bold whitespace-nowrap">{{title}}</span>
|
|
7
|
-
</span>
|
|
8
|
-
</p-accordion-header>
|
|
9
|
-
<p-accordion-content>
|
|
10
|
-
<div [ngClass]="{'border-t-2 border-gray-light pt-2': contentBorderTop, }">
|
|
11
|
-
<ng-content></ng-content>
|
|
12
|
-
</div>
|
|
13
|
-
</p-accordion-content>
|
|
14
|
-
</p-accordion-panel>
|
|
15
|
-
</p-accordion>
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from "@angular/core/testing";
|
|
2
|
-
import { AppAccordionComponent } from "./app-accordion.component";
|
|
3
|
-
|
|
4
|
-
describe("HeaderCardComponent", () => {
|
|
5
|
-
let component: AppAccordionComponent;
|
|
6
|
-
let fixture: ComponentFixture<AppAccordionComponent>;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
await TestBed.configureTestingModule({
|
|
10
|
-
imports: [AppAccordionComponent]
|
|
11
|
-
}).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(AppAccordionComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it("should create", () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from "@angular/core";
|
|
2
|
-
import { CommonModule } from "@angular/common";
|
|
3
|
-
import { IcoMoonIconComponent } from '../ico-moon-icon/ico-moon-icon.component';
|
|
4
|
-
import { AccordionModule } from 'primeng/accordion';
|
|
5
|
-
import { DividerModule } from 'primeng/divider';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: "app-accordion",
|
|
9
|
-
standalone: true,
|
|
10
|
-
imports: [CommonModule, DividerModule, AccordionModule, IcoMoonIconComponent],
|
|
11
|
-
templateUrl: "./app-accordion.component.html",
|
|
12
|
-
styleUrl: "./app-accordion.component.scss"
|
|
13
|
-
})
|
|
14
|
-
export class AppAccordionComponent {
|
|
15
|
-
@Input() iconName!: string;
|
|
16
|
-
@Input() iconClass!: string;
|
|
17
|
-
@Input() iconPathCount = 0;
|
|
18
|
-
@Input({required: true}) title!: string;
|
|
19
|
-
@Input() contentBorderTop: boolean = true;
|
|
20
|
-
@Input() accordionPanelBorder: boolean = true;
|
|
21
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<p-button
|
|
2
|
-
(click)="clickEmitter.emit()"
|
|
3
|
-
[class]="class"
|
|
4
|
-
[disabled]="disabled"
|
|
5
|
-
[iconPos]="iconPos"
|
|
6
|
-
[icon]="icon"
|
|
7
|
-
[label]="title"
|
|
8
|
-
[rounded]="rounded"
|
|
9
|
-
[severity]="style"
|
|
10
|
-
[styleClass]="'w-full'"
|
|
11
|
-
[text]="text"
|
|
12
|
-
[variant]="variant">
|
|
13
|
-
</p-button>
|
|
File without changes
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
|
|
3
|
-
import { RouterModule } from '@angular/router';
|
|
4
|
-
import { ButtonModule } from 'primeng/button';
|
|
5
|
-
import { AppButtonIconPos, AppButtonSeverity, AppButtonSize, AppButtonVariant } from './app-button';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
imports: [RouterModule, ButtonModule, CommonModule],
|
|
9
|
-
selector: 'app-button',
|
|
10
|
-
standalone: true,
|
|
11
|
-
encapsulation: ViewEncapsulation.None,
|
|
12
|
-
styleUrl: './app-button.component.scss',
|
|
13
|
-
templateUrl: './app-button.component.html',
|
|
14
|
-
})
|
|
15
|
-
export class AppButtonComponent {
|
|
16
|
-
@Input() title: string;
|
|
17
|
-
@Input() class: string;
|
|
18
|
-
@Input() icon: string;
|
|
19
|
-
@Input() size: AppButtonSize;
|
|
20
|
-
@Input() style: AppButtonSeverity;
|
|
21
|
-
@Input() iconPos: AppButtonIconPos;
|
|
22
|
-
@Input() variant: AppButtonVariant;
|
|
23
|
-
@Input() disabled = false;
|
|
24
|
-
@Input() text = false;
|
|
25
|
-
@Input() rounded = false;
|
|
26
|
-
|
|
27
|
-
@Output() clickEmitter = new EventEmitter<void>();
|
|
28
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
@if (showMenu) {
|
|
2
|
-
<app-button (click)="op.toggle($event)" [class]="buttonClass"
|
|
3
|
-
[iconPos]="buttonIconPosition"
|
|
4
|
-
[icon]="buttonIcon" [title]="buttonTitle"
|
|
5
|
-
[style]="buttonStyle"/>
|
|
6
|
-
}
|
|
7
|
-
<p-popover #op [styleClass]="popupMenuStyle === 'white' ? 'white-menu' : 'purple-menu'">
|
|
8
|
-
<div class="flex flex-col gap-4 text-sm md:text-xs">
|
|
9
|
-
<ul>
|
|
10
|
-
@for (item of menuItems; track $index) {
|
|
11
|
-
@if (item.show) {
|
|
12
|
-
<li
|
|
13
|
-
[ngClass]="{'flex-row-reverse': item.iconPosition === 'right'}"
|
|
14
|
-
[class]="'flex justify-between min-w-[130px] gap-3 items-center cursor-pointer text-sm ' + (item.textColor | popupTextColorClass)"
|
|
15
|
-
(click)="onMenuItemClick(item)">
|
|
16
|
-
{{ item.title | translate }}
|
|
17
|
-
@if (item.icon) {
|
|
18
|
-
<i [class]="item.icon"></i>
|
|
19
|
-
}
|
|
20
|
-
</li>
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
</ul>
|
|
24
|
-
</div>
|
|
25
|
-
</p-popover>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
.p-popover.p-component {
|
|
2
|
-
box-shadow: none;
|
|
3
|
-
&:is(.purple-menu) {
|
|
4
|
-
@apply bg-primary text-white text-sm mt-2;
|
|
5
|
-
li:not(:last-child) {
|
|
6
|
-
@apply border-b-2 border-purple-700;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
&:is(.white-menu) {
|
|
10
|
-
li:not(:last-child) {
|
|
11
|
-
@apply border-b;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
border-radius: 3px;
|
|
15
|
-
margin-top: 13px;
|
|
16
|
-
&::before, &::after {
|
|
17
|
-
display: none;
|
|
18
|
-
}
|
|
19
|
-
.p-popover-content {
|
|
20
|
-
width: auto;
|
|
21
|
-
min-width: unset;
|
|
22
|
-
|
|
23
|
-
ul {
|
|
24
|
-
li {
|
|
25
|
-
@apply py-3;
|
|
26
|
-
&:hover {
|
|
27
|
-
opacity: 0.7;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
li:first-child {
|
|
31
|
-
@apply pt-0
|
|
32
|
-
}
|
|
33
|
-
li:last-child {
|
|
34
|
-
@apply pb-0
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { AppDropdownMenuComponent } from './app-dropdown-menu.component';
|
|
3
|
-
|
|
4
|
-
describe('AppDropdownMenuComponent', () => {
|
|
5
|
-
let component: AppDropdownMenuComponent;
|
|
6
|
-
let fixture: ComponentFixture<AppDropdownMenuComponent>;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
await TestBed.configureTestingModule({
|
|
10
|
-
imports: [AppDropdownMenuComponent],
|
|
11
|
-
}).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(AppDropdownMenuComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {Component, inject, Input, OnInit, ViewEncapsulation} from '@angular/core';
|
|
2
|
-
import { AppButtonComponent } from '../app-button';
|
|
3
|
-
import { Popover } from 'primeng/popover';
|
|
4
|
-
import { DropdownMenuItem } from './app-dropdown-menu';
|
|
5
|
-
import {Router} from '@angular/router';
|
|
6
|
-
import {AppButtonIconPos, AppButtonSeverity} from '../app-button';
|
|
7
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
8
|
-
import {NgClass} from "@angular/common";
|
|
9
|
-
import {MenuPopupTextColorPipe} from "./menu-popup.pipe";
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: "app-dropdown-menu",
|
|
13
|
-
standalone: true,
|
|
14
|
-
imports: [AppButtonComponent, Popover, TranslateModule, NgClass, MenuPopupTextColorPipe],
|
|
15
|
-
templateUrl: "./app-dropdown-menu.component.html",
|
|
16
|
-
styleUrl: "./app-dropdown-menu.component.scss",
|
|
17
|
-
encapsulation: ViewEncapsulation.None
|
|
18
|
-
})
|
|
19
|
-
export class AppDropdownMenuComponent implements OnInit {
|
|
20
|
-
@Input({ required: true }) buttonTitle: string;
|
|
21
|
-
@Input({ required: true }) menuItems: DropdownMenuItem[] = [];
|
|
22
|
-
@Input() popupMenuStyle: "white" | "purple" = "purple";
|
|
23
|
-
@Input() buttonIcon = "font-icon-plus";
|
|
24
|
-
@Input() buttonClass: string;
|
|
25
|
-
@Input() buttonStyle: AppButtonSeverity;
|
|
26
|
-
@Input() buttonIconPosition: AppButtonIconPos = "left";
|
|
27
|
-
router = inject(Router);
|
|
28
|
-
|
|
29
|
-
showMenu: boolean;
|
|
30
|
-
|
|
31
|
-
ngOnInit() {
|
|
32
|
-
this.showMenu = this.menuItems.some((item) => {
|
|
33
|
-
return item.show;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
onMenuItemClick(item: DropdownMenuItem): void {
|
|
37
|
-
if (item.callback) {
|
|
38
|
-
item.callback();
|
|
39
|
-
} else if (item.routerLink) {
|
|
40
|
-
this.router.navigate(Array.isArray(item.routerLink) ? item.routerLink : [item.routerLink], { queryParams: item.queryParams || {} });
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {Params} from "@angular/router";
|
|
2
|
-
import {AppButtonIconPos} from "../app-button";
|
|
3
|
-
|
|
4
|
-
export interface DropdownMenuItem {
|
|
5
|
-
title: string;
|
|
6
|
-
routerLink?: string;
|
|
7
|
-
queryParams?: Params;
|
|
8
|
-
callback?: () => void;
|
|
9
|
-
icon?: string;
|
|
10
|
-
show?: boolean;
|
|
11
|
-
// TODO: add type
|
|
12
|
-
permissionKey?: string;
|
|
13
|
-
permissionAction?: string;
|
|
14
|
-
iconPosition?: AppButtonIconPos;
|
|
15
|
-
textColor?: DropdownTextColor;
|
|
16
|
-
}
|
|
17
|
-
export type DropdownTextColor = 'white' | 'purple' | 'green';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
-
import {DropdownTextColor} from "./app-dropdown-menu";
|
|
3
|
-
|
|
4
|
-
@Pipe({
|
|
5
|
-
name: 'popupTextColorClass',
|
|
6
|
-
standalone: true,
|
|
7
|
-
pure: true
|
|
8
|
-
})
|
|
9
|
-
export class MenuPopupTextColorPipe implements PipeTransform {
|
|
10
|
-
transform(color?: DropdownTextColor): string {
|
|
11
|
-
switch (color) {
|
|
12
|
-
case 'white': return 'text-white';
|
|
13
|
-
case 'purple': return 'text-purple-500';
|
|
14
|
-
case 'green': return 'text-green-500';
|
|
15
|
-
default: return 'text-white';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|