@corp-products/ui-components 0.0.1 → 1.0.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.
Files changed (161) hide show
  1. package/esm2022/corp-products-ui-components.mjs +5 -0
  2. package/esm2022/index.mjs +14 -0
  3. package/esm2022/lib/app-accordion/app-accordion.component.mjs +35 -0
  4. package/esm2022/lib/app-button/app-button.component.mjs +43 -0
  5. package/esm2022/lib/app-button/app-button.mjs +2 -0
  6. package/esm2022/lib/app-button/index.mjs +3 -0
  7. package/esm2022/lib/app-dropdown-menu/app-dropdown-menu.component.mjs +54 -0
  8. package/esm2022/lib/app-dropdown-menu/app-dropdown-menu.mjs +2 -0
  9. package/esm2022/lib/app-dropdown-menu/index.mjs +3 -0
  10. package/esm2022/lib/app-dropdown-menu/menu-popup.pipe.mjs +23 -0
  11. package/esm2022/lib/app-tabs/app-tab.interface.mjs +2 -0
  12. package/esm2022/lib/app-tabs/app-tabs.component.mjs +57 -0
  13. package/esm2022/lib/app-tabs/index.mjs +3 -0
  14. package/esm2022/lib/confirmation-dialog/confirmation-dialog.component.mjs +44 -0
  15. package/esm2022/lib/dynamic-form/dynamic-form.component.mjs +31 -0
  16. package/esm2022/lib/dynamic-form/dynamic-form.interface.mjs +6 -0
  17. package/esm2022/lib/form-components/@utils/form-utils.mjs +11 -0
  18. package/esm2022/lib/form-components/@utils/validations/error-keys.enum.mjs +27 -0
  19. package/esm2022/lib/form-components/@utils/validations/form-validation.service.mjs +50 -0
  20. package/esm2022/lib/form-components/@utils/validations/index.mjs +4 -0
  21. package/esm2022/lib/form-components/@utils/validations/validation-message.pipe.mjs +30 -0
  22. package/esm2022/lib/form-components/components/auto-complete/auto-complete.component.mjs +59 -0
  23. package/esm2022/lib/form-components/components/base-input.component.mjs +57 -0
  24. package/esm2022/lib/form-components/components/date-picker/date-picker.component.mjs +58 -0
  25. package/esm2022/lib/form-components/components/input/input.component.mjs +48 -0
  26. package/esm2022/lib/form-components/components/select/select.component.mjs +72 -0
  27. package/esm2022/lib/form-components/components/select-button/select-button.component.mjs +29 -0
  28. package/esm2022/lib/form-components/components/switcher/switch.component.mjs +34 -0
  29. package/esm2022/lib/form-components/index.mjs +10 -0
  30. package/esm2022/lib/form-components/interfaces/index.mjs +2 -0
  31. package/esm2022/lib/form-components/interfaces/label-value.mjs +2 -0
  32. package/esm2022/lib/ico-moon-icon/ico-moon-icon.component.mjs +41 -0
  33. package/esm2022/lib/read-more/read-more.component.mjs +30 -0
  34. package/esm2022/lib/side-bar/side-bar.component.mjs +51 -0
  35. package/esm2022/lib/user-autocomplete-card/user-autocomplete-card.component.mjs +32 -0
  36. package/esm2022/lib/user-info/user-info.component.mjs +15 -0
  37. package/fesm2022/corp-products-ui-components.mjs +840 -0
  38. package/fesm2022/corp-products-ui-components.mjs.map +1 -0
  39. package/{src/index.ts → index.d.ts} +13 -13
  40. package/lib/app-accordion/app-accordion.component.d.ts +11 -0
  41. package/lib/app-button/app-button.component.d.ts +18 -0
  42. package/{src/lib/app-button/app-button.ts → lib/app-button/app-button.d.ts} +4 -15
  43. package/{src/lib/app-button/index.ts → lib/app-button/index.d.ts} +2 -2
  44. package/lib/app-dropdown-menu/app-dropdown-menu.component.d.ts +20 -0
  45. package/lib/app-dropdown-menu/app-dropdown-menu.d.ts +15 -0
  46. package/{src/lib/app-dropdown-menu/index.ts → lib/app-dropdown-menu/index.d.ts} +2 -2
  47. package/lib/app-dropdown-menu/menu-popup.pipe.d.ts +8 -0
  48. package/lib/app-tabs/app-tab.interface.d.ts +23 -0
  49. package/lib/app-tabs/app-tabs.component.d.ts +18 -0
  50. package/{src/lib/app-tabs/index.ts → lib/app-tabs/index.d.ts} +2 -2
  51. package/lib/confirmation-dialog/confirmation-dialog.component.d.ts +19 -0
  52. package/lib/dynamic-form/dynamic-form.component.d.ts +16 -0
  53. package/lib/dynamic-form/dynamic-form.interface.d.ts +44 -0
  54. package/lib/form-components/@utils/form-utils.d.ts +4 -0
  55. package/lib/form-components/@utils/validations/error-keys.enum.d.ts +24 -0
  56. package/lib/form-components/@utils/validations/form-validation.service.d.ts +11 -0
  57. package/{src/lib/form-components/@utils/validations/index.ts → lib/form-components/@utils/validations/index.d.ts} +3 -3
  58. package/lib/form-components/@utils/validations/validation-message.pipe.d.ts +9 -0
  59. package/lib/form-components/components/auto-complete/auto-complete.component.d.ts +18 -0
  60. package/lib/form-components/components/base-input.component.d.ts +21 -0
  61. package/lib/form-components/components/date-picker/date-picker.component.d.ts +21 -0
  62. package/lib/form-components/components/input/input.component.d.ts +17 -0
  63. package/lib/form-components/components/select/select.component.d.ts +23 -0
  64. package/lib/form-components/components/select-button/select-button.component.d.ts +13 -0
  65. package/lib/form-components/components/switcher/switch.component.d.ts +11 -0
  66. package/{src/lib/form-components/index.ts → lib/form-components/index.d.ts} +9 -9
  67. package/{src/lib/form-components/interfaces/index.ts → lib/form-components/interfaces/index.d.ts} +1 -1
  68. package/lib/form-components/interfaces/label-value.d.ts +4 -0
  69. package/lib/ico-moon-icon/ico-moon-icon.component.d.ts +9 -0
  70. package/lib/read-more/read-more.component.d.ts +10 -0
  71. package/lib/side-bar/side-bar.component.d.ts +18 -0
  72. package/lib/user-autocomplete-card/user-autocomplete-card.component.d.ts +12 -0
  73. package/lib/user-info/user-info.component.d.ts +7 -0
  74. package/package.json +35 -19
  75. package/eslint.config.js +0 -34
  76. package/ng-package.json +0 -7
  77. package/project.json +0 -29
  78. package/src/lib/app-accordion/app-accordion.component.html +0 -15
  79. package/src/lib/app-accordion/app-accordion.component.scss +0 -0
  80. package/src/lib/app-accordion/app-accordion.component.spec.ts +0 -21
  81. package/src/lib/app-accordion/app-accordion.component.ts +0 -21
  82. package/src/lib/app-accordion/index.ts +0 -2
  83. package/src/lib/app-button/app-button.component.html +0 -13
  84. package/src/lib/app-button/app-button.component.scss +0 -0
  85. package/src/lib/app-button/app-button.component.ts +0 -28
  86. package/src/lib/app-dropdown-menu/app-dropdown-menu.component.html +0 -25
  87. package/src/lib/app-dropdown-menu/app-dropdown-menu.component.scss +0 -39
  88. package/src/lib/app-dropdown-menu/app-dropdown-menu.component.spec.ts +0 -21
  89. package/src/lib/app-dropdown-menu/app-dropdown-menu.component.ts +0 -43
  90. package/src/lib/app-dropdown-menu/app-dropdown-menu.ts +0 -17
  91. package/src/lib/app-dropdown-menu/menu-popup.pipe.ts +0 -18
  92. package/src/lib/app-tabs/app-tab.interface.ts +0 -26
  93. package/src/lib/app-tabs/app-tabs.component.html +0 -35
  94. package/src/lib/app-tabs/app-tabs.component.scss +0 -103
  95. package/src/lib/app-tabs/app-tabs.component.spec.ts +0 -21
  96. package/src/lib/app-tabs/app-tabs.component.ts +0 -48
  97. package/src/lib/confirmation-dialog/confirmation-dialog.component.html +0 -54
  98. package/src/lib/confirmation-dialog/confirmation-dialog.component.scss +0 -0
  99. package/src/lib/confirmation-dialog/confirmation-dialog.component.spec.ts +0 -22
  100. package/src/lib/confirmation-dialog/confirmation-dialog.component.ts +0 -51
  101. package/src/lib/dynamic-form/dynamic-form.component.html +0 -39
  102. package/src/lib/dynamic-form/dynamic-form.component.scss +0 -0
  103. package/src/lib/dynamic-form/dynamic-form.component.spec.ts +0 -21
  104. package/src/lib/dynamic-form/dynamic-form.component.ts +0 -29
  105. package/src/lib/dynamic-form/dynamic-form.interface.ts +0 -56
  106. package/src/lib/form-components/@utils/form-utils.ts +0 -12
  107. package/src/lib/form-components/@utils/validations/error-keys.enum.ts +0 -24
  108. package/src/lib/form-components/@utils/validations/form-validation.service.ts +0 -53
  109. package/src/lib/form-components/@utils/validations/validation-message.pipe.ts +0 -24
  110. package/src/lib/form-components/components/auto-complete/auto-complete.component.html +0 -48
  111. package/src/lib/form-components/components/auto-complete/auto-complete.component.scss +0 -0
  112. package/src/lib/form-components/components/auto-complete/auto-complete.component.spec.ts +0 -21
  113. package/src/lib/form-components/components/auto-complete/auto-complete.component.ts +0 -48
  114. package/src/lib/form-components/components/base-input.component.ts +0 -41
  115. package/src/lib/form-components/components/date-picker/date-picker.component.html +0 -53
  116. package/src/lib/form-components/components/date-picker/date-picker.component.scss +0 -4
  117. package/src/lib/form-components/components/date-picker/date-picker.component.spec.ts +0 -23
  118. package/src/lib/form-components/components/date-picker/date-picker.component.ts +0 -45
  119. package/src/lib/form-components/components/input/input.component.html +0 -59
  120. package/src/lib/form-components/components/input/input.component.scss +0 -3
  121. package/src/lib/form-components/components/input/input.component.spec.ts +0 -21
  122. package/src/lib/form-components/components/input/input.component.ts +0 -32
  123. package/src/lib/form-components/components/select/select.component.html +0 -90
  124. package/src/lib/form-components/components/select/select.component.scss +0 -0
  125. package/src/lib/form-components/components/select/select.component.spec.ts +0 -21
  126. package/src/lib/form-components/components/select/select.component.ts +0 -51
  127. package/src/lib/form-components/components/select-button/select-button.component.html +0 -21
  128. package/src/lib/form-components/components/select-button/select-button.component.scss +0 -0
  129. package/src/lib/form-components/components/select-button/select-button.component.spec.ts +0 -21
  130. package/src/lib/form-components/components/select-button/select-button.component.ts +0 -22
  131. package/src/lib/form-components/components/switcher/switch.component.html +0 -5
  132. package/src/lib/form-components/components/switcher/switch.component.scss +0 -0
  133. package/src/lib/form-components/components/switcher/switch.component.spec.ts +0 -21
  134. package/src/lib/form-components/components/switcher/switch.component.ts +0 -25
  135. package/src/lib/form-components/interfaces/label-value.ts +0 -4
  136. package/src/lib/ico-moon-icon/ico-moon-icon.component.ts +0 -23
  137. package/src/lib/read-more/read-more.component.html +0 -17
  138. package/src/lib/read-more/read-more.component.scss +0 -0
  139. package/src/lib/read-more/read-more.component.spec.ts +0 -21
  140. package/src/lib/read-more/read-more.component.ts +0 -21
  141. package/src/lib/side-bar/side-bar.component.html +0 -25
  142. package/src/lib/side-bar/side-bar.component.scss +0 -5
  143. package/src/lib/side-bar/side-bar.component.spec.ts +0 -21
  144. package/src/lib/side-bar/side-bar.component.ts +0 -32
  145. package/src/lib/side-bar-dynamic/data-injector.pipe.ts +0 -15
  146. package/src/lib/side-bar-dynamic/dynamic-sidebar.service.ts +0 -116
  147. package/src/lib/side-bar-dynamic/side-bar-dynamic.component.html +0 -51
  148. package/src/lib/side-bar-dynamic/side-bar-dynamic.component.scss +0 -5
  149. package/src/lib/side-bar-dynamic/side-bar-dynamic.component.spec.ts +0 -21
  150. package/src/lib/side-bar-dynamic/side-bar-dynamic.component.ts +0 -37
  151. package/src/lib/side-bar-dynamic/side-bar-utils.ts +0 -30
  152. package/src/lib/side-bar-dynamic/sidebar-config.ts +0 -48
  153. package/src/lib/user-autocomplete-card/user-autocomplete-card.component.html +0 -20
  154. package/src/lib/user-autocomplete-card/user-autocomplete-card.component.scss +0 -0
  155. package/src/lib/user-autocomplete-card/user-autocomplete-card.component.spec.ts +0 -21
  156. package/src/lib/user-autocomplete-card/user-autocomplete-card.component.ts +0 -21
  157. package/src/lib/user-info/user-info.component.html +0 -10
  158. package/src/lib/user-info/user-info.component.ts +0 -11
  159. package/tsconfig.json +0 -25
  160. package/tsconfig.lib.json +0 -12
  161. 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";
