platformcommons-web-lib 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commons-shared-web-ui-1.0.0.tgz +0 -0
- package/documentation/alert.md +123 -0
- package/documentation/button-dropdown.md +126 -0
- package/documentation/button.md +184 -0
- package/documentation/cards-usage-guidelines.md +131 -0
- package/documentation/configurable-form.md +605 -0
- package/documentation/confirmation-modal.md +250 -0
- package/documentation/filter-sidebar.md +178 -0
- package/documentation/filter-table-selector.md +228 -0
- package/documentation/form-builder.md +597 -0
- package/documentation/form-components.md +384 -0
- package/documentation/nav.md +427 -0
- package/documentation/pagination.md +181 -0
- package/documentation/side-nav-documentation.md +169 -0
- package/documentation/smart-form.md +2177 -0
- package/documentation/smart-table.md +1198 -0
- package/documentation/snackbar.md +118 -0
- package/documentation/style-externalization.md +88 -0
- package/documentation/summary-card.md +279 -0
- package/ng-package.json +28 -0
- package/package.json +54 -0
- package/src/lib/modules/alert/alert.models.ts +6 -0
- package/src/lib/modules/alert/alert.module.ts +16 -0
- package/src/lib/modules/alert/alert.theme.scss +85 -0
- package/src/lib/modules/alert/components/alert/alert.component.html +27 -0
- package/src/lib/modules/alert/components/alert/alert.component.scss +92 -0
- package/src/lib/modules/alert/components/alert/alert.component.ts +81 -0
- package/src/lib/modules/button/button.models.ts +13 -0
- package/src/lib/modules/button/button.module.ts +16 -0
- package/src/lib/modules/button/button.theme.scss +121 -0
- package/src/lib/modules/button/components/button/button.component.html +22 -0
- package/src/lib/modules/button/components/button/button.component.scss +88 -0
- package/src/lib/modules/button/components/button/button.component.ts +67 -0
- package/src/lib/modules/button-dropdown/button-dropdown.models.ts +26 -0
- package/src/lib/modules/button-dropdown/button-dropdown.module.ts +22 -0
- package/src/lib/modules/button-dropdown/button-dropdown.theme.scss +87 -0
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.html +41 -0
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.scss +135 -0
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.ts +160 -0
- package/src/lib/modules/configurable-form/component/configurable-form.component.html +294 -0
- package/src/lib/modules/configurable-form/component/configurable-form.component.scss +503 -0
- package/src/lib/modules/configurable-form/component/configurable-form.component.ts +628 -0
- package/src/lib/modules/configurable-form/configurable-form.examples.ts +154 -0
- package/src/lib/modules/configurable-form/configurable-form.model.ts +131 -0
- package/src/lib/modules/configurable-form/configurable-form.module.ts +19 -0
- package/src/lib/modules/configurable-form/configurable-form.theme.scss +78 -0
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.html +77 -0
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.scss +395 -0
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.ts +266 -0
- package/src/lib/modules/confirmation-modal/confirmation-modal.models.ts +71 -0
- package/src/lib/modules/confirmation-modal/confirmation-modal.module.ts +20 -0
- package/src/lib/modules/confirmation-modal/confirmation-modal.theme.scss +87 -0
- package/src/lib/modules/filter/components/filter/filter.component.html +131 -0
- package/src/lib/modules/filter/components/filter/filter.component.scss +245 -0
- package/src/lib/modules/filter/components/filter/filter.component.ts +216 -0
- package/src/lib/modules/filter/filter.models.ts +88 -0
- package/src/lib/modules/filter/filter.module.ts +24 -0
- package/src/lib/modules/filter/filter.theme.scss +92 -0
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.html +112 -0
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.scss +186 -0
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.ts +163 -0
- package/src/lib/modules/filter-sidebar/filter-sidebar.models.ts +95 -0
- package/src/lib/modules/filter-sidebar/filter-sidebar.module.ts +24 -0
- package/src/lib/modules/filter-sidebar/filter-sidebar.theme.scss +38 -0
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.html +73 -0
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.scss +321 -0
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.ts +361 -0
- package/src/lib/modules/filter-table-selector/filter-table-selector.models.ts +91 -0
- package/src/lib/modules/filter-table-selector/filter-table-selector.module.ts +22 -0
- package/src/lib/modules/filter-table-selector/filter-table-selector.theme.scss +36 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.html +63 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.scss +496 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.ts +445 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.html +75 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.scss +210 -0
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.ts +55 -0
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.html +25 -0
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.scss +82 -0
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.ts +95 -0
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.html +20 -0
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.scss +37 -0
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.ts +94 -0
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.html +46 -0
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.scss +102 -0
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.ts +50 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.html +35 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.scss +67 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.ts +34 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.html +68 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.scss +113 -0
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.ts +74 -0
- package/src/lib/modules/form-builder/configs/field-type-schema.map.ts +533 -0
- package/src/lib/modules/form-builder/form-builder.module.ts +36 -0
- package/src/lib/modules/form-builder/form-builder.theme.scss +212 -0
- package/src/lib/modules/form-builder/index.ts +9 -0
- package/src/lib/modules/form-builder/models/builder.models.ts +7 -0
- package/src/lib/modules/form-builder/models/field-configurator.models.ts +38 -0
- package/src/lib/modules/form-builder/models/field-selection.models.ts +51 -0
- package/src/lib/modules/form-builder/services/field-configurator.service.ts +258 -0
- package/src/lib/modules/form-builder/services/field-selection.service.ts +300 -0
- package/src/lib/modules/form-builder/services/form-schema-tree.service.ts +652 -0
- package/src/lib/modules/form-builder/tokens/builder.tokens.ts +10 -0
- package/src/lib/modules/form-builder/utils/constants.ts +43 -0
- package/src/lib/modules/form-components/components/checkbox/_theme.scss +63 -0
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.html +29 -0
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.scss +111 -0
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.ts +207 -0
- package/src/lib/modules/form-components/components/checkbox/checkbox.models.ts +35 -0
- package/src/lib/modules/form-components/components/datepicker/_theme.scss +82 -0
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.html +42 -0
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.scss +115 -0
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.ts +267 -0
- package/src/lib/modules/form-components/components/datepicker/datepicker.models.ts +45 -0
- package/src/lib/modules/form-components/components/dropdown/_theme.scss +91 -0
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.html +74 -0
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.scss +252 -0
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.ts +377 -0
- package/src/lib/modules/form-components/components/dropdown/dropdown.models.ts +53 -0
- package/src/lib/modules/form-components/components/input/_theme.scss +77 -0
- package/src/lib/modules/form-components/components/input/input.component.html +51 -0
- package/src/lib/modules/form-components/components/input/input.component.scss +128 -0
- package/src/lib/modules/form-components/components/input/input.component.ts +250 -0
- package/src/lib/modules/form-components/components/input/input.models.ts +55 -0
- package/src/lib/modules/form-components/components/radio/_theme.scss +61 -0
- package/src/lib/modules/form-components/components/radio/radio.component.html +22 -0
- package/src/lib/modules/form-components/components/radio/radio.component.scss +107 -0
- package/src/lib/modules/form-components/components/radio/radio.component.ts +181 -0
- package/src/lib/modules/form-components/components/radio/radio.models.ts +39 -0
- package/src/lib/modules/form-components/components/search/_theme.scss +73 -0
- package/src/lib/modules/form-components/components/search/search.component.html +15 -0
- package/src/lib/modules/form-components/components/search/search.component.scss +87 -0
- package/src/lib/modules/form-components/components/search/search.component.ts +213 -0
- package/src/lib/modules/form-components/components/search/search.models.ts +40 -0
- package/src/lib/modules/form-components/components/toggle/_theme.scss +45 -0
- package/src/lib/modules/form-components/components/toggle/toggle.component.html +15 -0
- package/src/lib/modules/form-components/components/toggle/toggle.component.scss +81 -0
- package/src/lib/modules/form-components/components/toggle/toggle.component.ts +166 -0
- package/src/lib/modules/form-components/components/toggle/toggle.models.ts +27 -0
- package/src/lib/modules/form-components/directives/click-outside.directive.ts +22 -0
- package/src/lib/modules/form-components/form-components.module.ts +41 -0
- package/src/lib/modules/form-components/form-components.theme.scss +25 -0
- package/src/lib/modules/material/material.module.ts +94 -0
- package/src/lib/modules/nav/components/nav/nav.component.html +34 -0
- package/src/lib/modules/nav/components/nav/nav.component.scss +171 -0
- package/src/lib/modules/nav/components/nav/nav.component.ts +82 -0
- package/src/lib/modules/nav/nav.models.ts +31 -0
- package/src/lib/modules/nav/nav.module.ts +17 -0
- package/src/lib/modules/nav/nav.theme.scss +86 -0
- package/src/lib/modules/pagination/components/pagination/pagination.component.html +52 -0
- package/src/lib/modules/pagination/components/pagination/pagination.component.scss +155 -0
- package/src/lib/modules/pagination/components/pagination/pagination.component.ts +109 -0
- package/src/lib/modules/pagination/pagination.module.ts +17 -0
- package/src/lib/modules/pagination/pagination.theme.scss +66 -0
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.html +56 -0
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.scss +342 -0
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.ts +135 -0
- package/src/lib/modules/side-nav/side-nav.models.ts +38 -0
- package/src/lib/modules/side-nav/side-nav.module.ts +16 -0
- package/src/lib/modules/side-nav/side-nav.theme.scss +111 -0
- package/src/lib/modules/smart-form/components/form-field/form-field.component.html +1109 -0
- package/src/lib/modules/smart-form/components/form-field/form-field.component.scss +1860 -0
- package/src/lib/modules/smart-form/components/form-field/form-field.component.ts +2232 -0
- package/src/lib/modules/smart-form/components/form-section/form-section.component.html +64 -0
- package/src/lib/modules/smart-form/components/form-section/form-section.component.scss +209 -0
- package/src/lib/modules/smart-form/components/form-section/form-section.component.ts +119 -0
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.html +253 -0
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.scss +689 -0
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.ts +1087 -0
- package/src/lib/modules/smart-form/index.ts +10 -0
- package/src/lib/modules/smart-form/models/form-schema.model.ts +700 -0
- package/src/lib/modules/smart-form/models/hierarchy-config.model.ts +21 -0
- package/src/lib/modules/smart-form/services/expression.service.ts +75 -0
- package/src/lib/modules/smart-form/services/smart-form-controller.service.ts +65 -0
- package/src/lib/modules/smart-form/smart-form.examples.ts +1324 -0
- package/src/lib/modules/smart-form/smart-form.module.ts +36 -0
- package/src/lib/modules/smart-form/smart-form.theme.scss +890 -0
- package/src/lib/modules/smart-form/utils/translation.utils.ts +82 -0
- package/src/lib/modules/smart-form/utils/trusted-url.pipe.ts +25 -0
- package/src/lib/modules/smart-form/utils/validation.utils.ts +98 -0
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.html +283 -0
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.scss +685 -0
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.ts +1118 -0
- package/src/lib/modules/smart-table/models/table-config.model.ts +202 -0
- package/src/lib/modules/smart-table/smart-table.module.ts +30 -0
- package/src/lib/modules/smart-table/smart-table.theme.scss +335 -0
- package/src/lib/modules/smart-table/utils/safe-html.pipe.ts +22 -0
- package/src/lib/modules/smart-table/utils/smart-table.utils.ts +18 -0
- package/src/lib/modules/snackbar/components/snackbar.component.html +41 -0
- package/src/lib/modules/snackbar/components/snackbar.component.scss +99 -0
- package/src/lib/modules/snackbar/components/snackbar.component.ts +18 -0
- package/src/lib/modules/snackbar/models/snackbar.models.ts +10 -0
- package/src/lib/modules/snackbar/services/snackbar.service.ts +40 -0
- package/src/lib/modules/snackbar/snackbar.module.ts +11 -0
- package/src/lib/modules/snackbar/snackbar.theme.scss +93 -0
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.html +47 -0
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.scss +199 -0
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.ts +126 -0
- package/src/lib/modules/summary-card/summary-card.module.ts +18 -0
- package/src/lib/modules/summary-card/summary-card.theme.scss +176 -0
- package/src/lib/shared-ui.module.ts +44 -0
- package/src/lib/styles/global.scss +152 -0
- package/src/lib/styles/utilities.scss +250 -0
- package/src/lib/utils/constants.ts +11 -0
- package/src/lib/utils/storage.utils.ts +37 -0
- package/src/lib/utils/string.utils.ts +23 -0
- package/src/lib/utils/translation.utils.ts +87 -0
- package/src/public-api.ts +104 -0
- package/tsconfig.lib.json +15 -0
|
@@ -0,0 +1,1109 @@
|
|
|
1
|
+
<div class="form-field mb-16px" *ngIf="isVisible" [class.has-error]="errorMessage">
|
|
2
|
+
|
|
3
|
+
<!-- ══ ROW Layout ════════════════════════════════════════════════════════ -->
|
|
4
|
+
<div *ngIf="isRow" class="form-row grid-row">
|
|
5
|
+
<ng-container *ngFor="let child of config.children">
|
|
6
|
+
<div class="row-field" [style.gridColumn]="'span ' + getChildColSpan(child)" *ngIf="child.isEnabled !== false">
|
|
7
|
+
<lib-form-field [config]="child" [controller]="controller" [formGroup]="formGroup" [allowMulti]="allowMulti">
|
|
8
|
+
</lib-form-field>
|
|
9
|
+
</div>
|
|
10
|
+
</ng-container>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<!-- ══ GROUP — allowMulti (repeater) ════════════════════════════════════ -->
|
|
14
|
+
<div *ngIf="isGroup && config.sectionConfig?.allowMulti"
|
|
15
|
+
class="group-section-wrapper mb-20px"
|
|
16
|
+
[class.multi-save-active]="config.sectionConfig?.multiSaveConfig?.active">
|
|
17
|
+
|
|
18
|
+
<!-- Multi-Save: header row with label + top-right Add button -->
|
|
19
|
+
<div class="multi-save-header d-flex justify-content-between align-items-center mb-24"
|
|
20
|
+
*ngIf="config.sectionConfig?.multiSaveConfig?.active">
|
|
21
|
+
<h3 class="group-label" *ngIf="config.sectionConfig?.label">{{ config.sectionConfig!.label }}</h3>
|
|
22
|
+
<lib-button [variant]="'outline'" [icon]="{type: 'material', value: 'add'}" (click)="addGroupInstance()"
|
|
23
|
+
class="btn-add-multi">
|
|
24
|
+
{{ addMultiLabel }}
|
|
25
|
+
</lib-button>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<!-- Standard heading (non-multiSave) -->
|
|
29
|
+
<h3 class="group-label"
|
|
30
|
+
*ngIf="config.sectionConfig?.label && !config.sectionConfig?.multiSaveConfig?.active">{{
|
|
31
|
+
config.sectionConfig!.label }}</h3>
|
|
32
|
+
|
|
33
|
+
<!-- ── Standard (non-multiSave) repeater: accordion instances ─────────── -->
|
|
34
|
+
<ng-container *ngIf="!config.sectionConfig?.multiSaveConfig?.active">
|
|
35
|
+
<div *ngFor="let instance of instanceList; trackBy: trackByInstanceId; let i = index"
|
|
36
|
+
class="group-accordion-instance"
|
|
37
|
+
[class.is-expanded]="isGroupExpanded(i)">
|
|
38
|
+
|
|
39
|
+
<!-- Accordion header -->
|
|
40
|
+
<div class="group-accordion-header" (click)="toggleGroupAccordion(i)"
|
|
41
|
+
role="button" [attr.aria-expanded]="isGroupExpanded(i)">
|
|
42
|
+
<div class="accordion-header-left d-flex align-items-center gap-10">
|
|
43
|
+
<span class="instance-badge">{{ i + 1 }}</span>
|
|
44
|
+
<span class="instance-title">{{ config.sectionConfig!.label }} #{{ i + 1 }}</span>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="accordion-header-right d-flex align-items-center gap-6">
|
|
47
|
+
<button type="button" class="accordion-remove-btn"
|
|
48
|
+
*ngIf="instanceList.length > 1"
|
|
49
|
+
(click)="$event.stopPropagation(); removeGroupInstance(i)"
|
|
50
|
+
aria-label="Remove">
|
|
51
|
+
<mat-icon>delete_outline</mat-icon>
|
|
52
|
+
</button>
|
|
53
|
+
<mat-icon class="accordion-chevron">
|
|
54
|
+
{{ isGroupExpanded(i) ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}
|
|
55
|
+
</mat-icon>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<!-- Accordion body (always mounted so form controls survive collapse) -->
|
|
60
|
+
<div class="group-accordion-body" [hidden]="!isGroupExpanded(i)">
|
|
61
|
+
<div class="group-fields sf-grid">
|
|
62
|
+
<ng-container *ngFor="let field of config.sectionConfig!.children">
|
|
63
|
+
<div class="sf-col" [style.gridColumn]="'span ' + (field.colSpan || 12)"
|
|
64
|
+
*ngIf="field.isEnabled !== false">
|
|
65
|
+
<lib-form-field [config]="field" [controller]="instance.rowController" [formGroup]="instance.fg"
|
|
66
|
+
[allowMulti]="false">
|
|
67
|
+
</lib-form-field>
|
|
68
|
+
</div>
|
|
69
|
+
</ng-container>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<!-- Full-width dashed Add button -->
|
|
75
|
+
<button type="button" class="btn-add-group" (click)="addGroupInstance()">
|
|
76
|
+
<mat-icon>add</mat-icon> {{ addLabel }} {{ config.sectionConfig!.label }}
|
|
77
|
+
</button>
|
|
78
|
+
</ng-container>
|
|
79
|
+
|
|
80
|
+
<!-- ── MultiSave: card instances ─────────────────────────────────────── -->
|
|
81
|
+
<ng-container *ngIf="config.sectionConfig?.multiSaveConfig?.active">
|
|
82
|
+
<div *ngFor="let instance of instanceList; trackBy: trackByInstanceId; let i = index"
|
|
83
|
+
class="group-instance position-relative mb-16 overflow-hidden"
|
|
84
|
+
[class.is-editing]="instance.isEditing"
|
|
85
|
+
[class.is-card]="!instance.isEditing">
|
|
86
|
+
|
|
87
|
+
<!-- Edit / new form view -->
|
|
88
|
+
<div [hidden]="!instance.isEditing">
|
|
89
|
+
<div class="group-fields sf-grid">
|
|
90
|
+
<ng-container *ngFor="let field of config.sectionConfig!.children">
|
|
91
|
+
<div class="sf-col" [style.gridColumn]="'span ' + (field.colSpan || 12)"
|
|
92
|
+
*ngIf="field.isEnabled !== false">
|
|
93
|
+
<lib-form-field [config]="field" [controller]="instance.rowController" [formGroup]="instance.fg"
|
|
94
|
+
[allowMulti]="false">
|
|
95
|
+
</lib-form-field>
|
|
96
|
+
</div>
|
|
97
|
+
</ng-container>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<!-- Save / Cancel -->
|
|
101
|
+
<div class="group-footer d-flex justify-content-end align-items-center gap-16 p-0-24"
|
|
102
|
+
*ngIf="config.sectionConfig?.multiSaveConfig?.active">
|
|
103
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="multiSaveError">{{ multiSaveError }}</span>
|
|
104
|
+
<div class="footer-actions d-flex gap-12">
|
|
105
|
+
<lib-button [variant]="'outline'" (click)="cancelGroupInstance(i)">Cancel</lib-button>
|
|
106
|
+
<lib-button [variant]="'primary'" (click)="saveGroupInstance(i)">Save</lib-button>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
<!-- Card view (saved state) -->
|
|
112
|
+
<ng-container *ngIf="!instance.isEditing">
|
|
113
|
+
<div class="card-view d-flex justify-content-between align-items-center p-18px-24px"
|
|
114
|
+
[class.is-expanded]="instance.isExpanded">
|
|
115
|
+
<div class="card-content flex-1 d-flex flex-column gap-4 overflow-hidden">
|
|
116
|
+
<span class="card-title font-weight-600 overflow-hidden fs-1rem c-111827">{{
|
|
117
|
+
instance.fg.get(config.sectionConfig!.multiSaveConfig!.summaryField || '')?.value
|
|
118
|
+
|| '—' }}</span>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="card-actions d-flex align-items-center gap-16 ml-20">
|
|
121
|
+
<mat-icon class="icon-delete" (click)="removeGroupInstance(i, true)">delete_outline</mat-icon>
|
|
122
|
+
<mat-icon class="icon-edit" (click)="editGroupInstance(i)">edit_outline</mat-icon>
|
|
123
|
+
<mat-icon class="icon-expand" (click)="toggleExpandGroupInstance(i)">
|
|
124
|
+
{{ instance.isExpanded ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}
|
|
125
|
+
</mat-icon>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</ng-container>
|
|
129
|
+
</div>
|
|
130
|
+
</ng-container>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<!-- ══ GROUP — single (non-repeater) ════════════════════════════════════ -->
|
|
134
|
+
<div *ngIf="isGroup && config.sectionConfig && !config.sectionConfig.allowMulti"
|
|
135
|
+
class="group-section-wrapper mb-20px">
|
|
136
|
+
<h3 class="group-label" *ngIf="config.sectionConfig.label">{{ config.sectionConfig.label }}</h3>
|
|
137
|
+
<div class="group-fields sf-grid">
|
|
138
|
+
<ng-container *ngFor="let field of config.sectionConfig.children">
|
|
139
|
+
<div class="sf-col" [style.gridColumn]="'span ' + (field.colSpan || 12)" *ngIf="field.isEnabled !== false">
|
|
140
|
+
<lib-form-field [config]="field" [controller]="controller" [formGroup]="groupFormGroup" [allowMulti]="false">
|
|
141
|
+
</lib-form-field>
|
|
142
|
+
</div>
|
|
143
|
+
</ng-container>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
<!-- ══ Text Input ════════════════════════════════════════════════════════ -->
|
|
149
|
+
<div *ngIf="isTextField" class="field-wrapper d-flex flex-column gap-6" [formGroup]="formGroup">
|
|
150
|
+
<label *ngIf="config.label" class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">
|
|
151
|
+
{{ config.label }}
|
|
152
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
153
|
+
</label>
|
|
154
|
+
|
|
155
|
+
<textarea *ngIf="config.subType === 'LONG'" class="field-input textarea" [placeholder]="config.placeholder || ''"
|
|
156
|
+
[formControlName]="config.name!" [class.is-invalid]="errorMessage" rows="4">
|
|
157
|
+
</textarea>
|
|
158
|
+
|
|
159
|
+
<!-- Password input with show/hide toggle -->
|
|
160
|
+
<div *ngIf="config.subType === 'PASSWORD'" class="password-wrapper position-relative d-flex align-items-center">
|
|
161
|
+
<input [type]="showPassword ? 'text' : 'password'" class="field-input password-input"
|
|
162
|
+
[placeholder]="config.placeholder || ''" [formControlName]="config.name!" [class.is-invalid]="errorMessage">
|
|
163
|
+
<button type="button"
|
|
164
|
+
class="password-toggle position-absolute cursor-pointer d-flex align-items-center justify-content-center b-none border-none c-6B7280 p-0-25rem"
|
|
165
|
+
(click)="showPassword = !showPassword" tabindex="-1"
|
|
166
|
+
[attr.aria-label]="showPassword ? 'Hide password' : 'Show password'">
|
|
167
|
+
<mat-icon class="eye-icon">{{ showPassword ? 'visibility' : 'visibility_off' }}</mat-icon>
|
|
168
|
+
</button>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
<div class="input-group position-relative d-flex w-100" [class.readonly]="config.readonly">
|
|
172
|
+
<span class="input-prefix br-none" *ngIf="config.prefix">{{ config.prefix }}</span>
|
|
173
|
+
|
|
174
|
+
<input *ngIf="config.subType !== 'LONG' && config.subType !== 'PASSWORD'"
|
|
175
|
+
[type]="config.subType === 'EMAIL' ? 'email' : config.subType === 'PHONE' ? 'tel' : 'text'" class="field-input"
|
|
176
|
+
[placeholder]="config.placeholder || ''" [formControlName]="config.name!" [class.is-invalid]="errorMessage"
|
|
177
|
+
[readonly]="config.readonly">
|
|
178
|
+
|
|
179
|
+
<span class="input-suffix d-flex align-items-center font-weight-500" *ngIf="config.suffix">{{ config.suffix
|
|
180
|
+
}}</span>
|
|
181
|
+
|
|
182
|
+
<div class="readonly-icons position-absolute d-flex gap-8 pe-none" *ngIf="config.readonly">
|
|
183
|
+
<mat-icon class="lock-icon">lock</mat-icon>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<!-- Suffix Action Icons (clickable) -->
|
|
187
|
+
<div class="suffix-action-icons position-absolute d-flex gap-8 align-items-center"
|
|
188
|
+
*ngIf="config.suffixActionIcons?.length && !config.readonly">
|
|
189
|
+
<mat-icon class="suffix-action-icon"
|
|
190
|
+
*ngFor="let action of config.suffixActionIcons"
|
|
191
|
+
[style.color]="action.color || null"
|
|
192
|
+
[title]="action.tooltip || ''"
|
|
193
|
+
(click)="onSuffixActionClick(action.actionId)">
|
|
194
|
+
{{ action.icon }}
|
|
195
|
+
</mat-icon>
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint && !errorMessage">{{ config.hint }}</span>
|
|
200
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
201
|
+
<div class="char-count-hint font-poppins font-weight-400 text-14 text-right c-6B7280" *ngIf="showCharCount">
|
|
202
|
+
{{ remainingCharacters }} characters remaining
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<!-- ══ Number Input ══════════════════════════════════════════════════════ -->
|
|
207
|
+
<div *ngIf="isNumberField" class="field-wrapper d-flex flex-column gap-6" [formGroup]="formGroup">
|
|
208
|
+
<label *ngIf="config.label" class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">
|
|
209
|
+
{{ config.label }}
|
|
210
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
211
|
+
</label>
|
|
212
|
+
|
|
213
|
+
<div class="input-group position-relative d-flex w-100" [class.readonly]="config.readonly">
|
|
214
|
+
<span class="input-prefix br-none" *ngIf="config.prefix">{{ config.prefix }}</span>
|
|
215
|
+
|
|
216
|
+
<input type="number" class="field-input" [placeholder]="config.placeholder || ''" [formControlName]="config.name!"
|
|
217
|
+
[min]="config.numberConfig?.min ?? null" [max]="config.numberConfig?.max ?? null"
|
|
218
|
+
[step]="config.numberConfig?.step || 1" [class.is-invalid]="errorMessage" [readonly]="config.readonly">
|
|
219
|
+
|
|
220
|
+
<span class="input-suffix d-flex align-items-center font-weight-500" *ngIf="config.suffix">{{ config.suffix
|
|
221
|
+
}}</span>
|
|
222
|
+
|
|
223
|
+
<div class="readonly-icons position-absolute d-flex gap-8 pe-none" *ngIf="config.readonly">
|
|
224
|
+
<mat-icon class="lock-icon">lock</mat-icon>
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
<!-- Suffix Action Icons (clickable) -->
|
|
228
|
+
<div class="suffix-action-icons position-absolute d-flex gap-8 align-items-center"
|
|
229
|
+
*ngIf="config.suffixActionIcons?.length && !config.readonly">
|
|
230
|
+
<mat-icon class="suffix-action-icon"
|
|
231
|
+
*ngFor="let action of config.suffixActionIcons"
|
|
232
|
+
[style.color]="action.color || null"
|
|
233
|
+
[title]="action.tooltip || ''"
|
|
234
|
+
(click)="onSuffixActionClick(action.actionId)">
|
|
235
|
+
{{ action.icon }}
|
|
236
|
+
</mat-icon>
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint && !errorMessage">{{ config.hint }}</span>
|
|
241
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
242
|
+
</div>
|
|
243
|
+
|
|
244
|
+
<!-- ══ Date Input ════════════════════════════════════════════════════════ -->
|
|
245
|
+
<div *ngIf="isDateField" class="field-wrapper d-flex flex-column gap-6" [formGroup]="formGroup">
|
|
246
|
+
<label *ngIf="config.label" class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">
|
|
247
|
+
{{ config.label }}
|
|
248
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
249
|
+
</label>
|
|
250
|
+
|
|
251
|
+
<div class="input-group position-relative d-flex w-100" [class.readonly]="config.readonly">
|
|
252
|
+
<input matInput [matDatepicker]="datePicker" class="field-input date-input has-icon-right"
|
|
253
|
+
[formControlName]="config.name!" [min]="effectiveMinDate" [max]="config.dateConfig?.maxDate"
|
|
254
|
+
[class.is-invalid]="errorMessage" [placeholder]="config.placeholder || ''"
|
|
255
|
+
[readonly]="config.readonly || config.dateConfig?.inputReadonly"
|
|
256
|
+
(click)="!config.readonly && datePicker.open()">
|
|
257
|
+
<div class="date-icon-wrapper position-absolute d-flex align-items-center justify-content-center"
|
|
258
|
+
*ngIf="!config.readonly">
|
|
259
|
+
<mat-datepicker-toggle matSuffix [for]="datePicker"></mat-datepicker-toggle>
|
|
260
|
+
</div>
|
|
261
|
+
<mat-datepicker #datePicker></mat-datepicker>
|
|
262
|
+
|
|
263
|
+
<div class="readonly-icons position-absolute d-flex gap-8 pe-none" *ngIf="config.readonly">
|
|
264
|
+
<mat-icon class="lock-icon">lock</mat-icon>
|
|
265
|
+
</div>
|
|
266
|
+
</div>
|
|
267
|
+
|
|
268
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint && !errorMessage">{{ config.hint }}</span>
|
|
269
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
270
|
+
</div>
|
|
271
|
+
|
|
272
|
+
<!-- ══ Time Input ════════════════════════════════════════════════════════ -->
|
|
273
|
+
<div *ngIf="isTimeField" class="field-wrapper d-flex flex-column gap-6" [formGroup]="formGroup">
|
|
274
|
+
<label *ngIf="config.label" class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">
|
|
275
|
+
{{ config.label }}
|
|
276
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
277
|
+
</label>
|
|
278
|
+
|
|
279
|
+
<div class="input-group position-relative d-flex w-100" [class.readonly]="config.readonly">
|
|
280
|
+
<input type="time" class="field-input time-input" [formControlName]="config.name!"
|
|
281
|
+
[min]="effectiveMinTime" [max]="effectiveMaxTime"
|
|
282
|
+
[class.is-invalid]="errorMessage" [readonly]="config.readonly || config.timeConfig?.inputReadonly">
|
|
283
|
+
|
|
284
|
+
<div class="readonly-icons position-absolute d-flex gap-8 pe-none" *ngIf="config.readonly">
|
|
285
|
+
<mat-icon class="lock-icon">lock</mat-icon>
|
|
286
|
+
</div>
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint && !errorMessage">{{ config.hint }}</span>
|
|
290
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
291
|
+
</div>
|
|
292
|
+
|
|
293
|
+
<!-- ══ Autocomplete ═════════════════════════════════════════════════════ -->
|
|
294
|
+
<div *ngIf="isAutocomplete" class="field-wrapper d-flex flex-column gap-6" [formGroup]="formGroup">
|
|
295
|
+
<label *ngIf="config.label" class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">
|
|
296
|
+
{{ config.label }}
|
|
297
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
298
|
+
</label>
|
|
299
|
+
|
|
300
|
+
<!-- Hidden real control (stores the code value) -->
|
|
301
|
+
<input type="hidden" [formControlName]="config.name!">
|
|
302
|
+
|
|
303
|
+
<div class="autocomplete-wrapper position-relative d-flex align-items-center w-100"
|
|
304
|
+
[class.is-invalid]="errorMessage" [class.readonly]="config.readonly">
|
|
305
|
+
<!-- Search icon -->
|
|
306
|
+
<mat-icon class="ac-search-icon position-absolute fs-1-1rem c-9CA3AF pe-none">search</mat-icon>
|
|
307
|
+
|
|
308
|
+
<input class="field-input ac-input" [formControl]="autocompleteInputCtrl" [matAutocomplete]="auto"
|
|
309
|
+
[placeholder]="config.placeholder || 'Search…'" [readonly]="!!config.readonly" [class.is-invalid]="errorMessage"
|
|
310
|
+
(blur)="onAutocompleteClear()" autocomplete="off">
|
|
311
|
+
|
|
312
|
+
<!-- Clear button -->
|
|
313
|
+
<button type="button"
|
|
314
|
+
class="ac-clear-btn position-absolute d-flex align-items-center justify-content-center cursor-pointer rounded-50 b-none border-none c-9CA3AF p-0-2rem"
|
|
315
|
+
*ngIf="autocompleteInputCtrl.value && !config.readonly"
|
|
316
|
+
(click)="autocompleteInputCtrl.setValue(''); updateValue(null)" tabindex="-1" aria-label="Clear">
|
|
317
|
+
<mat-icon>close</mat-icon>
|
|
318
|
+
</button>
|
|
319
|
+
|
|
320
|
+
<mat-autocomplete #auto="matAutocomplete" [panelWidth]="'auto'">
|
|
321
|
+
<mat-option *ngFor="let option of filteredOptions" [value]="option.label"
|
|
322
|
+
(onSelectionChange)="onAutocompleteSelected(option)">
|
|
323
|
+
<span class="ac-option-label">{{ option.label }}</span>
|
|
324
|
+
|
|
325
|
+
<!-- Dynamic display fields (image / email / phone / text) -->
|
|
326
|
+
<div class="ac-display-fields d-flex flex-wrap gap-6 mt-2" *ngIf="option['displayMeta']?.length">
|
|
327
|
+
<ng-container *ngFor="let field of option['displayMeta']">
|
|
328
|
+
|
|
329
|
+
<!-- Image avatar -->
|
|
330
|
+
<span *ngIf="field.type === 'image' && field.value" class="ac-df-item ac-df-image">
|
|
331
|
+
<img [src]="field.value" [alt]="field.label || 'image'" class="ac-df-avatar">
|
|
332
|
+
</span>
|
|
333
|
+
|
|
334
|
+
<!-- Email -->
|
|
335
|
+
<span *ngIf="field.type === 'email' && field.value" class="ac-df-item ac-df-chip">
|
|
336
|
+
<mat-icon class="ac-df-icon">mail_outline</mat-icon>
|
|
337
|
+
<span *ngIf="field.label" class="ac-df-label">{{ field.label }}</span>
|
|
338
|
+
{{ field.value }}
|
|
339
|
+
</span>
|
|
340
|
+
|
|
341
|
+
<!-- Phone -->
|
|
342
|
+
<span *ngIf="field.type === 'phone' && field.value" class="ac-df-item ac-df-chip" [class]="field.className">
|
|
343
|
+
<mat-icon class="ac-df-icon">phone</mat-icon>
|
|
344
|
+
<span *ngIf="field.label" class="ac-df-label">{{ field.label }}</span>
|
|
345
|
+
{{ field.value }}
|
|
346
|
+
</span>
|
|
347
|
+
|
|
348
|
+
<!-- Custom / Icon-based / Generic Text -->
|
|
349
|
+
<span *ngIf="field.type !== 'image' && field.type !== 'email' && field.type !== 'phone' && field.value"
|
|
350
|
+
class="ac-df-item" [class.ac-df-chip]="!!field.icon" [class]="field.className">
|
|
351
|
+
<mat-icon class="ac-df-icon" *ngIf="field.icon">{{ field.icon }}</mat-icon>
|
|
352
|
+
<span *ngIf="field.label" class="ac-df-label">{{ field.label }}</span>
|
|
353
|
+
{{ field.value }}
|
|
354
|
+
</span>
|
|
355
|
+
|
|
356
|
+
</ng-container>
|
|
357
|
+
</div>
|
|
358
|
+
</mat-option>
|
|
359
|
+
<mat-option *ngIf="filteredOptions.length === 0" disabled class="ac-no-results fs-0-8125rem c-6B7280">
|
|
360
|
+
No results found
|
|
361
|
+
</mat-option>
|
|
362
|
+
</mat-autocomplete>
|
|
363
|
+
|
|
364
|
+
<div class="readonly-icons position-absolute d-flex gap-8 pe-none" *ngIf="config.readonly">
|
|
365
|
+
<mat-icon class="lock-icon">lock</mat-icon>
|
|
366
|
+
</div>
|
|
367
|
+
</div>
|
|
368
|
+
|
|
369
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint && !errorMessage">{{ config.hint }}</span>
|
|
370
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
371
|
+
</div>
|
|
372
|
+
|
|
373
|
+
<!-- ══ Dropdown ══════════════════════════════════════════════════════════ -->
|
|
374
|
+
<div *ngIf="isDropdown" class="field-wrapper d-flex flex-column gap-6" [formGroup]="formGroup">
|
|
375
|
+
<label *ngIf="config.label" class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">
|
|
376
|
+
{{ config.label }}
|
|
377
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
378
|
+
</label>
|
|
379
|
+
|
|
380
|
+
<select *ngIf="config.subType === 'SINGLE'" class="field-input" [formControlName]="config.name!"
|
|
381
|
+
[class.is-invalid]="errorMessage">
|
|
382
|
+
<option [ngValue]="null" disabled selected>{{ config.placeholder || 'Select' }}</option>
|
|
383
|
+
<option *ngFor="let option of localOptionList" [value]="option.code">
|
|
384
|
+
{{ option.label }}
|
|
385
|
+
</option>
|
|
386
|
+
</select>
|
|
387
|
+
|
|
388
|
+
<!-- MULTIPLE SELECT: custom panel with checkboxes -->
|
|
389
|
+
<div *ngIf="config.subType === 'MULTIPLE'" class="multi-select-wrapper"
|
|
390
|
+
[class.is-invalid]="errorMessage">
|
|
391
|
+
|
|
392
|
+
<div class="field-input multi-select-trigger d-flex align-items-center justify-content-between cursor-pointer"
|
|
393
|
+
[class.ms-open]="isMultiDropdownOpen"
|
|
394
|
+
(click)="toggleMultiDropdown($event)">
|
|
395
|
+
<span *ngIf="multiSelectedCount > 0" class="multi-select-value fs-0-9rem">
|
|
396
|
+
{{ multiSelectedCount }} selected
|
|
397
|
+
</span>
|
|
398
|
+
<span *ngIf="multiSelectedCount === 0" class="multi-select-placeholder">
|
|
399
|
+
{{ config.placeholder || selectPlaceholderLabel }}
|
|
400
|
+
</span>
|
|
401
|
+
<mat-icon class="multi-select-arrow">
|
|
402
|
+
{{ isMultiDropdownOpen ? expandLessLabel : expandMoreLabel }}
|
|
403
|
+
</mat-icon>
|
|
404
|
+
</div>
|
|
405
|
+
|
|
406
|
+
<div class="multi-select-panel" *ngIf="isMultiDropdownOpen"
|
|
407
|
+
(click)="$event.stopPropagation()">
|
|
408
|
+
<label *ngFor="let option of localOptionList"
|
|
409
|
+
class="multi-select-option d-flex align-items-center gap-8 cursor-pointer">
|
|
410
|
+
<input type="checkbox"
|
|
411
|
+
[checked]="isChecked(option.code)"
|
|
412
|
+
[disabled]="!!config.disabled"
|
|
413
|
+
(change)="onCheckboxListChange(option.code, $any($event.target).checked)">
|
|
414
|
+
<span class="fs-0-875rem c-111827">{{ option.label }}</span>
|
|
415
|
+
</label>
|
|
416
|
+
<div *ngIf="!localOptionList?.length"
|
|
417
|
+
class="multi-select-empty fs-0-875rem c-6B7280">
|
|
418
|
+
{{ noOptionsAvailableLabel }}
|
|
419
|
+
</div>
|
|
420
|
+
</div>
|
|
421
|
+
</div>
|
|
422
|
+
|
|
423
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint && !errorMessage">{{ config.hint }}</span>
|
|
424
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
425
|
+
</div>
|
|
426
|
+
|
|
427
|
+
<!-- ══ Radio ═════════════════════════════════════════════════════════════ -->
|
|
428
|
+
<div *ngIf="isRadio" class="field-wrapper d-flex flex-column gap-6" [formGroup]="formGroup">
|
|
429
|
+
<label *ngIf="config.label" class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">
|
|
430
|
+
{{ config.label }}
|
|
431
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
432
|
+
</label>
|
|
433
|
+
|
|
434
|
+
<div class="radio-group" [class.is-invalid]="errorMessage"
|
|
435
|
+
[class]="config.optionConfig?.layout ? 'layout-' + config.optionConfig!.layout.toLowerCase() : ''">
|
|
436
|
+
<label *ngFor="let option of localOptionList" class="radio-label"
|
|
437
|
+
[class.card-item]="config.subType === 'CARD'"
|
|
438
|
+
[class.selected]="formGroup.get(config.name!)?.value === option.code"
|
|
439
|
+
[style.gridColumn]="config.optionConfig?.layout?.toUpperCase() === 'COLUMN' ? 'span ' + getOptionColSpan(option) : null">
|
|
440
|
+
<input type="radio" [formControlName]="config.name!" [value]="option.code">
|
|
441
|
+
<div class="option-content d-flex flex-column gap-4 flex-1 text-left">
|
|
442
|
+
<span class="label-text text-16 c-1F2937">{{ option.label }}</span>
|
|
443
|
+
<span class="option-hint text-13 color-gray" *ngIf="option.hint">{{ option.hint }}</span>
|
|
444
|
+
</div>
|
|
445
|
+
</label>
|
|
446
|
+
</div>
|
|
447
|
+
|
|
448
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint && !errorMessage">{{ config.hint }}</span>
|
|
449
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
450
|
+
</div>
|
|
451
|
+
|
|
452
|
+
<!-- ══ Checkbox ══════════════════════════════════════════════════════════ -->
|
|
453
|
+
<div *ngIf="isCheckbox" class="field-wrapper d-flex flex-column gap-6" [formGroup]="formGroup">
|
|
454
|
+
<label *ngIf="config.label && config.subType === 'LIST'"
|
|
455
|
+
class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">
|
|
456
|
+
{{ config.label }}
|
|
457
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
458
|
+
</label>
|
|
459
|
+
|
|
460
|
+
<div *ngIf="config.subType === 'BOOL'" class="checkbox-single">
|
|
461
|
+
<label class="checkbox-label d-flex align-items-center gap-8 cursor-pointer fs-0-875rem c-111827">
|
|
462
|
+
<input type="checkbox" [formControlName]="config.name!" [class.is-invalid]="errorMessage">
|
|
463
|
+
<span>{{ config.label }}</span>
|
|
464
|
+
</label>
|
|
465
|
+
</div>
|
|
466
|
+
|
|
467
|
+
<div *ngIf="config.subType === 'LIST' || config.subType === 'CARD'" class="checkbox-group d-flex flex-column gap-8"
|
|
468
|
+
[class.is-invalid]="errorMessage"
|
|
469
|
+
[class]="config.optionConfig?.layout ? 'layout-' + config.optionConfig!.layout.toLowerCase() : ''">
|
|
470
|
+
<label *ngFor="let option of localOptionList"
|
|
471
|
+
class="checkbox-label d-flex align-items-center gap-8 cursor-pointer fs-0-875rem c-111827"
|
|
472
|
+
[class.card-item]="config.subType === 'CARD'" [class.selected]="isChecked(option.code)"
|
|
473
|
+
[style.gridColumn]="config.optionConfig?.layout?.toUpperCase() === 'COLUMN' ? 'span ' + getOptionColSpan(option) : null">
|
|
474
|
+
<input type="checkbox" [checked]="isChecked(option.code)" [disabled]="!!config.disabled"
|
|
475
|
+
(change)="onCheckboxListChange(option.code, $any($event.target).checked)">
|
|
476
|
+
<div class="option-content d-flex flex-column gap-4 flex-1 text-left">
|
|
477
|
+
<span class="label-text text-16 c-1F2937">{{ option.label }}</span>
|
|
478
|
+
<span class="option-hint text-13 color-gray" *ngIf="option.hint">{{ option.hint }}</span>
|
|
479
|
+
</div>
|
|
480
|
+
</label>
|
|
481
|
+
</div>
|
|
482
|
+
|
|
483
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint && !errorMessage">{{ config.hint }}</span>
|
|
484
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
485
|
+
</div>
|
|
486
|
+
|
|
487
|
+
<!-- ══ Chip ══════════════════════════════════════════════════════════════ -->
|
|
488
|
+
<div *ngIf="isChip" class="field-wrapper d-flex flex-column gap-6" [formGroup]="formGroup">
|
|
489
|
+
<label *ngIf="config.label" class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">
|
|
490
|
+
{{ config.label }}
|
|
491
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
492
|
+
</label>
|
|
493
|
+
|
|
494
|
+
<div class="chip-group d-flex flex-wrap gap-8" [class.is-invalid]="errorMessage">
|
|
495
|
+
<label *ngFor="let option of localOptionList"
|
|
496
|
+
class="chip-label cursor-pointer p-6px-14px b-ffffff c-374151 b-1px-solid-D1D5DB br-20px fs-0-875rem"
|
|
497
|
+
[class.selected]="isChecked(option.code)">
|
|
498
|
+
<input type="checkbox" [checked]="isChecked(option.code)" [disabled]="!!config.disabled"
|
|
499
|
+
(change)="onCheckboxListChange(option.code, $any($event.target).checked)" hidden>
|
|
500
|
+
<span>{{ option.label }}</span>
|
|
501
|
+
</label>
|
|
502
|
+
</div>
|
|
503
|
+
|
|
504
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint && !errorMessage">{{ config.hint }}</span>
|
|
505
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
506
|
+
</div>
|
|
507
|
+
|
|
508
|
+
<!-- ══ Switch ════════════════════════════════════════════════════════════ -->
|
|
509
|
+
<div *ngIf="isSwitch" class="field-wrapper d-flex flex-column gap-6" [formGroup]="formGroup">
|
|
510
|
+
<label class="switch-container d-flex justify-content-between align-items-center cursor-pointer">
|
|
511
|
+
<span class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">{{ config.label }}</span>
|
|
512
|
+
<div class="switch position-relative">
|
|
513
|
+
<input type="checkbox" [formControlName]="config.name!" [class.is-invalid]="errorMessage">
|
|
514
|
+
<span class="slider position-absolute cursor-pointer"></span>
|
|
515
|
+
</div>
|
|
516
|
+
</label>
|
|
517
|
+
|
|
518
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint && !errorMessage">{{ config.hint }}</span>
|
|
519
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
520
|
+
</div>
|
|
521
|
+
|
|
522
|
+
<!-- ══ Rich Text ═════════════════════════════════════════════════════════ -->
|
|
523
|
+
<div *ngIf="isRichText" class="field-wrapper component-rich-text d-flex flex-column gap-6" [formGroup]="formGroup">
|
|
524
|
+
<label *ngIf="config.label" class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">
|
|
525
|
+
{{ config.label }}
|
|
526
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
527
|
+
</label>
|
|
528
|
+
|
|
529
|
+
<div class="rich-text-container" [class.is-invalid]="errorMessage">
|
|
530
|
+
<quill-editor [formControlName]="config.name!" class="rich-text-editor d-block w-100"
|
|
531
|
+
[placeholder]="config.richTextConfig?.placeholder || config.placeholder || ''"
|
|
532
|
+
[styles]="{height: config.richTextConfig?.height || '200px'}">
|
|
533
|
+
</quill-editor>
|
|
534
|
+
</div>
|
|
535
|
+
|
|
536
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint && !errorMessage">{{ config.hint }}</span>
|
|
537
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
538
|
+
<div class="char-count-hint font-poppins font-weight-400 text-14 text-right c-6B7280" *ngIf="showCharCount">
|
|
539
|
+
{{ remainingCharacters }} characters remaining
|
|
540
|
+
</div>
|
|
541
|
+
</div>
|
|
542
|
+
|
|
543
|
+
<!-- ══ Rating ════════════════════════════════════════════════════════════ -->
|
|
544
|
+
<div *ngIf="isRating" class="field-wrapper d-flex flex-column gap-6" [formGroup]="formGroup">
|
|
545
|
+
<label *ngIf="config.label" class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">
|
|
546
|
+
{{ config.label }}
|
|
547
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
548
|
+
</label>
|
|
549
|
+
|
|
550
|
+
<div class="rating-group d-flex gap-4" [class.is-invalid]="errorMessage">
|
|
551
|
+
<span *ngFor="let star of getStarArray()" class="star d-inline-flex align-items-center cursor-pointer"
|
|
552
|
+
[class.filled]="isStarFilled(star)" [class.half]="isStarHalf(star)" (click)="onRatingChange(star, $event)">
|
|
553
|
+
<mat-icon>{{ isStarFilled(star) || isStarHalf(star) ? 'star' : 'star_border' }}</mat-icon>
|
|
554
|
+
</span>
|
|
555
|
+
</div>
|
|
556
|
+
|
|
557
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint && !errorMessage">{{ config.hint }}</span>
|
|
558
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
559
|
+
</div>
|
|
560
|
+
|
|
561
|
+
<!-- ══ Generated Field (read-only) ══════════════════════════════════════ -->
|
|
562
|
+
<div *ngIf="isGenerated" class="field-wrapper d-flex flex-column gap-6">
|
|
563
|
+
<label *ngIf="config.label" class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">{{ config.label
|
|
564
|
+
}}</label>
|
|
565
|
+
<div class="generated-value fs-0-875rem p-0-625rem-0-875rem b-F3F4F6 b-1px-solid-E5E7EB br-8px c-6B7280">{{ value ||
|
|
566
|
+
'-' }}</div>
|
|
567
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint">{{ config.hint }}</span>
|
|
568
|
+
</div>
|
|
569
|
+
|
|
570
|
+
<!-- ══ File Upload ═══════════════════════════════════════════════════════ -->
|
|
571
|
+
<div *ngIf="isFileUpload" class="field-wrapper d-flex flex-column gap-6" [formGroup]="formGroup">
|
|
572
|
+
<label *ngIf="config.label" class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">
|
|
573
|
+
{{ config.label }}
|
|
574
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
575
|
+
</label>
|
|
576
|
+
|
|
577
|
+
<!-- Drop Zone -->
|
|
578
|
+
<div
|
|
579
|
+
class="upload-drop-zone d-flex flex-column align-items-center justify-content-center gap-8 cursor-pointer text-center p-32px-24px us-none"
|
|
580
|
+
[class.drag-over]="isDragOver" [class.has-files]="value?.length" [class.is-invalid]="errorMessage"
|
|
581
|
+
(dragover)="onDragOver($event)" (dragleave)="onDragLeave($event)" (drop)="onFileDrop($event)"
|
|
582
|
+
(click)="fileInput.click()">
|
|
583
|
+
|
|
584
|
+
<!-- Icon with accent-colour pill background -->
|
|
585
|
+
<div class="upload-icon-wrap mb-4">
|
|
586
|
+
<div class="dropzone-icon-pill d-flex align-items-center justify-content-center">
|
|
587
|
+
<mat-icon class="upload-cloud-icon">cloud_upload</mat-icon>
|
|
588
|
+
</div>
|
|
589
|
+
</div>
|
|
590
|
+
|
|
591
|
+
<p class="upload-main-text font-weight-600 m-0 fs-0-9rem">Drag & drop files here</p>
|
|
592
|
+
<p class="upload-sub-text m-0 fs-0-8rem c-64748B">or <span class="upload-link">Browse files</span></p>
|
|
593
|
+
<p class="upload-hint-text m-0 fs-0-78rem c-64748B" *ngIf="config.attachmentConfig?.acceptLabel">
|
|
594
|
+
Supported: <span class="upload-formats font-weight-500">{{ config.attachmentConfig!.acceptLabel }}</span>
|
|
595
|
+
</p>
|
|
596
|
+
<p class="upload-hint-text m-0 fs-0-78rem c-64748B" *ngIf="!config.attachmentConfig?.acceptLabel && config.hint">
|
|
597
|
+
{{ config.hint }}
|
|
598
|
+
</p>
|
|
599
|
+
<span class="upload-size-badge fs-0-72rem" *ngIf="config.attachmentConfig?.maxSizeMB">
|
|
600
|
+
Max {{ config.attachmentConfig!.maxSizeMB }}MB
|
|
601
|
+
</span>
|
|
602
|
+
|
|
603
|
+
<!-- Hidden native file input -->
|
|
604
|
+
<input #fileInput type="file" hidden [attr.multiple]="config.attachmentConfig?.multiple ? true : null"
|
|
605
|
+
[attr.accept]="config.attachmentConfig?.accept || null" (change)="onFileSelected($event)">
|
|
606
|
+
</div>
|
|
607
|
+
|
|
608
|
+
<!-- Uploaded file list -->
|
|
609
|
+
<div class="uploaded-list d-flex flex-column gap-8 mt-10" *ngIf="value?.length">
|
|
610
|
+
<div *ngFor="let f of value; let i = index"
|
|
611
|
+
class="uploaded-item d-flex align-items-center gap-10 p-10px-14px br-8px"
|
|
612
|
+
[class.uploading]="f.isUploading">
|
|
613
|
+
|
|
614
|
+
<!-- Uploading spinner -->
|
|
615
|
+
<ng-container *ngIf="f.isUploading; else fileReady">
|
|
616
|
+
<div class="upload-spinner rounded-50 b-2px-solid-E2E8F0"></div>
|
|
617
|
+
<div class="file-info flex-1 d-flex flex-column">
|
|
618
|
+
<span class="file-name font-weight-500 overflow-hidden fs-0-85rem" [title]="f.name">{{ f.name }}</span>
|
|
619
|
+
<span class="file-size uploading-label fs-0-72rem">Uploading...</span>
|
|
620
|
+
</div>
|
|
621
|
+
</ng-container>
|
|
622
|
+
|
|
623
|
+
<!-- Normal state once upload is done -->
|
|
624
|
+
<ng-template #fileReady>
|
|
625
|
+
<mat-icon class="file-type-icon">{{ getFileIcon(f.type) }}</mat-icon>
|
|
626
|
+
<img *ngIf="f.type?.startsWith('image') && f.dataUrl" [src]="f.dataUrl" class="file-thumb rounded-4"
|
|
627
|
+
alt="preview">
|
|
628
|
+
<div class="file-info flex-1 d-flex flex-column">
|
|
629
|
+
<span class="file-name font-weight-500 overflow-hidden fs-0-85rem" [title]="f.name">{{ f.name }}</span>
|
|
630
|
+
<span class="file-size fs-0-72rem">{{ formatFileSize(f.size) }}</span>
|
|
631
|
+
</div>
|
|
632
|
+
</ng-template>
|
|
633
|
+
|
|
634
|
+
<!-- Compact icon-only remove button -->
|
|
635
|
+
<button type="button" class="file-remove-btn d-flex align-items-center justify-content-center rounded-50"
|
|
636
|
+
[disabled]="f.isUploading" (click)="!f.isUploading && removeUploadedFile(i)"
|
|
637
|
+
aria-label="Remove file">
|
|
638
|
+
<mat-icon>close</mat-icon>
|
|
639
|
+
</button>
|
|
640
|
+
</div>
|
|
641
|
+
</div>
|
|
642
|
+
|
|
643
|
+
<!-- Validation / file errors -->
|
|
644
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="fileUploadError">{{ fileUploadError }}</span>
|
|
645
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage && !fileUploadError">{{ errorMessage }}</span>
|
|
646
|
+
<span class="field-hint c-6B7280 fs-0-75rem"
|
|
647
|
+
*ngIf="config.hint && !errorMessage && !fileUploadError && !config.attachmentConfig?.acceptLabel">
|
|
648
|
+
{{ config.hint }}
|
|
649
|
+
</span>
|
|
650
|
+
</div>
|
|
651
|
+
|
|
652
|
+
<!-- ══ Media Upload (Type 2) ════════════════════════════════════════════ -->
|
|
653
|
+
<div *ngIf="isMediaUpload" class="field-wrapper media-upload-wrapper d-flex flex-column gap-6 p-0 border-none b-none"
|
|
654
|
+
[formGroup]="formGroup">
|
|
655
|
+
|
|
656
|
+
<!-- Hidden file input lives outside *ngIf — triggered via ViewChild -->
|
|
657
|
+
<input #mediaDeviceInput type="file" hidden multiple accept="image/*" (change)="onMediaFileSelected($event)">
|
|
658
|
+
|
|
659
|
+
<!-- Two-column layout -->
|
|
660
|
+
<div class="mu-layout d-grid align-items-start">
|
|
661
|
+
|
|
662
|
+
<!-- ── LEFT PANEL ──────────────────────────────────────────────── -->
|
|
663
|
+
<div class="mu-left d-flex flex-column gap-20">
|
|
664
|
+
|
|
665
|
+
<!-- Header: title + max-items badge -->
|
|
666
|
+
<div class="mu-header d-flex align-items-start flex-wrap gap-10">
|
|
667
|
+
<h3 class="mu-title m-0 c-111827 fs-1-35rem">
|
|
668
|
+
{{ config.label }}
|
|
669
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
670
|
+
</h3>
|
|
671
|
+
<span
|
|
672
|
+
class="mu-badge d-inline-flex align-items-center rounded-20 color-white font-weight-600 fs-0-72rem p-4px-12px b-111827"
|
|
673
|
+
*ngIf="config.attachmentConfig?.maxFiles">
|
|
674
|
+
{{ controller.labels['LBL_MEDIA_MAX_PREFIX'] || 'Maximum' }}
|
|
675
|
+
{{ config.attachmentConfig?.maxFiles }}
|
|
676
|
+
{{ controller.labels['LBL_MEDIA_MAX_SUFFIX'] || 'Image & Videos' }}
|
|
677
|
+
</span>
|
|
678
|
+
</div>
|
|
679
|
+
|
|
680
|
+
<!-- Description -->
|
|
681
|
+
<p class="mu-description m-0 fs-0-875rem c-6B7280" *ngIf="config.attachmentConfig?.description">
|
|
682
|
+
{{ config.attachmentConfig?.description }}
|
|
683
|
+
</p>
|
|
684
|
+
<p class="mu-description m-0 fs-0-875rem c-6B7280"
|
|
685
|
+
*ngIf="!config.attachmentConfig?.description && controller.labels['LBL_MEDIA_DESC']">
|
|
686
|
+
{{ controller.labels['LBL_MEDIA_DESC'] }}
|
|
687
|
+
</p>
|
|
688
|
+
|
|
689
|
+
<!-- Feature bullet list -->
|
|
690
|
+
<ul class="mu-features m-0 p-0 d-flex flex-column gap-8 ls-none"
|
|
691
|
+
*ngIf="config.attachmentConfig?.features?.length || controller.labels['LBL_MEDIA_FEATURE_1']">
|
|
692
|
+
<ng-container *ngIf="config.attachmentConfig?.features?.length">
|
|
693
|
+
<li *ngFor="let f of config.attachmentConfig?.features"
|
|
694
|
+
class="mu-feature-item d-flex align-items-center gap-8 fs-0-875rem c-374151">
|
|
695
|
+
<mat-icon class="mu-check text-16 c-3B82F6">check</mat-icon>{{ f }}
|
|
696
|
+
</li>
|
|
697
|
+
</ng-container>
|
|
698
|
+
<ng-container *ngIf="!config.attachmentConfig?.features?.length">
|
|
699
|
+
<li *ngIf="controller.labels['LBL_MEDIA_FEATURE_1']"
|
|
700
|
+
class="mu-feature-item d-flex align-items-center gap-8 fs-0-875rem c-374151">
|
|
701
|
+
<mat-icon class="mu-check text-16 c-3B82F6">check</mat-icon>{{ controller.labels['LBL_MEDIA_FEATURE_1'] }}
|
|
702
|
+
</li>
|
|
703
|
+
<li *ngIf="controller.labels['LBL_MEDIA_FEATURE_2']"
|
|
704
|
+
class="mu-feature-item d-flex align-items-center gap-8 fs-0-875rem c-374151">
|
|
705
|
+
<mat-icon class="mu-check text-16 c-3B82F6">check</mat-icon>{{ controller.labels['LBL_MEDIA_FEATURE_2'] }}
|
|
706
|
+
</li>
|
|
707
|
+
<li *ngIf="controller.labels['LBL_MEDIA_FEATURE_3']"
|
|
708
|
+
class="mu-feature-item d-flex align-items-center gap-8 fs-0-875rem c-374151">
|
|
709
|
+
<mat-icon class="mu-check text-16 c-3B82F6">check</mat-icon>{{ controller.labels['LBL_MEDIA_FEATURE_3'] }}
|
|
710
|
+
</li>
|
|
711
|
+
</ng-container>
|
|
712
|
+
</ul>
|
|
713
|
+
|
|
714
|
+
<!-- Backdrop to close dropdown on outside click -->
|
|
715
|
+
<div class="media-menu-backdrop" *ngIf="showMediaMenu"
|
|
716
|
+
(click)="$event.stopPropagation(); showMediaMenu = false"></div>
|
|
717
|
+
|
|
718
|
+
<!-- Add Media button + dropdown -->
|
|
719
|
+
<div class="media-add-container position-relative" (click)="showMediaMenu = !showMediaMenu">
|
|
720
|
+
<lib-button id="btn-add-media-{{ config.name }}" [variant]="'warning'"
|
|
721
|
+
[icon]="{type: 'material', value: 'add_photo_alternate'}">
|
|
722
|
+
{{ controller.labels['LBL_ADD_MEDIA'] || 'Add media' }}
|
|
723
|
+
<mat-icon class="menu-chevron fs-18px">add</mat-icon>
|
|
724
|
+
</lib-button>
|
|
725
|
+
|
|
726
|
+
<div class="media-dropdown position-absolute rounded-12 overflow-hidden b-ffffff b-1px-solid-E5E7EB"
|
|
727
|
+
*ngIf="showMediaMenu" role="menu" (click)="$event.stopPropagation()">
|
|
728
|
+
<!-- Video -->
|
|
729
|
+
<button id="btn-media-video-{{ config.name }}" type="button"
|
|
730
|
+
class="media-dropdown-item d-flex align-items-center gap-12 w-100 cursor-pointer text-left b-none border-none p-12px-16px bb-1px-solid-F3F4F6"
|
|
731
|
+
(click)="onMediaMenuVideo(); showMediaMenu = false" role="menuitem">
|
|
732
|
+
<span
|
|
733
|
+
class="media-drop-icon media-drop-icon--video d-flex align-items-center justify-content-center rounded-8"><mat-icon>videocam</mat-icon></span>
|
|
734
|
+
<span class="media-drop-text d-flex flex-column flex-1">
|
|
735
|
+
<span class="media-drop-label font-weight-600 fs-0-875rem c-111827">{{
|
|
736
|
+
controller.labels['LBL_MEDIA_VIDEO'] || 'Video' }}</span>
|
|
737
|
+
<span class="media-drop-desc c-6B7280 fs-0-75rem">{{ controller.labels['LBL_MEDIA_VIDEO_DESC'] || 'Add
|
|
738
|
+
YouTube URL'
|
|
739
|
+
}}</span>
|
|
740
|
+
</span>
|
|
741
|
+
</button>
|
|
742
|
+
<!-- Device -->
|
|
743
|
+
<button id="btn-media-device-{{ config.name }}" type="button"
|
|
744
|
+
class="media-dropdown-item d-flex align-items-center gap-12 w-100 cursor-pointer text-left b-none border-none p-12px-16px bb-1px-solid-F3F4F6"
|
|
745
|
+
(click)="onMediaMenuDevice(); showMediaMenu = false" role="menuitem">
|
|
746
|
+
<span
|
|
747
|
+
class="media-drop-icon media-drop-icon--device d-flex align-items-center justify-content-center rounded-8"><mat-icon>upload</mat-icon></span>
|
|
748
|
+
<span class="media-drop-text d-flex flex-column flex-1">
|
|
749
|
+
<span class="media-drop-label font-weight-600 fs-0-875rem c-111827">{{
|
|
750
|
+
controller.labels['LBL_MEDIA_DEVICE'] || 'Upload from device'
|
|
751
|
+
}}</span>
|
|
752
|
+
<span class="media-drop-desc c-6B7280 fs-0-75rem">{{ controller.labels['LBL_MEDIA_DEVICE_DESC'] ||
|
|
753
|
+
'Select images from your
|
|
754
|
+
computer' }}</span>
|
|
755
|
+
</span>
|
|
756
|
+
</button>
|
|
757
|
+
<!-- Library -->
|
|
758
|
+
<button id="btn-media-library-{{ config.name }}" type="button"
|
|
759
|
+
class="media-dropdown-item d-flex align-items-center gap-12 w-100 cursor-pointer text-left b-none border-none p-12px-16px bb-1px-solid-F3F4F6"
|
|
760
|
+
(click)="onMediaMenuLibrary(); showMediaMenu = false" role="menuitem">
|
|
761
|
+
<span
|
|
762
|
+
class="media-drop-icon media-drop-icon--library d-flex align-items-center justify-content-center rounded-8"><mat-icon>photo_library</mat-icon></span>
|
|
763
|
+
<span class="media-drop-text d-flex flex-column flex-1">
|
|
764
|
+
<span class="media-drop-label font-weight-600 fs-0-875rem c-111827">{{
|
|
765
|
+
controller.labels['LBL_MEDIA_LIBRARY'] || 'Upload from library'
|
|
766
|
+
}}</span>
|
|
767
|
+
<span class="media-drop-desc c-6B7280 fs-0-75rem">{{ controller.labels['LBL_MEDIA_LIBRARY_DESC'] ||
|
|
768
|
+
'Choose from default
|
|
769
|
+
images' }}</span>
|
|
770
|
+
</span>
|
|
771
|
+
</button>
|
|
772
|
+
</div>
|
|
773
|
+
</div>
|
|
774
|
+
|
|
775
|
+
<!-- YouTube URL Input (inline below button) -->
|
|
776
|
+
<div class="youtube-input-panel d-flex flex-column gap-8 p-16 rounded-10 b-FFFAF1 b-1px-solid-E5E7EB"
|
|
777
|
+
*ngIf="showYoutubeInput">
|
|
778
|
+
<label class="youtube-panel-label d-flex align-items-center gap-6 font-weight-600 fs-0-875rem c-111827">
|
|
779
|
+
{{ controller.labels['LBL_YOUTUBE_URL'] || 'Video URL' }}
|
|
780
|
+
</label>
|
|
781
|
+
<div class="youtube-input-row d-flex gap-8">
|
|
782
|
+
<input id="input-youtube-url-{{ config.name }}" type="url" class="field-input youtube-url-input"
|
|
783
|
+
[(ngModel)]="youtubeUrlInput" [ngModelOptions]="{standalone: true}"
|
|
784
|
+
[placeholder]="controller.labels['PH_YOUTUBE_URL'] || 'Video URL'" (keyup.enter)="addYoutubeMedia()">
|
|
785
|
+
<lib-button id="btn-add-youtube-{{ config.name }}" [variant]="'secondary'" (click)="addYoutubeMedia()">
|
|
786
|
+
{{ controller.labels['LBL_ADD'] || 'Add' }}
|
|
787
|
+
</lib-button>
|
|
788
|
+
</div>
|
|
789
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="youtubeUrlError">{{ youtubeUrlError }}</span>
|
|
790
|
+
</div>
|
|
791
|
+
|
|
792
|
+
<div
|
|
793
|
+
class="media-upload-status d-flex align-items-center gap-8 mt-4 color-error rounded-8 font-weight-500 p-10px-14px b-FEF2F2 fs-0-85rem"
|
|
794
|
+
*ngIf="mediaUploadError">
|
|
795
|
+
<mat-icon class="status-icon fs-18px">error_outline</mat-icon>
|
|
796
|
+
<span>{{ mediaUploadError }}</span>
|
|
797
|
+
</div>
|
|
798
|
+
|
|
799
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
800
|
+
<span class="field-hint c-6B7280 fs-0-75rem" *ngIf="config.hint && !errorMessage">{{ config.hint }}</span>
|
|
801
|
+
</div>
|
|
802
|
+
<!-- end left panel -->
|
|
803
|
+
|
|
804
|
+
<!-- ── RIGHT PANEL (carousel) ──────────────────────────────────── -->
|
|
805
|
+
<div class="mu-right d-flex flex-column gap-12">
|
|
806
|
+
|
|
807
|
+
<!-- Carousel (when items exist) -->
|
|
808
|
+
<div class="media-carousel-section d-flex flex-column gap-12" *ngIf="mediaItems.length">
|
|
809
|
+
<div
|
|
810
|
+
class="media-carousel-main position-relative w-100 overflow-hidden d-flex align-items-center justify-content-center br-12px b-0F172A">
|
|
811
|
+
<button id="btn-carousel-prev-{{ config.name }}" type="button"
|
|
812
|
+
class="carousel-nav carousel-nav--prev position-absolute rounded-50 cursor-pointer d-flex align-items-center justify-content-center border-none b-rgba-255-255-255-0-85"
|
|
813
|
+
(click)="mediaCarouselPrev()" [disabled]="mediaCarouselIndex === 0" aria-label="Previous">
|
|
814
|
+
<mat-icon>chevron_left</mat-icon>
|
|
815
|
+
</button>
|
|
816
|
+
|
|
817
|
+
<div class="carousel-viewer position-absolute d-flex align-items-center justify-content-center"
|
|
818
|
+
*ngFor="let item of mediaItems; let i = index" [hidden]="i !== mediaCarouselIndex">
|
|
819
|
+
<div *ngIf="item.isUploading"
|
|
820
|
+
class="carousel-uploading d-flex flex-column align-items-center gap-12 c-94A3B8 fs-0-85rem">
|
|
821
|
+
<div class="carousel-spinner rounded-50 b-3px-solid-rgba-255-255-255-0-15"></div>
|
|
822
|
+
<span>{{ controller.labels['LBL_UPLOADING'] || 'Uploading…' }}</span>
|
|
823
|
+
</div>
|
|
824
|
+
<ng-container *ngIf="!item.isUploading && item.mediaType === 'youtube'">
|
|
825
|
+
<iframe class="carousel-iframe w-100 h-100 br-12px" [src]="item.url | trustedUrl" frameborder="0"
|
|
826
|
+
allowfullscreen
|
|
827
|
+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture">
|
|
828
|
+
</iframe>
|
|
829
|
+
</ng-container>
|
|
830
|
+
<ng-container *ngIf="!item.isUploading && item.mediaType === 'image'">
|
|
831
|
+
<img class="carousel-image w-100 h-100 br-12px" [src]="item.url" alt="Media">
|
|
832
|
+
</ng-container>
|
|
833
|
+
<button id="btn-remove-media-{{ config.name }}-{{ i }}" type="button"
|
|
834
|
+
class="carousel-remove-btn position-absolute rounded-50 cursor-pointer d-flex align-items-center justify-content-center border-none b-rgba-0-0-0-0-55"
|
|
835
|
+
[disabled]="item.isUploading" (click)="removeMediaItem(i)" aria-label="Remove">
|
|
836
|
+
<mat-icon>close</mat-icon>
|
|
837
|
+
</button>
|
|
838
|
+
</div>
|
|
839
|
+
|
|
840
|
+
<button id="btn-carousel-next-{{ config.name }}" type="button"
|
|
841
|
+
class="carousel-nav carousel-nav--next position-absolute rounded-50 cursor-pointer d-flex align-items-center justify-content-center border-none b-rgba-255-255-255-0-85"
|
|
842
|
+
(click)="mediaCarouselNext()" [disabled]="mediaCarouselIndex === mediaItems.length - 1" aria-label="Next">
|
|
843
|
+
<mat-icon>chevron_right</mat-icon>
|
|
844
|
+
</button>
|
|
845
|
+
|
|
846
|
+
<div class="carousel-dots position-absolute d-flex gap-6">
|
|
847
|
+
<span *ngFor="let item of mediaItems; let i = index"
|
|
848
|
+
class="carousel-dot rounded-50 cursor-pointer b-rgba-255-255-255-0-45"
|
|
849
|
+
[class.active]="i === mediaCarouselIndex" (click)="mediaGoTo(i)"></span>
|
|
850
|
+
</div>
|
|
851
|
+
</div>
|
|
852
|
+
|
|
853
|
+
<!-- Thumbnail strip -->
|
|
854
|
+
<div class="media-thumbnail-strip d-flex flex-wrap gap-8 pb-4px">
|
|
855
|
+
<div *ngFor="let item of mediaThumbnails; let i = index"
|
|
856
|
+
class="media-thumb rounded-8 overflow-hidden cursor-pointer d-flex align-items-center justify-content-center b-2px-solid-transparent b-E2E8F0"
|
|
857
|
+
[class.active]="i === mediaCarouselIndex" (click)="mediaGoTo(i)">
|
|
858
|
+
<div *ngIf="item.isUploading"
|
|
859
|
+
class="thumb-uploading d-flex align-items-center justify-content-center w-100 h-100">
|
|
860
|
+
<div class="thumb-spinner rounded-50 b-2px-solid-E2E8F0"></div>
|
|
861
|
+
</div>
|
|
862
|
+
<img *ngIf="!item.isUploading && item.mediaType === 'youtube' && item.thumbnailUrl"
|
|
863
|
+
[src]="item.thumbnailUrl" class="thumb-img w-100 h-100" alt="Video thumbnail">
|
|
864
|
+
<div *ngIf="!item.isUploading && item.mediaType === 'youtube' && !item.thumbnailUrl"
|
|
865
|
+
class="thumb-yt-placeholder d-flex align-items-center justify-content-center w-100 h-100 b-1E293B c-EF4444">
|
|
866
|
+
<mat-icon>play_circle</mat-icon>
|
|
867
|
+
</div>
|
|
868
|
+
<img *ngIf="!item.isUploading && item.mediaType === 'image' && item.url" [src]="item.url"
|
|
869
|
+
class="thumb-img w-100 h-100" alt="Image thumbnail">
|
|
870
|
+
</div>
|
|
871
|
+
</div>
|
|
872
|
+
</div>
|
|
873
|
+
|
|
874
|
+
<!-- Empty right-side placeholder -->
|
|
875
|
+
<div
|
|
876
|
+
class="mu-right-empty d-flex flex-column align-items-center justify-content-center gap-10 h-100 text-center p-24 br-12px b-FFFAF1 c-94A3B8 b-2px-dashed-CBD5E1"
|
|
877
|
+
*ngIf="!mediaItems.length" (click)="onMediaMenuDevice()">
|
|
878
|
+
<mat-icon class="mu-right-empty-icon fs-52px">perm_media</mat-icon>
|
|
879
|
+
<p>{{ controller.labels['LBL_ADD_MEDIA'] || 'Add media' }}</p>
|
|
880
|
+
</div>
|
|
881
|
+
|
|
882
|
+
</div>
|
|
883
|
+
<!-- end right panel -->
|
|
884
|
+
|
|
885
|
+
</div><!-- end mu-layout -->
|
|
886
|
+
</div>
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
<!-- ══ Library Image Picker Modal ════════════════════════════════════════ -->
|
|
890
|
+
<!-- Wrapper is always in DOM (hidden) so @ViewChild can move it to body -->
|
|
891
|
+
<div #libraryModal class="media-library-portal-host" [class.is-open]="showLibraryModal">
|
|
892
|
+
|
|
893
|
+
<!-- Backdrop -->
|
|
894
|
+
<div class="media-library-overlay" (click)="closeLibraryModal()"></div>
|
|
895
|
+
|
|
896
|
+
<!-- Modal card -->
|
|
897
|
+
<div class="media-library-modal d-flex flex-column overflow-hidden b-ffffff br-16px"
|
|
898
|
+
role="dialog" aria-modal="true">
|
|
899
|
+
<div class="library-modal-header d-flex align-items-start justify-content-between p-24px-28px bb-1px-solid-E5E7EB">
|
|
900
|
+
<div class="header-left d-flex flex-column gap-8">
|
|
901
|
+
<h3 class="library-modal-title m-0 color-dark fs-1-25rem">
|
|
902
|
+
{{ controller.labels['LBL_ADD_IMAGES'] || 'Add Images' }}
|
|
903
|
+
</h3>
|
|
904
|
+
<p class="library-modal-subtitle m-0 color-gray fs-0-85rem">
|
|
905
|
+
{{ controller.labels['LBL_LIBRARY_MODAL_DESC'] || 'Select images from your library.' }}
|
|
906
|
+
</p>
|
|
907
|
+
</div>
|
|
908
|
+
<button id="btn-close-library-{{ config.name }}" type="button"
|
|
909
|
+
class="library-close-btn d-flex align-items-center justify-content-center cursor-pointer rounded-50 border-none b-none c-9CA3AF"
|
|
910
|
+
(click)="closeLibraryModal()" aria-label="Close">
|
|
911
|
+
<mat-icon>close</mat-icon>
|
|
912
|
+
</button>
|
|
913
|
+
</div>
|
|
914
|
+
|
|
915
|
+
<!-- Loading -->
|
|
916
|
+
<div class="library-loading" *ngIf="libraryLoading">
|
|
917
|
+
<div class="lib-spinner rounded-50 b-3px-solid-E2E8F0"></div>
|
|
918
|
+
<span>{{ controller.labels['LBL_LOADING'] || 'Loading…' }}</span>
|
|
919
|
+
</div>
|
|
920
|
+
|
|
921
|
+
<!-- Error -->
|
|
922
|
+
<div class="library-error d-flex align-items-center gap-8 color-error b-FEF2F2 fs-0-875rem p-16px-24px"
|
|
923
|
+
*ngIf="libraryError && !libraryLoading">
|
|
924
|
+
<mat-icon>error_outline</mat-icon>
|
|
925
|
+
{{ libraryError }}
|
|
926
|
+
</div>
|
|
927
|
+
|
|
928
|
+
<!-- Image grid -->
|
|
929
|
+
<div class="library-grid d-grid gap-16 flex-1 p-28px b-F9FAFB" *ngIf="!libraryLoading && libraryImages.length">
|
|
930
|
+
<div *ngFor="let img of libraryImages; let li = index" id="lib-img-{{ config.name }}-{{ li }}"
|
|
931
|
+
class="library-grid-item position-relative rounded-12 overflow-hidden cursor-pointer bg-white b-3px-solid-transparent"
|
|
932
|
+
[class.selected]="isLibraryItemSelected(img)" (click)="toggleLibraryItem(img)">
|
|
933
|
+
<img [src]="getLibraryItemUrl(img)" class="library-grid-img w-100 h-100 d-block" alt="Library image">
|
|
934
|
+
<div
|
|
935
|
+
class="library-check position-absolute bg-white rounded-50 d-flex align-items-center justify-content-center c-3B82F6"
|
|
936
|
+
*ngIf="isLibraryItemSelected(img)">
|
|
937
|
+
<mat-icon>check_circle</mat-icon>
|
|
938
|
+
</div>
|
|
939
|
+
<div class="library-overlay-hover position-absolute b-rgba-59-130-246-0-12"></div>
|
|
940
|
+
</div>
|
|
941
|
+
</div>
|
|
942
|
+
|
|
943
|
+
<!-- Empty library -->
|
|
944
|
+
<div
|
|
945
|
+
class="library-empty d-flex flex-column align-items-center justify-content-center gap-12 flex-1 c-9CA3AF fs-0-875rem p-48px-24px"
|
|
946
|
+
*ngIf="!libraryLoading && !libraryError && libraryImages.length === 0">
|
|
947
|
+
<mat-icon>image_not_supported</mat-icon>
|
|
948
|
+
<span>{{ controller.labels['LBL_LIBRARY_EMPTY'] || 'No images found in library.' }}</span>
|
|
949
|
+
</div>
|
|
950
|
+
|
|
951
|
+
<!-- Footer -->
|
|
952
|
+
<div class="library-modal-footer d-flex align-items-center justify-content-end bg-white p-20px-28px bt-1px-solid-E5E7EB">
|
|
953
|
+
<div class="library-footer-actions d-flex gap-12">
|
|
954
|
+
<lib-button id="btn-library-cancel-{{ config.name }}" [variant]="'outline'" (click)="closeLibraryModal()">
|
|
955
|
+
{{ controller.labels['LBL_CANCEL'] || 'Cancel' }}
|
|
956
|
+
</lib-button>
|
|
957
|
+
<lib-button id="btn-library-confirm-{{ config.name }}" [variant]="'primary'"
|
|
958
|
+
[disabled]="librarySelectedIds.size === 0" (click)="confirmLibrarySelection()">
|
|
959
|
+
{{ controller.labels['LBL_CONTINUE'] || 'Continue' }}
|
|
960
|
+
</lib-button>
|
|
961
|
+
</div>
|
|
962
|
+
</div>
|
|
963
|
+
</div>
|
|
964
|
+
</div>
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
<!-- ══ Location Field ═══════════════════════════════════════════════════ -->
|
|
969
|
+
<div *ngIf="isLocation" class="field-wrapper location-field-wrapper d-flex flex-column gap-6 gap-12"
|
|
970
|
+
[formGroup]="formGroup">
|
|
971
|
+
|
|
972
|
+
<!-- Field label -->
|
|
973
|
+
<label *ngIf="config.label" class="field-label d-block font-poppins c-202124 fs-18px mb-0-5rem">
|
|
974
|
+
{{ config.label }}
|
|
975
|
+
<span class="required c-DC2626 ml-0-125rem" *ngIf="config.required">*</span>
|
|
976
|
+
</label>
|
|
977
|
+
<p class="location-subtitle m-0 c-6B7280 fs-0-8125rem" *ngIf="config.hint">{{ config.hint }}</p>
|
|
978
|
+
|
|
979
|
+
<!-- Three-tab bar -->
|
|
980
|
+
<div class="location-tabs d-flex gap-12 mb-24">
|
|
981
|
+
<lib-button class="loc-tab-btn flex-1" [variant]="locationActiveTab === 'VENUE' ? 'warning' : 'outline'"
|
|
982
|
+
(click)="onLocationTabChange('VENUE')">
|
|
983
|
+
{{ controller.labels['LBL_LOC_VENUE'] || 'Venue' }}
|
|
984
|
+
</lib-button>
|
|
985
|
+
<lib-button class="loc-tab-btn flex-1" [variant]="locationActiveTab === 'ONLINE' ? 'warning' : 'outline'"
|
|
986
|
+
(click)="onLocationTabChange('ONLINE')">
|
|
987
|
+
{{ controller.labels['LBL_LOC_ONLINE'] || 'Online Event' }}
|
|
988
|
+
</lib-button>
|
|
989
|
+
<lib-button class="loc-tab-btn flex-1" [variant]="locationActiveTab === 'TBA' ? 'warning' : 'outline'"
|
|
990
|
+
(click)="onLocationTabChange('TBA')">
|
|
991
|
+
{{ controller.labels['LBL_LOC_TBA'] || 'To be Announced' }}
|
|
992
|
+
</lib-button>
|
|
993
|
+
</div>
|
|
994
|
+
|
|
995
|
+
<!-- VENUE TAB -->
|
|
996
|
+
<div *ngIf="locationActiveTab === 'VENUE'" class="loc-panel loc-venue-panel d-flex flex-column gap-12">
|
|
997
|
+
|
|
998
|
+
<p class="loc-section-label m-0 font-weight-600 c-111827 fs-0-9rem">
|
|
999
|
+
{{ controller.labels['LBL_LOC_ADDRESS'] || 'Location address' }}
|
|
1000
|
+
</p>
|
|
1001
|
+
|
|
1002
|
+
<!-- Added venue rows -->
|
|
1003
|
+
<div class="loc-venue-list d-flex flex-column gap-8" *ngIf="locationVenues.length > 0">
|
|
1004
|
+
<div *ngFor="let venue of locationVenues; let i = index"
|
|
1005
|
+
class="loc-venue-item d-flex align-items-center gap-10 p-10px-14px br-7px b-ffffff b-1px-solid-D1D5DB">
|
|
1006
|
+
<mat-icon class="loc-venue-search-icon fs-18px c-9CA3AF">search</mat-icon>
|
|
1007
|
+
<span class="loc-venue-text flex-1 overflow-hidden fs-0-875rem c-111827">{{ venue.address || venue.name ||
|
|
1008
|
+
venue.description }}</span>
|
|
1009
|
+
<button type="button"
|
|
1010
|
+
class="loc-action-btn loc-delete-btn d-flex align-items-center justify-content-center cursor-pointer rounded-50 b-none border-none p-4px"
|
|
1011
|
+
(click)="removeLocationVenue(i)">
|
|
1012
|
+
<mat-icon>delete_outline</mat-icon>
|
|
1013
|
+
</button>
|
|
1014
|
+
</div>
|
|
1015
|
+
</div>
|
|
1016
|
+
|
|
1017
|
+
<!-- Location count badge -->
|
|
1018
|
+
<p class="loc-count-text m-0 font-weight-600 fs-0-8125rem c-3B82F6"
|
|
1019
|
+
*ngIf="locationVenues.length > 0 && config.locationConfig?.allowMulti">
|
|
1020
|
+
{{ locationVenues.length }} {{ controller.labels['LBL_LOC_COUNT_SUFFIX'] || 'Locations Added!' }}
|
|
1021
|
+
</p>
|
|
1022
|
+
|
|
1023
|
+
<!-- Search input (hide when max reached) -->
|
|
1024
|
+
<div class="loc-search-container position-relative" *ngIf="!locationMaxReached">
|
|
1025
|
+
<div class="loc-search-wrapper position-relative d-flex align-items-center mt-4">
|
|
1026
|
+
<mat-icon class="loc-search-icon position-absolute fs-1-1rem c-9CA3AF pe-none">search</mat-icon>
|
|
1027
|
+
<input
|
|
1028
|
+
class="field-input loc-search-input w-100 font-poppins flex-1 fs-0-875rem c-111827 br-7px br-8px bc-F3F4F6 pl-2-4rem bc-DC2626 pt-0-625rem pb-0-625rem pl-16px pr-16px bc-ffffff b-1px-solid-D1D5DB pr-3-5rem"
|
|
1029
|
+
[placeholder]="config.locationConfig?.venuePlaceholder || (controller.labels['PH_LOC_VENUE'] || 'Type to search venue...')"
|
|
1030
|
+
[value]="locationSearchText" (input)="handleLocationSearchInput($event)" (blur)="hideLocationSuggestions()"
|
|
1031
|
+
autocomplete="off" [class.is-invalid]="errorMessage">
|
|
1032
|
+
</div>
|
|
1033
|
+
<!-- Suggestions dropdown -->
|
|
1034
|
+
<div class="loc-suggestions-panel position-absolute overflow-hidden br-8px b-ffffff b-1px-solid-D1D5DB"
|
|
1035
|
+
*ngIf="locationShowSuggestions && locationSuggestions.length">
|
|
1036
|
+
<div *ngFor="let sug of locationSuggestions"
|
|
1037
|
+
class="loc-suggestion-item d-flex align-items-center gap-10 cursor-pointer p-10px-14px"
|
|
1038
|
+
(mousedown)="onLocationSuggestionSelect(sug)">
|
|
1039
|
+
<mat-icon class="loc-suggestion-icon fs-18px c-E53E3E">place</mat-icon>
|
|
1040
|
+
<span class="loc-suggestion-text overflow-hidden fs-0-875rem c-374151">{{ sug.description }}</span>
|
|
1041
|
+
</div>
|
|
1042
|
+
</div>
|
|
1043
|
+
</div>
|
|
1044
|
+
|
|
1045
|
+
<!-- Add another button -->
|
|
1046
|
+
<button type="button"
|
|
1047
|
+
class="loc-add-btn d-inline-flex align-items-center gap-6 cursor-pointer font-weight-600 p-0 b-none border-none fs-0-875rem c-1A56DB"
|
|
1048
|
+
*ngIf="locationVenues.length > 0 && !locationMaxReached && config.locationConfig?.allowMulti">
|
|
1049
|
+
<mat-icon>add_circle_outline</mat-icon>
|
|
1050
|
+
<span>{{ controller.labels['LBL_LOC_ADD_ANOTHER'] || 'Add another Location' }}</span>
|
|
1051
|
+
</button>
|
|
1052
|
+
|
|
1053
|
+
<!-- Map -->
|
|
1054
|
+
<div class="loc-map-container overflow-hidden br-10px b-1px-solid-E5E7EB"
|
|
1055
|
+
*ngIf="config.locationConfig?.showMap !== false">
|
|
1056
|
+
<ng-container *ngIf="config.locationConfig?.googleMapsApiKey; else simpleEmbed">
|
|
1057
|
+
<div [id]="'loc-map-' + config.name" class="loc-map-frame w-100 d-block border-none"
|
|
1058
|
+
[style.height]="config.locationConfig?.mapHeight || '300px'"></div>
|
|
1059
|
+
</ng-container>
|
|
1060
|
+
<ng-template #simpleEmbed>
|
|
1061
|
+
<iframe class="loc-map-frame w-100 d-block border-none"
|
|
1062
|
+
[style.height]="config.locationConfig?.mapHeight || '300px'" [src]="getLocationMapEmbedUrl() | trustedUrl"
|
|
1063
|
+
frameborder="0" allowfullscreen loading="lazy">
|
|
1064
|
+
</iframe>
|
|
1065
|
+
</ng-template>
|
|
1066
|
+
</div>
|
|
1067
|
+
|
|
1068
|
+
<!-- Map hint -->
|
|
1069
|
+
<p class="loc-map-hint m-0 text-center fs-0-78rem c-6B7280">
|
|
1070
|
+
{{ controller.labels['LBL_LOC_MAP_HINT'] || 'Type the venue address. A map will appear to assist you.' }}
|
|
1071
|
+
</p>
|
|
1072
|
+
</div>
|
|
1073
|
+
|
|
1074
|
+
<!-- ONLINE TAB -->
|
|
1075
|
+
<div *ngIf="locationActiveTab === 'ONLINE'" class="loc-panel loc-online-panel d-flex flex-column gap-12">
|
|
1076
|
+
<p class="loc-section-label m-0 font-weight-600 c-111827 fs-0-9rem">
|
|
1077
|
+
{{ controller.labels['LBL_LOC_ONLINE_URL'] || 'Event URL' }}
|
|
1078
|
+
</p>
|
|
1079
|
+
<div class="loc-search-wrapper position-relative d-flex align-items-center mt-4">
|
|
1080
|
+
<mat-icon class="loc-search-icon position-absolute fs-1-1rem c-9CA3AF pe-none">link</mat-icon>
|
|
1081
|
+
<input
|
|
1082
|
+
class="field-input loc-search-input w-100 font-poppins flex-1 fs-0-875rem c-111827 br-7px br-8px bc-F3F4F6 pl-2-4rem bc-DC2626 pt-0-625rem pb-0-625rem pl-16px pr-16px bc-ffffff b-1px-solid-D1D5DB pr-3-5rem"
|
|
1083
|
+
type="url"
|
|
1084
|
+
[placeholder]="config.locationConfig?.onlinePlaceholder || (controller.labels['PH_LOC_ONLINE'] || 'https://zoom.us/j/...')"
|
|
1085
|
+
[value]="locationOnlineUrl" (input)="onLocationUrlChange($any($event.target).value)"
|
|
1086
|
+
[class.is-invalid]="errorMessage">
|
|
1087
|
+
</div>
|
|
1088
|
+
</div>
|
|
1089
|
+
|
|
1090
|
+
<!-- TBA TAB -->
|
|
1091
|
+
<div *ngIf="locationActiveTab === 'TBA'"
|
|
1092
|
+
class="loc-panel loc-tba-panel d-flex flex-column gap-12 justify-content-center">
|
|
1093
|
+
<div
|
|
1094
|
+
class="loc-tba-content d-flex flex-column align-items-center justify-content-center text-center gap-12 p-32px-24px b-F9FAFB b-1px-dashed-D1D5DB br-10px">
|
|
1095
|
+
<mat-icon class="loc-tba-icon fs-40px c-9CA3AF">schedule</mat-icon>
|
|
1096
|
+
<p class="loc-tba-text m-0 c-6B7280 fs-0-9rem">
|
|
1097
|
+
{{ controller.labels['LBL_LOC_TBA_DESC'] || "This event's location is yet to be announced. Check back later
|
|
1098
|
+
for updates." }}
|
|
1099
|
+
</p>
|
|
1100
|
+
</div>
|
|
1101
|
+
</div>
|
|
1102
|
+
|
|
1103
|
+
<!-- Hidden real form control -->
|
|
1104
|
+
<input type="hidden" [formControlName]="config.name!">
|
|
1105
|
+
|
|
1106
|
+
<span class="field-error color-error fs-0-75rem" *ngIf="errorMessage">{{ errorMessage }}</span>
|
|
1107
|
+
</div>
|
|
1108
|
+
|
|
1109
|
+
</div>
|