@unicef-polymer/etools-form-builder 3.2.2 → 3.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/LICENSE +674 -674
  2. package/README.md +1 -1
  3. package/dist/form-attachments-popup/form-attachments-popup.js +135 -135
  4. package/dist/form-fields/abstract-field-base.class.js +100 -100
  5. package/dist/form-fields/field-renderer-component.js +198 -166
  6. package/dist/form-fields/index.d.ts +2 -0
  7. package/dist/form-fields/index.js +2 -0
  8. package/dist/form-fields/repeatable-fields/repeatable-attachment-field.js +111 -111
  9. package/dist/form-fields/repeatable-fields/repeatable-base-field.js +22 -22
  10. package/dist/form-fields/repeatable-fields/repeatable-choice-field.d.ts +15 -0
  11. package/dist/form-fields/repeatable-fields/repeatable-choice-field.js +123 -0
  12. package/dist/form-fields/repeatable-fields/repeatable-number-field.js +19 -19
  13. package/dist/form-fields/repeatable-fields/repeatable-scale-field.js +57 -57
  14. package/dist/form-fields/repeatable-fields/repeatable-text-field.js +19 -19
  15. package/dist/form-fields/single-fields/attachment-field.js +13 -13
  16. package/dist/form-fields/single-fields/boolean-field.js +16 -16
  17. package/dist/form-fields/single-fields/choice-field.d.ts +17 -0
  18. package/dist/form-fields/single-fields/choice-field.js +121 -0
  19. package/dist/form-fields/single-fields/number-field.js +20 -20
  20. package/dist/form-fields/single-fields/scale-field.js +58 -58
  21. package/dist/form-fields/single-fields/text-field.js +30 -30
  22. package/dist/form-groups/form-abstract-group.d.ts +2 -1
  23. package/dist/form-groups/form-abstract-group.js +130 -129
  24. package/dist/form-groups/form-card.js +30 -30
  25. package/dist/form-groups/form-collapsed-card.js +34 -34
  26. package/dist/lib/additional-components/confirmation-dialog.js +20 -20
  27. package/dist/lib/additional-components/etools-fb-card.js +144 -144
  28. package/dist/lib/styles/attachments.styles.js +61 -61
  29. package/dist/lib/styles/card-styles.js +147 -147
  30. package/dist/lib/styles/dialog.styles.js +83 -83
  31. package/dist/lib/styles/elevation-styles.js +46 -46
  32. package/dist/lib/styles/flex-layout-classes.js +316 -316
  33. package/dist/lib/styles/form-builder-card.styles.js +53 -53
  34. package/dist/lib/styles/page-layout-styles.js +198 -198
  35. package/dist/lib/styles/shared-styles.js +61 -61
  36. package/dist/lib/types/form-builder.types.d.ts +1 -1
  37. package/dist/rich-editor/rich-action.js +34 -34
  38. package/dist/rich-editor/rich-text.d.ts +1 -0
  39. package/dist/rich-editor/rich-text.js +163 -65
  40. package/dist/rich-editor/rich-toolbar.js +125 -125
  41. package/dist/rich-editor/rich-viewer.js +21 -21
  42. package/package.json +52 -51
@@ -1,319 +1,319 @@
1
1
  import { css } from 'lit';
2
2
  // language=CSS