@@ -1 +1 @@
1
- export * from "./label-value";
1
+ export * from "./label-value";
@@ -0,0 +1,4 @@
1
+ export interface LabelValue<T> {
2
+ label: string;
3
+ value: T | any;
4
+ }
@@ -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,35 @@
1
- {
2
- "name": "@corp-products/ui-components",
3
- "version": "0.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
- },
10
- "keywords": [
11
- "angular",
12
- "library"
13
- ],
14
- "publishConfig": {
15
- "access": "public"
16
- },
17
- "license": "MIT",
18
- "sideEffects": false
19
- }
1
+ {
2
+ "name": "@corp-products/ui-components",
3
+ "version": "1.0.0",
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
+ "keywords": [
11
+ "angular",
12
+ "library"
13
+ ],
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "license": "MIT",
18
+ "sideEffects": false,
19
+ "module": "fesm2022/corp-products-ui-components.mjs",
20
+ "typings": "index.d.ts",
21
+ "exports": {
22
+ "./package.json": {
23
+ "default": "./package.json"
24
+ },
25
+ ".": {
26
+ "types": "./index.d.ts",
27
+ "esm2022": "./esm2022/corp-products-ui-components.mjs",
28
+ "esm": "./esm2022/corp-products-ui-components.mjs",
29
+ "default": "./fesm2022/corp-products-ui-components.mjs"
30
+ }
31
+ },
32
+ "dependencies": {
33
+ "tslib": "^2.3.0"
34
+ }
35
+ }
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
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/libs/ui-components",
4
- "lib": {
5
- "entryFile": "src/index.ts"
6
- }
7
- }
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>
@@ -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,2 +0,0 @@
1
- // export * from './app-button';
2
- export * from './app-accordion.component';
@@ -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
- }