@memberjunction/ng-conversations 2.117.0 → 2.118.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/dist/lib/components/collection/collection-artifact-card.component.d.ts +7 -1
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-artifact-card.component.js +14 -18
- package/dist/lib/components/collection/collection-artifact-card.component.js.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts +86 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.js +1042 -255
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +9 -2
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +236 -162
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/mention/mention-dropdown.component.js +2 -2
- package/dist/lib/components/mention/mention-editor.component.d.ts +21 -0
- package/dist/lib/components/mention/mention-editor.component.d.ts.map +1 -1
- package/dist/lib/components/mention/mention-editor.component.js +299 -2
- package/dist/lib/components/mention/mention-editor.component.js.map +1 -1
- package/dist/lib/components/message/actionable-commands.component.d.ts +33 -0
- package/dist/lib/components/message/actionable-commands.component.d.ts.map +1 -0
- package/dist/lib/components/message/actionable-commands.component.js +107 -0
- package/dist/lib/components/message/actionable-commands.component.js.map +1 -0
- package/dist/lib/components/message/agent-response-form.component.d.ts +72 -0
- package/dist/lib/components/message/agent-response-form.component.d.ts.map +1 -0
- package/dist/lib/components/message/agent-response-form.component.js +310 -0
- package/dist/lib/components/message/agent-response-form.component.js.map +1 -0
- package/dist/lib/components/message/form-question.component.d.ts +105 -0
- package/dist/lib/components/message/form-question.component.d.ts.map +1 -0
- package/dist/lib/components/message/form-question.component.js +621 -0
- package/dist/lib/components/message/form-question.component.js.map +1 -0
- package/dist/lib/components/message/message-input-box.component.d.ts +12 -0
- package/dist/lib/components/message/message-input-box.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input-box.component.js +14 -1
- package/dist/lib/components/message/message-input-box.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +3 -3
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +85 -51
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +39 -6
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +490 -196
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +2 -1
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +5 -1
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +23 -6
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +128 -52
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +60 -56
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +17 -1
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/models/collection-view.model.d.ts +30 -0
- package/dist/lib/models/collection-view.model.d.ts.map +1 -0
- package/dist/lib/models/collection-view.model.js +2 -0
- package/dist/lib/models/collection-view.model.js.map +1 -0
- package/dist/lib/models/conversation-state.model.d.ts +1 -0
- package/dist/lib/models/conversation-state.model.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +4 -1
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +22 -2
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/data-cache.service.d.ts +12 -0
- package/dist/lib/services/data-cache.service.d.ts.map +1 -1
- package/dist/lib/services/data-cache.service.js +41 -0
- package/dist/lib/services/data-cache.service.js.map +1 -1
- package/dist/lib/services/mention-parser.service.d.ts +6 -1
- package/dist/lib/services/mention-parser.service.d.ts.map +1 -1
- package/dist/lib/services/mention-parser.service.js +114 -34
- package/dist/lib/services/mention-parser.service.js.map +1 -1
- package/dist/lib/services/ui-command-handler.service.d.ts +45 -0
- package/dist/lib/services/ui-command-handler.service.d.ts.map +1 -0
- package/dist/lib/services/ui-command-handler.service.js +95 -0
- package/dist/lib/services/ui-command-handler.service.js.map +1 -0
- package/package.json +15 -14
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
import { Component, Input, forwardRef } from '@angular/core';
|
|
2
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
import * as i2 from "@angular/forms";
|
|
6
|
+
import * as i3 from "@progress/kendo-angular-buttons";
|
|
7
|
+
import * as i4 from "@progress/kendo-angular-inputs";
|
|
8
|
+
import * as i5 from "@progress/kendo-angular-dateinputs";
|
|
9
|
+
function FormQuestionComponent_label_1_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
10
|
+
i0.ɵɵelementStart(0, "span", 20);
|
|
11
|
+
i0.ɵɵtext(1, "*");
|
|
12
|
+
i0.ɵɵelementEnd();
|
|
13
|
+
} }
|
|
14
|
+
function FormQuestionComponent_label_1_Template(rf, ctx) { if (rf & 1) {
|
|
15
|
+
i0.ɵɵelementStart(0, "label", 18);
|
|
16
|
+
i0.ɵɵtext(1);
|
|
17
|
+
i0.ɵɵtemplate(2, FormQuestionComponent_label_1_span_2_Template, 2, 0, "span", 19);
|
|
18
|
+
i0.ɵɵelementEnd();
|
|
19
|
+
} if (rf & 2) {
|
|
20
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
21
|
+
i0.ɵɵadvance();
|
|
22
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.question.label, " ");
|
|
23
|
+
i0.ɵɵadvance();
|
|
24
|
+
i0.ɵɵproperty("ngIf", ctx_r0.question.required);
|
|
25
|
+
} }
|
|
26
|
+
function FormQuestionComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
27
|
+
i0.ɵɵelementStart(0, "div", 21);
|
|
28
|
+
i0.ɵɵtext(1);
|
|
29
|
+
i0.ɵɵelementEnd();
|
|
30
|
+
} if (rf & 2) {
|
|
31
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
32
|
+
i0.ɵɵadvance();
|
|
33
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.question.helpText, " ");
|
|
34
|
+
} }
|
|
35
|
+
function FormQuestionComponent_input_4_Template(rf, ctx) { if (rf & 1) {
|
|
36
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
37
|
+
i0.ɵɵelementStart(0, "input", 22);
|
|
38
|
+
i0.ɵɵlistener("input", function FormQuestionComponent_input_4_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onValueChange($event.target.value)); });
|
|
39
|
+
i0.ɵɵelementEnd();
|
|
40
|
+
} if (rf & 2) {
|
|
41
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
42
|
+
i0.ɵɵproperty("value", ctx_r0.value || "")("placeholder", ctx_r0.placeholder)("disabled", ctx_r0.disabled);
|
|
43
|
+
} }
|
|
44
|
+
function FormQuestionComponent_input_5_Template(rf, ctx) { if (rf & 1) {
|
|
45
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
46
|
+
i0.ɵɵelementStart(0, "input", 23);
|
|
47
|
+
i0.ɵɵlistener("input", function FormQuestionComponent_input_5_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onValueChange($event.target.value)); });
|
|
48
|
+
i0.ɵɵelementEnd();
|
|
49
|
+
} if (rf & 2) {
|
|
50
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
51
|
+
i0.ɵɵproperty("value", ctx_r0.value || "")("placeholder", ctx_r0.placeholder)("disabled", ctx_r0.disabled);
|
|
52
|
+
} }
|
|
53
|
+
function FormQuestionComponent_textarea_6_Template(rf, ctx) { if (rf & 1) {
|
|
54
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
55
|
+
i0.ɵɵelementStart(0, "textarea", 24);
|
|
56
|
+
i0.ɵɵlistener("input", function FormQuestionComponent_textarea_6_Template_textarea_input_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onValueChange($event.target.value)); });
|
|
57
|
+
i0.ɵɵelementEnd();
|
|
58
|
+
} if (rf & 2) {
|
|
59
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
60
|
+
i0.ɵɵproperty("value", ctx_r0.value || "")("placeholder", ctx_r0.placeholder)("disabled", ctx_r0.disabled);
|
|
61
|
+
} }
|
|
62
|
+
function FormQuestionComponent_kendo_numerictextbox_7_Template(rf, ctx) { if (rf & 1) {
|
|
63
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
64
|
+
i0.ɵɵelementStart(0, "kendo-numerictextbox", 25);
|
|
65
|
+
i0.ɵɵlistener("valueChange", function FormQuestionComponent_kendo_numerictextbox_7_Template_kendo_numerictextbox_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onValueChange($event)); });
|
|
66
|
+
i0.ɵɵelementEnd();
|
|
67
|
+
} if (rf & 2) {
|
|
68
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
69
|
+
i0.ɵɵproperty("value", ctx_r0.value)("min", ctx_r0.min || 0)("max", ctx_r0.max || 999999999)("step", ctx_r0.step || 1)("disabled", ctx_r0.disabled);
|
|
70
|
+
} }
|
|
71
|
+
function FormQuestionComponent_kendo_numerictextbox_8_Template(rf, ctx) { if (rf & 1) {
|
|
72
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
73
|
+
i0.ɵɵelementStart(0, "kendo-numerictextbox", 26);
|
|
74
|
+
i0.ɵɵlistener("valueChange", function FormQuestionComponent_kendo_numerictextbox_8_Template_kendo_numerictextbox_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onValueChange($event)); });
|
|
75
|
+
i0.ɵɵelementEnd();
|
|
76
|
+
} if (rf & 2) {
|
|
77
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
78
|
+
i0.ɵɵproperty("value", ctx_r0.value)("min", ctx_r0.min || 0)("max", ctx_r0.max || 999999999)("step", ctx_r0.step || 0.01)("format", "c2")("disabled", ctx_r0.disabled);
|
|
79
|
+
} }
|
|
80
|
+
function FormQuestionComponent_kendo_datepicker_9_Template(rf, ctx) { if (rf & 1) {
|
|
81
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
82
|
+
i0.ɵɵelementStart(0, "kendo-datepicker", 27);
|
|
83
|
+
i0.ɵɵlistener("valueChange", function FormQuestionComponent_kendo_datepicker_9_Template_kendo_datepicker_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onValueChange($event)); });
|
|
84
|
+
i0.ɵɵelementEnd();
|
|
85
|
+
} if (rf & 2) {
|
|
86
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
87
|
+
i0.ɵɵproperty("value", ctx_r0.value)("disabled", ctx_r0.disabled);
|
|
88
|
+
} }
|
|
89
|
+
function FormQuestionComponent_kendo_datetimepicker_10_Template(rf, ctx) { if (rf & 1) {
|
|
90
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
91
|
+
i0.ɵɵelementStart(0, "kendo-datetimepicker", 27);
|
|
92
|
+
i0.ɵɵlistener("valueChange", function FormQuestionComponent_kendo_datetimepicker_10_Template_kendo_datetimepicker_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onValueChange($event)); });
|
|
93
|
+
i0.ɵɵelementEnd();
|
|
94
|
+
} if (rf & 2) {
|
|
95
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
96
|
+
i0.ɵɵproperty("value", ctx_r0.value)("disabled", ctx_r0.disabled);
|
|
97
|
+
} }
|
|
98
|
+
function FormQuestionComponent_kendo_buttongroup_11_button_1_i_1_Template(rf, ctx) { if (rf & 1) {
|
|
99
|
+
i0.ɵɵelement(0, "i", 32);
|
|
100
|
+
} if (rf & 2) {
|
|
101
|
+
const option_r10 = i0.ɵɵnextContext().$implicit;
|
|
102
|
+
i0.ɵɵclassMapInterpolate1("fa ", option_r10.icon, "");
|
|
103
|
+
} }
|
|
104
|
+
function FormQuestionComponent_kendo_buttongroup_11_button_1_Template(rf, ctx) { if (rf & 1) {
|
|
105
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
106
|
+
i0.ɵɵelementStart(0, "button", 30);
|
|
107
|
+
i0.ɵɵlistener("click", function FormQuestionComponent_kendo_buttongroup_11_button_1_Template_button_click_0_listener() { const option_r10 = i0.ɵɵrestoreView(_r9).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onValueChange(option_r10.value)); });
|
|
108
|
+
i0.ɵɵtemplate(1, FormQuestionComponent_kendo_buttongroup_11_button_1_i_1_Template, 1, 3, "i", 31);
|
|
109
|
+
i0.ɵɵtext(2);
|
|
110
|
+
i0.ɵɵelementEnd();
|
|
111
|
+
} if (rf & 2) {
|
|
112
|
+
const option_r10 = ctx.$implicit;
|
|
113
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
114
|
+
i0.ɵɵproperty("toggleable", true)("selected", ctx_r0.value === option_r10.value)("disabled", ctx_r0.disabled);
|
|
115
|
+
i0.ɵɵadvance();
|
|
116
|
+
i0.ɵɵproperty("ngIf", option_r10.icon);
|
|
117
|
+
i0.ɵɵadvance();
|
|
118
|
+
i0.ɵɵtextInterpolate1(" ", option_r10.label, " ");
|
|
119
|
+
} }
|
|
120
|
+
function FormQuestionComponent_kendo_buttongroup_11_Template(rf, ctx) { if (rf & 1) {
|
|
121
|
+
i0.ɵɵelementStart(0, "kendo-buttongroup", 28);
|
|
122
|
+
i0.ɵɵtemplate(1, FormQuestionComponent_kendo_buttongroup_11_button_1_Template, 3, 5, "button", 29);
|
|
123
|
+
i0.ɵɵelementEnd();
|
|
124
|
+
} if (rf & 2) {
|
|
125
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
126
|
+
i0.ɵɵproperty("selection", "single");
|
|
127
|
+
i0.ɵɵadvance();
|
|
128
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.options)("ngForTrackBy", ctx_r0.trackByValue);
|
|
129
|
+
} }
|
|
130
|
+
function FormQuestionComponent_div_12_div_1_i_3_Template(rf, ctx) { if (rf & 1) {
|
|
131
|
+
i0.ɵɵelement(0, "i", 32);
|
|
132
|
+
} if (rf & 2) {
|
|
133
|
+
const option_r12 = i0.ɵɵnextContext().$implicit;
|
|
134
|
+
i0.ɵɵclassMapInterpolate1("fa ", option_r12.icon, "");
|
|
135
|
+
} }
|
|
136
|
+
function FormQuestionComponent_div_12_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
137
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
138
|
+
i0.ɵɵelementStart(0, "div", 35)(1, "input", 36);
|
|
139
|
+
i0.ɵɵlistener("change", function FormQuestionComponent_div_12_div_1_Template_input_change_1_listener() { const option_r12 = i0.ɵɵrestoreView(_r11).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onValueChange(option_r12.value)); });
|
|
140
|
+
i0.ɵɵelementEnd();
|
|
141
|
+
i0.ɵɵelementStart(2, "label", 37);
|
|
142
|
+
i0.ɵɵtemplate(3, FormQuestionComponent_div_12_div_1_i_3_Template, 1, 3, "i", 31);
|
|
143
|
+
i0.ɵɵtext(4);
|
|
144
|
+
i0.ɵɵelementEnd()();
|
|
145
|
+
} if (rf & 2) {
|
|
146
|
+
const option_r12 = ctx.$implicit;
|
|
147
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
148
|
+
i0.ɵɵadvance();
|
|
149
|
+
i0.ɵɵproperty("name", ctx_r0.question.id)("value", option_r12.value)("checked", ctx_r0.value === option_r12.value)("disabled", ctx_r0.disabled)("id", ctx_r0.question.id + "_" + option_r12.value);
|
|
150
|
+
i0.ɵɵadvance();
|
|
151
|
+
i0.ɵɵproperty("for", ctx_r0.question.id + "_" + option_r12.value);
|
|
152
|
+
i0.ɵɵadvance();
|
|
153
|
+
i0.ɵɵproperty("ngIf", option_r12.icon);
|
|
154
|
+
i0.ɵɵadvance();
|
|
155
|
+
i0.ɵɵtextInterpolate1(" ", option_r12.label, " ");
|
|
156
|
+
} }
|
|
157
|
+
function FormQuestionComponent_div_12_Template(rf, ctx) { if (rf & 1) {
|
|
158
|
+
i0.ɵɵelementStart(0, "div", 33);
|
|
159
|
+
i0.ɵɵtemplate(1, FormQuestionComponent_div_12_div_1_Template, 5, 8, "div", 34);
|
|
160
|
+
i0.ɵɵelementEnd();
|
|
161
|
+
} if (rf & 2) {
|
|
162
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
163
|
+
i0.ɵɵadvance();
|
|
164
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.options)("ngForTrackBy", ctx_r0.trackByValue);
|
|
165
|
+
} }
|
|
166
|
+
function FormQuestionComponent_select_13_option_3_Template(rf, ctx) { if (rf & 1) {
|
|
167
|
+
i0.ɵɵelementStart(0, "option", 41);
|
|
168
|
+
i0.ɵɵtext(1);
|
|
169
|
+
i0.ɵɵelementEnd();
|
|
170
|
+
} if (rf & 2) {
|
|
171
|
+
const option_r13 = ctx.$implicit;
|
|
172
|
+
i0.ɵɵproperty("value", option_r13.value);
|
|
173
|
+
i0.ɵɵadvance();
|
|
174
|
+
i0.ɵɵtextInterpolate1(" ", option_r13.label, " ");
|
|
175
|
+
} }
|
|
176
|
+
function FormQuestionComponent_select_13_Template(rf, ctx) { if (rf & 1) {
|
|
177
|
+
i0.ɵɵelementStart(0, "select", 38)(1, "option", 39);
|
|
178
|
+
i0.ɵɵtext(2, "Select an option...");
|
|
179
|
+
i0.ɵɵelementEnd();
|
|
180
|
+
i0.ɵɵtemplate(3, FormQuestionComponent_select_13_option_3_Template, 2, 2, "option", 40);
|
|
181
|
+
i0.ɵɵelementEnd();
|
|
182
|
+
} if (rf & 2) {
|
|
183
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
184
|
+
i0.ɵɵproperty("formControl", ctx_r0.control)("disabled", ctx_r0.disabled);
|
|
185
|
+
i0.ɵɵadvance(3);
|
|
186
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.options)("ngForTrackBy", ctx_r0.trackByValue);
|
|
187
|
+
} }
|
|
188
|
+
function FormQuestionComponent_div_14_Template(rf, ctx) { if (rf & 1) {
|
|
189
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
190
|
+
i0.ɵɵelementStart(0, "div", 42)(1, "kendo-slider", 43);
|
|
191
|
+
i0.ɵɵlistener("valueChange", function FormQuestionComponent_div_14_Template_kendo_slider_valueChange_1_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onValueChange($event)); });
|
|
192
|
+
i0.ɵɵelementEnd();
|
|
193
|
+
i0.ɵɵelementStart(2, "div", 44);
|
|
194
|
+
i0.ɵɵtext(3);
|
|
195
|
+
i0.ɵɵelementEnd()();
|
|
196
|
+
} if (rf & 2) {
|
|
197
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
198
|
+
i0.ɵɵadvance();
|
|
199
|
+
i0.ɵɵproperty("min", ctx_r0.getSliderConfig().min)("max", ctx_r0.getSliderConfig().max)("smallStep", ctx_r0.getSliderConfig().step || 1)("value", ctx_r0.value || ctx_r0.getSliderConfig().min)("disabled", ctx_r0.disabled);
|
|
200
|
+
i0.ɵɵadvance(2);
|
|
201
|
+
i0.ɵɵtextInterpolate2(" ", ctx_r0.value || ctx_r0.getSliderConfig().min, "", ctx_r0.getSliderConfig().suffix || "", " ");
|
|
202
|
+
} }
|
|
203
|
+
function FormQuestionComponent_div_15_Template(rf, ctx) { if (rf & 1) {
|
|
204
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
205
|
+
i0.ɵɵelementStart(0, "div", 45)(1, "kendo-datepicker", 46);
|
|
206
|
+
i0.ɵɵlistener("valueChange", function FormQuestionComponent_div_15_Template_kendo_datepicker_valueChange_1_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onDateRangeStartChange($event)); });
|
|
207
|
+
i0.ɵɵelementEnd();
|
|
208
|
+
i0.ɵɵelementStart(2, "span", 47);
|
|
209
|
+
i0.ɵɵtext(3, "to");
|
|
210
|
+
i0.ɵɵelementEnd();
|
|
211
|
+
i0.ɵɵelementStart(4, "kendo-datepicker", 48);
|
|
212
|
+
i0.ɵɵlistener("valueChange", function FormQuestionComponent_div_15_Template_kendo_datepicker_valueChange_4_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onDateRangeEndChange($event)); });
|
|
213
|
+
i0.ɵɵelementEnd()();
|
|
214
|
+
} if (rf & 2) {
|
|
215
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
216
|
+
i0.ɵɵadvance();
|
|
217
|
+
i0.ɵɵproperty("value", ctx_r0.value == null ? null : ctx_r0.value.start)("disabled", ctx_r0.disabled);
|
|
218
|
+
i0.ɵɵadvance(3);
|
|
219
|
+
i0.ɵɵproperty("value", ctx_r0.value == null ? null : ctx_r0.value.end)("disabled", ctx_r0.disabled);
|
|
220
|
+
} }
|
|
221
|
+
function FormQuestionComponent_kendo_timepicker_16_Template(rf, ctx) { if (rf & 1) {
|
|
222
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
223
|
+
i0.ɵɵelementStart(0, "kendo-timepicker", 49);
|
|
224
|
+
i0.ɵɵlistener("valueChange", function FormQuestionComponent_kendo_timepicker_16_Template_kendo_timepicker_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r16); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onValueChange($event)); });
|
|
225
|
+
i0.ɵɵelementEnd();
|
|
226
|
+
} if (rf & 2) {
|
|
227
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
228
|
+
i0.ɵɵproperty("value", ctx_r0.value)("disabled", ctx_r0.disabled)("format", "h:mm a");
|
|
229
|
+
} }
|
|
230
|
+
function FormQuestionComponent_div_17_div_1_i_3_Template(rf, ctx) { if (rf & 1) {
|
|
231
|
+
i0.ɵɵelement(0, "i", 32);
|
|
232
|
+
} if (rf & 2) {
|
|
233
|
+
const option_r18 = i0.ɵɵnextContext().$implicit;
|
|
234
|
+
i0.ɵɵclassMapInterpolate1("fa ", option_r18.icon, "");
|
|
235
|
+
} }
|
|
236
|
+
function FormQuestionComponent_div_17_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
237
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
238
|
+
i0.ɵɵelementStart(0, "div", 52)(1, "input", 53);
|
|
239
|
+
i0.ɵɵlistener("change", function FormQuestionComponent_div_17_div_1_Template_input_change_1_listener() { const option_r18 = i0.ɵɵrestoreView(_r17).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.toggleCheckbox(option_r18)); });
|
|
240
|
+
i0.ɵɵelementEnd();
|
|
241
|
+
i0.ɵɵelementStart(2, "label", 54);
|
|
242
|
+
i0.ɵɵtemplate(3, FormQuestionComponent_div_17_div_1_i_3_Template, 1, 3, "i", 31);
|
|
243
|
+
i0.ɵɵtext(4);
|
|
244
|
+
i0.ɵɵelementEnd()();
|
|
245
|
+
} if (rf & 2) {
|
|
246
|
+
const option_r18 = ctx.$implicit;
|
|
247
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
248
|
+
i0.ɵɵadvance();
|
|
249
|
+
i0.ɵɵproperty("checked", ctx_r0.isChecked(option_r18))("disabled", ctx_r0.disabled)("id", ctx_r0.question.id + "_" + option_r18.value);
|
|
250
|
+
i0.ɵɵadvance();
|
|
251
|
+
i0.ɵɵproperty("for", ctx_r0.question.id + "_" + option_r18.value);
|
|
252
|
+
i0.ɵɵadvance();
|
|
253
|
+
i0.ɵɵproperty("ngIf", option_r18.icon);
|
|
254
|
+
i0.ɵɵadvance();
|
|
255
|
+
i0.ɵɵtextInterpolate1(" ", option_r18.label, " ");
|
|
256
|
+
} }
|
|
257
|
+
function FormQuestionComponent_div_17_Template(rf, ctx) { if (rf & 1) {
|
|
258
|
+
i0.ɵɵelementStart(0, "div", 50);
|
|
259
|
+
i0.ɵɵtemplate(1, FormQuestionComponent_div_17_div_1_Template, 5, 6, "div", 51);
|
|
260
|
+
i0.ɵɵelementEnd();
|
|
261
|
+
} if (rf & 2) {
|
|
262
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
263
|
+
i0.ɵɵadvance();
|
|
264
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.options)("ngForTrackBy", ctx_r0.trackByValue);
|
|
265
|
+
} }
|
|
266
|
+
function FormQuestionComponent_div_18_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
267
|
+
i0.ɵɵelementStart(0, "span");
|
|
268
|
+
i0.ɵɵtext(1, "This field is required");
|
|
269
|
+
i0.ɵɵelementEnd();
|
|
270
|
+
} }
|
|
271
|
+
function FormQuestionComponent_div_18_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
272
|
+
i0.ɵɵelementStart(0, "span");
|
|
273
|
+
i0.ɵɵtext(1, "Please enter a valid email address");
|
|
274
|
+
i0.ɵɵelementEnd();
|
|
275
|
+
} }
|
|
276
|
+
function FormQuestionComponent_div_18_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
277
|
+
i0.ɵɵelementStart(0, "span");
|
|
278
|
+
i0.ɵɵtext(1);
|
|
279
|
+
i0.ɵɵelementEnd();
|
|
280
|
+
} if (rf & 2) {
|
|
281
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
282
|
+
i0.ɵɵadvance();
|
|
283
|
+
i0.ɵɵtextInterpolate1("Value must be at least ", ctx_r0.min, "");
|
|
284
|
+
} }
|
|
285
|
+
function FormQuestionComponent_div_18_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
286
|
+
i0.ɵɵelementStart(0, "span");
|
|
287
|
+
i0.ɵɵtext(1);
|
|
288
|
+
i0.ɵɵelementEnd();
|
|
289
|
+
} if (rf & 2) {
|
|
290
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
291
|
+
i0.ɵɵadvance();
|
|
292
|
+
i0.ɵɵtextInterpolate1("Value must be at most ", ctx_r0.max, "");
|
|
293
|
+
} }
|
|
294
|
+
function FormQuestionComponent_div_18_Template(rf, ctx) { if (rf & 1) {
|
|
295
|
+
i0.ɵɵelementStart(0, "div", 55);
|
|
296
|
+
i0.ɵɵtemplate(1, FormQuestionComponent_div_18_span_1_Template, 2, 0, "span", 56)(2, FormQuestionComponent_div_18_span_2_Template, 2, 0, "span", 56)(3, FormQuestionComponent_div_18_span_3_Template, 2, 1, "span", 56)(4, FormQuestionComponent_div_18_span_4_Template, 2, 1, "span", 56);
|
|
297
|
+
i0.ɵɵelementEnd();
|
|
298
|
+
} if (rf & 2) {
|
|
299
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
300
|
+
i0.ɵɵadvance();
|
|
301
|
+
i0.ɵɵproperty("ngIf", ctx_r0.control == null ? null : ctx_r0.control.errors == null ? null : ctx_r0.control.errors["required"]);
|
|
302
|
+
i0.ɵɵadvance();
|
|
303
|
+
i0.ɵɵproperty("ngIf", ctx_r0.control == null ? null : ctx_r0.control.errors == null ? null : ctx_r0.control.errors["email"]);
|
|
304
|
+
i0.ɵɵadvance();
|
|
305
|
+
i0.ɵɵproperty("ngIf", ctx_r0.control == null ? null : ctx_r0.control.errors == null ? null : ctx_r0.control.errors["min"]);
|
|
306
|
+
i0.ɵɵadvance();
|
|
307
|
+
i0.ɵɵproperty("ngIf", ctx_r0.control == null ? null : ctx_r0.control.errors == null ? null : ctx_r0.control.errors["max"]);
|
|
308
|
+
} }
|
|
309
|
+
/**
|
|
310
|
+
* Component for rendering individual form questions with various input types
|
|
311
|
+
* Implements ControlValueAccessor for seamless integration with Angular forms
|
|
312
|
+
*/
|
|
313
|
+
export class FormQuestionComponent {
|
|
314
|
+
question;
|
|
315
|
+
control;
|
|
316
|
+
value = null;
|
|
317
|
+
disabled = false;
|
|
318
|
+
onChange = () => { };
|
|
319
|
+
onTouched = () => { };
|
|
320
|
+
ngOnInit() {
|
|
321
|
+
// Debug logging for dropdown issues
|
|
322
|
+
if (this.questionType === 'dropdown') {
|
|
323
|
+
console.log('[FormQuestion] Dropdown initialized:', {
|
|
324
|
+
questionId: this.question.id,
|
|
325
|
+
hasControl: !!this.control,
|
|
326
|
+
controlValue: this.control?.value,
|
|
327
|
+
options: this.options,
|
|
328
|
+
value: this.value
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Get the question type (handles both simple string and complex types)
|
|
334
|
+
*/
|
|
335
|
+
get questionType() {
|
|
336
|
+
return typeof this.question.type === 'string'
|
|
337
|
+
? this.question.type
|
|
338
|
+
: this.question.type.type;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Check if this is a choice-based question (buttongroup, radio, dropdown, checkbox)
|
|
342
|
+
*/
|
|
343
|
+
get isChoiceQuestion() {
|
|
344
|
+
const type = this.questionType;
|
|
345
|
+
return ['buttongroup', 'radio', 'dropdown', 'checkbox'].includes(type);
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Get options for choice questions
|
|
349
|
+
*/
|
|
350
|
+
get options() {
|
|
351
|
+
if (typeof this.question.type === 'object' && 'options' in this.question.type) {
|
|
352
|
+
return this.question.type.options;
|
|
353
|
+
}
|
|
354
|
+
return [];
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Check if multiple selections are allowed (for checkbox type)
|
|
358
|
+
*/
|
|
359
|
+
get allowMultiple() {
|
|
360
|
+
return this.questionType === 'checkbox' ||
|
|
361
|
+
(typeof this.question.type === 'object' && 'multiple' in this.question.type && !!this.question.type.multiple);
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Get CSS class for field width based on widthHint or intelligent defaults
|
|
365
|
+
*/
|
|
366
|
+
get widthClass() {
|
|
367
|
+
// If explicit widthHint provided, use it
|
|
368
|
+
if (this.question.widthHint) {
|
|
369
|
+
return `width-${this.question.widthHint}`;
|
|
370
|
+
}
|
|
371
|
+
// Otherwise, apply intelligent defaults based on question type
|
|
372
|
+
const type = this.questionType;
|
|
373
|
+
// Narrow fields
|
|
374
|
+
if (['number', 'currency', 'date', 'datetime', 'time'].includes(type)) {
|
|
375
|
+
return 'width-narrow';
|
|
376
|
+
}
|
|
377
|
+
// Wide fields for choice-based controls (need space for multiple options)
|
|
378
|
+
if (['buttongroup', 'radio', 'checkbox'].includes(type)) {
|
|
379
|
+
return 'width-wide';
|
|
380
|
+
}
|
|
381
|
+
// Auto-width for dropdowns
|
|
382
|
+
if (type === 'dropdown') {
|
|
383
|
+
return 'width-auto';
|
|
384
|
+
}
|
|
385
|
+
// Full-width fields
|
|
386
|
+
if (type === 'textarea') {
|
|
387
|
+
return 'width-full';
|
|
388
|
+
}
|
|
389
|
+
// Wide fields
|
|
390
|
+
if (type === 'email') {
|
|
391
|
+
return 'width-wide';
|
|
392
|
+
}
|
|
393
|
+
// Default to medium for text and other types
|
|
394
|
+
return 'width-medium';
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Get placeholder text for text inputs
|
|
398
|
+
*/
|
|
399
|
+
get placeholder() {
|
|
400
|
+
if (typeof this.question.type === 'object' && 'placeholder' in this.question.type) {
|
|
401
|
+
return this.question.type.placeholder;
|
|
402
|
+
}
|
|
403
|
+
return undefined;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Get min value for number/currency inputs
|
|
407
|
+
*/
|
|
408
|
+
get min() {
|
|
409
|
+
if (typeof this.question.type === 'object' && 'min' in this.question.type) {
|
|
410
|
+
return this.question.type.min;
|
|
411
|
+
}
|
|
412
|
+
return undefined;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Get max value for number/currency inputs
|
|
416
|
+
*/
|
|
417
|
+
get max() {
|
|
418
|
+
if (typeof this.question.type === 'object' && 'max' in this.question.type) {
|
|
419
|
+
return this.question.type.max;
|
|
420
|
+
}
|
|
421
|
+
return undefined;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Get step value for number/currency inputs
|
|
425
|
+
*/
|
|
426
|
+
get step() {
|
|
427
|
+
if (typeof this.question.type === 'object' && 'step' in this.question.type) {
|
|
428
|
+
return this.question.type.step;
|
|
429
|
+
}
|
|
430
|
+
return undefined;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Get prefix for currency inputs
|
|
434
|
+
*/
|
|
435
|
+
get prefix() {
|
|
436
|
+
if (typeof this.question.type === 'object' && 'prefix' in this.question.type) {
|
|
437
|
+
return this.question.type.prefix;
|
|
438
|
+
}
|
|
439
|
+
return undefined;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Get suffix for currency inputs
|
|
443
|
+
*/
|
|
444
|
+
get suffix() {
|
|
445
|
+
if (typeof this.question.type === 'object' && 'suffix' in this.question.type) {
|
|
446
|
+
return this.question.type.suffix;
|
|
447
|
+
}
|
|
448
|
+
return undefined;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Handle value changes
|
|
452
|
+
*/
|
|
453
|
+
onValueChange(newValue) {
|
|
454
|
+
this.value = newValue;
|
|
455
|
+
this.onChange(newValue);
|
|
456
|
+
this.onTouched();
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Handle checkbox toggle for multiple selection
|
|
460
|
+
*/
|
|
461
|
+
toggleCheckbox(option) {
|
|
462
|
+
if (!this.allowMultiple) {
|
|
463
|
+
// Single selection mode
|
|
464
|
+
this.onValueChange(option.value);
|
|
465
|
+
}
|
|
466
|
+
else {
|
|
467
|
+
// Multiple selection mode
|
|
468
|
+
const currentValues = Array.isArray(this.value) ? this.value : [];
|
|
469
|
+
const index = currentValues.indexOf(option.value);
|
|
470
|
+
let newValues;
|
|
471
|
+
if (index > -1) {
|
|
472
|
+
// Remove if already selected
|
|
473
|
+
newValues = currentValues.filter((v) => v !== option.value);
|
|
474
|
+
}
|
|
475
|
+
else {
|
|
476
|
+
// Add if not selected
|
|
477
|
+
newValues = [...currentValues, option.value];
|
|
478
|
+
}
|
|
479
|
+
this.onValueChange(newValues);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Check if a checkbox option is selected
|
|
484
|
+
*/
|
|
485
|
+
isChecked(option) {
|
|
486
|
+
if (!this.allowMultiple) {
|
|
487
|
+
return this.value === option.value;
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
return Array.isArray(this.value) && this.value.includes(option.value);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
// ControlValueAccessor implementation
|
|
494
|
+
writeValue(value) {
|
|
495
|
+
this.value = value;
|
|
496
|
+
}
|
|
497
|
+
registerOnChange(fn) {
|
|
498
|
+
this.onChange = fn;
|
|
499
|
+
}
|
|
500
|
+
registerOnTouched(fn) {
|
|
501
|
+
this.onTouched = fn;
|
|
502
|
+
}
|
|
503
|
+
setDisabledState(isDisabled) {
|
|
504
|
+
this.disabled = isDisabled;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Debug handler for dropdown changes
|
|
508
|
+
*/
|
|
509
|
+
onDropdownChange(value) {
|
|
510
|
+
console.log('[FormQuestion] Dropdown value changed:', {
|
|
511
|
+
questionId: this.question.id,
|
|
512
|
+
newValue: value,
|
|
513
|
+
controlValue: this.control?.value,
|
|
514
|
+
optionsCount: this.options.length
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Get slider configuration
|
|
519
|
+
*/
|
|
520
|
+
getSliderConfig() {
|
|
521
|
+
if (typeof this.question.type === 'object' && this.question.type.type === 'slider') {
|
|
522
|
+
return {
|
|
523
|
+
min: this.question.type.min,
|
|
524
|
+
max: this.question.type.max,
|
|
525
|
+
step: this.question.type.step,
|
|
526
|
+
suffix: this.question.type.suffix
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
return { min: 0, max: 100, step: 1 };
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Handle date range start date change
|
|
533
|
+
*/
|
|
534
|
+
onDateRangeStartChange(value) {
|
|
535
|
+
const current = this.value || {};
|
|
536
|
+
this.onValueChange({ ...current, start: value });
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Handle date range end date change
|
|
540
|
+
*/
|
|
541
|
+
onDateRangeEndChange(value) {
|
|
542
|
+
const current = this.value || {};
|
|
543
|
+
this.onValueChange({ ...current, end: value });
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Track by function for options list
|
|
547
|
+
*/
|
|
548
|
+
trackByValue(index, option) {
|
|
549
|
+
return option.value;
|
|
550
|
+
}
|
|
551
|
+
static ɵfac = function FormQuestionComponent_Factory(t) { return new (t || FormQuestionComponent)(); };
|
|
552
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FormQuestionComponent, selectors: [["mj-form-question"]], inputs: { question: "question", control: "control" }, features: [i0.ɵɵProvidersFeature([
|
|
553
|
+
{
|
|
554
|
+
provide: NG_VALUE_ACCESSOR,
|
|
555
|
+
useExisting: forwardRef(() => FormQuestionComponent),
|
|
556
|
+
multi: true
|
|
557
|
+
}
|
|
558
|
+
])], decls: 19, vars: 20, consts: [[1, "form-question"], ["class", "question-label", 4, "ngIf"], ["class", "help-text", 4, "ngIf"], [1, "input-container", 3, "ngClass"], ["type", "text", "kendoTextBox", "", "class", "question-input", 3, "value", "placeholder", "disabled", "input", 4, "ngIf"], ["type", "email", "kendoTextBox", "", "class", "question-input", 3, "value", "placeholder", "disabled", "input", 4, "ngIf"], ["kendoTextArea", "", "class", "question-textarea", "rows", "3", 3, "value", "placeholder", "disabled", "input", 4, "ngIf"], ["class", "question-input", 3, "value", "min", "max", "step", "disabled", "valueChange", 4, "ngIf"], ["class", "question-input", 3, "value", "min", "max", "step", "format", "disabled", "valueChange", 4, "ngIf"], ["class", "question-input", 3, "value", "disabled", "valueChange", 4, "ngIf"], ["class", "question-buttongroup", 3, "selection", 4, "ngIf"], ["class", "question-radio-group", 4, "ngIf"], ["class", "question-dropdown", 3, "formControl", "disabled", 4, "ngIf"], ["class", "question-slider-container", 4, "ngIf"], ["class", "question-daterange", 4, "ngIf"], ["class", "question-input", 3, "value", "disabled", "format", "valueChange", 4, "ngIf"], ["class", "question-checkbox-group", 4, "ngIf"], ["class", "validation-error", 4, "ngIf"], [1, "question-label"], ["class", "required-indicator", 4, "ngIf"], [1, "required-indicator"], [1, "help-text"], ["type", "text", "kendoTextBox", "", 1, "question-input", 3, "input", "value", "placeholder", "disabled"], ["type", "email", "kendoTextBox", "", 1, "question-input", 3, "input", "value", "placeholder", "disabled"], ["kendoTextArea", "", "rows", "3", 1, "question-textarea", 3, "input", "value", "placeholder", "disabled"], [1, "question-input", 3, "valueChange", "value", "min", "max", "step", "disabled"], [1, "question-input", 3, "valueChange", "value", "min", "max", "step", "format", "disabled"], [1, "question-input", 3, "valueChange", "value", "disabled"], [1, "question-buttongroup", 3, "selection"], ["kendoButton", "", "class", "buttongroup-option", 3, "toggleable", "selected", "disabled", "click", 4, "ngFor", "ngForOf", "ngForTrackBy"], ["kendoButton", "", 1, "buttongroup-option", 3, "click", "toggleable", "selected", "disabled"], ["aria-hidden", "true", 3, "class", 4, "ngIf"], ["aria-hidden", "true"], [1, "question-radio-group"], ["class", "radio-option", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "radio-option"], ["type", "radio", "kendoRadioButton", "", 3, "change", "name", "value", "checked", "disabled", "id"], [1, "radio-label", 3, "for"], [1, "question-dropdown", 3, "formControl", "disabled"], ["value", ""], [3, "value", 4, "ngFor", "ngForOf", "ngForTrackBy"], [3, "value"], [1, "question-slider-container"], [1, "question-slider", 3, "valueChange", "min", "max", "smallStep", "value", "disabled"], [1, "slider-value"], [1, "question-daterange"], ["placeholder", "Start Date", 1, "daterange-start", 3, "valueChange", "value", "disabled"], [1, "daterange-separator"], ["placeholder", "End Date", 1, "daterange-end", 3, "valueChange", "value", "disabled"], [1, "question-input", 3, "valueChange", "value", "disabled", "format"], [1, "question-checkbox-group"], ["class", "checkbox-option", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "checkbox-option"], ["type", "checkbox", "kendoCheckBox", "", 3, "change", "checked", "disabled", "id"], [1, "checkbox-label", 3, "for"], [1, "validation-error"], [4, "ngIf"]], template: function FormQuestionComponent_Template(rf, ctx) { if (rf & 1) {
|
|
559
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
560
|
+
i0.ɵɵtemplate(1, FormQuestionComponent_label_1_Template, 3, 2, "label", 1)(2, FormQuestionComponent_div_2_Template, 2, 1, "div", 2);
|
|
561
|
+
i0.ɵɵelementStart(3, "div", 3);
|
|
562
|
+
i0.ɵɵtemplate(4, FormQuestionComponent_input_4_Template, 1, 3, "input", 4)(5, FormQuestionComponent_input_5_Template, 1, 3, "input", 5)(6, FormQuestionComponent_textarea_6_Template, 1, 3, "textarea", 6)(7, FormQuestionComponent_kendo_numerictextbox_7_Template, 1, 5, "kendo-numerictextbox", 7)(8, FormQuestionComponent_kendo_numerictextbox_8_Template, 1, 6, "kendo-numerictextbox", 8)(9, FormQuestionComponent_kendo_datepicker_9_Template, 1, 2, "kendo-datepicker", 9)(10, FormQuestionComponent_kendo_datetimepicker_10_Template, 1, 2, "kendo-datetimepicker", 9)(11, FormQuestionComponent_kendo_buttongroup_11_Template, 2, 3, "kendo-buttongroup", 10)(12, FormQuestionComponent_div_12_Template, 2, 2, "div", 11)(13, FormQuestionComponent_select_13_Template, 4, 4, "select", 12)(14, FormQuestionComponent_div_14_Template, 4, 7, "div", 13)(15, FormQuestionComponent_div_15_Template, 5, 4, "div", 14)(16, FormQuestionComponent_kendo_timepicker_16_Template, 1, 3, "kendo-timepicker", 15)(17, FormQuestionComponent_div_17_Template, 2, 2, "div", 16);
|
|
563
|
+
i0.ɵɵelementEnd();
|
|
564
|
+
i0.ɵɵtemplate(18, FormQuestionComponent_div_18_Template, 5, 4, "div", 17);
|
|
565
|
+
i0.ɵɵelementEnd();
|
|
566
|
+
} if (rf & 2) {
|
|
567
|
+
i0.ɵɵclassProp("required", ctx.question.required);
|
|
568
|
+
i0.ɵɵadvance();
|
|
569
|
+
i0.ɵɵproperty("ngIf", ctx.question.label);
|
|
570
|
+
i0.ɵɵadvance();
|
|
571
|
+
i0.ɵɵproperty("ngIf", ctx.question.helpText);
|
|
572
|
+
i0.ɵɵadvance();
|
|
573
|
+
i0.ɵɵproperty("ngClass", ctx.widthClass);
|
|
574
|
+
i0.ɵɵadvance();
|
|
575
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "text");
|
|
576
|
+
i0.ɵɵadvance();
|
|
577
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "email");
|
|
578
|
+
i0.ɵɵadvance();
|
|
579
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "textarea");
|
|
580
|
+
i0.ɵɵadvance();
|
|
581
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "number");
|
|
582
|
+
i0.ɵɵadvance();
|
|
583
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "currency");
|
|
584
|
+
i0.ɵɵadvance();
|
|
585
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "date");
|
|
586
|
+
i0.ɵɵadvance();
|
|
587
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "datetime");
|
|
588
|
+
i0.ɵɵadvance();
|
|
589
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "buttongroup");
|
|
590
|
+
i0.ɵɵadvance();
|
|
591
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "radio");
|
|
592
|
+
i0.ɵɵadvance();
|
|
593
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "dropdown");
|
|
594
|
+
i0.ɵɵadvance();
|
|
595
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "slider");
|
|
596
|
+
i0.ɵɵadvance();
|
|
597
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "daterange");
|
|
598
|
+
i0.ɵɵadvance();
|
|
599
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "time");
|
|
600
|
+
i0.ɵɵadvance();
|
|
601
|
+
i0.ɵɵproperty("ngIf", ctx.questionType === "checkbox");
|
|
602
|
+
i0.ɵɵadvance();
|
|
603
|
+
i0.ɵɵproperty("ngIf", (ctx.control == null ? null : ctx.control.invalid) && (ctx.control == null ? null : ctx.control.touched));
|
|
604
|
+
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i2.NgSelectOption, i2.ɵNgSelectMultipleOption, i2.SelectControlValueAccessor, i2.NgControlStatus, i2.FormControlDirective, i3.ButtonGroupComponent, i3.ButtonComponent, i4.TextAreaDirective, i4.TextBoxDirective, i4.SliderComponent, i4.NumericTextBoxComponent, i4.CheckBoxDirective, i4.RadioButtonDirective, i5.DatePickerComponent, i5.TimePickerComponent, i5.DateTimePickerComponent], styles: [".form-question[_ngcontent-%COMP%] {\n margin-bottom: 16px;\n}\n\n.question-label[_ngcontent-%COMP%] {\n display: block;\n font-weight: 500;\n margin-bottom: 6px;\n color: #333;\n font-size: 14px;\n}\n\n.required-indicator[_ngcontent-%COMP%] {\n color: #d9534f;\n margin-left: 2px;\n}\n\n.help-text[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #666;\n margin-bottom: 8px;\n font-style: italic;\n}\n\n\n\n.question-input[_ngcontent-%COMP%], \n.question-textarea[_ngcontent-%COMP%], \n.question-dropdown[_ngcontent-%COMP%] {\n width: 100%;\n max-width: 100%;\n}\n\n.question-dropdown[_ngcontent-%COMP%] {\n padding: 8px 12px;\n border: 1px solid #d1d5db;\n border-radius: 4px;\n font-size: 14px;\n font-family: inherit;\n background-color: white;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right 8px center;\n background-size: 12px;\n padding-right: 32px;\n cursor: pointer;\n transition: border-color 0.2s ease, box-shadow 0.2s ease;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n}\n\n.question-dropdown[_ngcontent-%COMP%]:hover {\n border-color: #9ca3af;\n}\n\n.question-dropdown[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: #667eea;\n box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);\n}\n\n.question-dropdown[_ngcontent-%COMP%]:disabled {\n background-color: #f3f4f6;\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.question-textarea[_ngcontent-%COMP%] {\n resize: vertical;\n min-height: 60px;\n}\n\n.question-buttongroup[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n overflow-x: auto;\n overflow-y: hidden;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n scrollbar-color: rgba(16, 185, 129, 0.3) transparent;\n}\n\n.question-buttongroup[_ngcontent-%COMP%]::-webkit-scrollbar {\n height: 6px;\n}\n\n.question-buttongroup[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.question-buttongroup[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: rgba(16, 185, 129, 0.3);\n border-radius: 3px;\n}\n\n.question-buttongroup[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: rgba(16, 185, 129, 0.5);\n}\n\n.buttongroup-option[_ngcontent-%COMP%] {\n flex: 0 0 auto;\n white-space: nowrap;\n}\n\n.buttongroup-option[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-right: 6px;\n}\n\n.question-radio-group[_ngcontent-%COMP%], \n.question-checkbox-group[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 12px 16px;\n}\n\n.radio-option[_ngcontent-%COMP%], \n.checkbox-option[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 120px;\n flex: 0 0 auto;\n}\n\n.radio-label[_ngcontent-%COMP%], \n.checkbox-label[_ngcontent-%COMP%] {\n cursor: pointer;\n user-select: none;\n margin: 0;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.radio-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.checkbox-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #666;\n}\n\n.validation-error[_ngcontent-%COMP%] {\n color: #d9534f;\n font-size: 12px;\n margin-top: 4px;\n}\n\n\n\n.form-question.required[_ngcontent-%COMP%] .question-label[_ngcontent-%COMP%] {\n font-weight: 600;\n}\n\n\n\n.question-slider-container[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n.question-slider[_ngcontent-%COMP%] {\n width: 100%;\n margin-bottom: 8px;\n}\n\n.slider-value[_ngcontent-%COMP%] {\n text-align: center;\n font-size: 16px;\n font-weight: 600;\n color: #10b981;\n padding: 4px 0;\n}\n\n\n\n.question-daterange[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.daterange-start[_ngcontent-%COMP%], \n.daterange-end[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 150px;\n}\n\n.daterange-separator[_ngcontent-%COMP%] {\n font-weight: 500;\n color: #666;\n white-space: nowrap;\n}\n\n\n\n@media (max-width: 480px) {\n .question-daterange[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: stretch;\n }\n\n .daterange-separator[_ngcontent-%COMP%] {\n text-align: center;\n padding: 4px 0;\n }\n}\n\n\n\n\n\n\n.input-container[_ngcontent-%COMP%] {\n display: block;\n}\n\n\n\n.input-container.width-narrow[_ngcontent-%COMP%] {\n max-width: 200px;\n}\n\n.input-container.width-narrow[_ngcontent-%COMP%] .question-input[_ngcontent-%COMP%], \n.input-container.width-narrow[_ngcontent-%COMP%] .question-dropdown[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n\n\n.input-container.width-medium[_ngcontent-%COMP%] {\n max-width: 350px;\n}\n\n.input-container.width-medium[_ngcontent-%COMP%] .question-input[_ngcontent-%COMP%], \n.input-container.width-medium[_ngcontent-%COMP%] .question-dropdown[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n\n\n.input-container.width-wide[_ngcontent-%COMP%] {\n max-width: 500px;\n}\n\n.input-container.width-wide[_ngcontent-%COMP%] .question-input[_ngcontent-%COMP%], \n.input-container.width-wide[_ngcontent-%COMP%] .question-dropdown[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n\n\n.input-container.width-full[_ngcontent-%COMP%] {\n max-width: 100%;\n}\n\n.input-container.width-full[_ngcontent-%COMP%] .question-input[_ngcontent-%COMP%], \n.input-container.width-full[_ngcontent-%COMP%] .question-textarea[_ngcontent-%COMP%], \n.input-container.width-full[_ngcontent-%COMP%] .question-dropdown[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n\n\n.input-container.width-auto[_ngcontent-%COMP%] {\n max-width: 350px;\n min-width: 150px;\n width: auto;\n}\n\n.input-container.width-auto[_ngcontent-%COMP%] .question-dropdown[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n\n\n@media (max-width: 600px) {\n .input-container.width-narrow[_ngcontent-%COMP%], \n .input-container.width-medium[_ngcontent-%COMP%], \n .input-container.width-wide[_ngcontent-%COMP%], \n .input-container.width-auto[_ngcontent-%COMP%] {\n max-width: 100%;\n }\n}"] });
|
|
605
|
+
}
|
|
606
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormQuestionComponent, [{
|
|
607
|
+
type: Component,
|
|
608
|
+
args: [{ selector: 'mj-form-question', providers: [
|
|
609
|
+
{
|
|
610
|
+
provide: NG_VALUE_ACCESSOR,
|
|
611
|
+
useExisting: forwardRef(() => FormQuestionComponent),
|
|
612
|
+
multi: true
|
|
613
|
+
}
|
|
614
|
+
], template: "<div class=\"form-question\" [class.required]=\"question.required\">\n <!-- Label -->\n <label *ngIf=\"question.label\" class=\"question-label\">\n {{ question.label }}\n <span *ngIf=\"question.required\" class=\"required-indicator\">*</span>\n </label>\n\n <!-- Help Text -->\n <div *ngIf=\"question.helpText\" class=\"help-text\">\n {{ question.helpText }}\n </div>\n\n <!-- Input Container with width class -->\n <div class=\"input-container\" [ngClass]=\"widthClass\">\n\n <!-- Text Input -->\n <input\n *ngIf=\"questionType === 'text'\"\n type=\"text\"\n kendoTextBox\n [value]=\"value || ''\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (input)=\"onValueChange($any($event.target).value)\"\n class=\"question-input\"\n />\n\n <!-- Email Input -->\n <input\n *ngIf=\"questionType === 'email'\"\n type=\"email\"\n kendoTextBox\n [value]=\"value || ''\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (input)=\"onValueChange($any($event.target).value)\"\n class=\"question-input\"\n />\n\n <!-- Textarea -->\n <textarea\n *ngIf=\"questionType === 'textarea'\"\n kendoTextArea\n [value]=\"value || ''\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n (input)=\"onValueChange($any($event.target).value)\"\n class=\"question-textarea\"\n rows=\"3\"\n ></textarea>\n\n <!-- Number Input -->\n <kendo-numerictextbox\n *ngIf=\"questionType === 'number'\"\n [value]=\"value\"\n [min]=\"min || 0\"\n [max]=\"max || 999999999\"\n [step]=\"step || 1\"\n [disabled]=\"disabled\"\n (valueChange)=\"onValueChange($event)\"\n class=\"question-input\"\n ></kendo-numerictextbox>\n\n <!-- Currency Input -->\n <kendo-numerictextbox\n *ngIf=\"questionType === 'currency'\"\n [value]=\"value\"\n [min]=\"min || 0\"\n [max]=\"max || 999999999\"\n [step]=\"step || 0.01\"\n [format]=\"'c2'\"\n [disabled]=\"disabled\"\n (valueChange)=\"onValueChange($event)\"\n class=\"question-input\"\n ></kendo-numerictextbox>\n\n <!-- Date Picker -->\n <kendo-datepicker\n *ngIf=\"questionType === 'date'\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n (valueChange)=\"onValueChange($event)\"\n class=\"question-input\"\n ></kendo-datepicker>\n\n <!-- DateTime Picker -->\n <kendo-datetimepicker\n *ngIf=\"questionType === 'datetime'\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n (valueChange)=\"onValueChange($event)\"\n class=\"question-input\"\n ></kendo-datetimepicker>\n\n <!-- Button Group -->\n <kendo-buttongroup\n *ngIf=\"questionType === 'buttongroup'\"\n [selection]=\"'single'\"\n class=\"question-buttongroup\"\n >\n <button\n *ngFor=\"let option of options; trackBy: trackByValue\"\n kendoButton\n [toggleable]=\"true\"\n [selected]=\"value === option.value\"\n [disabled]=\"disabled\"\n (click)=\"onValueChange(option.value)\"\n class=\"buttongroup-option\"\n >\n <i *ngIf=\"option.icon\" class=\"fa {{ option.icon }}\" aria-hidden=\"true\"></i>\n {{ option.label }}\n </button>\n </kendo-buttongroup>\n\n <!-- Radio Buttons -->\n <div *ngIf=\"questionType === 'radio'\" class=\"question-radio-group\">\n <div *ngFor=\"let option of options; trackBy: trackByValue\" class=\"radio-option\">\n <input\n type=\"radio\"\n kendoRadioButton\n [name]=\"question.id\"\n [value]=\"option.value\"\n [checked]=\"value === option.value\"\n [disabled]=\"disabled\"\n (change)=\"onValueChange(option.value)\"\n [id]=\"question.id + '_' + option.value\"\n />\n <label [for]=\"question.id + '_' + option.value\" class=\"radio-label\">\n <i *ngIf=\"option.icon\" class=\"fa {{ option.icon }}\" aria-hidden=\"true\"></i>\n {{ option.label }}\n </label>\n </div>\n </div>\n\n <!-- Dropdown -->\n <select\n *ngIf=\"questionType === 'dropdown'\"\n [formControl]=\"control\"\n [disabled]=\"disabled\"\n class=\"question-dropdown\"\n >\n <option value=\"\">Select an option...</option>\n <option *ngFor=\"let option of options; trackBy: trackByValue\" [value]=\"option.value\">\n {{ option.label }}\n </option>\n </select>\n\n <!-- Slider -->\n <div *ngIf=\"questionType === 'slider'\" class=\"question-slider-container\">\n <kendo-slider\n [min]=\"getSliderConfig().min\"\n [max]=\"getSliderConfig().max\"\n [smallStep]=\"getSliderConfig().step || 1\"\n [value]=\"value || getSliderConfig().min\"\n [disabled]=\"disabled\"\n (valueChange)=\"onValueChange($event)\"\n class=\"question-slider\"\n ></kendo-slider>\n <div class=\"slider-value\">\n {{ value || getSliderConfig().min }}{{ getSliderConfig().suffix || '' }}\n </div>\n </div>\n\n <!-- Date Range -->\n <div *ngIf=\"questionType === 'daterange'\" class=\"question-daterange\">\n <kendo-datepicker\n [value]=\"value?.start\"\n [disabled]=\"disabled\"\n (valueChange)=\"onDateRangeStartChange($event)\"\n placeholder=\"Start Date\"\n class=\"daterange-start\"\n ></kendo-datepicker>\n <span class=\"daterange-separator\">to</span>\n <kendo-datepicker\n [value]=\"value?.end\"\n [disabled]=\"disabled\"\n (valueChange)=\"onDateRangeEndChange($event)\"\n placeholder=\"End Date\"\n class=\"daterange-end\"\n ></kendo-datepicker>\n </div>\n\n <!-- Time Picker -->\n <kendo-timepicker\n *ngIf=\"questionType === 'time'\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n (valueChange)=\"onValueChange($event)\"\n [format]=\"'h:mm a'\"\n class=\"question-input\"\n ></kendo-timepicker>\n\n <!-- Checkboxes -->\n <div *ngIf=\"questionType === 'checkbox'\" class=\"question-checkbox-group\">\n <div *ngFor=\"let option of options; trackBy: trackByValue\" class=\"checkbox-option\">\n <input\n type=\"checkbox\"\n kendoCheckBox\n [checked]=\"isChecked(option)\"\n [disabled]=\"disabled\"\n (change)=\"toggleCheckbox(option)\"\n [id]=\"question.id + '_' + option.value\"\n />\n <label [for]=\"question.id + '_' + option.value\" class=\"checkbox-label\">\n <i *ngIf=\"option.icon\" class=\"fa {{ option.icon }}\" aria-hidden=\"true\"></i>\n {{ option.label }}\n </label>\n </div>\n </div>\n </div><!-- end input-container -->\n\n <!-- Validation Error -->\n <div *ngIf=\"control?.invalid && control?.touched\" class=\"validation-error\">\n <span *ngIf=\"control?.errors?.['required']\">This field is required</span>\n <span *ngIf=\"control?.errors?.['email']\">Please enter a valid email address</span>\n <span *ngIf=\"control?.errors?.['min']\">Value must be at least {{ min }}</span>\n <span *ngIf=\"control?.errors?.['max']\">Value must be at most {{ max }}</span>\n </div>\n</div>\n", styles: [".form-question {\n margin-bottom: 16px;\n}\n\n.question-label {\n display: block;\n font-weight: 500;\n margin-bottom: 6px;\n color: #333;\n font-size: 14px;\n}\n\n.required-indicator {\n color: #d9534f;\n margin-left: 2px;\n}\n\n.help-text {\n font-size: 12px;\n color: #666;\n margin-bottom: 8px;\n font-style: italic;\n}\n\n/* Default widths - controlled by input-container width classes */\n.question-input,\n.question-textarea,\n.question-dropdown {\n width: 100%;\n max-width: 100%;\n}\n\n.question-dropdown {\n padding: 8px 12px;\n border: 1px solid #d1d5db;\n border-radius: 4px;\n font-size: 14px;\n font-family: inherit;\n background-color: white;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right 8px center;\n background-size: 12px;\n padding-right: 32px;\n cursor: pointer;\n transition: border-color 0.2s ease, box-shadow 0.2s ease;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n}\n\n.question-dropdown:hover {\n border-color: #9ca3af;\n}\n\n.question-dropdown:focus {\n outline: none;\n border-color: #667eea;\n box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);\n}\n\n.question-dropdown:disabled {\n background-color: #f3f4f6;\n cursor: not-allowed;\n opacity: 0.6;\n}\n\n.question-textarea {\n resize: vertical;\n min-height: 60px;\n}\n\n.question-buttongroup {\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n overflow-x: auto;\n overflow-y: hidden;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n scrollbar-color: rgba(16, 185, 129, 0.3) transparent;\n}\n\n.question-buttongroup::-webkit-scrollbar {\n height: 6px;\n}\n\n.question-buttongroup::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.question-buttongroup::-webkit-scrollbar-thumb {\n background: rgba(16, 185, 129, 0.3);\n border-radius: 3px;\n}\n\n.question-buttongroup::-webkit-scrollbar-thumb:hover {\n background: rgba(16, 185, 129, 0.5);\n}\n\n.buttongroup-option {\n flex: 0 0 auto;\n white-space: nowrap;\n}\n\n.buttongroup-option i {\n margin-right: 6px;\n}\n\n.question-radio-group,\n.question-checkbox-group {\n display: flex;\n flex-wrap: wrap;\n gap: 12px 16px;\n}\n\n.radio-option,\n.checkbox-option {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 120px;\n flex: 0 0 auto;\n}\n\n.radio-label,\n.checkbox-label {\n cursor: pointer;\n user-select: none;\n margin: 0;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.radio-label i,\n.checkbox-label i {\n color: #666;\n}\n\n.validation-error {\n color: #d9534f;\n font-size: 12px;\n margin-top: 4px;\n}\n\n/* Required field styling */\n.form-question.required .question-label {\n font-weight: 600;\n}\n\n/* Slider styling */\n.question-slider-container {\n width: 100%;\n}\n\n.question-slider {\n width: 100%;\n margin-bottom: 8px;\n}\n\n.slider-value {\n text-align: center;\n font-size: 16px;\n font-weight: 600;\n color: #10b981;\n padding: 4px 0;\n}\n\n/* Date range styling */\n.question-daterange {\n display: flex;\n align-items: center;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.daterange-start,\n.daterange-end {\n flex: 1;\n min-width: 150px;\n}\n\n.daterange-separator {\n font-weight: 500;\n color: #666;\n white-space: nowrap;\n}\n\n/* Mobile adjustments for date range */\n@media (max-width: 480px) {\n .question-daterange {\n flex-direction: column;\n align-items: stretch;\n }\n\n .daterange-separator {\n text-align: center;\n padding: 4px 0;\n }\n}\n\n/* ===== Semantic Width Classes ===== */\n/* Controls field width based on expected content length */\n\n.input-container {\n display: block;\n}\n\n/* Narrow fields - for numbers, dates, times, short codes */\n.input-container.width-narrow {\n max-width: 200px;\n}\n\n.input-container.width-narrow .question-input,\n.input-container.width-narrow .question-dropdown {\n width: 100%;\n}\n\n/* Medium fields - for names, cities, phone numbers (DEFAULT) */\n.input-container.width-medium {\n max-width: 350px;\n}\n\n.input-container.width-medium .question-input,\n.input-container.width-medium .question-dropdown {\n width: 100%;\n}\n\n/* Wide fields - for emails, URLs, long text */\n.input-container.width-wide {\n max-width: 500px;\n}\n\n.input-container.width-wide .question-input,\n.input-container.width-wide .question-dropdown {\n width: 100%;\n}\n\n/* Full width - for textarea, search fields */\n.input-container.width-full {\n max-width: 100%;\n}\n\n.input-container.width-full .question-input,\n.input-container.width-full .question-textarea,\n.input-container.width-full .question-dropdown {\n width: 100%;\n}\n\n/* Auto-width - for dropdowns, radio, checkbox (sizes to content) */\n.input-container.width-auto {\n max-width: 350px;\n min-width: 150px;\n width: auto;\n}\n\n.input-container.width-auto .question-dropdown {\n width: 100%;\n}\n\n/* Responsive adjustments for smaller screens */\n@media (max-width: 600px) {\n .input-container.width-narrow,\n .input-container.width-medium,\n .input-container.width-wide,\n .input-container.width-auto {\n max-width: 100%;\n }\n}\n"] }]
|
|
615
|
+
}], null, { question: [{
|
|
616
|
+
type: Input
|
|
617
|
+
}], control: [{
|
|
618
|
+
type: Input
|
|
619
|
+
}] }); })();
|
|
620
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FormQuestionComponent, { className: "FormQuestionComponent", filePath: "src/lib/components/message/form-question.component.ts", lineNumber: 21 }); })();
|
|
621
|
+
//# sourceMappingURL=form-question.component.js.map
|