3
- export const FlexLayoutClasses = css `
4
- .layout.horizontal,
5
- .layout.vertical {
6
- display: -ms-flexbox;
7
- display: -webkit-flex;
8
- display: flex;
9
- }
10
- .layout.inline {
11
- display: -ms-inline-flexbox;
12
- display: -webkit-inline-flex;
13
- display: inline-flex;
14
- }
15
- .layout.horizontal {
16
- -ms-flex-direction: row;
17
- -webkit-flex-direction: row;
18
- flex-direction: row;
19
- }
20
- .layout.vertical {
21
- -ms-flex-direction: column;
22
- -webkit-flex-direction: column;
23
- flex-direction: column;
24
- }
25
- .layout.wrap {
26
- -ms-flex-wrap: wrap;
27
- -webkit-flex-wrap: wrap;
28
- flex-wrap: wrap;
29
- }
30
- .layout.no-wrap {
31
- -ms-flex-wrap: nowrap;
32
- -webkit-flex-wrap: nowrap;
33
- flex-wrap: nowrap;
34
- }
35
- .layout.center,
36
- .layout.center-center {
37
- -ms-flex-align: center;
38
- -webkit-align-items: center;
39
- align-items: center;
40
- }
41
- .layout.center-justified,
42
- .layout.center-center {
43
- -ms-flex-pack: center;
44
- -webkit-justify-content: center;
45
- justify-content: center;
46
- }
47
- .flex {
48
- -ms-flex: 1 1 0.000000001px;
49
- -webkit-flex: 1;
50
- flex: 1;
51
- -webkit-flex-basis: 0.000000001px;
52
- flex-basis: 0.000000001px;
53
- }
54
- .flex-auto {
55
- -ms-flex: 1 1 auto;
56
- -webkit-flex: 1 1 auto;
57
- flex: 1 1 auto;
58
- }
59
- .flex-none {
60
- -ms-flex: none;
61
- -webkit-flex: none;
62
- flex: none;
63
- }
64
-
65
- .layout.horizontal-reverse,
66
- .layout.vertical-reverse {
67
- display: -ms-flexbox;
68
- display: -webkit-flex;
69
- display: flex;
70
- }
71
- .layout.horizontal-reverse {
72
- -ms-flex-direction: row-reverse;
73
- -webkit-flex-direction: row-reverse;
74
- flex-direction: row-reverse;
75
- }
76
- .layout.vertical-reverse {
77
- -ms-flex-direction: column-reverse;
78
- -webkit-flex-direction: column-reverse;
79
- flex-direction: column-reverse;
80
- }
81
- .layout.wrap-reverse {
82
- -ms-flex-wrap: wrap-reverse;
83
- -webkit-flex-wrap: wrap-reverse;
84
- flex-wrap: wrap-reverse;
85
- }
86
-
87
- /**
88
- * Alignment in cross axis.
89
- */
90
- .layout.start {
91
- -ms-flex-align: start;
92
- -webkit-align-items: flex-start;
93
- align-items: flex-start;
94
- }
95
- .layout.center,
96
- .layout.center-center {
97
- -ms-flex-align: center;
98
- -webkit-align-items: center;
99
- align-items: center;
100
- }
101
- .layout.end {
102
- -ms-flex-align: end;
103
- -webkit-align-items: flex-end;
104
- align-items: flex-end;
105
- }
106
- .layout.baseline {
107
- -ms-flex-align: baseline;
108
- -webkit-align-items: baseline;
109
- align-items: baseline;
110
- }
111
- /**
112
- * Alignment in main axis.
113
- */
114
- .layout.start-justified {
115
- -ms-flex-pack: start;
116
- -webkit-justify-content: flex-start;
117
- justify-content: flex-start;
118
- }
119
- .layout.center-justified,
120
- .layout.center-center {
121
- -ms-flex-pack: center;
122
- -webkit-justify-content: center;
123
- justify-content: center;
124
- }
125
- .layout.end-justified {
126
- -ms-flex-pack: end;
127
- -webkit-justify-content: flex-end;
128
- justify-content: flex-end;
129
- }
130
- .layout.around-justified {
131
- -ms-flex-pack: distribute;
132
- -webkit-justify-content: space-around;
133
- justify-content: space-around;
134
- }
135
- .layout.justified {
136
- -ms-flex-pack: justify;
137
- -webkit-justify-content: space-between;
138
- justify-content: space-between;
139
- }
140
- /**
141
- * Self alignment.
142
- */
143
- .self-start {
144
- -ms-align-self: flex-start;
145
- -webkit-align-self: flex-start;
146
- align-self: flex-start;
147
- }
148
- .self-center {
149
- -ms-align-self: center;
150
- -webkit-align-self: center;
151
- align-self: center;
152
- }
153
- .self-end {
154
- -ms-align-self: flex-end;
155
- -webkit-align-self: flex-end;
156
- align-self: flex-end;
157
- }
158
- .self-stretch {
159
- -ms-align-self: stretch;
160
- -webkit-align-self: stretch;
161
- align-self: stretch;
162
- }
163
- .self-baseline {
164
- -ms-align-self: baseline;
165
- -webkit-align-self: baseline;
166
- align-self: baseline;
167
- }
168
- /**
169
- * multi-line alignment in main axis.
170
- */
171
- .layout.start-aligned {
172
- -ms-flex-line-pack: start; /* IE10 */
173
- -ms-align-content: flex-start;
174
- -webkit-align-content: flex-start;
175
- align-content: flex-start;
176
- }
177
- .layout.end-aligned {
178
- -ms-flex-line-pack: end; /* IE10 */
179
- -ms-align-content: flex-end;
180
- -webkit-align-content: flex-end;
181
- align-content: flex-end;
182
- }
183
- .layout.center-aligned {
184
- -ms-flex-line-pack: center; /* IE10 */
185
- -ms-align-content: center;
186
- -webkit-align-content: center;
187
- align-content: center;
188
- }
189
- .layout.between-aligned {
190
- -ms-flex-line-pack: justify; /* IE10 */
191
- -ms-align-content: space-between;
192
- -webkit-align-content: space-between;
193
- align-content: space-between;
194
- }
195
- .layout.around-aligned {
196
- -ms-flex-line-pack: distribute; /* IE10 */
197
- -ms-align-content: space-around;
198
- -webkit-align-content: space-around;
199
- align-content: space-around;
200
- }
201
-
202
- .flex,
203
- .flex-1 {
204
- -ms-flex: 1 1 0.000000001px;
205
- -webkit-flex: 1;
206
- flex: 1;
207
- -webkit-flex-basis: 0.000000001px;
208
- flex-basis: 0.000000001px;
209
- }
210
- .flex-2 {
211
- -ms-flex: 2;
212
- -webkit-flex: 2;
213
- flex: 2;
214
- }
215
- .flex-3 {
216
- -ms-flex: 3;
217
- -webkit-flex: 3;
218
- flex: 3;
219
- }
220
- .flex-4 {
221
- -ms-flex: 4;
222
- -webkit-flex: 4;
223
- flex: 4;
224
- }
225
- .flex-5 {
226
- -ms-flex: 5;
227
- -webkit-flex: 5;
228
- flex: 5;
229
- }
230
- .flex-6 {
231
- -ms-flex: 6;
232
- -webkit-flex: 6;
233
- flex: 6;
234
- }
235
- .flex-7 {
236
- -ms-flex: 7;
237
- -webkit-flex: 7;
238
- flex: 7;
239
- }
240
- .flex-8 {
241
- -ms-flex: 8;
242
- -webkit-flex: 8;
243
- flex: 8;
244
- }
245
- .flex-9 {
246
- -ms-flex: 9;
247
- -webkit-flex: 9;
248
- flex: 9;
249
- }
250
- .flex-10 {
251
- -ms-flex: 10;
252
- -webkit-flex: 10;
253
- flex: 10;
254
- }
255
- .flex-11 {
256
- -ms-flex: 11;
257
- -webkit-flex: 11;
258
- flex: 11;
259
- }
260
- .flex-12 {
261
- -ms-flex: 12;
262
- -webkit-flex: 12;
263
- flex: 12;
264
- }
265
- .block {
266
- display: block;
267
- }
268
- [hidden] {
269
- display: none !important;
270
- }
271
- .invisible {
272
- visibility: hidden !important;
273
- }
274
- .relative {
275
- position: relative;
276
- }
277
- .fit {
278
- position: absolute;
279
- top: 0;
280
- right: 0;
281
- bottom: 0;
282
- left: 0;
283
- }
284
- body.fullbleed {
285
- margin: 0;
286
- height: 100vh;
287
- }
288
- .scroll {
289
- -webkit-overflow-scrolling: touch;
290
- overflow: auto;
291
- }
292
- /* fixed position */
293
- .fixed-bottom,
294
- .fixed-left,
295
- .fixed-right,
296
- .fixed-top {
297
- position: fixed;
298
- }
299
- .fixed-top {
300
- top: 0;
301
- left: 0;
302
- right: 0;
303
- }
304
- .fixed-right {
305
- top: 0;
306
- right: 0;
307
- bottom: 0;
308
- }
309
- .fixed-bottom {
310
- right: 0;
311
- bottom: 0;
312
- left: 0;
313
- }
314
- .fixed-left {
315
- top: 0;
316
- bottom: 0;
317
- left: 0;
318
- }
3
+ export const FlexLayoutClasses = css `
4
+ .layout.horizontal,
5
+ .layout.vertical {
6
+ display: -ms-flexbox;
7
+ display: -webkit-flex;
8
+ display: flex;
9
+ }
10
+ .layout.inline {
11
+ display: -ms-inline-flexbox;
12
+ display: -webkit-inline-flex;
13
+ display: inline-flex;
14
+ }
15
+ .layout.horizontal {
16
+ -ms-flex-direction: row;
17
+ -webkit-flex-direction: row;
18
+ flex-direction: row;
19
+ }
20
+ .layout.vertical {
21
+ -ms-flex-direction: column;
22
+ -webkit-flex-direction: column;
23
+ flex-direction: column;
24
+ }
25
+ .layout.wrap {
26
+ -ms-flex-wrap: wrap;
27
+ -webkit-flex-wrap: wrap;
28
+ flex-wrap: wrap;
29
+ }
30
+ .layout.no-wrap {
31
+ -ms-flex-wrap: nowrap;
32
+ -webkit-flex-wrap: nowrap;
33
+ flex-wrap: nowrap;
34
+ }
35
+ .layout.center,
36
+ .layout.center-center {
37
+ -ms-flex-align: center;
38
+ -webkit-align-items: center;
39
+ align-items: center;
40
+ }
41
+ .layout.center-justified,
42
+ .layout.center-center {
43
+ -ms-flex-pack: center;
44
+ -webkit-justify-content: center;
45
+ justify-content: center;
46
+ }
47
+ .flex {
48
+ -ms-flex: 1 1 0.000000001px;
49
+ -webkit-flex: 1;
50
+ flex: 1;
51
+ -webkit-flex-basis: 0.000000001px;
52
+ flex-basis: 0.000000001px;
53
+ }
54
+ .flex-auto {
55
+ -ms-flex: 1 1 auto;
56
+ -webkit-flex: 1 1 auto;
57
+ flex: 1 1 auto;
58
+ }
59
+ .flex-none {
60
+ -ms-flex: none;
61
+ -webkit-flex: none;
62
+ flex: none;
63
+ }
64
+
65
+ .layout.horizontal-reverse,
66
+ .layout.vertical-reverse {
67
+ display: -ms-flexbox;
68
+ display: -webkit-flex;
69
+ display: flex;
70
+ }
71
+ .layout.horizontal-reverse {
72
+ -ms-flex-direction: row-reverse;
73
+ -webkit-flex-direction: row-reverse;
74
+ flex-direction: row-reverse;
75
+ }
76
+ .layout.vertical-reverse {
77
+ -ms-flex-direction: column-reverse;
78
+ -webkit-flex-direction: column-reverse;
79
+ flex-direction: column-reverse;
80
+ }
81
+ .layout.wrap-reverse {
82
+ -ms-flex-wrap: wrap-reverse;
83
+ -webkit-flex-wrap: wrap-reverse;
84
+ flex-wrap: wrap-reverse;
85
+ }
86
+
87
+ /**
88
+ * Alignment in cross axis.
89
+ */
90
+ .layout.start {
91
+ -ms-flex-align: start;
92
+ -webkit-align-items: flex-start;
93
+ align-items: flex-start;
94
+ }
95
+ .layout.center,
96
+ .layout.center-center {
97
+ -ms-flex-align: center;
98
+ -webkit-align-items: center;
99
+ align-items: center;
100
+ }
101
+ .layout.end {
102
+ -ms-flex-align: end;
103
+ -webkit-align-items: flex-end;
104
+ align-items: flex-end;
105
+ }
106
+ .layout.baseline {
107
+ -ms-flex-align: baseline;
108
+ -webkit-align-items: baseline;
109
+ align-items: baseline;
110
+ }
111
+ /**
112
+ * Alignment in main axis.
113
+ */
114
+ .layout.start-justified {
115
+ -ms-flex-pack: start;
116
+ -webkit-justify-content: flex-start;
117
+ justify-content: flex-start;
118
+ }
119
+ .layout.center-justified,
120
+ .layout.center-center {
121
+ -ms-flex-pack: center;
122
+ -webkit-justify-content: center;
123
+ justify-content: center;
124
+ }
125
+ .layout.end-justified {
126
+ -ms-flex-pack: end;
127
+ -webkit-justify-content: flex-end;
128
+ justify-content: flex-end;
129
+ }
130
+ .layout.around-justified {
131
+ -ms-flex-pack: distribute;
132
+ -webkit-justify-content: space-around;
133
+ justify-content: space-around;
134
+ }
135
+ .layout.justified {
136
+ -ms-flex-pack: justify;
137
+ -webkit-justify-content: space-between;
138
+ justify-content: space-between;
139
+ }
140
+ /**
141
+ * Self alignment.
142
+ */
143
+ .self-start {
144
+ -ms-align-self: flex-start;
145
+ -webkit-align-self: flex-start;
146
+ align-self: flex-start;
147
+ }
148
+ .self-center {
149
+ -ms-align-self: center;
150
+ -webkit-align-self: center;
151
+ align-self: center;
152
+ }
153
+ .self-end {
154
+ -ms-align-self: flex-end;
155
+ -webkit-align-self: flex-end;
156
+ align-self: flex-end;
157
+ }
158
+ .self-stretch {
159
+ -ms-align-self: stretch;
160
+ -webkit-align-self: stretch;
161
+ align-self: stretch;
162
+ }
163
+ .self-baseline {
164
+ -ms-align-self: baseline;
165
+ -webkit-align-self: baseline;
166
+ align-self: baseline;
167
+ }
168
+ /**
169
+ * multi-line alignment in main axis.
170
+ */
171
+ .layout.start-aligned {
172
+ -ms-flex-line-pack: start; /* IE10 */
173
+ -ms-align-content: flex-start;
174
+ -webkit-align-content: flex-start;
175
+ align-content: flex-start;
176
+ }
177
+ .layout.end-aligned {
178
+ -ms-flex-line-pack: end; /* IE10 */
179
+ -ms-align-content: flex-end;
180
+ -webkit-align-content: flex-end;
181
+ align-content: flex-end;
182
+ }
183
+ .layout.center-aligned {
184
+ -ms-flex-line-pack: center; /* IE10 */
185
+ -ms-align-content: center;
186
+ -webkit-align-content: center;
187
+ align-content: center;
188
+ }
189
+ .layout.between-aligned {
190
+ -ms-flex-line-pack: justify; /* IE10 */
191
+ -ms-align-content: space-between;
192
+ -webkit-align-content: space-between;
193
+ align-content: space-between;
194
+ }
195
+ .layout.around-aligned {
196
+ -ms-flex-line-pack: distribute; /* IE10 */
197
+ -ms-align-content: space-around;
198
+ -webkit-align-content: space-around;
199
+ align-content: space-around;
200
+ }
201
+
202
+ .flex,
203
+ .flex-1 {
204
+ -ms-flex: 1 1 0.000000001px;
205
+ -webkit-flex: 1;
206
+ flex: 1;
207
+ -webkit-flex-basis: 0.000000001px;
208
+ flex-basis: 0.000000001px;
209
+ }
210
+ .flex-2 {
211
+ -ms-flex: 2;
212
+ -webkit-flex: 2;
213
+ flex: 2;
214
+ }
215
+ .flex-3 {
216
+ -ms-flex: 3;
217
+ -webkit-flex: 3;
218
+ flex: 3;
219
+ }
220
+ .flex-4 {
221
+ -ms-flex: 4;
222
+ -webkit-flex: 4;
223
+ flex: 4;
224
+ }
225
+ .flex-5 {
226
+ -ms-flex: 5;
227
+ -webkit-flex: 5;
228
+ flex: 5;
229
+ }
230
+ .flex-6 {
231
+ -ms-flex: 6;
232
+ -webkit-flex: 6;
233
+ flex: 6;
234
+ }
235
+ .flex-7 {
236
+ -ms-flex: 7;
237
+ -webkit-flex: 7;
238
+ flex: 7;
239
+ }
240
+ .flex-8 {
241
+ -ms-flex: 8;
242
+ -webkit-flex: 8;
243
+ flex: 8;
244
+ }
245
+ .flex-9 {
246
+ -ms-flex: 9;
247
+ -webkit-flex: 9;
248
+ flex: 9;
249
+ }
250
+ .flex-10 {
251
+ -ms-flex: 10;
252
+ -webkit-flex: 10;
253
+ flex: 10;
254
+ }
255
+ .flex-11 {
256
+ -ms-flex: 11;
257
+ -webkit-flex: 11;
258
+ flex: 11;
259
+ }
260
+ .flex-12 {
261
+ -ms-flex: 12;
262
+ -webkit-flex: 12;
263
+ flex: 12;
264
+ }
265
+ .block {
266
+ display: block;
267
+ }
268
+ [hidden] {
269
+ display: none !important;
270
+ }
271
+ .invisible {
272
+ visibility: hidden !important;
273
+ }
274
+ .relative {
275
+ position: relative;
276
+ }
277
+ .fit {
278
+ position: absolute;
279
+ top: 0;
280
+ right: 0;
281
+ bottom: 0;
282
+ left: 0;
283
+ }
284
+ body.fullbleed {
285
+ margin: 0;
286
+ height: 100vh;
287
+ }
288
+ .scroll {
289
+ -webkit-overflow-scrolling: touch;
290
+ overflow: auto;
291
+ }
292
+ /* fixed position */
293
+ .fixed-bottom,
294
+ .fixed-left,
295
+ .fixed-right,
296
+ .fixed-top {
297
+ position: fixed;
298
+ }
299
+ .fixed-top {
300
+ top: 0;
301
+ left: 0;
302
+ right: 0;
303
+ }
304
+ .fixed-right {
305
+ top: 0;
306
+ right: 0;
307
+ bottom: 0;
308
+ }
309
+ .fixed-bottom {
310
+ right: 0;
311
+ bottom: 0;
312
+ left: 0;
313
+ }
314
+ .fixed-left {
315
+ top: 0;
316
+ bottom: 0;
317
+ left: 0;
318
+ }
319
319
  `;