@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.
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 +36 -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,840 @@
1
+ import * as i1$2 from '@angular/common';
2
+ import { CommonModule, NgClass, NgTemplateOutlet, NgStyle, NgIf, JsonPipe, SlicePipe } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { EventEmitter, Output, Input, ViewEncapsulation, Component, ChangeDetectionStrategy, Pipe, inject, Injectable } from '@angular/core';
5
+ import * as i1$1 from '@angular/router';
6
+ import { RouterModule, NavigationEnd, RouterLink, RouterOutlet, Router, NavigationStart } from '@angular/router';
7
+ import * as i1 from 'primeng/button';
8
+ import { ButtonModule } from 'primeng/button';
9
+ import * as i3 from 'primeng/tabs';
10
+ import { TabsModule } from 'primeng/tabs';
11
+ import * as i1$3 from '@ngx-translate/core';
12
+ import { TranslateModule, TranslateService, TranslatePipe } from '@ngx-translate/core';
13
+ import { filter, Subject, takeUntil, Subscription } from 'rxjs';
14
+ import { Popover } from 'primeng/popover';
15
+ import * as i2$1 from 'primeng/api';
16
+ import { PrimeTemplate } from 'primeng/api';
17
+ import { Drawer } from 'primeng/drawer';
18
+ import { AvatarModule } from 'primeng/avatar';
19
+ import { DialogService, DynamicDialogConfig, DynamicDialogRef, DynamicDialog } from 'primeng/dynamicdialog';
20
+ import * as i1$4 from '@angular/forms';
21
+ import { Validators, ReactiveFormsModule, FormsModule } from '@angular/forms';
22
+ import { InputText } from 'primeng/inputtext';
23
+ import { Textarea } from 'primeng/textarea';
24
+ import { Select } from 'primeng/select';
25
+ import * as i2 from 'primeng/multiselect';
26
+ import { MultiSelectModule } from 'primeng/multiselect';
27
+ import { DatePicker } from 'primeng/datepicker';
28
+ import { CalendarModule } from 'primeng/calendar';
29
+ import { AutoComplete } from 'primeng/autocomplete';
30
+ import * as i2$2 from 'primeng/selectbutton';
31
+ import { SelectButtonModule } from 'primeng/selectbutton';
32
+ import * as i1$5 from 'primeng/toggleswitch';
33
+ import { ToggleSwitchModule } from 'primeng/toggleswitch';
34
+ import * as i2$3 from 'primeng/accordion';
35
+ import { AccordionModule } from 'primeng/accordion';
36
+ import { DividerModule } from 'primeng/divider';
37
+
38
+ class AppButtonComponent {
39
+ constructor() {
40
+ this.disabled = false;
41
+ this.text = false;
42
+ this.rounded = false;
43
+ this.clickEmitter = new EventEmitter();
44
+ }
45
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AppButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
46
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AppButtonComponent, isStandalone: true, selector: "app-button", inputs: { title: "title", class: "class", icon: "icon", size: "size", style: "style", iconPos: "iconPos", variant: "variant", disabled: "disabled", text: "text", rounded: "rounded" }, outputs: { clickEmitter: "clickEmitter" }, ngImport: i0, template: "<p-button\r\n (click)=\"clickEmitter.emit()\"\r\n [class]=\"class\"\r\n [disabled]=\"disabled\"\r\n [iconPos]=\"iconPos\"\r\n [icon]=\"icon\"\r\n [label]=\"title\"\r\n [rounded]=\"rounded\"\r\n [severity]=\"style\"\r\n [styleClass]=\"'w-full'\"\r\n [text]=\"text\"\r\n [variant]=\"variant\">\r\n</p-button>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None }); }
47
+ }
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AppButtonComponent, decorators: [{
49
+ type: Component,
50
+ args: [{ imports: [RouterModule, ButtonModule, CommonModule], selector: 'app-button', standalone: true, encapsulation: ViewEncapsulation.None, template: "<p-button\r\n (click)=\"clickEmitter.emit()\"\r\n [class]=\"class\"\r\n [disabled]=\"disabled\"\r\n [iconPos]=\"iconPos\"\r\n [icon]=\"icon\"\r\n [label]=\"title\"\r\n [rounded]=\"rounded\"\r\n [severity]=\"style\"\r\n [styleClass]=\"'w-full'\"\r\n [text]=\"text\"\r\n [variant]=\"variant\">\r\n</p-button>\r\n" }]
51
+ }], propDecorators: { title: [{
52
+ type: Input
53
+ }], class: [{
54
+ type: Input
55
+ }], icon: [{
56
+ type: Input
57
+ }], size: [{
58
+ type: Input
59
+ }], style: [{
60
+ type: Input
61
+ }], iconPos: [{
62
+ type: Input
63
+ }], variant: [{
64
+ type: Input
65
+ }], disabled: [{
66
+ type: Input
67
+ }], text: [{
68
+ type: Input
69
+ }], rounded: [{
70
+ type: Input
71
+ }], clickEmitter: [{
72
+ type: Output
73
+ }] } });
74
+
75
+ class IcoMoonIconComponent {
76
+ constructor() {
77
+ this.iconPathCount = 0;
78
+ }
79
+ get getPathCount() {
80
+ return Array.from({ length: this.iconPathCount }, (_, i) => i + 1);
81
+ }
82
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: IcoMoonIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
83
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: IcoMoonIconComponent, isStandalone: true, selector: "app-ico-moon-card", inputs: { iconName: "iconName", iconClass: "iconClass", iconPathCount: "iconPathCount" }, ngImport: i0, template: `
84
+ <i [class]="iconName + ' ' + iconClass">
85
+ @for (path of getPathCount; track $index) {
86
+ <i [class]="iconName + ' path'+path"></i>
87
+ }
88
+ </i>
89
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
90
+ }
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: IcoMoonIconComponent, decorators: [{
92
+ type: Component,
93
+ args: [{
94
+ selector: 'app-ico-moon-card',
95
+ standalone: true,
96
+ template: `
97
+ <i [class]="iconName + ' ' + iconClass">
98
+ @for (path of getPathCount; track $index) {
99
+ <i [class]="iconName + ' path'+path"></i>
100
+ }
101
+ </i>
102
+ `,
103
+ changeDetection: ChangeDetectionStrategy.OnPush
104
+ }]
105
+ }], propDecorators: { iconName: [{
106
+ type: Input,
107
+ args: [{ required: true }]
108
+ }], iconClass: [{
109
+ type: Input
110
+ }], iconPathCount: [{
111
+ type: Input
112
+ }] } });
113
+
114
+ class AppTabsComponent {
115
+ constructor(route, router) {
116
+ this.route = route;
117
+ this.router = router;
118
+ this.tabsStyle = "basic";
119
+ this.responsive = false;
120
+ this.activeTabIndex = 0;
121
+ }
122
+ ngOnInit() {
123
+ this.router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe(() => {
124
+ this.updateActiveTab();
125
+ });
126
+ // to be refactor
127
+ this.updateActiveTab();
128
+ }
129
+ // Updates the active tab index based on the current route
130
+ updateActiveTab() {
131
+ if (!this.tabs.isRouted)
132
+ return;
133
+ const currentUrl = this.router.url;
134
+ const matchingTabIndex = this.tabs.items.findIndex((tab) => currentUrl.includes(tab.link));
135
+ this.activeTabIndex = matchingTabIndex !== -1 ? matchingTabIndex : 0;
136
+ }
137
+ onTabChange(index) {
138
+ if (!this.tabs.isRouted)
139
+ return;
140
+ const selectedTab = this.tabs.items[index];
141
+ if (selectedTab && !selectedTab.disabled) {
142
+ this.router.navigate([selectedTab.link], { relativeTo: this.route });
143
+ }
144
+ }
145
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AppTabsComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
146
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AppTabsComponent, isStandalone: true, selector: "app-tabs", inputs: { tabs: "tabs", tabsStyle: "tabsStyle", responsive: "responsive" }, ngImport: i0, template: "@if (tabs && tabs.items.length) {\r\n <div [class]=\"tabsStyle + (responsive ? ' full-width' : '') + ' tabs-container'\">\r\n <p-tabs [value]=\"activeTabIndex\" scrollable>\r\n <p-tablist>\r\n\r\n @for (tab of tabs.items; let i = $index; track i) {\r\n <p-tab [value]=\"i\" [routerLink]=\"tabs.isRouted ? $any(tab).link : null\" [disabled]=\"tab.disabled\"\r\n (click)=\"onTabChange(i)\">\r\n @if (tab.iconName) {\r\n <app-ico-moon-card [iconClass]=\"'text-[17px]'\" [iconName]=\"tab.iconName\"\r\n [iconPathCount]=\"tab.iconPathCount || 0\"/>\r\n }\r\n <span>{{ tab.title | translate }} @if (tab.count) {\r\n <span>({{ tab.count }})</span>\r\n } </span>\r\n </p-tab>\r\n }\r\n\r\n </p-tablist>\r\n\r\n <p-tabpanels>\r\n @if (tabs.isRouted) {\r\n <router-outlet></router-outlet>\r\n } @else {\r\n @for (tab of tabs.items; let i = $index; track i) {\r\n <p-tabpanel [value]=\"i\">\r\n <ng-container [ngTemplateOutlet]=\"tab.contentTemplate\"></ng-container>\r\n </p-tabpanel>\r\n }\r\n }\r\n\r\n </p-tabpanels>\r\n </p-tabs>\r\n </div>\r\n}\r\n", styles: [".tabs-container.full-width .p-tabs .p-tablist-tab-list .p-tab{display:flex;max-width:50%;flex-grow:1;justify-content:center}.tabs-container .p-tabs .p-tablist-tab-list{position:relative}.tabs-container .p-tabs .p-tablist-tab-list:after{position:absolute;bottom:0;right:0;z-index:1;height:3px;width:100%;background-color:#6b21a80d;--tw-content: \"\";content:var(--tw-content)}.tabs-container .p-tabs .p-tablist-tab-list .p-tab{z-index:2;border-bottom-width:4px;border-color:transparent;font-size:.875rem;line-height:1.25rem;font-size:16px;font-weight:400;--tw-text-opacity: 1;color:rgb(166 166 166 / var(--tw-text-opacity, 1))}.tabs-container .p-tabs .p-tablist-tab-list .p-tab:not(.p-tab-active) app-ico-moon-card{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.tabs-container .p-tabs .p-tablist-active-bar{display:none}.tabs-container .p-tabs .p-tabpanels.p-component{margin-top:1.25rem;border-radius:.5rem}.tabs-container.basic .p-tabs .p-tablist-tab-list{background-color:transparent}.tabs-container.basic .p-tabs .p-tablist-tab-list .p-tab.p-tab-active{border-color:var(--primary);color:var(--primary)}.tabs-container.primary_light .p-tabs .p-tablist-tab-list .p-tab{border-top-left-radius:.5rem;border-top-right-radius:.5rem;font-size:14px}.tabs-container.primary_light .p-tabs .p-tablist-tab-list .p-tab.p-tab-active{border-color:var(--primary);background-color:#6b21a80d;font-weight:500;color:var(--primary)}.tabs-container.primary .p-tabs .p-tablist-tab-list:after{background-color:#6b21a80d}.tabs-container.primary .p-tabs .p-tablist-tab-list .p-tab{border-top-left-radius:.5rem;border-top-right-radius:.5rem;font-size:14px}.tabs-container.primary .p-tabs .p-tablist-tab-list .p-tab.p-tab-active{border-color:var(--secondary);background-color:var(--primary);font-weight:500;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[dir=rtl] .p-tabs .p-tablist .p-iconwrapper{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[dir=rtl] .p-tabs .p-tablist .p-tablist-next-button{right:auto;left:0}[dir=rtl] .p-tabs .p-tablist .p-tablist-prev-button{right:0;left:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i3.Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: i3.TabPanels, selector: "p-tabpanels" }, { kind: "component", type: i3.TabPanel, selector: "p-tabpanel", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: i3.TabList, selector: "p-tablist" }, { kind: "component", type: i3.Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: IcoMoonIconComponent, selector: "app-ico-moon-card", inputs: ["iconName", "iconClass", "iconPathCount"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
147
+ }
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AppTabsComponent, decorators: [{
149
+ type: Component,
150
+ args: [{ selector: "app-tabs", standalone: true, encapsulation: ViewEncapsulation.None, imports: [CommonModule, TabsModule, RouterLink, RouterOutlet, IcoMoonIconComponent, TranslateModule], template: "@if (tabs && tabs.items.length) {\r\n <div [class]=\"tabsStyle + (responsive ? ' full-width' : '') + ' tabs-container'\">\r\n <p-tabs [value]=\"activeTabIndex\" scrollable>\r\n <p-tablist>\r\n\r\n @for (tab of tabs.items; let i = $index; track i) {\r\n <p-tab [value]=\"i\" [routerLink]=\"tabs.isRouted ? $any(tab).link : null\" [disabled]=\"tab.disabled\"\r\n (click)=\"onTabChange(i)\">\r\n @if (tab.iconName) {\r\n <app-ico-moon-card [iconClass]=\"'text-[17px]'\" [iconName]=\"tab.iconName\"\r\n [iconPathCount]=\"tab.iconPathCount || 0\"/>\r\n }\r\n <span>{{ tab.title | translate }} @if (tab.count) {\r\n <span>({{ tab.count }})</span>\r\n } </span>\r\n </p-tab>\r\n }\r\n\r\n </p-tablist>\r\n\r\n <p-tabpanels>\r\n @if (tabs.isRouted) {\r\n <router-outlet></router-outlet>\r\n } @else {\r\n @for (tab of tabs.items; let i = $index; track i) {\r\n <p-tabpanel [value]=\"i\">\r\n <ng-container [ngTemplateOutlet]=\"tab.contentTemplate\"></ng-container>\r\n </p-tabpanel>\r\n }\r\n }\r\n\r\n </p-tabpanels>\r\n </p-tabs>\r\n </div>\r\n}\r\n", styles: [".tabs-container.full-width .p-tabs .p-tablist-tab-list .p-tab{display:flex;max-width:50%;flex-grow:1;justify-content:center}.tabs-container .p-tabs .p-tablist-tab-list{position:relative}.tabs-container .p-tabs .p-tablist-tab-list:after{position:absolute;bottom:0;right:0;z-index:1;height:3px;width:100%;background-color:#6b21a80d;--tw-content: \"\";content:var(--tw-content)}.tabs-container .p-tabs .p-tablist-tab-list .p-tab{z-index:2;border-bottom-width:4px;border-color:transparent;font-size:.875rem;line-height:1.25rem;font-size:16px;font-weight:400;--tw-text-opacity: 1;color:rgb(166 166 166 / var(--tw-text-opacity, 1))}.tabs-container .p-tabs .p-tablist-tab-list .p-tab:not(.p-tab-active) app-ico-moon-card{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.tabs-container .p-tabs .p-tablist-active-bar{display:none}.tabs-container .p-tabs .p-tabpanels.p-component{margin-top:1.25rem;border-radius:.5rem}.tabs-container.basic .p-tabs .p-tablist-tab-list{background-color:transparent}.tabs-container.basic .p-tabs .p-tablist-tab-list .p-tab.p-tab-active{border-color:var(--primary);color:var(--primary)}.tabs-container.primary_light .p-tabs .p-tablist-tab-list .p-tab{border-top-left-radius:.5rem;border-top-right-radius:.5rem;font-size:14px}.tabs-container.primary_light .p-tabs .p-tablist-tab-list .p-tab.p-tab-active{border-color:var(--primary);background-color:#6b21a80d;font-weight:500;color:var(--primary)}.tabs-container.primary .p-tabs .p-tablist-tab-list:after{background-color:#6b21a80d}.tabs-container.primary .p-tabs .p-tablist-tab-list .p-tab{border-top-left-radius:.5rem;border-top-right-radius:.5rem;font-size:14px}.tabs-container.primary .p-tabs .p-tablist-tab-list .p-tab.p-tab-active{border-color:var(--secondary);background-color:var(--primary);font-weight:500;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[dir=rtl] .p-tabs .p-tablist .p-iconwrapper{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[dir=rtl] .p-tabs .p-tablist .p-tablist-next-button{right:auto;left:0}[dir=rtl] .p-tabs .p-tablist .p-tablist-prev-button{right:0;left:auto}\n"] }]
151
+ }], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }], propDecorators: { tabs: [{
152
+ type: Input
153
+ }], tabsStyle: [{
154
+ type: Input
155
+ }], responsive: [{
156
+ type: Input
157
+ }] } });
158
+
159
+ class MenuPopupTextColorPipe {
160
+ transform(color) {
161
+ switch (color) {
162
+ case 'white': return 'text-white';
163
+ case 'purple': return 'text-purple-500';
164
+ case 'green': return 'text-green-500';
165
+ default: return 'text-white';
166
+ }
167
+ }
168
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: MenuPopupTextColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
169
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: MenuPopupTextColorPipe, isStandalone: true, name: "popupTextColorClass" }); }
170
+ }
171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: MenuPopupTextColorPipe, decorators: [{
172
+ type: Pipe,
173
+ args: [{
174
+ name: 'popupTextColorClass',
175
+ standalone: true,
176
+ pure: true
177
+ }]
178
+ }] });
179
+
180
+ class AppDropdownMenuComponent {
181
+ constructor() {
182
+ this.menuItems = [];
183
+ this.popupMenuStyle = "purple";
184
+ this.buttonIcon = "font-icon-plus";
185
+ this.buttonIconPosition = "left";
186
+ this.router = inject(Router);
187
+ }
188
+ ngOnInit() {
189
+ this.showMenu = this.menuItems.some((item) => {
190
+ return item.show;
191
+ });
192
+ }
193
+ onMenuItemClick(item) {
194
+ if (item.callback) {
195
+ item.callback();
196
+ }
197
+ else if (item.routerLink) {
198
+ this.router.navigate(Array.isArray(item.routerLink) ? item.routerLink : [item.routerLink], { queryParams: item.queryParams || {} });
199
+ }
200
+ }
201
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AppDropdownMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
202
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AppDropdownMenuComponent, isStandalone: true, selector: "app-dropdown-menu", inputs: { buttonTitle: "buttonTitle", menuItems: "menuItems", popupMenuStyle: "popupMenuStyle", buttonIcon: "buttonIcon", buttonClass: "buttonClass", buttonStyle: "buttonStyle", buttonIconPosition: "buttonIconPosition" }, ngImport: i0, template: "@if (showMenu) {\r\n <app-button (click)=\"op.toggle($event)\" [class]=\"buttonClass\"\r\n [iconPos]=\"buttonIconPosition\"\r\n [icon]=\"buttonIcon\" [title]=\"buttonTitle\"\r\n [style]=\"buttonStyle\"/>\r\n}\r\n<p-popover #op [styleClass]=\"popupMenuStyle === 'white' ? 'white-menu' : 'purple-menu'\">\r\n <div class=\"flex flex-col gap-4 text-sm md:text-xs\">\r\n <ul>\r\n @for (item of menuItems; track $index) {\r\n @if (item.show) {\r\n <li\r\n [ngClass]=\"{'flex-row-reverse': item.iconPosition === 'right'}\"\r\n [class]=\"'flex justify-between min-w-[130px] gap-3 items-center cursor-pointer text-sm ' + (item.textColor | popupTextColorClass)\"\r\n (click)=\"onMenuItemClick(item)\">\r\n {{ item.title | translate }}\r\n @if (item.icon) {\r\n <i [class]=\"item.icon\"></i>\r\n }\r\n </li>\r\n }\r\n }\r\n </ul>\r\n </div>\r\n</p-popover>\r\n", styles: [".p-popover.p-component{box-shadow:none;border-radius:3px;margin-top:13px}.p-popover.p-component:is(.purple-menu){margin-top:.5rem;background-color:var(--primary);font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.p-popover.p-component:is(.purple-menu) li:not(:last-child){border-bottom-width:2px;--tw-border-opacity: 1;border-color:rgb(126 34 206 / var(--tw-border-opacity, 1))}.p-popover.p-component:is(.white-menu) li:not(:last-child){border-bottom-width:1px}.p-popover.p-component:before,.p-popover.p-component:after{display:none}.p-popover.p-component .p-popover-content{width:auto;min-width:unset}.p-popover.p-component .p-popover-content ul li{padding-top:.75rem;padding-bottom:.75rem}.p-popover.p-component .p-popover-content ul li:hover{opacity:.7}.p-popover.p-component .p-popover-content ul li:first-child{padding-top:0}.p-popover.p-component .p-popover-content ul li:last-child{padding-bottom:0}\n"], dependencies: [{ kind: "component", type: AppButtonComponent, selector: "app-button", inputs: ["title", "class", "icon", "size", "style", "iconPos", "variant", "disabled", "text", "rounded"], outputs: ["clickEmitter"] }, { kind: "component", type: Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: MenuPopupTextColorPipe, name: "popupTextColorClass" }], encapsulation: i0.ViewEncapsulation.None }); }
203
+ }
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AppDropdownMenuComponent, decorators: [{
205
+ type: Component,
206
+ args: [{ selector: "app-dropdown-menu", standalone: true, imports: [AppButtonComponent, Popover, TranslateModule, NgClass, MenuPopupTextColorPipe], encapsulation: ViewEncapsulation.None, template: "@if (showMenu) {\r\n <app-button (click)=\"op.toggle($event)\" [class]=\"buttonClass\"\r\n [iconPos]=\"buttonIconPosition\"\r\n [icon]=\"buttonIcon\" [title]=\"buttonTitle\"\r\n [style]=\"buttonStyle\"/>\r\n}\r\n<p-popover #op [styleClass]=\"popupMenuStyle === 'white' ? 'white-menu' : 'purple-menu'\">\r\n <div class=\"flex flex-col gap-4 text-sm md:text-xs\">\r\n <ul>\r\n @for (item of menuItems; track $index) {\r\n @if (item.show) {\r\n <li\r\n [ngClass]=\"{'flex-row-reverse': item.iconPosition === 'right'}\"\r\n [class]=\"'flex justify-between min-w-[130px] gap-3 items-center cursor-pointer text-sm ' + (item.textColor | popupTextColorClass)\"\r\n (click)=\"onMenuItemClick(item)\">\r\n {{ item.title | translate }}\r\n @if (item.icon) {\r\n <i [class]=\"item.icon\"></i>\r\n }\r\n </li>\r\n }\r\n }\r\n </ul>\r\n </div>\r\n</p-popover>\r\n", styles: [".p-popover.p-component{box-shadow:none;border-radius:3px;margin-top:13px}.p-popover.p-component:is(.purple-menu){margin-top:.5rem;background-color:var(--primary);font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.p-popover.p-component:is(.purple-menu) li:not(:last-child){border-bottom-width:2px;--tw-border-opacity: 1;border-color:rgb(126 34 206 / var(--tw-border-opacity, 1))}.p-popover.p-component:is(.white-menu) li:not(:last-child){border-bottom-width:1px}.p-popover.p-component:before,.p-popover.p-component:after{display:none}.p-popover.p-component .p-popover-content{width:auto;min-width:unset}.p-popover.p-component .p-popover-content ul li{padding-top:.75rem;padding-bottom:.75rem}.p-popover.p-component .p-popover-content ul li:hover{opacity:.7}.p-popover.p-component .p-popover-content ul li:first-child{padding-top:0}.p-popover.p-component .p-popover-content ul li:last-child{padding-bottom:0}\n"] }]
207
+ }], propDecorators: { buttonTitle: [{
208
+ type: Input,
209
+ args: [{ required: true }]
210
+ }], menuItems: [{
211
+ type: Input,
212
+ args: [{ required: true }]
213
+ }], popupMenuStyle: [{
214
+ type: Input
215
+ }], buttonIcon: [{
216
+ type: Input
217
+ }], buttonClass: [{
218
+ type: Input
219
+ }], buttonStyle: [{
220
+ type: Input
221
+ }], buttonIconPosition: [{
222
+ type: Input
223
+ }] } });
224
+
225
+ class SideBarComponent {
226
+ constructor() {
227
+ this.show = false;
228
+ this.closable = false;
229
+ this.dismissible = false;
230
+ this.closeOnEscape = false;
231
+ this.sidebarSize = "sm";
232
+ this.styleClass = "";
233
+ this.hide = new EventEmitter();
234
+ // eslint-disable-next-line @angular-eslint/no-output-on-prefix
235
+ this.onShow = new EventEmitter();
236
+ }
237
+ hideSidebar() {
238
+ this.show = false;
239
+ this.hide.emit(false);
240
+ }
241
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SideBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
242
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: SideBarComponent, isStandalone: true, selector: "app-side-bar", inputs: { show: "show", title: "title", closable: "closable", dismissible: "dismissible", closeOnEscape: "closeOnEscape", sidebarSize: "sidebarSize", styleClass: "styleClass", contentTemplate: "contentTemplate", footerTemplate: "footerTemplate" }, outputs: { hide: "hide", onShow: "onShow" }, ngImport: i0, template: "<!-- TODO refactor position sidebar based on html dir-->\r\n<p-drawer\r\n (onHide)=\"hideSidebar()\"\r\n (onShow)=\"onShow.emit($event)\"\r\n [(visible)]=\"show\"\r\n [closable]=\"closable\"\r\n [closeOnEscape]=\"closeOnEscape\"\r\n [dismissible]=\"dismissible\"\r\n [ngClass]=\"{ show: show }\"\r\n [position]=\"'left'\"\r\n appendTo=\"body\"\r\n styleClass=\"p-drawer-{{ sidebarSize }} custom-content bg-white {{ styleClass }}\">\r\n <ng-template pTemplate=\"header\">{{ title }}</ng-template>\r\n @if (contentTemplate) {\r\n <ng-template pTemplate=\"content\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\">\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"content\">\r\n <ng-content id=\"side-content\"></ng-content>\r\n </ng-template>\r\n</p-drawer>\r\n", styles: [".sidebar.show{min-width:550px}\n"], dependencies: [{ kind: "directive", type: PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: Drawer, selector: "p-drawer", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
243
+ }
244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SideBarComponent, decorators: [{
245
+ type: Component,
246
+ args: [{ selector: "app-side-bar", standalone: true, imports: [PrimeTemplate, Drawer, NgClass, NgTemplateOutlet], encapsulation: ViewEncapsulation.None, template: "<!-- TODO refactor position sidebar based on html dir-->\r\n<p-drawer\r\n (onHide)=\"hideSidebar()\"\r\n (onShow)=\"onShow.emit($event)\"\r\n [(visible)]=\"show\"\r\n [closable]=\"closable\"\r\n [closeOnEscape]=\"closeOnEscape\"\r\n [dismissible]=\"dismissible\"\r\n [ngClass]=\"{ show: show }\"\r\n [position]=\"'left'\"\r\n appendTo=\"body\"\r\n styleClass=\"p-drawer-{{ sidebarSize }} custom-content bg-white {{ styleClass }}\">\r\n <ng-template pTemplate=\"header\">{{ title }}</ng-template>\r\n @if (contentTemplate) {\r\n <ng-template pTemplate=\"content\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\">\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n </ng-template>\r\n }\r\n <ng-template pTemplate=\"content\">\r\n <ng-content id=\"side-content\"></ng-content>\r\n </ng-template>\r\n</p-drawer>\r\n", styles: [".sidebar.show{min-width:550px}\n"] }]
247
+ }], propDecorators: { show: [{
248
+ type: Input
249
+ }], title: [{
250
+ type: Input
251
+ }], closable: [{
252
+ type: Input
253
+ }], dismissible: [{
254
+ type: Input
255
+ }], closeOnEscape: [{
256
+ type: Input
257
+ }], sidebarSize: [{
258
+ type: Input
259
+ }], styleClass: [{
260
+ type: Input
261
+ }], hide: [{
262
+ type: Output
263
+ }], onShow: [{
264
+ type: Output
265
+ }], contentTemplate: [{
266
+ type: Input
267
+ }], footerTemplate: [{
268
+ type: Input
269
+ }] } });
270
+
271
+ class UserInfoComponent {
272
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: UserInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
273
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: UserInfoComponent, isStandalone: true, selector: "user-info", inputs: { profileImage: "profileImage", name: "name" }, ngImport: i0, template: "<div class=\"flex items-center gap-2\">\r\n <img\r\n [alt]=\"name\"\r\n [src]=\"profileImage\"\r\n class=\"rounded-full object-cover w-[24px] h-[24px]\"\r\n height=\"24\"\r\n width=\"24\"\r\n />\r\n <p class=\"text-[14px]\">{{ name }}</p>\r\n</div>\r\n" }); }
274
+ }
275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: UserInfoComponent, decorators: [{
276
+ type: Component,
277
+ args: [{ selector: "user-info", standalone: true, template: "<div class=\"flex items-center gap-2\">\r\n <img\r\n [alt]=\"name\"\r\n [src]=\"profileImage\"\r\n class=\"rounded-full object-cover w-[24px] h-[24px]\"\r\n height=\"24\"\r\n width=\"24\"\r\n />\r\n <p class=\"text-[14px]\">{{ name }}</p>\r\n</div>\r\n" }]
278
+ }], propDecorators: { profileImage: [{
279
+ type: Input
280
+ }], name: [{
281
+ type: Input
282
+ }] } });
283
+
284
+ var FormFieldTypeEnum;
285
+ (function (FormFieldTypeEnum) {
286
+ FormFieldTypeEnum["DATE_PICKER"] = "date-picker";
287
+ FormFieldTypeEnum["SELECT_BUTTON"] = "select-button";
288
+ })(FormFieldTypeEnum || (FormFieldTypeEnum = {}));
289
+
290
+ var BasicErrorKeysEnum;
291
+ (function (BasicErrorKeysEnum) {
292
+ BasicErrorKeysEnum["required"] = "REQUIRED";
293
+ BasicErrorKeysEnum["email"] = "EMAIL";
294
+ BasicErrorKeysEnum["pattern"] = "PATTERN";
295
+ BasicErrorKeysEnum["invalidArFormat"] = "INVALID_AR_FORMAT";
296
+ BasicErrorKeysEnum["invalidLink"] = "INVALID_LINK";
297
+ BasicErrorKeysEnum["endDateBeforeStartDate"] = "END_DATE_BEFORE_START_DATE";
298
+ BasicErrorKeysEnum["startDateEqualsEndDate"] = "START_DATE_EQUALS_END_DATE";
299
+ BasicErrorKeysEnum["endTimeBeforeStartTime"] = "END_TIME_BEFORE_START_TIME";
300
+ BasicErrorKeysEnum["startTimeEqualsEndTime"] = "START_TIME_EQUALS_END_TIME";
301
+ BasicErrorKeysEnum["integer"] = "INTEGER";
302
+ BasicErrorKeysEnum["positiveNumber"] = "POSITIVE_NUMBER";
303
+ BasicErrorKeysEnum["fileSelected"] = "FILE_SELECTED";
304
+ BasicErrorKeysEnum["default"] = "DEFAULT";
305
+ })(BasicErrorKeysEnum || (BasicErrorKeysEnum = {}));
306
+ var ErrorsWithValuesKeysEnum;
307
+ (function (ErrorsWithValuesKeysEnum) {
308
+ ErrorsWithValuesKeysEnum["minlength"] = "MIN_LENGTH";
309
+ ErrorsWithValuesKeysEnum["maxlength"] = "MAX_LENGTH";
310
+ ErrorsWithValuesKeysEnum["min"] = "MIN";
311
+ ErrorsWithValuesKeysEnum["max"] = "MAX";
312
+ ErrorsWithValuesKeysEnum["maxSize"] = "MAX_SIZE";
313
+ ErrorsWithValuesKeysEnum["maxFiles"] = "MAX_FILES";
314
+ ErrorsWithValuesKeysEnum["allowedTypes"] = "ALLOWED_TYPES";
315
+ })(ErrorsWithValuesKeysEnum || (ErrorsWithValuesKeysEnum = {}));
316
+
317
+ class FormValidationService {
318
+ constructor() {
319
+ this.translate = inject(TranslateService);
320
+ }
321
+ getTranslation(key, interpolateParams) {
322
+ return this.translate.instant(`VALIDATION.${key}`, interpolateParams);
323
+ }
324
+ getErrorMessage(errorKey, errorValue) {
325
+ if (this.isBasicErrorKey(errorKey)) {
326
+ return this.getTranslation(BasicErrorKeysEnum[errorKey]);
327
+ }
328
+ if (this.isErrorWithValueKey(errorKey)) {
329
+ return this.getErrorWithValueMessage(errorKey, errorValue);
330
+ }
331
+ return this.getTranslation(BasicErrorKeysEnum.default);
332
+ }
333
+ // Basic error keys are the keys that don't have any values to interpolate. like required, email, etc.
334
+ isBasicErrorKey(key) {
335
+ return Object.keys(BasicErrorKeysEnum).includes(key);
336
+ }
337
+ // Error keys with values are the keys that have values to interpolate. like minlength, maxlength, etc.
338
+ isErrorWithValueKey(key) {
339
+ return Object.keys(ErrorsWithValuesKeysEnum).includes(key);
340
+ }
341
+ getErrorWithValueMessage(errorKey, errorValue) {
342
+ const messages = {
343
+ minlength: (val) => this.getTranslation(ErrorsWithValuesKeysEnum.minlength, { requiredLength: val?.requiredLength, actualLength: val?.actualLength }),
344
+ maxlength: (val) => this.getTranslation(ErrorsWithValuesKeysEnum.maxlength, { requiredLength: val?.requiredLength, actualLength: val?.actualLength }),
345
+ min: (val) => this.getTranslation(ErrorsWithValuesKeysEnum.min, { min: val?.min }),
346
+ max: (val) => this.getTranslation(ErrorsWithValuesKeysEnum.max, { max: val?.max }),
347
+ maxSize: (val) => this.getTranslation(ErrorsWithValuesKeysEnum.maxSize, { size: val?.requiredLength }),
348
+ maxFiles: (val) => this.getTranslation(ErrorsWithValuesKeysEnum.maxFiles, { size: val?.requiredLength }),
349
+ allowedTypes: (val) => this.getTranslation(ErrorsWithValuesKeysEnum.allowedTypes, { types: val?.join(", ") })
350
+ };
351
+ return messages[errorKey](errorValue);
352
+ }
353
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: FormValidationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
354
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: FormValidationService, providedIn: "root" }); }
355
+ }
356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: FormValidationService, decorators: [{
357
+ type: Injectable,
358
+ args: [{
359
+ providedIn: "root"
360
+ }]
361
+ }] });
362
+
363
+ class ValidationErrorsPipe {
364
+ constructor() {
365
+ this.formValidationService = inject(FormValidationService);
366
+ }
367
+ // allowed keys here to handle errors in case of cross-validators like startDate and endDate validators,
368
+ // we pass this custom key to handle the error messages only for the allowed keys
369
+ transform(errors, allowedKeys) {
370
+ if (!errors)
371
+ return [];
372
+ return Object.keys(errors)
373
+ .filter((errorKey) => !allowedKeys || allowedKeys.includes(errorKey)) // Filter errors if allowedKeys are provided
374
+ .map((errorKey) => {
375
+ return this.formValidationService.getErrorMessage(errorKey, errors[errorKey]);
376
+ });
377
+ }
378
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ValidationErrorsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
379
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: ValidationErrorsPipe, isStandalone: true, name: "validationErrors" }); }
380
+ }
381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ValidationErrorsPipe, decorators: [{
382
+ type: Pipe,
383
+ args: [{
384
+ name: "validationErrors",
385
+ standalone: true,
386
+ pure: true
387
+ }]
388
+ }] });
389
+
390
+ class BaseInputComponent {
391
+ constructor() {
392
+ this.name = "";
393
+ this.placeholder = "";
394
+ this.readonly = false;
395
+ this.disabled = false;
396
+ this.destroy$ = new Subject();
397
+ }
398
+ get required() {
399
+ return this.control.hasValidator(Validators.required);
400
+ }
401
+ get isInvalid() {
402
+ return this.control.invalid && this.control.touched;
403
+ }
404
+ ngOnInit() {
405
+ this.inputId = `input-${this.name + "-" + Math.random().toString(36).substring(7)}`;
406
+ this.control.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((v) => {
407
+ if (v) {
408
+ this.control.markAsTouched();
409
+ }
410
+ });
411
+ }
412
+ ngOnDestroy() {
413
+ this.destroy$.next();
414
+ this.destroy$.complete();
415
+ }
416
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: BaseInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
417
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: BaseInputComponent, selector: "ng-component", inputs: { control: "control", name: "name", label: "label", placeholder: "placeholder", inputId: "inputId", readonly: "readonly", disabled: "disabled", hint: "hint" }, ngImport: i0, template: "", isInline: true }); }
418
+ }
419
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: BaseInputComponent, decorators: [{
420
+ type: Component,
421
+ args: [{
422
+ template: ""
423
+ }]
424
+ }], propDecorators: { control: [{
425
+ type: Input,
426
+ args: [{ required: true }]
427
+ }], name: [{
428
+ type: Input
429
+ }], label: [{
430
+ type: Input
431
+ }], placeholder: [{
432
+ type: Input
433
+ }], inputId: [{
434
+ type: Input
435
+ }], readonly: [{
436
+ type: Input
437
+ }], disabled: [{
438
+ type: Input
439
+ }], hint: [{
440
+ type: Input
441
+ }] } });
442
+
443
+ class InputComponent extends BaseInputComponent {
444
+ constructor() {
445
+ super();
446
+ this.type = "text";
447
+ this.contentType = "text";
448
+ this.rows = 2;
449
+ this.cols = 20;
450
+ this.autoResize = true;
451
+ this.inputDirection = "inherit";
452
+ }
453
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
454
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: InputComponent, isStandalone: true, selector: "stc-input", inputs: { type: "type", contentType: "contentType", prefix: "prefix", rows: "rows", cols: "cols", autoResize: "autoResize", basicInput: "basicInput", noStyle: "noStyle", hideOptionalLabel: "hideOptionalLabel", inputDirection: "inputDirection" }, usesInheritance: true, ngImport: i0, template: "<div class=\"field flex flex-col gap-2 my-3 relative\">\r\n @if (label) {\r\n <label [for]=\"inputId\">\r\n {{ label }}\r\n @if (required) {\r\n <span [class.text-red-700]=\"isInvalid\">*</span>\r\n }\r\n </label>\r\n }\r\n @if (!required && !hideOptionalLabel) {\r\n <span class=\"absolute top-[6px] left-0 text-[10px] text-gray-400\">{{'forms.config.optional' | translate}}</span>\r\n }\r\n\r\n <!-- input text align will be handled according to lang when implemented -->\r\n\r\n @if (type !== 'textarea') {\r\n <input\r\n [id]=\"inputId\"\r\n [type]=\"contentType\"\r\n [formControl]=\"control\"\r\n [placeholder]=\"placeholder\"\r\n [readonly]=\"readonly\"\r\n [disabled]=\"disabled\"\r\n [name]=\"name\"\r\n pInputText\r\n [ngStyle]=\"{'direction': inputDirection || 'inherit', 'text-align': 'right'}\"\r\n [ngClass]=\"{ 'p-invalid ng-dirty ng-invalid': isInvalid, 'basic-style': basicInput, 'no-style':noStyle}\"\r\n />\r\n @if (prefix) {\r\n <span class=\"absolute top-[40px] font-bold text-[16px] left-[25px]\">\r\n {{ prefix }}\r\n </span>\r\n }\r\n } @else {\r\n <textarea\r\n [name]=\"name\"\r\n [id]=\"inputId\"\r\n [formControl]=\"control\"\r\n [placeholder]=\"placeholder\"\r\n [readonly]=\"readonly\"\r\n [disabled]=\"disabled\"\r\n pTextarea\r\n [rows]=\"rows\"\r\n [cols]=\"cols\"\r\n [autoResize]=\"autoResize\"\r\n [ngClass]=\"{'ng-invalid ng-dirty': control.invalid && (control.dirty || control.touched), 'basic-style': basicInput, 'no-style':noStyle}\"\r\n ></textarea>\r\n }\r\n @if (hint) {\r\n <small class=\"p-mt-1\">{{ hint }}</small>\r\n }\r\n @if (isInvalid && (control.dirty || control.touched)) {\r\n <small class=\"p-error text-red-700\">\r\n @for (error of control.errors | validationErrors; track error) {\r\n {{ error }}<br>\r\n }\r\n </small>\r\n }\r\n</div>\r\n", styles: ["textarea{height:auto;min-height:50px;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "directive", type: Textarea, selector: "[pTextarea]", inputs: ["autoResize", "variant", "fluid", "pSize"], outputs: ["onResize"] }, { kind: "pipe", type: ValidationErrorsPipe, name: "validationErrors" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
455
+ }
456
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: InputComponent, decorators: [{
457
+ type: Component,
458
+ args: [{ selector: "stc-input", standalone: true, imports: [ReactiveFormsModule, InputText, Textarea, ValidationErrorsPipe, NgClass, NgStyle, TranslatePipe], template: "<div class=\"field flex flex-col gap-2 my-3 relative\">\r\n @if (label) {\r\n <label [for]=\"inputId\">\r\n {{ label }}\r\n @if (required) {\r\n <span [class.text-red-700]=\"isInvalid\">*</span>\r\n }\r\n </label>\r\n }\r\n @if (!required && !hideOptionalLabel) {\r\n <span class=\"absolute top-[6px] left-0 text-[10px] text-gray-400\">{{'forms.config.optional' | translate}}</span>\r\n }\r\n\r\n <!-- input text align will be handled according to lang when implemented -->\r\n\r\n @if (type !== 'textarea') {\r\n <input\r\n [id]=\"inputId\"\r\n [type]=\"contentType\"\r\n [formControl]=\"control\"\r\n [placeholder]=\"placeholder\"\r\n [readonly]=\"readonly\"\r\n [disabled]=\"disabled\"\r\n [name]=\"name\"\r\n pInputText\r\n [ngStyle]=\"{'direction': inputDirection || 'inherit', 'text-align': 'right'}\"\r\n [ngClass]=\"{ 'p-invalid ng-dirty ng-invalid': isInvalid, 'basic-style': basicInput, 'no-style':noStyle}\"\r\n />\r\n @if (prefix) {\r\n <span class=\"absolute top-[40px] font-bold text-[16px] left-[25px]\">\r\n {{ prefix }}\r\n </span>\r\n }\r\n } @else {\r\n <textarea\r\n [name]=\"name\"\r\n [id]=\"inputId\"\r\n [formControl]=\"control\"\r\n [placeholder]=\"placeholder\"\r\n [readonly]=\"readonly\"\r\n [disabled]=\"disabled\"\r\n pTextarea\r\n [rows]=\"rows\"\r\n [cols]=\"cols\"\r\n [autoResize]=\"autoResize\"\r\n [ngClass]=\"{'ng-invalid ng-dirty': control.invalid && (control.dirty || control.touched), 'basic-style': basicInput, 'no-style':noStyle}\"\r\n ></textarea>\r\n }\r\n @if (hint) {\r\n <small class=\"p-mt-1\">{{ hint }}</small>\r\n }\r\n @if (isInvalid && (control.dirty || control.touched)) {\r\n <small class=\"p-error text-red-700\">\r\n @for (error of control.errors | validationErrors; track error) {\r\n {{ error }}<br>\r\n }\r\n </small>\r\n }\r\n</div>\r\n", styles: ["textarea{height:auto;min-height:50px;overflow:auto}\n"] }]
459
+ }], ctorParameters: () => [], propDecorators: { type: [{
460
+ type: Input
461
+ }], contentType: [{
462
+ type: Input
463
+ }], prefix: [{
464
+ type: Input
465
+ }], rows: [{
466
+ type: Input
467
+ }], cols: [{
468
+ type: Input
469
+ }], autoResize: [{
470
+ type: Input
471
+ }], basicInput: [{
472
+ type: Input
473
+ }], noStyle: [{
474
+ type: Input
475
+ }], hideOptionalLabel: [{
476
+ type: Input
477
+ }], inputDirection: [{
478
+ type: Input
479
+ }] } });
480
+
481
+ class SelectComponent extends BaseInputComponent {
482
+ constructor() {
483
+ super();
484
+ this.selectedItemTemplate = null;
485
+ this.optionTemplate = null;
486
+ this.checkmark = true;
487
+ this.showClear = false;
488
+ this.editable = false;
489
+ this.filter = false;
490
+ this.multiple = false;
491
+ // eslint-disable-next-line @angular-eslint/no-output-native
492
+ this.change = new EventEmitter();
493
+ }
494
+ onChange(e) {
495
+ this.change.emit(e);
496
+ }
497
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
498
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: SelectComponent, isStandalone: true, selector: "stc-select", inputs: { selectedItemTemplate: "selectedItemTemplate", optionTemplate: "optionTemplate", options: "options", optionLabel: "optionLabel", checkmark: "checkmark", showClear: "showClear", editable: "editable", filter: "filter", multiple: "multiple", filterBy: "filterBy", selectedItemsLabel: "selectedItemsLabel", basicInput: "basicInput" }, outputs: { change: "change" }, usesInheritance: true, ngImport: i0, template: "<div class=\"field flex flex-col gap-2 my-3 relative\">\r\n @if (label) {\r\n <label [for]=\"inputId\">\r\n {{ label }}\r\n @if (required) {\r\n <span [class.text-red-700]=\"isInvalid\">*</span>\r\n }\r\n </label>\r\n } @if (!required) {\r\n <span class=\"absolute top-[6px] left-0 text-[10px] text-gray-400\">{{'forms.config.optional' | translate}}</span>\r\n }\r\n\r\n\r\n @if(multiple) {\r\n\r\n\r\n <p-multiselect\r\n [disabled]=\"disabled\"\r\n [filterBy]=\"filterBy\"\r\n [filter]=\"filter\"\r\n [formControl]=\"control\"\r\n [id]=\"inputId\"\r\n [name]=\"name\"\r\n [ngClass]=\"{ 'p-invalid ng-dirty ng-invalid': isInvalid }\"\r\n [optionLabel]=\"optionLabel\"\r\n [options]=\"options\"\r\n [placeholder]=\"placeholder\"\r\n [readonly]=\"readonly\"\r\n [showClear]=\"showClear\"\r\n class=\"w-full\"\r\n [selectedItemsLabel]=\"selectedItemsLabel\"\r\n (onChange)=\"onChange($event)\"\r\n [ngClass]=\"{ 'basic-style': basicInput }\"\r\n >\r\n\r\n\r\n @if(optionTemplate){\r\n <ng-template let-item #item>\r\n <ng-container [ngTemplateOutletContext]=\"{ $implicit: item }\" [ngTemplateOutlet]=\"optionTemplate\" />\r\n </ng-template>\r\n }\r\n\r\n\r\n <ng-template #dropdownicon>\r\n <i class=\"pi pi-map\"></i>\r\n </ng-template>\r\n\r\n\r\n </p-multiselect>\r\n\r\n } @else {\r\n <p-select\r\n [checkmark]=\"checkmark\"\r\n [disabled]=\"disabled\"\r\n [editable]=\"editable\"\r\n [filterBy]=\"filterBy\"\r\n [filter]=\"filter\"\r\n [formControl]=\"control\"\r\n [id]=\"inputId\"\r\n [name]=\"name\"\r\n [ngClass]=\"{ 'p-invalid ng-dirty ng-invalid': isInvalid }\"\r\n [optionLabel]=\"optionLabel\"\r\n [options]=\"options\"\r\n [placeholder]=\"placeholder\"\r\n [readonly]=\"readonly\"\r\n [showClear]=\"showClear\"\r\n class=\"w-full\"\r\n (onChange)=\"onChange($event)\"\r\n [ngClass]=\"{ 'basic-style': basicInput }\"\r\n >\r\n\r\n\r\n @if (selectedItemTemplate) {\r\n <ng-template let-item pTemplate=\"item\">\r\n <ng-container [ngTemplateOutletContext]=\"{ $implicit: item }\" [ngTemplateOutlet]=\"selectedItemTemplate\" />\r\n </ng-template>\r\n }\r\n </p-select>\r\n}\r\n\r\n @if (hint) {\r\n <small class=\"p-mt-1\">{{ hint }}</small>\r\n } @if (isInvalid && (control.dirty || control.touched)) {\r\n <small class=\"p-error text-red-700\">\r\n @for (error of control.errors | validationErrors; track error) {\r\n {{ error }}<br />\r\n }\r\n </small>\r\n }\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "pipe", type: ValidationErrorsPipe, name: "validationErrors" }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i2.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "fluid", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "size", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
499
+ }
500
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SelectComponent, decorators: [{
501
+ type: Component,
502
+ args: [{ selector: "stc-select", standalone: true, imports: [
503
+ FormsModule,
504
+ Select,
505
+ ReactiveFormsModule,
506
+ NgClass,
507
+ NgTemplateOutlet,
508
+ PrimeTemplate,
509
+ ValidationErrorsPipe,
510
+ MultiSelectModule,
511
+ TranslatePipe
512
+ ], template: "<div class=\"field flex flex-col gap-2 my-3 relative\">\r\n @if (label) {\r\n <label [for]=\"inputId\">\r\n {{ label }}\r\n @if (required) {\r\n <span [class.text-red-700]=\"isInvalid\">*</span>\r\n }\r\n </label>\r\n } @if (!required) {\r\n <span class=\"absolute top-[6px] left-0 text-[10px] text-gray-400\">{{'forms.config.optional' | translate}}</span>\r\n }\r\n\r\n\r\n @if(multiple) {\r\n\r\n\r\n <p-multiselect\r\n [disabled]=\"disabled\"\r\n [filterBy]=\"filterBy\"\r\n [filter]=\"filter\"\r\n [formControl]=\"control\"\r\n [id]=\"inputId\"\r\n [name]=\"name\"\r\n [ngClass]=\"{ 'p-invalid ng-dirty ng-invalid': isInvalid }\"\r\n [optionLabel]=\"optionLabel\"\r\n [options]=\"options\"\r\n [placeholder]=\"placeholder\"\r\n [readonly]=\"readonly\"\r\n [showClear]=\"showClear\"\r\n class=\"w-full\"\r\n [selectedItemsLabel]=\"selectedItemsLabel\"\r\n (onChange)=\"onChange($event)\"\r\n [ngClass]=\"{ 'basic-style': basicInput }\"\r\n >\r\n\r\n\r\n @if(optionTemplate){\r\n <ng-template let-item #item>\r\n <ng-container [ngTemplateOutletContext]=\"{ $implicit: item }\" [ngTemplateOutlet]=\"optionTemplate\" />\r\n </ng-template>\r\n }\r\n\r\n\r\n <ng-template #dropdownicon>\r\n <i class=\"pi pi-map\"></i>\r\n </ng-template>\r\n\r\n\r\n </p-multiselect>\r\n\r\n } @else {\r\n <p-select\r\n [checkmark]=\"checkmark\"\r\n [disabled]=\"disabled\"\r\n [editable]=\"editable\"\r\n [filterBy]=\"filterBy\"\r\n [filter]=\"filter\"\r\n [formControl]=\"control\"\r\n [id]=\"inputId\"\r\n [name]=\"name\"\r\n [ngClass]=\"{ 'p-invalid ng-dirty ng-invalid': isInvalid }\"\r\n [optionLabel]=\"optionLabel\"\r\n [options]=\"options\"\r\n [placeholder]=\"placeholder\"\r\n [readonly]=\"readonly\"\r\n [showClear]=\"showClear\"\r\n class=\"w-full\"\r\n (onChange)=\"onChange($event)\"\r\n [ngClass]=\"{ 'basic-style': basicInput }\"\r\n >\r\n\r\n\r\n @if (selectedItemTemplate) {\r\n <ng-template let-item pTemplate=\"item\">\r\n <ng-container [ngTemplateOutletContext]=\"{ $implicit: item }\" [ngTemplateOutlet]=\"selectedItemTemplate\" />\r\n </ng-template>\r\n }\r\n </p-select>\r\n}\r\n\r\n @if (hint) {\r\n <small class=\"p-mt-1\">{{ hint }}</small>\r\n } @if (isInvalid && (control.dirty || control.touched)) {\r\n <small class=\"p-error text-red-700\">\r\n @for (error of control.errors | validationErrors; track error) {\r\n {{ error }}<br />\r\n }\r\n </small>\r\n }\r\n</div>\r\n" }]
513
+ }], ctorParameters: () => [], propDecorators: { selectedItemTemplate: [{
514
+ type: Input
515
+ }], optionTemplate: [{
516
+ type: Input
517
+ }], options: [{
518
+ type: Input
519
+ }], optionLabel: [{
520
+ type: Input
521
+ }], checkmark: [{
522
+ type: Input
523
+ }], showClear: [{
524
+ type: Input
525
+ }], editable: [{
526
+ type: Input
527
+ }], filter: [{
528
+ type: Input
529
+ }], multiple: [{
530
+ type: Input
531
+ }], filterBy: [{
532
+ type: Input
533
+ }], selectedItemsLabel: [{
534
+ type: Input
535
+ }], basicInput: [{
536
+ type: Input
537
+ }], change: [{
538
+ type: Output
539
+ }] } });
540
+
541
+ class DatePickerComponent extends BaseInputComponent {
542
+ constructor() {
543
+ super();
544
+ this.showIcon = false;
545
+ this.showClear = false;
546
+ this.isTimeOnly = false;
547
+ this.hourFormat = "12";
548
+ this.nowTime = new Date();
549
+ this.selectionMode = "single";
550
+ this.onAfterClearDate = new EventEmitter();
551
+ }
552
+ selectCurrentTime(e) {
553
+ this.control.setValue(this.nowTime);
554
+ }
555
+ clearButtonClick(e) {
556
+ this.control.setValue(null);
557
+ }
558
+ afterClearDate() {
559
+ this.control.reset();
560
+ this.onAfterClearDate.emit();
561
+ }
562
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
563
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: DatePickerComponent, isStandalone: true, selector: "stc-date-picker", inputs: { showIcon: "showIcon", showClear: "showClear", basicInput: "basicInput", isTimeOnly: "isTimeOnly", minDate: "minDate", maxDate: "maxDate", hourFormat: "hourFormat", selectionMode: "selectionMode" }, outputs: { onAfterClearDate: "onAfterClearDate" }, usesInheritance: true, ngImport: i0, template: "<div class=\"field flex flex-col gap-2 my-3 relative\" >\r\n @if (label) {\r\n <label [for]=\"inputId\">\r\n {{ label }}\r\n @if (required) {\r\n <span [class.text-red-700]=\"isInvalid\">*</span>\r\n }\r\n </label>\r\n }\r\n @if (!required) {\r\n <span class=\"absolute top-[6px] left-0 text-[10px] text-gray-400\">{{'forms.config.optional' | translate}}</span>\r\n }\r\n <p-datepicker\r\n [selectionMode]=\"selectionMode\"\r\n [disabled]=\"disabled\"\r\n [formControl]=\"control\"\r\n [iconDisplay]=\"'input'\"\r\n [showClear]=\"showClear\"\r\n (onClear)=\"afterClearDate()\"\r\n [id]=\"inputId\"\r\n [inputStyleClass]=\"'reset-default-styles ' + (basicInput ? 'basic-style' : '')\"\r\n [ngClass]=\"{ 'p-invalid ng-dirty ng-invalid': isInvalid }\"\r\n [placeholder]=\"placeholder\"\r\n [showIcon]=\"showIcon\" [styleClass]=\"'w-full'\"\r\n appendTo=\"body\"\r\n [timeOnly]=\"isTimeOnly\"\r\n [hourFormat]=\"hourFormat\"\r\n [minDate]=\"minDate\"\r\n [maxDate]=\"maxDate\">\r\n @if (isTimeOnly) {\r\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\r\n <i class=\"text-[18px] font-icon-time-clock\" (click)=\"clickCallBack($event)\"></i>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"p-datepicker-buttonbar\">\r\n <button pButton type=\"button\" class=\"p-button-text\" (click)=\"selectCurrentTime($event)\">\u0627\u0644\u0627\u0646\r\n </button>\r\n <button pButton type=\"button\" class=\"p-button-text\" (click)=\"clearButtonClick($event)\"> \u0627\u0644\u063A\u0627\u0621</button>\r\n </div>\r\n </ng-template>\r\n }\r\n </p-datepicker>\r\n @if (hint) {\r\n <small class=\"p-mt-1\">{{ hint }}</small>\r\n }\r\n @if (isInvalid && (control.dirty || control.touched)) {\r\n <small class=\"p-error text-red-700\">\r\n @for (error of control.errors | validationErrors; track error) {\r\n {{ error }}<br>\r\n }\r\n </small>\r\n }\r\n</div>\r\n", styles: [".p-datepicker-clear-icon{position:absolute;top:50%;left:13px;margin-left:calc(var(--p-icon-size));--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;line-height:1;color:var(--p-datepicker-input-icon-color)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "fluid", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "size", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "pipe", type: ValidationErrorsPipe, name: "validationErrors" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
564
+ }
565
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DatePickerComponent, decorators: [{
566
+ type: Component,
567
+ args: [{ selector: "stc-date-picker", standalone: true, imports: [FormsModule, DatePicker, ReactiveFormsModule, NgClass, CalendarModule, ValidationErrorsPipe, TranslatePipe], encapsulation: ViewEncapsulation.None, template: "<div class=\"field flex flex-col gap-2 my-3 relative\" >\r\n @if (label) {\r\n <label [for]=\"inputId\">\r\n {{ label }}\r\n @if (required) {\r\n <span [class.text-red-700]=\"isInvalid\">*</span>\r\n }\r\n </label>\r\n }\r\n @if (!required) {\r\n <span class=\"absolute top-[6px] left-0 text-[10px] text-gray-400\">{{'forms.config.optional' | translate}}</span>\r\n }\r\n <p-datepicker\r\n [selectionMode]=\"selectionMode\"\r\n [disabled]=\"disabled\"\r\n [formControl]=\"control\"\r\n [iconDisplay]=\"'input'\"\r\n [showClear]=\"showClear\"\r\n (onClear)=\"afterClearDate()\"\r\n [id]=\"inputId\"\r\n [inputStyleClass]=\"'reset-default-styles ' + (basicInput ? 'basic-style' : '')\"\r\n [ngClass]=\"{ 'p-invalid ng-dirty ng-invalid': isInvalid }\"\r\n [placeholder]=\"placeholder\"\r\n [showIcon]=\"showIcon\" [styleClass]=\"'w-full'\"\r\n appendTo=\"body\"\r\n [timeOnly]=\"isTimeOnly\"\r\n [hourFormat]=\"hourFormat\"\r\n [minDate]=\"minDate\"\r\n [maxDate]=\"maxDate\">\r\n @if (isTimeOnly) {\r\n <ng-template #inputicon let-clickCallBack=\"clickCallBack\">\r\n <i class=\"text-[18px] font-icon-time-clock\" (click)=\"clickCallBack($event)\"></i>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"p-datepicker-buttonbar\">\r\n <button pButton type=\"button\" class=\"p-button-text\" (click)=\"selectCurrentTime($event)\">\u0627\u0644\u0627\u0646\r\n </button>\r\n <button pButton type=\"button\" class=\"p-button-text\" (click)=\"clearButtonClick($event)\"> \u0627\u0644\u063A\u0627\u0621</button>\r\n </div>\r\n </ng-template>\r\n }\r\n </p-datepicker>\r\n @if (hint) {\r\n <small class=\"p-mt-1\">{{ hint }}</small>\r\n }\r\n @if (isInvalid && (control.dirty || control.touched)) {\r\n <small class=\"p-error text-red-700\">\r\n @for (error of control.errors | validationErrors; track error) {\r\n {{ error }}<br>\r\n }\r\n </small>\r\n }\r\n</div>\r\n", styles: [".p-datepicker-clear-icon{position:absolute;top:50%;left:13px;margin-left:calc(var(--p-icon-size));--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;line-height:1;color:var(--p-datepicker-input-icon-color)}\n"] }]
568
+ }], ctorParameters: () => [], propDecorators: { showIcon: [{
569
+ type: Input
570
+ }], showClear: [{
571
+ type: Input
572
+ }], basicInput: [{
573
+ type: Input
574
+ }], isTimeOnly: [{
575
+ type: Input
576
+ }], minDate: [{
577
+ type: Input
578
+ }], maxDate: [{
579
+ type: Input
580
+ }], hourFormat: [{
581
+ type: Input
582
+ }], selectionMode: [{
583
+ type: Input
584
+ }], onAfterClearDate: [{
585
+ type: Output
586
+ }] } });
587
+
588
+ class AutoCompleteComponent extends BaseInputComponent {
589
+ constructor() {
590
+ super();
591
+ this.selectedItemTemplate = null;
592
+ // eslint-disable-next-line @angular-eslint/no-output-on-prefix
593
+ this.onSearch = new EventEmitter();
594
+ this.selectOption = new EventEmitter();
595
+ this.items = [];
596
+ this.minLengthToSearch = 3;
597
+ this.delay = 300; // default value
598
+ }
599
+ search(event) {
600
+ this.onSearch.emit(event.query);
601
+ }
602
+ onSelect(event) {
603
+ this.selectOption.emit(event);
604
+ }
605
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AutoCompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
606
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AutoCompleteComponent, isStandalone: true, selector: "stc-auto-complete", inputs: { selectedItemTemplate: "selectedItemTemplate", items: "items", minLengthToSearch: "minLengthToSearch", delay: "delay", basicInput: "basicInput" }, outputs: { onSearch: "onSearch", selectOption: "selectOption" }, usesInheritance: true, ngImport: i0, template: "<div class=\"field flex flex-col gap-2 my-3 relative\">\r\n @if (label) {\r\n <label [for]=\"inputId\">\r\n {{ label }}\r\n @if (required) {\r\n <span [class.text-red-700]=\"isInvalid\">*</span>\r\n }\r\n </label>\r\n }\r\n @if (!required) {\r\n <span class=\"absolute top-[6px] left-0 text-[10px] text-gray-400\">{{'forms.config.optional' | translate}}</span>\r\n }\r\n <p-auto-complete\r\n (completeMethod)=\"search($event)\"\r\n (onSelect)=\"onSelect($event)\"\r\n [delay]=\"delay\"\r\n [disabled]=\"disabled\"\r\n [formControl]=\"control\"\r\n [id]=\"inputId\"\r\n [inputStyleClass]=\"'reset-default-styles w-full' + (basicInput ? ' basic-style': ' ')\"\r\n [minLength]=\"minLengthToSearch\"\r\n [name]=\"name\"\r\n [ngClass]=\"{ 'p-invalid ng-dirty ng-invalid': isInvalid}\"\r\n [placeholder]=\"placeholder\"\r\n [styleClass]=\"'w-full'\"\r\n [suggestions]=\"items\">\r\n <ng-template let-item pTemplate=\"item\">\r\n @if (selectedItemTemplate) {\r\n <ng-container\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\r\n [ngTemplateOutlet]=\"selectedItemTemplate\"\r\n />\r\n }\r\n </ng-template>\r\n </p-auto-complete>\r\n\r\n @if (hint) {\r\n <small class=\"p-mt-1\">{{ hint }}</small>\r\n }\r\n @if (isInvalid && (control.dirty || control.touched)) {\r\n <small class=\"p-error text-red-700\">\r\n @for (error of control.errors | validationErrors; track error) {\r\n {{ error }}<br>\r\n }\r\n </small>\r\n }\r\n\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "variant", "fluid"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: ValidationErrorsPipe, name: "validationErrors" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
607
+ }
608
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AutoCompleteComponent, decorators: [{
609
+ type: Component,
610
+ args: [{ selector: "stc-auto-complete", standalone: true, imports: [
611
+ ReactiveFormsModule,
612
+ AutoComplete,
613
+ PrimeTemplate,
614
+ NgIf,
615
+ NgTemplateOutlet,
616
+ NgClass,
617
+ JsonPipe,
618
+ ValidationErrorsPipe,
619
+ TranslatePipe
620
+ ], template: "<div class=\"field flex flex-col gap-2 my-3 relative\">\r\n @if (label) {\r\n <label [for]=\"inputId\">\r\n {{ label }}\r\n @if (required) {\r\n <span [class.text-red-700]=\"isInvalid\">*</span>\r\n }\r\n </label>\r\n }\r\n @if (!required) {\r\n <span class=\"absolute top-[6px] left-0 text-[10px] text-gray-400\">{{'forms.config.optional' | translate}}</span>\r\n }\r\n <p-auto-complete\r\n (completeMethod)=\"search($event)\"\r\n (onSelect)=\"onSelect($event)\"\r\n [delay]=\"delay\"\r\n [disabled]=\"disabled\"\r\n [formControl]=\"control\"\r\n [id]=\"inputId\"\r\n [inputStyleClass]=\"'reset-default-styles w-full' + (basicInput ? ' basic-style': ' ')\"\r\n [minLength]=\"minLengthToSearch\"\r\n [name]=\"name\"\r\n [ngClass]=\"{ 'p-invalid ng-dirty ng-invalid': isInvalid}\"\r\n [placeholder]=\"placeholder\"\r\n [styleClass]=\"'w-full'\"\r\n [suggestions]=\"items\">\r\n <ng-template let-item pTemplate=\"item\">\r\n @if (selectedItemTemplate) {\r\n <ng-container\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\r\n [ngTemplateOutlet]=\"selectedItemTemplate\"\r\n />\r\n }\r\n </ng-template>\r\n </p-auto-complete>\r\n\r\n @if (hint) {\r\n <small class=\"p-mt-1\">{{ hint }}</small>\r\n }\r\n @if (isInvalid && (control.dirty || control.touched)) {\r\n <small class=\"p-error text-red-700\">\r\n @for (error of control.errors | validationErrors; track error) {\r\n {{ error }}<br>\r\n }\r\n </small>\r\n }\r\n\r\n</div>\r\n" }]
621
+ }], ctorParameters: () => [], propDecorators: { selectedItemTemplate: [{
622
+ type: Input
623
+ }], onSearch: [{
624
+ type: Output
625
+ }], selectOption: [{
626
+ type: Output
627
+ }], items: [{
628
+ type: Input
629
+ }], minLengthToSearch: [{
630
+ type: Input
631
+ }], delay: [{
632
+ type: Input
633
+ }], basicInput: [{
634
+ type: Input
635
+ }] } });
636
+
637
+ class SelectButtonComponent extends BaseInputComponent {
638
+ constructor() {
639
+ super(...arguments);
640
+ this.onChange = new EventEmitter();
641
+ }
642
+ changeValue(e) {
643
+ this.onChange.emit(e.value);
644
+ }
645
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SelectButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
646
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: SelectButtonComponent, isStandalone: true, selector: "stc-select-button", inputs: { options: "options", title: "title" }, outputs: { onChange: "onChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"grid grid-cols-12 gap-x-4 gap-y-0 items-end\">\r\n <div class=\"col-span-12\">\r\n <div class=\"text-[14px] font-bold mb-1\">{{ title }}</div>\r\n <div class=\"grid w-100 bg-gray-100 rounded drop-shadow-basic\">\r\n <p-selectButton [disabled]=\"disabled\"\r\n [options]=\"options\"\r\n [formControl]=\"control\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n class=\"rounded\"\r\n [styleClass]=\"'full-width'\"\r\n (onChange)=\"changeValue($event)\">\r\n <ng-template let-item class=\"flex w-100\">\r\n <div class=\"col-span-4\">\r\n <span>{{ item.value }}</span>\r\n </div>\r\n </ng-template>\r\n </p-selectButton>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: SelectButtonModule }, { kind: "component", type: i2$2.SelectButton, selector: "p-selectButton, p-selectbutton, p-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "style", "styleClass", "ariaLabelledBy", "size", "disabled", "dataKey", "autofocus"], outputs: ["onOptionClick", "onChange"] }, { kind: "ngmodule", type: FormsModule }] }); }
647
+ }
648
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SelectButtonComponent, decorators: [{
649
+ type: Component,
650
+ args: [{ selector: "stc-select-button", standalone: true, imports: [ReactiveFormsModule, SelectButtonModule, FormsModule], template: "<div class=\"grid grid-cols-12 gap-x-4 gap-y-0 items-end\">\r\n <div class=\"col-span-12\">\r\n <div class=\"text-[14px] font-bold mb-1\">{{ title }}</div>\r\n <div class=\"grid w-100 bg-gray-100 rounded drop-shadow-basic\">\r\n <p-selectButton [disabled]=\"disabled\"\r\n [options]=\"options\"\r\n [formControl]=\"control\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n class=\"rounded\"\r\n [styleClass]=\"'full-width'\"\r\n (onChange)=\"changeValue($event)\">\r\n <ng-template let-item class=\"flex w-100\">\r\n <div class=\"col-span-4\">\r\n <span>{{ item.value }}</span>\r\n </div>\r\n </ng-template>\r\n </p-selectButton>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
651
+ }], propDecorators: { onChange: [{
652
+ type: Output
653
+ }], options: [{
654
+ type: Input
655
+ }], title: [{
656
+ type: Input
657
+ }] } });
658
+
659
+ class SwitchComponent {
660
+ constructor() {
661
+ this.checked = false;
662
+ this.onChange = new EventEmitter();
663
+ }
664
+ // checked: boolean = false;
665
+ sendUpdatedValue(value) {
666
+ if (value) {
667
+ this.onChange.emit(value.checked);
668
+ }
669
+ }
670
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
671
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: SwitchComponent, isStandalone: true, selector: "stc-switch", inputs: { label: "label", key: "key", checked: "checked" }, outputs: { onChange: "onChange" }, ngImport: i0, template: "<div class=\"flex items-center mr-2\">\r\n <p-toggleswitch [(ngModel)]=\"checked\" [inputId]=\"key\" (onChange)=\"sendUpdatedValue($event)\" class=\"flex\">\r\n </p-toggleswitch>\r\n <label [for]=\"key\" class=\"text-[12px] mx-2\">{{label}}</label>\r\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ToggleSwitchModule }, { kind: "component", type: i1$5.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
672
+ }
673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SwitchComponent, decorators: [{
674
+ type: Component,
675
+ args: [{ selector: "stc-switch", standalone: true, imports: [CommonModule, ToggleSwitchModule, FormsModule], template: "<div class=\"flex items-center mr-2\">\r\n <p-toggleswitch [(ngModel)]=\"checked\" [inputId]=\"key\" (onChange)=\"sendUpdatedValue($event)\" class=\"flex\">\r\n </p-toggleswitch>\r\n <label [for]=\"key\" class=\"text-[12px] mx-2\">{{label}}</label>\r\n</div>" }]
676
+ }], propDecorators: { label: [{
677
+ type: Input
678
+ }], key: [{
679
+ type: Input
680
+ }], checked: [{
681
+ type: Input
682
+ }], onChange: [{
683
+ type: Output
684
+ }] } });
685
+
686
+ class FormUtils {
687
+ static getFormControl(controlName, form) {
688
+ if (!form)
689
+ throw new Error(`Form is not initialized.`);
690
+ const formControl = form.get(controlName);
691
+ if (!formControl)
692
+ throw new Error(`There's no form control with given name. '${controlName}'`);
693
+ return formControl;
694
+ }
695
+ }
696
+
697
+ class DynamicFormComponent {
698
+ constructor() {
699
+ this.inputsNames = [];
700
+ this.fieldType = FormFieldTypeEnum;
701
+ this.getFormControl = FormUtils.getFormControl;
702
+ }
703
+ ngOnInit() {
704
+ this.formGroup = this.dynamicFormData?.formGroup;
705
+ this.inputsMap = this.dynamicFormData?.inputsMap;
706
+ this.inputsNames = Object.keys(this.inputsMap || {});
707
+ }
708
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DynamicFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
709
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: DynamicFormComponent, isStandalone: true, selector: "app-dynamic-form", inputs: { dynamicFormData: "dynamicFormData" }, ngImport: i0, template: "<div class=\"border-t mx-4 py-2\">\r\n <form [formGroup]=\"formGroup\">\r\n <div class=\"grid grid-cols-12 gap-x-2\">\r\n @for (inputName of inputsNames; track $index) {\r\n <div\r\n [ngClass]=\"inputsMap[inputName].rowSize === 'half' ? 'col-span-6 md:col-span-6': 'col-span-12 md:col-span-12'\">\r\n @switch (inputsMap[inputName].fieldType) {\r\n @case (fieldType.DATE_PICKER) {\r\n <stc-date-picker\r\n [minDate]=\"inputsMap[inputName]?.dateRange?.min\"\r\n [id]=\"inputsMap[inputName].inputId\"\r\n [control]=\"getFormControl(inputName, formGroup)\"\r\n [name]=\"inputName\"\r\n [label]=\"inputsMap[inputName].label\"\r\n [showIcon]=\"inputsMap[inputName].showIcon || true\"\r\n [isTimeOnly]=\"inputsMap[inputName].isTimeOnly || false\"/>\r\n }\r\n @case (fieldType.SELECT_BUTTON) {\r\n <stc-select-button\r\n [control]=\"getFormControl(inputName, formGroup)\"\r\n [id]=\"inputsMap[inputName].inputId\"\r\n [name]=\"inputName\"\r\n [label]=\"inputsMap[inputName].label\"\r\n [options]=\"inputsMap[inputName].selectButtonOptions || []\"/>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n <div class=\"col-span-12\">\r\n <small class=\"p-error text-red-700\">\r\n @for (error of formGroup.errors | validationErrors: dynamicFormData.formValidationErrorsKeys;\r\n track error) {\r\n {{ error }}\r\n }\r\n </small>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: DatePickerComponent, selector: "stc-date-picker", inputs: ["showIcon", "showClear", "basicInput", "isTimeOnly", "minDate", "maxDate", "hourFormat", "selectionMode"], outputs: ["onAfterClearDate"] }, { kind: "pipe", type: ValidationErrorsPipe, name: "validationErrors" }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: SelectButtonComponent, selector: "stc-select-button", inputs: ["options", "title"], outputs: ["onChange"] }] }); }
710
+ }
711
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: DynamicFormComponent, decorators: [{
712
+ type: Component,
713
+ args: [{ selector: "app-dynamic-form", standalone: true, imports: [CommonModule, ReactiveFormsModule, DatePickerComponent, ValidationErrorsPipe, TranslateModule, SelectButtonComponent], template: "<div class=\"border-t mx-4 py-2\">\r\n <form [formGroup]=\"formGroup\">\r\n <div class=\"grid grid-cols-12 gap-x-2\">\r\n @for (inputName of inputsNames; track $index) {\r\n <div\r\n [ngClass]=\"inputsMap[inputName].rowSize === 'half' ? 'col-span-6 md:col-span-6': 'col-span-12 md:col-span-12'\">\r\n @switch (inputsMap[inputName].fieldType) {\r\n @case (fieldType.DATE_PICKER) {\r\n <stc-date-picker\r\n [minDate]=\"inputsMap[inputName]?.dateRange?.min\"\r\n [id]=\"inputsMap[inputName].inputId\"\r\n [control]=\"getFormControl(inputName, formGroup)\"\r\n [name]=\"inputName\"\r\n [label]=\"inputsMap[inputName].label\"\r\n [showIcon]=\"inputsMap[inputName].showIcon || true\"\r\n [isTimeOnly]=\"inputsMap[inputName].isTimeOnly || false\"/>\r\n }\r\n @case (fieldType.SELECT_BUTTON) {\r\n <stc-select-button\r\n [control]=\"getFormControl(inputName, formGroup)\"\r\n [id]=\"inputsMap[inputName].inputId\"\r\n [name]=\"inputName\"\r\n [label]=\"inputsMap[inputName].label\"\r\n [options]=\"inputsMap[inputName].selectButtonOptions || []\"/>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n <div class=\"col-span-12\">\r\n <small class=\"p-error text-red-700\">\r\n @for (error of formGroup.errors | validationErrors: dynamicFormData.formValidationErrorsKeys;\r\n track error) {\r\n {{ error }}\r\n }\r\n </small>\r\n </div>\r\n </form>\r\n</div>\r\n" }]
714
+ }], propDecorators: { dynamicFormData: [{
715
+ type: Input,
716
+ args: [{ required: true }]
717
+ }] } });
718
+
719
+ class ConfirmationDialogComponent {
720
+ constructor() {
721
+ this.router = inject(Router);
722
+ this.dialogService = inject(DialogService);
723
+ this.dynamicDialogConfig = inject(DynamicDialogConfig);
724
+ this._ref = inject(DynamicDialogRef);
725
+ this._subscription = new Subscription();
726
+ }
727
+ ngOnInit() {
728
+ // closing when navigating back from the browser
729
+ this._subscription.add(this.router.events.pipe(filter((event) => event instanceof NavigationStart)).subscribe(() => {
730
+ if (this.dynamicDialogConfig) {
731
+ this._ref.close();
732
+ }
733
+ }));
734
+ this.dialogFormData = this.dynamicDialogConfig.data?.inputForm;
735
+ }
736
+ ngOnDestroy() {
737
+ this._subscription.unsubscribe();
738
+ }
739
+ submit() {
740
+ const submitData = { submitted: true, data: this.dialogFormData?.formGroup?.value };
741
+ this._ref.close(this.dynamicDialogConfig.data.inputForm ? submitData : true);
742
+ }
743
+ close() {
744
+ this._ref.close();
745
+ }
746
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ConfirmationDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
747
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ConfirmationDialogComponent, isStandalone: true, selector: "app-confirm-dialog", providers: [DialogService], ngImport: i0, template: "@if (dynamicDialogConfig.data) {\r\n <div>\r\n <div class=\"bg-gray-150 p-4 flex items-center\">\r\n <div class=\"flex-grow flex gap-2\">\r\n @if (dynamicDialogConfig.data.headerIcon) {\r\n <i [class]=\"dynamicDialogConfig.data.headerIcon\"></i>\r\n }\r\n\r\n <h3 class=\"m-0 font-bold text-[16px]\">\r\n {{ dynamicDialogConfig.data.header }}\r\n </h3>\r\n </div>\r\n\r\n <app-button (click)=\"close()\" icon=\"font-icon-close\" [style]=\"'secondary'\" variant=\"text\"/>\r\n </div>\r\n\r\n @if (dynamicDialogConfig.data) {\r\n <div class=\"p-4\">\r\n @if (dynamicDialogConfig.data.dialogIcon) {\r\n <em [class]=\"dynamicDialogConfig.data.dialogIcon\"></em>\r\n }\r\n <div>\r\n {{ dynamicDialogConfig.data.message }}\r\n </div>\r\n @if (dynamicDialogConfig.data.hint) {\r\n <div class=\"font-bold text-[14px] mt-2\">\r\n {{ dynamicDialogConfig.data.hint }}\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (dynamicDialogConfig.data.inputForm) {\r\n <app-dynamic-form [dynamicFormData]=\"dialogFormData\"></app-dynamic-form>\r\n }\r\n\r\n <div class=\"p-4 flex gap-3\">\r\n <app-button\r\n [title]=\"dynamicDialogConfig.data?.confirmLabel || ('actions.confirm' | translate)\" class=\"w-[50%]\"\r\n [disabled]=\"!!(dialogFormData && dialogFormData.formGroup?.invalid)\"\r\n [icon]=\"dynamicDialogConfig.data.confirmBtnIcon || ''\"\r\n [iconPos]=\"dynamicDialogConfig.data.confirmBtnPosition || 'left'\"\r\n [style]=\"dynamicDialogConfig.data.confirmBtnStyle ||'primary'\"\r\n (click)=\"submit()\"/>\r\n\r\n <app-button\r\n [title]=\"dynamicDialogConfig.data?.closeLabel || ('actions.cancel' | translate)\"\r\n class=\"w-[50%]\"\r\n [style]=\"'secondary'\"\r\n [variant]=\"'outlined'\"\r\n (click)=\"close()\"/>\r\n </div>\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "component", type: AppButtonComponent, selector: "app-button", inputs: ["title", "class", "icon", "size", "style", "iconPos", "variant", "disabled", "text", "rounded"], outputs: ["clickEmitter"] }, { kind: "ngmodule", type: AvatarModule }, { kind: "ngmodule", type: DynamicDialog }, { kind: "component", type: DynamicFormComponent, selector: "app-dynamic-form", inputs: ["dynamicFormData"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
748
+ }
749
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
750
+ type: Component,
751
+ args: [{ selector: "app-confirm-dialog", standalone: true, imports: [AppButtonComponent, AvatarModule, DynamicDialog, DynamicFormComponent, TranslatePipe], providers: [DialogService], template: "@if (dynamicDialogConfig.data) {\r\n <div>\r\n <div class=\"bg-gray-150 p-4 flex items-center\">\r\n <div class=\"flex-grow flex gap-2\">\r\n @if (dynamicDialogConfig.data.headerIcon) {\r\n <i [class]=\"dynamicDialogConfig.data.headerIcon\"></i>\r\n }\r\n\r\n <h3 class=\"m-0 font-bold text-[16px]\">\r\n {{ dynamicDialogConfig.data.header }}\r\n </h3>\r\n </div>\r\n\r\n <app-button (click)=\"close()\" icon=\"font-icon-close\" [style]=\"'secondary'\" variant=\"text\"/>\r\n </div>\r\n\r\n @if (dynamicDialogConfig.data) {\r\n <div class=\"p-4\">\r\n @if (dynamicDialogConfig.data.dialogIcon) {\r\n <em [class]=\"dynamicDialogConfig.data.dialogIcon\"></em>\r\n }\r\n <div>\r\n {{ dynamicDialogConfig.data.message }}\r\n </div>\r\n @if (dynamicDialogConfig.data.hint) {\r\n <div class=\"font-bold text-[14px] mt-2\">\r\n {{ dynamicDialogConfig.data.hint }}\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (dynamicDialogConfig.data.inputForm) {\r\n <app-dynamic-form [dynamicFormData]=\"dialogFormData\"></app-dynamic-form>\r\n }\r\n\r\n <div class=\"p-4 flex gap-3\">\r\n <app-button\r\n [title]=\"dynamicDialogConfig.data?.confirmLabel || ('actions.confirm' | translate)\" class=\"w-[50%]\"\r\n [disabled]=\"!!(dialogFormData && dialogFormData.formGroup?.invalid)\"\r\n [icon]=\"dynamicDialogConfig.data.confirmBtnIcon || ''\"\r\n [iconPos]=\"dynamicDialogConfig.data.confirmBtnPosition || 'left'\"\r\n [style]=\"dynamicDialogConfig.data.confirmBtnStyle ||'primary'\"\r\n (click)=\"submit()\"/>\r\n\r\n <app-button\r\n [title]=\"dynamicDialogConfig.data?.closeLabel || ('actions.cancel' | translate)\"\r\n class=\"w-[50%]\"\r\n [style]=\"'secondary'\"\r\n [variant]=\"'outlined'\"\r\n (click)=\"close()\"/>\r\n </div>\r\n </div>\r\n}\r\n" }]
752
+ }] });
753
+
754
+ class ReadMoreComponent {
755
+ constructor() {
756
+ this.text = "";
757
+ this.styleClass = "";
758
+ this.maxCharacters = 100;
759
+ this.isExpanded = false;
760
+ }
761
+ toggleReadMore() {
762
+ this.isExpanded = !this.isExpanded;
763
+ }
764
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ReadMoreComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
765
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: ReadMoreComponent, isStandalone: true, selector: "app-read-more", inputs: { text: "text", styleClass: "styleClass", maxCharacters: "maxCharacters" }, ngImport: i0, template: "<p [class]=\"styleClass\">\r\n {{ isExpanded ? text : (text | slice : 0 : maxCharacters) }}\r\n @if (text.length > maxCharacters && !isExpanded) {\r\n <span>...</span>\r\n }\r\n @if (isExpanded) {\r\n <span>\r\n {{ text | slice : maxCharacters + 1 : text.length }}\r\n </span>\r\n }\r\n <br>\r\n @if (text.length > maxCharacters) {\r\n <span class=\"text-primary_light cursor-pointer\" (click)=\"toggleReadMore()\">\r\n {{ isExpanded ? ('less' | translate) : ('more' | translate) }}\r\n </span>\r\n }\r\n</p>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }, { kind: "pipe", type: SlicePipe, name: "slice" }] }); }
766
+ }
767
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ReadMoreComponent, decorators: [{
768
+ type: Component,
769
+ args: [{ selector: "app-read-more", standalone: true, imports: [TranslateModule, SlicePipe], template: "<p [class]=\"styleClass\">\r\n {{ isExpanded ? text : (text | slice : 0 : maxCharacters) }}\r\n @if (text.length > maxCharacters && !isExpanded) {\r\n <span>...</span>\r\n }\r\n @if (isExpanded) {\r\n <span>\r\n {{ text | slice : maxCharacters + 1 : text.length }}\r\n </span>\r\n }\r\n <br>\r\n @if (text.length > maxCharacters) {\r\n <span class=\"text-primary_light cursor-pointer\" (click)=\"toggleReadMore()\">\r\n {{ isExpanded ? ('less' | translate) : ('more' | translate) }}\r\n </span>\r\n }\r\n</p>\r\n" }]
770
+ }], propDecorators: { text: [{
771
+ type: Input,
772
+ args: [{ required: true }]
773
+ }], styleClass: [{
774
+ type: Input
775
+ }], maxCharacters: [{
776
+ type: Input
777
+ }] } });
778
+
779
+ class AppAccordionComponent {
780
+ constructor() {
781
+ this.iconPathCount = 0;
782
+ this.contentBorderTop = true;
783
+ this.accordionPanelBorder = true;
784
+ }
785
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AppAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
786
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AppAccordionComponent, isStandalone: true, selector: "app-accordion", inputs: { iconName: "iconName", iconClass: "iconClass", iconPathCount: "iconPathCount", title: "title", contentBorderTop: "contentBorderTop", accordionPanelBorder: "accordionPanelBorder" }, ngImport: i0, template: "<p-accordion value=\"0\">\r\n <p-accordion-panel value=\"0\" [class.!border-0]=\"!accordionPanelBorder\">\r\n <p-accordion-header>\r\n <span class=\"flex items-center gap-2 w-full\">\r\n <app-ico-moon-card [iconClass]=\"'text-[24px] text-secondary'\" [iconName]=\"'font-icon-'+iconName\" />\r\n <span class=\"font-bold whitespace-nowrap\">{{title}}</span>\r\n </span>\r\n </p-accordion-header>\r\n <p-accordion-content>\r\n <div [ngClass]=\"{'border-t-2 border-gray-light pt-2': contentBorderTop, }\">\r\n <ng-content></ng-content>\r\n </div>\r\n </p-accordion-content>\r\n </p-accordion-panel>\r\n</p-accordion>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: DividerModule }, { kind: "ngmodule", type: AccordionModule }, { kind: "component", type: i2$3.Accordion, selector: "p-accordion", inputs: ["value", "multiple", "style", "styleClass", "expandIcon", "collapseIcon", "selectOnFocus", "transitionOptions", "activeIndex", "headerAriaLevel"], outputs: ["valueChange", "activeIndexChange", "onClose", "onOpen"] }, { kind: "component", type: i2$3.AccordionPanel, selector: "p-accordion-panel, p-accordionpanel", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "component", type: i2$3.AccordionHeader, selector: "p-accordion-header, p-accordionheader" }, { kind: "component", type: i2$3.AccordionContent, selector: "p-accordion-content, p-accordioncontent" }, { kind: "component", type: IcoMoonIconComponent, selector: "app-ico-moon-card", inputs: ["iconName", "iconClass", "iconPathCount"] }] }); }
787
+ }
788
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AppAccordionComponent, decorators: [{
789
+ type: Component,
790
+ args: [{ selector: "app-accordion", standalone: true, imports: [CommonModule, DividerModule, AccordionModule, IcoMoonIconComponent], template: "<p-accordion value=\"0\">\r\n <p-accordion-panel value=\"0\" [class.!border-0]=\"!accordionPanelBorder\">\r\n <p-accordion-header>\r\n <span class=\"flex items-center gap-2 w-full\">\r\n <app-ico-moon-card [iconClass]=\"'text-[24px] text-secondary'\" [iconName]=\"'font-icon-'+iconName\" />\r\n <span class=\"font-bold whitespace-nowrap\">{{title}}</span>\r\n </span>\r\n </p-accordion-header>\r\n <p-accordion-content>\r\n <div [ngClass]=\"{'border-t-2 border-gray-light pt-2': contentBorderTop, }\">\r\n <ng-content></ng-content>\r\n </div>\r\n </p-accordion-content>\r\n </p-accordion-panel>\r\n</p-accordion>\r\n" }]
791
+ }], propDecorators: { iconName: [{
792
+ type: Input
793
+ }], iconClass: [{
794
+ type: Input
795
+ }], iconPathCount: [{
796
+ type: Input
797
+ }], title: [{
798
+ type: Input,
799
+ args: [{ required: true }]
800
+ }], contentBorderTop: [{
801
+ type: Input
802
+ }], accordionPanelBorder: [{
803
+ type: Input
804
+ }] } });
805
+
806
+ class UserAutocompleteCardComponent {
807
+ constructor() {
808
+ this.select = new EventEmitter();
809
+ this.delete = new EventEmitter();
810
+ this.explicitRole = "";
811
+ this.showDeleteAction = true;
812
+ }
813
+ onDelete() {
814
+ this.delete.emit(this.userData);
815
+ }
816
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: UserAutocompleteCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
817
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: UserAutocompleteCardComponent, isStandalone: true, selector: "app-user-autocomplete-card", inputs: { userData: "userData", explicitRole: "explicitRole", showDeleteAction: "showDeleteAction" }, outputs: { select: "select", delete: "delete" }, ngImport: i0, template: "<div class=\"flex gap-2 items-center justify-between p-4 rounded mb-4 border border-dotted border-gray-300 bg-gray-100\">\r\n <div class=\"flex gap-4 items-center\">\r\n <img [alt]=\"userData.name\" [src]=\"userData.profileImage\" class=\"rounded-full object-cover w-[48px] h-[48px]\" />\r\n <div class=\"flex flex-col justify-end\">\r\n <h4 class=\"font-bold text-[12px] text-gray-800 truncate max-w-[135px] dir-ltr\">\r\n {{ userData.name }}\r\n </h4>\r\n <p class=\"text-[12px] text-gray-700\">{{ explicitRole ? explicitRole : userData.position.name }}</p>\r\n </div>\r\n </div>\r\n <div class=\"flex-1 flex flex-col items-end\">\r\n <p class=\"text-[12px] text-purple-700 truncate max-w-[90px] dir-ltr\">{{ userData.email }}</p>\r\n <p class=\"text-[12px] text-gray-600 dir-ltr\">{{ userData.contact.mobile }}</p>\r\n </div>\r\n @if (showDeleteAction){\r\n <div class=\"flex gap-1 flex-nowrap\">\r\n <app-button (clickEmitter)=\"onDelete()\" [rounded]=\"true\" [size]=\"'large'\" [text]=\"true\" icon=\"font-icon-trash\"/>\r\n </div>\r\n }\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: AppButtonComponent, selector: "app-button", inputs: ["title", "class", "icon", "size", "style", "iconPos", "variant", "disabled", "text", "rounded"], outputs: ["clickEmitter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
818
+ }
819
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: UserAutocompleteCardComponent, decorators: [{
820
+ type: Component,
821
+ args: [{ selector: "app-user-autocomplete-card", standalone: true, imports: [AppButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex gap-2 items-center justify-between p-4 rounded mb-4 border border-dotted border-gray-300 bg-gray-100\">\r\n <div class=\"flex gap-4 items-center\">\r\n <img [alt]=\"userData.name\" [src]=\"userData.profileImage\" class=\"rounded-full object-cover w-[48px] h-[48px]\" />\r\n <div class=\"flex flex-col justify-end\">\r\n <h4 class=\"font-bold text-[12px] text-gray-800 truncate max-w-[135px] dir-ltr\">\r\n {{ userData.name }}\r\n </h4>\r\n <p class=\"text-[12px] text-gray-700\">{{ explicitRole ? explicitRole : userData.position.name }}</p>\r\n </div>\r\n </div>\r\n <div class=\"flex-1 flex flex-col items-end\">\r\n <p class=\"text-[12px] text-purple-700 truncate max-w-[90px] dir-ltr\">{{ userData.email }}</p>\r\n <p class=\"text-[12px] text-gray-600 dir-ltr\">{{ userData.contact.mobile }}</p>\r\n </div>\r\n @if (showDeleteAction){\r\n <div class=\"flex gap-1 flex-nowrap\">\r\n <app-button (clickEmitter)=\"onDelete()\" [rounded]=\"true\" [size]=\"'large'\" [text]=\"true\" icon=\"font-icon-trash\"/>\r\n </div>\r\n }\r\n</div>\r\n" }]
822
+ }], propDecorators: { select: [{
823
+ type: Output
824
+ }], delete: [{
825
+ type: Output
826
+ }], userData: [{
827
+ type: Input,
828
+ args: [{ required: true }]
829
+ }], explicitRole: [{
830
+ type: Input
831
+ }], showDeleteAction: [{
832
+ type: Input
833
+ }] } });
834
+
835
+ /**
836
+ * Generated bundle index. Do not edit.
837
+ */
838
+
839
+ export { AppAccordionComponent, AppButtonComponent, AppDropdownMenuComponent, AppTabsComponent, AutoCompleteComponent, BasicErrorKeysEnum, ConfirmationDialogComponent, DatePickerComponent, DynamicFormComponent, ErrorsWithValuesKeysEnum, FormFieldTypeEnum, FormUtils, FormValidationService, IcoMoonIconComponent, InputComponent, ReadMoreComponent, SelectButtonComponent, SelectComponent, SideBarComponent, SwitchComponent, UserAutocompleteCardComponent, UserInfoComponent, ValidationErrorsPipe };
840
+ //# sourceMappingURL=corp-products-ui-components.mjs.map