survery-lib 0.1.9 → 0.1.11
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/assets/style.css +325 -0
- package/assets/style.css.map +1 -1
- package/ng-package.json +11 -0
- package/package.json +15 -27
- package/scss/style.scss +88 -0
- package/src/lib/components/question-boolean-template/question-boolean-template.component.html +13 -0
- package/src/lib/components/question-boolean-template/question-boolean-template.component.scss +0 -0
- package/src/lib/components/question-boolean-template/question-boolean-template.component.spec.ts +21 -0
- package/src/lib/components/question-boolean-template/question-boolean-template.component.ts +109 -0
- package/src/lib/components/question-check-box-template/question-check-box-template.component.html +13 -0
- package/src/lib/components/question-check-box-template/question-check-box-template.component.scss +0 -0
- package/src/lib/components/question-check-box-template/question-check-box-template.component.spec.ts +21 -0
- package/src/lib/components/question-check-box-template/question-check-box-template.component.ts +124 -0
- package/src/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.html +10 -0
- package/src/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.scss +3 -0
- package/src/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.spec.ts +21 -0
- package/src/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.ts +100 -0
- package/src/lib/components/question-dropdown-template/question-dropdown-template.component.html +10 -0
- package/src/lib/components/question-dropdown-template/question-dropdown-template.component.scss +0 -0
- package/src/lib/components/question-dropdown-template/question-dropdown-template.component.spec.ts +21 -0
- package/src/lib/components/question-dropdown-template/question-dropdown-template.component.ts +87 -0
- package/src/lib/components/question-matrix-template/question-matrix-template.component.html +36 -0
- package/src/lib/components/question-matrix-template/question-matrix-template.component.scss +0 -0
- package/src/lib/components/question-matrix-template/question-matrix-template.component.spec.ts +21 -0
- package/src/lib/components/question-matrix-template/question-matrix-template.component.ts +110 -0
- package/src/lib/components/question-radio-button-template/question-radio-button-template.component.html +13 -0
- package/src/lib/components/question-radio-button-template/question-radio-button-template.component.scss +0 -0
- package/src/lib/components/question-radio-button-template/question-radio-button-template.component.spec.ts +21 -0
- package/src/lib/components/question-radio-button-template/question-radio-button-template.component.ts +111 -0
- package/src/lib/components/question-text-template/question-text-template.component.html +13 -0
- package/src/lib/components/question-text-template/question-text-template.component.scss +0 -0
- package/src/lib/components/question-text-template/question-text-template.component.spec.ts +21 -0
- package/src/lib/components/question-text-template/question-text-template.component.ts +105 -0
- package/src/lib/pipes/default-question-answer.pipe.spec.ts +8 -0
- package/src/lib/pipes/default-question-answer.pipe.ts +18 -0
- package/src/lib/pipes/default-question-answers.pipe.spec.ts +8 -0
- package/src/lib/pipes/default-question-answers.pipe.ts +17 -0
- package/src/lib/pipes/filter-question.pipe.spec.ts +8 -0
- package/src/lib/pipes/filter-question.pipe.ts +14 -0
- package/src/lib/services/survey-lib.service.spec.ts +16 -0
- package/src/lib/services/survey-lib.service.ts +31 -0
- package/src/lib/survery-lib.component.spec.ts +21 -0
- package/src/lib/survery-lib.component.ts +308 -0
- package/src/lib/survery-lib.module.ts +47 -0
- package/src/lib/survey-lib.component.html +67 -0
- package/src/lib/survey-lib.component.scss +4 -0
- package/{lib/usecases/base/use-case.d.ts → src/lib/usecases/base/use-case.ts} +9 -7
- package/src/lib/usecases/check-rule-exps.usecase.ts +188 -0
- package/{public-api.d.ts → src/public-api.ts} +5 -1
- package/src/shared/dtos/default-question-answers.dto.ts +10 -0
- package/{shared/dtos/rule-exp-answer.dto.d.ts → src/shared/dtos/rule-exp-answer.dto.ts} +5 -5
- package/{shared/dtos/rule-exp.dto.d.ts → src/shared/dtos/rule-exp.dto.ts} +14 -13
- package/{shared/dtos/rule-result-question.dto.d.ts → src/shared/dtos/rule-result-question.dto.ts} +5 -4
- package/{shared/dtos/survey-answer.dto.d.ts → src/shared/dtos/survey-answer.dto.ts} +16 -16
- package/{shared/dtos/survey-answers-subject.dto.d.ts → src/shared/dtos/survey-answers-subject.dto.ts} +6 -5
- package/{shared/dtos/survey-page.dto.d.ts → src/shared/dtos/survey-page.dto.ts} +10 -9
- package/{shared/dtos/survey-question-group.dto.d.ts → src/shared/dtos/survey-question-group.dto.ts} +9 -8
- package/{shared/dtos/survey-question.dto.d.ts → src/shared/dtos/survey-question.dto.ts} +19 -18
- package/{shared/dtos/survey-rule.dto.d.ts → src/shared/dtos/survey-rule.dto.ts} +11 -10
- package/{shared/dtos/survey-sub-question.dto.d.ts → src/shared/dtos/survey-sub-question.dto.ts} +9 -9
- package/{shared/dtos/survey.dto.d.ts → src/shared/dtos/survey.dto.ts} +17 -16
- package/{shared/enums/logic-action.enum.d.ts → src/shared/enums/logic-action.enum.ts} +7 -7
- package/src/shared/enums/logic-property.enum.ts +12 -0
- package/src/shared/enums/operator.enum.ts +4 -0
- package/{shared/enums/question-type.enum.d.ts → src/shared/enums/question-type.enum.ts} +9 -8
- package/src/shared/form-interfaces/question-boolean-template.form-interface.ts +17 -0
- package/src/shared/form-interfaces/question-check-box-template.form-interface.ts +18 -0
- package/src/shared/form-interfaces/question-dropdown-multi-template.form-interface.ts +17 -0
- package/src/shared/form-interfaces/question-dropdown-template.form-interface.ts +10 -0
- package/{shared/form-interfaces/question-matrix-template.form-interface.d.ts → src/shared/form-interfaces/question-matrix-template.form-interface.ts} +13 -11
- package/src/shared/form-interfaces/question-radio-button-template.form-interface.ts +17 -0
- package/src/shared/form-interfaces/question-text-template.form-interface.ts +11 -0
- package/src/shared/form-interfaces/survery-lib.form-interface.ts +27 -0
- package/src/shared/models/question-answer.model.ts +6 -0
- package/src/shared/models/survery-question-result.model.ts +8 -0
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/esm2022/lib/components/question-boolean-template/question-boolean-template.component.mjs +0 -97
- package/esm2022/lib/components/question-check-box-template/question-check-box-template.component.mjs +0 -108
- package/esm2022/lib/components/question-dropdown-template/question-dropdown-template.component.mjs +0 -83
- package/esm2022/lib/components/question-matrix-template/question-matrix-template.component.mjs +0 -101
- package/esm2022/lib/components/question-radio-button-template/question-radio-button-template.component.mjs +0 -97
- package/esm2022/lib/components/question-text-template/question-text-template.component.mjs +0 -99
- package/esm2022/lib/pipes/default-question-answer.pipe.mjs +0 -19
- package/esm2022/lib/pipes/default-question-answers.pipe.mjs +0 -19
- package/esm2022/lib/pipes/filter-question.pipe.mjs +0 -16
- package/esm2022/lib/services/survey-lib.service.mjs +0 -30
- package/esm2022/lib/survery-lib.component.mjs +0 -270
- package/esm2022/lib/survery-lib.module.mjs +0 -59
- package/esm2022/lib/usecases/base/use-case.mjs +0 -2
- package/esm2022/lib/usecases/check-rule-exps.usecase.mjs +0 -154
- package/esm2022/public-api.mjs +0 -8
- package/esm2022/shared/dtos/default-question-answers.dto.mjs +0 -3
- package/esm2022/shared/dtos/rule-exp-answer.dto.mjs +0 -2
- package/esm2022/shared/dtos/rule-exp.dto.mjs +0 -2
- package/esm2022/shared/dtos/rule-result-question.dto.mjs +0 -2
- package/esm2022/shared/dtos/survey-answer.dto.mjs +0 -2
- package/esm2022/shared/dtos/survey-answers-subject.dto.mjs +0 -3
- package/esm2022/shared/dtos/survey-page.dto.mjs +0 -2
- package/esm2022/shared/dtos/survey-question-group.dto.mjs +0 -2
- package/esm2022/shared/dtos/survey-question.dto.mjs +0 -2
- package/esm2022/shared/dtos/survey-rule.dto.mjs +0 -2
- package/esm2022/shared/dtos/survey-sub-question.dto.mjs +0 -2
- package/esm2022/shared/dtos/survey.dto.mjs +0 -2
- package/esm2022/shared/enums/Logic-Property.enum.mjs +0 -14
- package/esm2022/shared/enums/logic-action.enum.mjs +0 -9
- package/esm2022/shared/enums/operator.enum.mjs +0 -6
- package/esm2022/shared/enums/question-type.enum.mjs +0 -10
- package/esm2022/shared/form-interfaces/question-boolean-template.form-interface.mjs +0 -2
- package/esm2022/shared/form-interfaces/question-check-box-template.form-interface.mjs +0 -3
- package/esm2022/shared/form-interfaces/question-dropdown-template.form-interface.mjs +0 -3
- package/esm2022/shared/form-interfaces/question-matrix-template.form-interface.mjs +0 -2
- package/esm2022/shared/form-interfaces/question-radio-button-template.form-interface.mjs +0 -3
- package/esm2022/shared/form-interfaces/question-text-template.form-interface.mjs +0 -2
- package/esm2022/shared/form-interfaces/survery-lib.form-interface.mjs +0 -2
- package/esm2022/shared/models/question-answer.model.mjs +0 -3
- package/esm2022/shared/models/survery-question-result.model.mjs +0 -3
- package/esm2022/survery-lib.mjs +0 -5
- package/fesm2022/survery-lib.mjs +0 -1114
- package/fesm2022/survery-lib.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/question-boolean-template/question-boolean-template.component.d.ts +0 -36
- package/lib/components/question-check-box-template/question-check-box-template.component.d.ts +0 -37
- package/lib/components/question-dropdown-template/question-dropdown-template.component.d.ts +0 -33
- package/lib/components/question-matrix-template/question-matrix-template.component.d.ts +0 -33
- package/lib/components/question-radio-button-template/question-radio-button-template.component.d.ts +0 -36
- package/lib/components/question-text-template/question-text-template.component.d.ts +0 -35
- package/lib/pipes/default-question-answer.pipe.d.ts +0 -8
- package/lib/pipes/default-question-answers.pipe.d.ts +0 -8
- package/lib/pipes/filter-question.pipe.d.ts +0 -9
- package/lib/services/survey-lib.service.d.ts +0 -14
- package/lib/survery-lib.component.d.ts +0 -45
- package/lib/survery-lib.module.d.ts +0 -22
- package/lib/usecases/check-rule-exps.usecase.d.ts +0 -21
- package/shared/dtos/default-question-answers.dto.d.ts +0 -9
- package/shared/enums/Logic-Property.enum.d.ts +0 -12
- package/shared/enums/operator.enum.d.ts +0 -4
- package/shared/form-interfaces/question-boolean-template.form-interface.d.ts +0 -15
- package/shared/form-interfaces/question-check-box-template.form-interface.d.ts +0 -15
- package/shared/form-interfaces/question-dropdown-template.form-interface.d.ts +0 -9
- package/shared/form-interfaces/question-radio-button-template.form-interface.d.ts +0 -15
- package/shared/form-interfaces/question-text-template.form-interface.d.ts +0 -10
- package/shared/form-interfaces/survery-lib.form-interface.d.ts +0 -24
- package/shared/models/question-answer.model.d.ts +0 -6
- package/shared/models/survery-question-result.model.d.ts +0 -8
package/assets/style.css
CHANGED
|
@@ -1,3 +1,325 @@
|
|
|
1
|
+
.ng-select.ng-select-opened > .ng-select-container {
|
|
2
|
+
background: #ffffff;
|
|
3
|
+
border-color: #b3b3b3 #ccc #d9d9d9;
|
|
4
|
+
}
|
|
5
|
+
.ng-select.ng-select-opened > .ng-select-container:hover {
|
|
6
|
+
box-shadow: none;
|
|
7
|
+
}
|
|
8
|
+
.ng-select.ng-select-opened > .ng-select-container .ng-arrow {
|
|
9
|
+
top: -2px;
|
|
10
|
+
border-color: transparent transparent #999999;
|
|
11
|
+
border-width: 0 5px 5px;
|
|
12
|
+
}
|
|
13
|
+
.ng-select.ng-select-opened > .ng-select-container .ng-arrow:hover {
|
|
14
|
+
border-color: transparent transparent #333333;
|
|
15
|
+
}
|
|
16
|
+
.ng-select.ng-select-opened.ng-select-top > .ng-select-container {
|
|
17
|
+
border-top-right-radius: 0;
|
|
18
|
+
border-top-left-radius: 0;
|
|
19
|
+
}
|
|
20
|
+
.ng-select.ng-select-opened.ng-select-right > .ng-select-container {
|
|
21
|
+
border-top-right-radius: 0;
|
|
22
|
+
border-bottom-right-radius: 0;
|
|
23
|
+
}
|
|
24
|
+
.ng-select.ng-select-opened.ng-select-bottom > .ng-select-container {
|
|
25
|
+
border-bottom-right-radius: 0;
|
|
26
|
+
border-bottom-left-radius: 0;
|
|
27
|
+
}
|
|
28
|
+
.ng-select.ng-select-opened.ng-select-left > .ng-select-container {
|
|
29
|
+
border-top-left-radius: 0;
|
|
30
|
+
border-bottom-left-radius: 0;
|
|
31
|
+
}
|
|
32
|
+
.ng-select.ng-select-focused:not(.ng-select-opened) > .ng-select-container {
|
|
33
|
+
border-color: #007eff;
|
|
34
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 3px rgba(0, 126, 255, 0.1);
|
|
35
|
+
}
|
|
36
|
+
.ng-select.ng-select-disabled > .ng-select-container {
|
|
37
|
+
background-color: #f9f9f9;
|
|
38
|
+
}
|
|
39
|
+
.ng-select .ng-has-value .ng-placeholder {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
.ng-select .ng-select-container {
|
|
43
|
+
color: #333;
|
|
44
|
+
background-color: #ffffff;
|
|
45
|
+
border-radius: 4px;
|
|
46
|
+
border: 1px solid #ccc;
|
|
47
|
+
min-height: 36px;
|
|
48
|
+
align-items: center;
|
|
49
|
+
}
|
|
50
|
+
.ng-select .ng-select-container:hover {
|
|
51
|
+
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
|
|
52
|
+
}
|
|
53
|
+
.ng-select .ng-select-container .ng-value-container {
|
|
54
|
+
align-items: center;
|
|
55
|
+
padding-left: 10px;
|
|
56
|
+
}
|
|
57
|
+
[dir=rtl] .ng-select .ng-select-container .ng-value-container {
|
|
58
|
+
padding-right: 10px;
|
|
59
|
+
padding-left: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ng-select .ng-select-container .ng-value-container .ng-placeholder {
|
|
63
|
+
color: #999999;
|
|
64
|
+
}
|
|
65
|
+
.ng-select.ng-select-single .ng-select-container {
|
|
66
|
+
height: 36px;
|
|
67
|
+
}
|
|
68
|
+
.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input {
|
|
69
|
+
top: 5px;
|
|
70
|
+
left: 0;
|
|
71
|
+
padding-left: 10px;
|
|
72
|
+
padding-right: 50px;
|
|
73
|
+
}
|
|
74
|
+
[dir=rtl] .ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input {
|
|
75
|
+
padding-right: 10px;
|
|
76
|
+
padding-left: 50px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.ng-select.ng-select-multiple.ng-select-disabled > .ng-select-container .ng-value-container .ng-value {
|
|
80
|
+
background-color: #f9f9f9;
|
|
81
|
+
border: 1px solid #e6e6e6;
|
|
82
|
+
}
|
|
83
|
+
.ng-select.ng-select-multiple.ng-select-disabled > .ng-select-container .ng-value-container .ng-value .ng-value-label {
|
|
84
|
+
padding: 0 5px;
|
|
85
|
+
}
|
|
86
|
+
.ng-select.ng-select-multiple .ng-select-container .ng-value-container {
|
|
87
|
+
padding-top: 5px;
|
|
88
|
+
padding-left: 7px;
|
|
89
|
+
}
|
|
90
|
+
[dir=rtl] .ng-select.ng-select-multiple .ng-select-container .ng-value-container {
|
|
91
|
+
padding-right: 7px;
|
|
92
|
+
padding-left: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value {
|
|
96
|
+
font-size: 0.9em;
|
|
97
|
+
margin-bottom: 5px;
|
|
98
|
+
color: #333;
|
|
99
|
+
background-color: #ebf5ff;
|
|
100
|
+
border-radius: 2px;
|
|
101
|
+
margin-right: 5px;
|
|
102
|
+
}
|
|
103
|
+
[dir=rtl] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value {
|
|
104
|
+
margin-right: 0;
|
|
105
|
+
margin-left: 5px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled {
|
|
109
|
+
background-color: #f9f9f9;
|
|
110
|
+
}
|
|
111
|
+
.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-label {
|
|
112
|
+
padding-left: 5px;
|
|
113
|
+
}
|
|
114
|
+
[dir=rtl] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-label {
|
|
115
|
+
padding-left: 0;
|
|
116
|
+
padding-right: 5px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-label {
|
|
120
|
+
display: inline-block;
|
|
121
|
+
padding: 1px 5px;
|
|
122
|
+
}
|
|
123
|
+
.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon {
|
|
124
|
+
display: inline-block;
|
|
125
|
+
padding: 1px 5px;
|
|
126
|
+
}
|
|
127
|
+
.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon:hover {
|
|
128
|
+
background-color: #d1e8ff;
|
|
129
|
+
}
|
|
130
|
+
.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.left {
|
|
131
|
+
border-right: 1px solid #b8dbff;
|
|
132
|
+
}
|
|
133
|
+
[dir=rtl] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.left {
|
|
134
|
+
border-left: 1px solid #b8dbff;
|
|
135
|
+
border-right: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.right {
|
|
139
|
+
border-left: 1px solid #b8dbff;
|
|
140
|
+
}
|
|
141
|
+
[dir=rtl] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon.right {
|
|
142
|
+
border-left: 0;
|
|
143
|
+
border-right: 1px solid #b8dbff;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input {
|
|
147
|
+
padding: 0 0 3px 3px;
|
|
148
|
+
}
|
|
149
|
+
[dir=rtl] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input {
|
|
150
|
+
padding: 0 3px 3px 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input > input {
|
|
154
|
+
color: #000000;
|
|
155
|
+
}
|
|
156
|
+
.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder {
|
|
157
|
+
top: 5px;
|
|
158
|
+
padding-bottom: 5px;
|
|
159
|
+
padding-left: 3px;
|
|
160
|
+
}
|
|
161
|
+
[dir=rtl] .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder {
|
|
162
|
+
padding-right: 3px;
|
|
163
|
+
padding-left: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.ng-select .ng-clear-wrapper {
|
|
167
|
+
color: #999999;
|
|
168
|
+
}
|
|
169
|
+
.ng-select .ng-clear-wrapper:hover .ng-clear {
|
|
170
|
+
color: #D0021B;
|
|
171
|
+
}
|
|
172
|
+
.ng-select .ng-clear-wrapper:focus .ng-clear {
|
|
173
|
+
color: #D0021B;
|
|
174
|
+
}
|
|
175
|
+
.ng-select .ng-clear-wrapper:focus {
|
|
176
|
+
outline: none;
|
|
177
|
+
}
|
|
178
|
+
.ng-select .ng-spinner-zone {
|
|
179
|
+
padding: 5px 5px 0 0;
|
|
180
|
+
}
|
|
181
|
+
[dir=rtl] .ng-select .ng-spinner-zone {
|
|
182
|
+
padding: 5px 0 0 5px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.ng-select .ng-arrow-wrapper {
|
|
186
|
+
width: 25px;
|
|
187
|
+
padding-right: 5px;
|
|
188
|
+
}
|
|
189
|
+
[dir=rtl] .ng-select .ng-arrow-wrapper {
|
|
190
|
+
padding-left: 5px;
|
|
191
|
+
padding-right: 0;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.ng-select .ng-arrow-wrapper:hover .ng-arrow {
|
|
195
|
+
border-top-color: #666666;
|
|
196
|
+
}
|
|
197
|
+
.ng-select .ng-arrow-wrapper .ng-arrow {
|
|
198
|
+
border-color: #999999 transparent transparent;
|
|
199
|
+
border-style: solid;
|
|
200
|
+
border-width: 5px 5px 2.5px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.ng-dropdown-panel {
|
|
204
|
+
background-color: #ffffff;
|
|
205
|
+
border: 1px solid #ccc;
|
|
206
|
+
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
|
|
207
|
+
left: 0;
|
|
208
|
+
}
|
|
209
|
+
.ng-dropdown-panel.ng-select-top {
|
|
210
|
+
bottom: 100%;
|
|
211
|
+
border-top-right-radius: 4px;
|
|
212
|
+
border-top-left-radius: 4px;
|
|
213
|
+
border-bottom-color: #e6e6e6;
|
|
214
|
+
margin-bottom: -1px;
|
|
215
|
+
}
|
|
216
|
+
.ng-dropdown-panel.ng-select-top .ng-dropdown-panel-items .ng-option:first-child {
|
|
217
|
+
border-top-right-radius: 4px;
|
|
218
|
+
border-top-left-radius: 4px;
|
|
219
|
+
}
|
|
220
|
+
.ng-dropdown-panel.ng-select-right {
|
|
221
|
+
left: 100%;
|
|
222
|
+
top: 0;
|
|
223
|
+
border-top-right-radius: 4px;
|
|
224
|
+
border-bottom-right-radius: 4px;
|
|
225
|
+
border-bottom-left-radius: 4px;
|
|
226
|
+
border-bottom-color: #e6e6e6;
|
|
227
|
+
margin-bottom: -1px;
|
|
228
|
+
}
|
|
229
|
+
.ng-dropdown-panel.ng-select-right .ng-dropdown-panel-items .ng-option:first-child {
|
|
230
|
+
border-top-right-radius: 4px;
|
|
231
|
+
}
|
|
232
|
+
.ng-dropdown-panel.ng-select-bottom {
|
|
233
|
+
top: 100%;
|
|
234
|
+
border-bottom-right-radius: 4px;
|
|
235
|
+
border-bottom-left-radius: 4px;
|
|
236
|
+
border-top-color: #e6e6e6;
|
|
237
|
+
margin-top: -1px;
|
|
238
|
+
}
|
|
239
|
+
.ng-dropdown-panel.ng-select-bottom .ng-dropdown-panel-items .ng-option:last-child {
|
|
240
|
+
border-bottom-right-radius: 4px;
|
|
241
|
+
border-bottom-left-radius: 4px;
|
|
242
|
+
}
|
|
243
|
+
.ng-dropdown-panel.ng-select-left {
|
|
244
|
+
left: -100%;
|
|
245
|
+
top: 0;
|
|
246
|
+
border-top-left-radius: 4px;
|
|
247
|
+
border-bottom-right-radius: 4px;
|
|
248
|
+
border-bottom-left-radius: 4px;
|
|
249
|
+
border-bottom-color: #e6e6e6;
|
|
250
|
+
margin-bottom: -1px;
|
|
251
|
+
}
|
|
252
|
+
.ng-dropdown-panel.ng-select-left .ng-dropdown-panel-items .ng-option:first-child {
|
|
253
|
+
border-top-left-radius: 4px;
|
|
254
|
+
}
|
|
255
|
+
.ng-dropdown-panel .ng-dropdown-header {
|
|
256
|
+
border-bottom: 1px solid #ccc;
|
|
257
|
+
padding: 5px 7px;
|
|
258
|
+
}
|
|
259
|
+
.ng-dropdown-panel .ng-dropdown-footer {
|
|
260
|
+
border-top: 1px solid #ccc;
|
|
261
|
+
padding: 5px 7px;
|
|
262
|
+
}
|
|
263
|
+
.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup {
|
|
264
|
+
user-select: none;
|
|
265
|
+
padding: 8px 10px;
|
|
266
|
+
font-weight: 500;
|
|
267
|
+
color: rgba(0, 0, 0, 0.54);
|
|
268
|
+
cursor: pointer;
|
|
269
|
+
}
|
|
270
|
+
.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-disabled {
|
|
271
|
+
cursor: default;
|
|
272
|
+
}
|
|
273
|
+
.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-marked {
|
|
274
|
+
background-color: #f5faff;
|
|
275
|
+
}
|
|
276
|
+
.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-selected, .ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup.ng-option-selected.ng-option-marked {
|
|
277
|
+
color: rgba(0, 0, 0, 0.54);
|
|
278
|
+
background-color: #ebf5ff;
|
|
279
|
+
font-weight: 600;
|
|
280
|
+
}
|
|
281
|
+
.ng-dropdown-panel .ng-dropdown-panel-items .ng-option {
|
|
282
|
+
background-color: #ffffff;
|
|
283
|
+
color: rgba(0, 0, 0, 0.87);
|
|
284
|
+
padding: 8px 10px;
|
|
285
|
+
}
|
|
286
|
+
.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected, .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked {
|
|
287
|
+
color: #333;
|
|
288
|
+
background-color: #ebf5ff;
|
|
289
|
+
}
|
|
290
|
+
.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected .ng-option-label, .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked .ng-option-label {
|
|
291
|
+
font-weight: 600;
|
|
292
|
+
}
|
|
293
|
+
.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-marked {
|
|
294
|
+
background-color: #f5faff;
|
|
295
|
+
color: #333;
|
|
296
|
+
}
|
|
297
|
+
.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-disabled {
|
|
298
|
+
color: #cccccc;
|
|
299
|
+
}
|
|
300
|
+
.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-child {
|
|
301
|
+
padding-left: 22px;
|
|
302
|
+
}
|
|
303
|
+
[dir=rtl] .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-child {
|
|
304
|
+
padding-right: 22px;
|
|
305
|
+
padding-left: 0;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-tag-label {
|
|
309
|
+
font-size: 80%;
|
|
310
|
+
font-weight: 400;
|
|
311
|
+
padding-right: 5px;
|
|
312
|
+
}
|
|
313
|
+
[dir=rtl] .ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-tag-label {
|
|
314
|
+
padding-left: 5px;
|
|
315
|
+
padding-right: 0;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
[dir=rtl] .ng-dropdown-panel {
|
|
319
|
+
direction: rtl;
|
|
320
|
+
text-align: right;
|
|
321
|
+
}
|
|
322
|
+
|
|
1
323
|
lib-survery-lib .survay-pagination nav ul.pagination {
|
|
2
324
|
display: flex;
|
|
3
325
|
gap: 8px;
|
|
@@ -54,5 +376,8 @@ lib-survery-lib .survey-page_submitted .invalid-question {
|
|
|
54
376
|
border-radius: 5px;
|
|
55
377
|
border-bottom: 2px solid red !important;
|
|
56
378
|
}
|
|
379
|
+
lib-survery-lib ng-select {
|
|
380
|
+
font-size: 20px !important;
|
|
381
|
+
}
|
|
57
382
|
|
|
58
383
|
/*# sourceMappingURL=style.css.map */
|
package/assets/style.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../scss/style.scss"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../node_modules/@ng-select/ng-select/scss/default.theme.scss","../../../node_modules/@ng-select/ng-select/scss/_mixins.scss","../scss/style.scss"],"names":[],"mappings":"AAiCQ;EACI,YA3BG;EA4BH;;AACA;EACI;;AAEJ;EACI;EACA;EACA;;AACA;EACI;;AAKR;EACI;EACA;;AAIJ;EACI;EACA;;AAIJ;EACI;EACA;;AAIJ;EACI;EACA;;AAKR;EACI,cAzEU;EA0EV,YA9DW;;AAkEf;EACI,kBA7Ec;;AAgFtB;EACI;;AAEJ;EACI,OArFiB;EAsFjB,kBAlFO;EAmFP,eApFkB;EAqFlB;EACA,YA5EW;EA6EX;;AACA;EACI;;AAEJ;EACI;EACA,cAlFmB;;AChBlB;EDoGG,eApFe;EAqFf;;;AAEJ;EACI,OA1FQ;;AA+FhB;EACI,QA/FO;;AAiGH;EACI;EACA;EACA,cAnGW;EAoGX;;ACpHP;EDsHW,eAtGO;EAuGP;;;AAQZ;EACI,kBA7HU;EA8HV;;AACA;EACI;;AAKR;EACI;EACA;;AC1IH;ED4IO;EACA;;;AAEJ;EACI,WA/HQ;EAgIR;EACA,OAhJK;EAiJL,kBA5IC;EA6ID;EACA;;ACrJP;EDuJW;EACA;;;AAEJ;EACI,kBAxJE;;AAyJF;EACI;;AC7Jf;ED+JmB;EACA;;;AAIZ;EACI;EACA;;AAEJ;EACI;EACA;;AACA;EACI;;AAEJ;EACI;;AC/Kf;EDiLmB;EACA;;;AAGR;EACI;;ACtLf;EDwLmB;EACA;;;AAKhB;EACI;;AC/LP;EDiMW;;;AAEJ;EACI,OAxKD;;AA2KP;EACI;EACA;EACA;;AC1MP;ED4MW;EACA;;;AAMpB;EACI;;AACA;EACI;;AAEJ;EACI;;AAEJ;EACI;;AAGR;EACI;;AChOK;EDmOD;;;AAGR;EACI;EACA;;ACxOK;ED0OD;EACA;;;AAGA;EACI;;AAGR;EACI;EACA;EACA;;;AAKZ;EACI,kBArPW;EAsPX;EACA;EACA;;AACA;EACI;EACA,yBA5PkB;EA6PlB,wBA7PkB;EA8PlB;EACA;;AAGQ;EACI,yBAnQM;EAoQN,wBApQM;;AAyQtB;EACI;EACA;EACA,yBA5QkB;EA6QlB,4BA7QkB;EA8QlB,2BA9QkB;EA+QlB;EACA;;AAGQ;EACI,yBApRM;;AAyRtB;EACI;EACA,4BA3RkB;EA4RlB,2BA5RkB;EA6RlB;EACA;;AAGQ;EACI,4BAlSM;EAmSN,2BAnSM;;AAwStB;EACI;EACA;EACA,wBA3SkB;EA4SlB,4BA5SkB;EA6SlB,2BA7SkB;EA8SlB;EACA;;AAGQ;EACI,wBAnTM;;AAwTtB;EACI;EACA;;AAEJ;EACI;EACA;;AAGA;EACI;EACA;EACA;EACA,OApTuB;EAqTvB;;AACA;EACI;;AAEJ;EACI,kBAtUG;;AAwUP;EACI,OA7TmB;EA8TnB,kBA7UK;EA8UL;;AAGR;EACI,kBAnVG;EAoVH,OAjUqB;EAkUrB;;AACA;EACI,OA3VS;EA4VT,kBAvVK;;AAwVL;EACI;;AAGR;EACI,kBA1VG;EA2VH,OAnWS;;AAqWb;EACI,OA9UqB;;AAgVzB;EACI;;AC3WH;ED6WO;EACA;;;AAGR;EACI;EACA;EACA;;ACpXH;EDsXO;EACA;;;ACvXP;ED8XL;EACA;;;AE1XI;EACI;EACA;;AAIQ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAOJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAOJ;EACI;EACA;EACA;;AAKJ;EACI;EACA;EACA;;AAIR;EACI;AACA;EACA;EACA;EACA;EACA;AACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAOpB;EACI;EACA;EACA;;AAGJ;EACI","file":"style.css"}
|
package/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,27 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "survery-lib",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^16.1.0",
|
|
6
|
-
"@angular/core": "^16.1.0"
|
|
7
|
-
},
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"tslib": "^2.3.0",
|
|
10
|
-
"@ng-stack/forms": "^3.1.0",
|
|
11
|
-
"uuid": "^8.3.2"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
"exports": {
|
|
17
|
-
"./package.json": {
|
|
18
|
-
"default": "./package.json"
|
|
19
|
-
},
|
|
20
|
-
".": {
|
|
21
|
-
"types": "./index.d.ts",
|
|
22
|
-
"esm2022": "./esm2022/survery-lib.mjs",
|
|
23
|
-
"esm": "./esm2022/survery-lib.mjs",
|
|
24
|
-
"default": "./fesm2022/survery-lib.mjs"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "survery-lib",
|
|
3
|
+
"version": "0.1.11",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^16.1.0",
|
|
6
|
+
"@angular/core": "^16.1.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0",
|
|
10
|
+
"@ng-stack/forms": "^3.1.0",
|
|
11
|
+
"uuid": "^8.3.2",
|
|
12
|
+
"@ng-select/ng-select": "^11.2.0"
|
|
13
|
+
},
|
|
14
|
+
"sideEffects": false
|
|
15
|
+
}
|
package/scss/style.scss
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@import "../../../node_modules/@ng-select/ng-select/scss/default.theme.scss";
|
|
2
|
+
|
|
3
|
+
lib-survery-lib {
|
|
4
|
+
.survay-pagination {
|
|
5
|
+
nav {
|
|
6
|
+
ul.pagination {
|
|
7
|
+
display: flex;
|
|
8
|
+
gap: 8px;
|
|
9
|
+
|
|
10
|
+
li.page-item.next-page-item {
|
|
11
|
+
a {
|
|
12
|
+
&::after {
|
|
13
|
+
content: ' ';
|
|
14
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxOCAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkFycm93IC0gTGVmdCI+CjxwYXRoIGlkPSJGaWxsIDEiIG9wYWNpdHk9IjAuNCIgZD0iTTEyLjc5NzUgNC44MDk1N0wxNi40OTY3IDQuNDgyNDJDMTcuMzI2OSA0LjQ4MjQyIDE4IDUuMTYyMDYgMTggNi4wMDAzMkMxOCA2LjgzODU4IDE3LjMyNjkgNy41MTgyMiAxNi40OTY3IDcuNTE4MjJMMTIuNzk3NSA3LjE5MTA3QzEyLjE0NjMgNy4xOTEwNyAxMS42MTgzIDYuNjU3OTMgMTEuNjE4MyA2LjAwMDMyQzExLjYxODMgNS4zNDE2MSAxMi4xNDYzIDQuODA5NTcgMTIuNzk3NSA0LjgwOTU3WiIgZmlsbD0iIzRDM0Q4RiIvPgo8cGF0aCBpZD0iRmlsbCA0IiBkPSJNMC4zNzUzNCA0Ljg2OTg0QzAuNDMzMTU3IDQuODExNDYgMC42NDkxNTUgNC41NjQ3MSAwLjg1MjA2MSA0LjM1OTgzQzIuMDM1NjggMy4wNzY1NiA1LjEyNjE5IDAuOTc4MTUzIDYuNzQyOSAwLjMzNTk2NUM2Ljk4ODM1IDAuMjMzNTIzIDcuNjA5MDcgMC4wMTU0MjEzIDcuOTQxNzkgMEM4LjI1OTI0IDAgOC41NjI1MSAwLjA3MzgwMjEgOC44NTE2IDAuMjE5MjAzQzkuMjEyNjkgMC40MjI5ODUgOS41MDA2OCAwLjc0NDYzIDkuNjU5OTUgMS4xMjM1NUM5Ljc2MTQxIDEuMzg1NzIgOS45MjA2OCAyLjE3MzMxIDkuOTIwNjggMi4xODc2M0MxMC4wNzg5IDMuMDQ3OTIgMTAuMTY1IDQuNDQ2ODUgMTAuMTY1IDUuOTkzMzlDMTAuMTY1IDcuNDY1MDMgMTAuMDc4OSA4LjgwNjY4IDkuOTQ5MDQgOS42ODEyOUM5LjkzNDg2IDkuNjk2NzEgOS43NzU1OSAxMC42NzM4IDkuNjAyMTQgMTEuMDA4NkM5LjI4NDY5IDExLjYyMTEgOC42NjM5NyAxMiA3Ljk5OTYxIDEySDcuOTQxNzlDNy41MDg3MSAxMS45ODU3IDYuNTk4OSAxMS42MDU3IDYuNTk4OSAxMS41OTI0QzUuMDY4MzcgMTAuOTUwMiAyLjA1MDk2IDguOTUzMTkgMC44Mzc4NzkgNy42MjU4NUMwLjgzNzg3OSA3LjYyNTg1IDAuNDk1MzM4IDcuMjg0MzggMC4zNDY5NzYgNy4wNzE3OEMwLjExNTcwNiA2Ljc2NTU2IDcuMTUyNTZlLTA1IDYuMzg2NjMgNy4xNTI1NmUtMDUgNi4wMDc3MUM3LjE1MjU2ZS0wNSA1LjU4NDczIDAuMTI5ODg4IDUuMTkxNDggMC4zNzUzNCA0Ljg2OTg0WiIgZmlsbD0iIzRDM0Q4RiIvPgo8L2c+Cjwvc3ZnPgo=);
|
|
15
|
+
width: 20px;
|
|
16
|
+
height: 20px;
|
|
17
|
+
display: inline-block;
|
|
18
|
+
background-repeat: no-repeat;
|
|
19
|
+
background-position: center;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
li.page-item.previous-page-item {
|
|
25
|
+
a {
|
|
26
|
+
&::before {
|
|
27
|
+
content: ' ';
|
|
28
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxOCAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkFycm93IC0gTGVmdCI+CjxwYXRoIGlkPSJGaWxsIDEiIG9wYWNpdHk9IjAuNCIgZD0iTTUuMjAyNDggNC44MDk1N0wxLjUwMzI1IDQuNDgyNDJDMC42NzMwODMgNC40ODI0MiAwIDUuMTYyMDYgMCA2LjAwMDMyQzAgNi44Mzg1OCAwLjY3MzA4MyA3LjUxODIyIDEuNTAzMjUgNy41MTgyMkw1LjIwMjQ4IDcuMTkxMDdDNS44NTM3NSA3LjE5MTA3IDYuMzgxNzQgNi42NTc5MyA2LjM4MTc0IDYuMDAwMzJDNi4zODE3NCA1LjM0MTYxIDUuODUzNzUgNC44MDk1NyA1LjIwMjQ4IDQuODA5NTdaIiBmaWxsPSIjNEMzRDhGIi8+CjxwYXRoIGlkPSJGaWxsIDQiIGQ9Ik0xNy42MjQ3IDQuODY5ODRDMTcuNTY2OCA0LjgxMTQ2IDE3LjM1MDggNC41NjQ3MSAxNy4xNDc5IDQuMzU5ODNDMTUuOTY0MyAzLjA3NjU2IDEyLjg3MzggMC45NzgxNTMgMTEuMjU3MSAwLjMzNTk2NUMxMS4wMTE2IDAuMjMzNTIzIDEwLjM5MDkgMC4wMTU0MjEzIDEwLjA1ODIgMEM5Ljc0MDc2IDAgOS40Mzc0OSAwLjA3MzgwMjEgOS4xNDg0IDAuMjE5MjAzQzguNzg3MzEgMC40MjI5ODUgOC40OTkzMiAwLjc0NDYzIDguMzQwMDUgMS4xMjM1NUM4LjIzODU5IDEuMzg1NzIgOC4wNzkzMiAyLjE3MzMxIDguMDc5MzIgMi4xODc2M0M3LjkyMTE0IDMuMDQ3OTIgNy44MzQ5NiA0LjQ0Njg1IDcuODM0OTYgNS45OTMzOUM3LjgzNDk2IDcuNDY1MDMgNy45MjExNCA4LjgwNjY4IDguMDUwOTYgOS42ODEyOUM4LjA2NTE0IDkuNjk2NzEgOC4yMjQ0MSAxMC42NzM4IDguMzk3ODYgMTEuMDA4NkM4LjcxNTMxIDExLjYyMTEgOS4zMzYwMyAxMiAxMC4wMDA0IDEySDEwLjA1ODJDMTAuNDkxMyAxMS45ODU3IDExLjQwMTEgMTEuNjA1NyAxMS40MDExIDExLjU5MjRDMTIuOTMxNiAxMC45NTAyIDE1Ljk0OSA4Ljk1MzE5IDE3LjE2MjEgNy42MjU4NUMxNy4xNjIxIDcuNjI1ODUgMTcuNTA0NyA3LjI4NDM4IDE3LjY1MyA3LjA3MTc4QzE3Ljg4NDMgNi43NjU1NiAxNy45OTk5IDYuMzg2NjMgMTcuOTk5OSA2LjAwNzcxQzE3Ljk5OTkgNS41ODQ3MyAxNy44NzAxIDUuMTkxNDggMTcuNjI0NyA0Ljg2OTg0WiIgZmlsbD0iIzRDM0Q4RiIvPgo8L2c+Cjwvc3ZnPgo=);
|
|
29
|
+
width: 20px;
|
|
30
|
+
height: 20px;
|
|
31
|
+
display: inline-block;
|
|
32
|
+
background-repeat: no-repeat;
|
|
33
|
+
background-position: center;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
li.page-item {
|
|
39
|
+
&.active {
|
|
40
|
+
a {
|
|
41
|
+
border-radius: 8px;
|
|
42
|
+
background: var(--primary-100, #4C3D8F);
|
|
43
|
+
color: #fff;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:hover {
|
|
48
|
+
a {
|
|
49
|
+
border-radius: 8px;
|
|
50
|
+
background: var(--primary-100, #4C3D8F);
|
|
51
|
+
color: #fff;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
a {
|
|
56
|
+
color: var(--dark-100, #363636);
|
|
57
|
+
/* Body/Bold */
|
|
58
|
+
font-size: 16px;
|
|
59
|
+
font-style: normal;
|
|
60
|
+
font-weight: 700;
|
|
61
|
+
line-height: 24px;
|
|
62
|
+
/* 150% */
|
|
63
|
+
display: flex;
|
|
64
|
+
min-width: 50px;
|
|
65
|
+
height: 50px;
|
|
66
|
+
padding: 20px;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: 10px;
|
|
70
|
+
border-radius: 8px;
|
|
71
|
+
background: var(--secondary-20, #F4F5FE);
|
|
72
|
+
border: none;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.survey-page_submitted .invalid-question {
|
|
80
|
+
border: 2px solid red;
|
|
81
|
+
border-radius: 5px;
|
|
82
|
+
border-bottom: 2px solid red !important;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
ng-select{
|
|
86
|
+
font-size: 20px !important;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div class="quastion" [attr.id]="'question_'+fCtrls.id.value" [ngClass]="{'invalid-question': fCtrls.answer.invalid , 'd-none':isShow != true}">
|
|
2
|
+
<h3 class="quastion-title ">
|
|
3
|
+
{{fCtrls.title.value}}
|
|
4
|
+
</h3>
|
|
5
|
+
<div class="radio-button-quastion">
|
|
6
|
+
<div class="form-check form-check-radio form-check-inline"
|
|
7
|
+
*ngFor="let item of fCtrls.answerArray.controls ;let i = index">
|
|
8
|
+
<input class="form-check-input" type="radio" (change)="onChangeAnswer(item.value)" [disabled]="isDisabled"
|
|
9
|
+
name="{{elemId}}__radio-btn-option" id="{{elemId}}__radio-btn_{{i}}" [checked]="item.value.isSelected == true? true : null">
|
|
10
|
+
<label class="form-check-label" for="{{elemId}}__radio-btn_{{i}}">{{item.value.title}}</label>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
File without changes
|
package/src/lib/components/question-boolean-template/question-boolean-template.component.spec.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { QuestionBooleanTemplateComponent } from './question-boolean-template.component';
|
|
4
|
+
|
|
5
|
+
describe('QuestionBooleanTemplateComponent', () => {
|
|
6
|
+
let component: QuestionBooleanTemplateComponent;
|
|
7
|
+
let fixture: ComponentFixture<QuestionBooleanTemplateComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [QuestionBooleanTemplateComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(QuestionBooleanTemplateComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
+
import { Validators, FormControl } from '@angular/forms';
|
|
3
|
+
import { SurveyQuestionDto } from '../../../shared/dtos/survey-question.dto';
|
|
4
|
+
import { QuestionTypeEnum } from '../../../shared/enums/question-type.enum';
|
|
5
|
+
import { QuestionRadioButtonTemplateFormInterface } from '../../../shared/form-interfaces/question-radio-button-template.form-interface';
|
|
6
|
+
import { QuestionAnswerModel } from '../../../shared/models/question-answer.model';
|
|
7
|
+
import { debounceTime, distinctUntilChanged, filter, map } from 'rxjs';
|
|
8
|
+
import { AnswerChildOfQuestionBooleanTemplateFormInterface, QuestionBooleanTemplateFormInterface } from '../../../shared/form-interfaces/question-boolean-template.form-interface';
|
|
9
|
+
import { FormBuilder, FormGroup } from '@ng-stack/forms';
|
|
10
|
+
import { v4 as guidGenerator } from 'uuid';
|
|
11
|
+
import { SurveyAnswerDto } from '../../../shared/dtos/survey-answer.dto';
|
|
12
|
+
import { DefaultQuestionAnswerDto } from '../../../shared/dtos/default-question-answers.dto';
|
|
13
|
+
import { SurveyLibService } from '../../services/survey-lib.service';
|
|
14
|
+
|
|
15
|
+
@Component({
|
|
16
|
+
selector: 'lib-question-boolean-template',
|
|
17
|
+
templateUrl: './question-boolean-template.component.html',
|
|
18
|
+
styleUrls: ['./question-boolean-template.component.scss']
|
|
19
|
+
})
|
|
20
|
+
export class QuestionBooleanTemplateComponent implements OnInit {
|
|
21
|
+
elemId = guidGenerator() as string;
|
|
22
|
+
surveyQuestion: SurveyQuestionDto;
|
|
23
|
+
rForm: FormGroup<QuestionBooleanTemplateFormInterface>;
|
|
24
|
+
|
|
25
|
+
get fCtrls() {
|
|
26
|
+
return this.rForm.controls;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
get questionTypeEnum() {
|
|
30
|
+
return QuestionTypeEnum;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@Output() emitter = new EventEmitter<QuestionAnswerModel>();
|
|
34
|
+
|
|
35
|
+
@Input() isShow: boolean = true;
|
|
36
|
+
@Input() isDisabled: boolean = false;
|
|
37
|
+
|
|
38
|
+
@Input() set setQuestion(value: SurveyQuestionDto) {
|
|
39
|
+
this.surveyQuestion = value;
|
|
40
|
+
this.rForm.patchValue({
|
|
41
|
+
id: value.questionId,
|
|
42
|
+
name: value.questionName,
|
|
43
|
+
title: value.questionTitle,
|
|
44
|
+
typeId: value.questionTypeId,
|
|
45
|
+
description: value.questionDescription
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
value.surveyAnswers.forEach(surveryAnswer => {
|
|
49
|
+
this.fCtrls.answerArray.push(this._formBuilder.group<AnswerChildOfQuestionBooleanTemplateFormInterface>({
|
|
50
|
+
id: [surveryAnswer.answerId],
|
|
51
|
+
title: [surveryAnswer.answerTitle],
|
|
52
|
+
isSelected: [false]
|
|
53
|
+
}))
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
if (value.isRequired == true) {
|
|
57
|
+
this.fCtrls.answer.addValidators([Validators.required]);
|
|
58
|
+
this.fCtrls.answer.updateValueAndValidity();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
this.isShow = value.isVisable;
|
|
62
|
+
this.isDisabled = value.isReadOnly;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
constructor(private _formBuilder: FormBuilder , private _surveyLibService:SurveyLibService) {
|
|
66
|
+
this.rForm = this._formBuilder.group<QuestionBooleanTemplateFormInterface>({
|
|
67
|
+
id: [null],
|
|
68
|
+
name: [null],
|
|
69
|
+
title: [null],
|
|
70
|
+
typeId: [null],
|
|
71
|
+
description: [null],
|
|
72
|
+
answer: [null],
|
|
73
|
+
answerArray: this._formBuilder.array<AnswerChildOfQuestionBooleanTemplateFormInterface>([])
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
ngOnInit(): void {
|
|
78
|
+
this.fCtrls.answer.valueChanges.pipe().pipe(debounceTime(200)).subscribe(value => {
|
|
79
|
+
const formValue = this.rForm.value;
|
|
80
|
+
this.emitter.emit({
|
|
81
|
+
QuestionId: formValue.id,
|
|
82
|
+
IsValid: this.fCtrls.answer.valid,
|
|
83
|
+
Answer: value
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
this.fCtrls.answer.setValue(null);
|
|
88
|
+
|
|
89
|
+
this._surveyLibService.surveyAnswersObsrv
|
|
90
|
+
.pipe(map(x=> x.defaultAnswers.filter(x=>x.QuestionId == this.fCtrls.id.value)))
|
|
91
|
+
.pipe(filter(x=>x.length > 0)).pipe(map(x=> x.at(0)))
|
|
92
|
+
.subscribe(answer=>{
|
|
93
|
+
this.fCtrls.answer.setValue(answer.AnswerId);
|
|
94
|
+
|
|
95
|
+
const groupIndex = this.fCtrls.answerArray.value.findIndex(x => x.id == answer.AnswerId);
|
|
96
|
+
if(groupIndex > -1){
|
|
97
|
+
this.fCtrls.answerArray.at(groupIndex).controls.isSelected.setValue(true);
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
onChangeAnswer(item: AnswerChildOfQuestionBooleanTemplateFormInterface) {
|
|
103
|
+
this.fCtrls.answer.setValue(item.id);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
convertToFormControl(element: any) {
|
|
107
|
+
return element as FormControl;
|
|
108
|
+
}
|
|
109
|
+
}
|
package/src/lib/components/question-check-box-template/question-check-box-template.component.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div class="quastion" [attr.id]="'question_'+fCtrls.id.value" [ngClass]="{'invalid-question': fCtrls.answer.invalid , 'd-none':isShow != true}">
|
|
2
|
+
<h3 class="quastion-title ">
|
|
3
|
+
{{fCtrls.title.value}}
|
|
4
|
+
</h3>
|
|
5
|
+
|
|
6
|
+
<div class="checkbox-button-quastion">
|
|
7
|
+
<div class="form-check check-box-form-check" *ngFor="let item of fCtrls.answerArray.controls ;let i = index">
|
|
8
|
+
<input type="checkbox" class="form-check-input" id="{{elemId}}__checkbox_{{i}}" [disabled]="isDisabled"
|
|
9
|
+
(change)="onChangeAnswer(item.value ,$event)" [checked]="item.value.isSelected == true? true : null">
|
|
10
|
+
<label class="form-check-label " for="{{elemId}}__checkbox_{{i}}">{{item.value.title}}</label>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
package/src/lib/components/question-check-box-template/question-check-box-template.component.scss
ADDED
|
File without changes
|
package/src/lib/components/question-check-box-template/question-check-box-template.component.spec.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { QuestionCheckBoxTemplateComponent } from './question-check-box-template.component';
|
|
4
|
+
|
|
5
|
+
describe('QuestionCheckBoxTemplateComponent', () => {
|
|
6
|
+
let component: QuestionCheckBoxTemplateComponent;
|
|
7
|
+
let fixture: ComponentFixture<QuestionCheckBoxTemplateComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [QuestionCheckBoxTemplateComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(QuestionCheckBoxTemplateComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|