@5minds/node-red-dashboard-2-processcube-dynamic-form 2.0.7-feature-14f62e-md8hngmw → 2.0.7-feature-5796b4-md8ryyr7

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.
@@ -1,29 +1,18 @@
1
1
  <template>
2
- <div style="display: flex; justify-content: space-between; width: 100%">
3
- <div style="display: flex; gap: 8px; flex-wrap: wrap">
2
+ <div class="ui-dynamic-form-footer-actions-container">
3
+ <div class="ui-dynamic-form-footer-actions-left">
4
4
  <div v-for="(action, index) in actions" :key="index">
5
- <v-btn
6
- v-if="action.alignment === 'left' || !action.alignment"
7
- :key="index"
8
- style="min-height: 36px"
9
- :class="getActionButtonClass(action)"
10
- :disabled="formIsFinished"
11
- @click="actionCallback(action)"
12
- >
5
+ <v-btn v-if="action.alignment === 'left' || !action.alignment" :key="index"
6
+ class="ui-dynamic-form-footer-action-button" :class="getActionButtonClass(action)"
7
+ :disabled="formIsFinished" @click="actionCallback(action)">
13
8
  {{ action.label }}
14
9
  </v-btn>
15
10
  </div>
16
11
  </div>
17
- <div style="display: flex; gap: 8px;">
12
+ <div class="ui-dynamic-form-footer-actions-right">
18
13
  <div v-for="(action, index) in actions" :key="index">
19
- <v-btn
20
- v-if="action.alignment === 'right'"
21
- :key="index"
22
- style="min-height: 36px"
23
- :class="getActionButtonClass(action)"
24
- :disabled="formIsFinished"
25
- @click="actionCallback(action)"
26
- >
14
+ <v-btn v-if="action.alignment === 'right'" :key="index" class="ui-dynamic-form-footer-action-button"
15
+ :class="getActionButtonClass(action)" :disabled="formIsFinished" @click="actionCallback(action)">
27
16
  {{ action.label }}
28
17
  </v-btn>
29
18
  </div>
@@ -36,12 +25,12 @@
36
25
  export default {
37
26
  name: 'UIDynamicFormFooterAction',
38
27
  props: {
39
- actions: { type: Array, default () { return [] } },
40
- actionCallback: { type: Function, default (action) {} },
41
- formIsFinished: { type: Boolean, default () { return false } }
28
+ actions: { type: Array, default() { return [] } },
29
+ actionCallback: { type: Function, default(action) { } },
30
+ formIsFinished: { type: Boolean, default() { return false } }
42
31
  },
43
32
  methods: {
44
- getActionButtonClass (action) {
33
+ getActionButtonClass(action) {
45
34
  return action.primary === 'true' ? 'ui-dynamic-form-footer-action-primary' : 'ui-dynamic-form-footer-action-secondary'
46
35
  }
47
36
  }
@@ -1,25 +1,18 @@
1
1
  <template>
2
2
  <div v-if="title.length > 0">
3
- <h3 :class="typeSpecificStyling" style="display: flex; gap: 25px; align-items: center">
4
- <svg
5
- v-if="collapsible && !collapsed"
6
- style="width: 25px; height: 25px; cursor: pointer;"
7
- xmlns="http://www.w3.org/2000/svg"
8
- viewBox="0 0 448 512"
9
- @click="toggleCollapse"
10
- >
11
- <path :fill="style === 'default' ? 'white' : 'black'" d="M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"/>
3
+ <h3 :class="typeSpecificStyling" class="ui-dynamic-form-title-responsive"
4
+ style="display: flex; gap: 25px; align-items: center">
5
+ <svg v-if="collapsible && !collapsed" style="width: 25px; height: 25px; cursor: pointer;"
6
+ xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" @click="toggleCollapse">
7
+ <path :fill="style === 'default' ? 'white' : 'black'"
8
+ d="M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z" />
12
9
  </svg>
13
- <svg
14
- v-if="collapsible && collapsed"
15
- style="width: 25px; height: 25px; cursor: pointer;"
16
- xmlns="http://www.w3.org/2000/svg"
17
- viewBox="0 0 320 512"
18
- @click="toggleCollapse"
19
- >
20
- <path :fill="style === 'default' ? 'white' : 'black'" d="M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"/>
10
+ <svg v-if="collapsible && collapsed" style="width: 25px; height: 25px; cursor: pointer;"
11
+ xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" @click="toggleCollapse">
12
+ <path :fill="style === 'default' ? 'white' : 'black'"
13
+ d="M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z" />
21
14
  </svg>
22
- <div :style="{width: 'fit-content', display: style === 'default' ? '' : 'flex'}">
15
+ <div :style="{ width: 'fit-content', display: style === 'default' ? '' : 'flex' }">
23
16
  <img v-if="titleIcon.length > 0" :src="titleIcon" style="padding-right: 16px;">
24
17
  <span :style="customStyles">{{ title }}</span>
25
18
  <hr v-if="style === 'default'">
@@ -33,16 +26,16 @@
33
26
  export default {
34
27
  name: 'UIDynamicFormTitleText',
35
28
  props: {
36
- style: { type: String, default () { return 'default' } },
37
- title: { type: String, default () { return '' } },
38
- customStyles: { type: String, default () { return '' } },
39
- collapsible: { type: Boolean, default () { return false } },
40
- collapsed: { type: Boolean, default () { return false } },
41
- titleIcon: { type: String, default () { return '' } },
42
- toggleCollapse: { type: Function, default () {} }
29
+ style: { type: String, default() { return 'default' } },
30
+ title: { type: String, default() { return '' } },
31
+ customStyles: { type: String, default() { return '' } },
32
+ collapsible: { type: Boolean, default() { return false } },
33
+ collapsed: { type: Boolean, default() { return false } },
34
+ titleIcon: { type: String, default() { return '' } },
35
+ toggleCollapse: { type: Function, default() { } }
43
36
  },
44
37
  computed: {
45
- typeSpecificStyling () {
38
+ typeSpecificStyling() {
46
39
  return `ui-dynamic-form-title-${this.style}`
47
40
  }
48
41
  }
@@ -15,9 +15,11 @@
15
15
  :collapsed="collapsed" :toggleCollapse="toggleCollapse" />
16
16
  <Transition name="cardCollapse">
17
17
  <div v-if="!collapsed">
18
- <div className="ui-dynamic-form-formfield-positioner" :style="props.inner_card_styling">
18
+ <div className="ui-dynamic-form-formfield-positioner" :style="props.inner_card_styling"
19
+ :data-columns="props.form_columns || 1">
19
20
  <FormKit id="form" type="group">
20
21
  <v-row v-for="(field, index) in fields()" :key="field"
22
+ :class="field.type === 'header' ? 'ui-dynamic-form-header-row' : ''"
21
23
  :style="getRowWidthStyling(field, index)">
22
24
  <v-col cols="12">
23
25
  <component :is="createComponent(field).type"
@@ -779,7 +781,7 @@ export default {
779
781
  if (field.type === 'header') {
780
782
  style += 'flex-basis: 100%;'
781
783
  } else {
782
- style += `flex-basis: ${(1 / this.props.form_columns) * 100}%;`
784
+ style += `flex-basis: 100%;`
783
785
  }
784
786
  return style
785
787
  },
@@ -102,6 +102,7 @@ code {
102
102
  flex-direction: column;
103
103
  gap: 8px;
104
104
  margin: 0;
105
+ padding-top: 16px;
105
106
  border-bottom-left-radius: 8px;
106
107
  border-bottom-right-radius: 8px;
107
108
  }
@@ -129,6 +130,42 @@ code {
129
130
  padding: 8px;
130
131
  }
131
132
 
133
+ .ui-dynamic-form-footer-actions-container {
134
+ display: flex;
135
+ justify-content: space-between;
136
+ align-items: center;
137
+ gap: 12px;
138
+ width: 100%;
139
+ box-sizing: border-box;
140
+ }
141
+
142
+ .ui-dynamic-form-footer-actions-left,
143
+ .ui-dynamic-form-footer-actions-right {
144
+ display: flex;
145
+ gap: 8px;
146
+ align-items: center;
147
+ }
148
+
149
+ .ui-dynamic-form-footer-action-button {
150
+ min-height: 36px;
151
+ padding: 8px 12px;
152
+ box-sizing: border-box;
153
+ flex-shrink: 0;
154
+ }
155
+
156
+ @media screen and (min-width: 600px) {
157
+ .ui-dynamic-form-footer-actions-container {
158
+ flex-wrap: wrap;
159
+ }
160
+
161
+ .ui-dynamic-form-footer-action-button {
162
+ max-width: 200px;
163
+ white-space: nowrap;
164
+ overflow: hidden;
165
+ text-overflow: ellipsis;
166
+ }
167
+ }
168
+
132
169
  .ui-dynamic-form-wrapper {
133
170
  --fk-color-primary: rgb(var(--v-theme-primary)) !important;
134
171
  --fk-color-border: rgb(var(--v-theme-group-outline)); /* Does not work somehow */
@@ -145,6 +182,202 @@ code {
145
182
  }
146
183
  }
147
184
 
185
+ @media only screen and (max-width: 599px) {
186
+ .ui-dynamic-form-external-sizing-wrapper {
187
+ max-width: 100vw;
188
+ margin: 0;
189
+ padding: 0;
190
+ overflow-x: hidden;
191
+ }
192
+
193
+ .ui-dynamic-form-wrapper {
194
+ padding: 8px;
195
+ margin: 0;
196
+ overflow-x: hidden;
197
+ }
198
+
199
+ .ui-dynamic-form-formfield-positioner {
200
+ padding: 16px;
201
+ padding-top: 8px;
202
+ max-height: calc(100vh - 200px);
203
+ column-gap: 0px;
204
+ flex-direction: column;
205
+ border-left: none;
206
+ border-right: none;
207
+ overflow-x: hidden;
208
+ }
209
+
210
+ .ui-dynamic-form-title-default {
211
+ padding: 16px;
212
+ font-size: 24px;
213
+ border-left: none;
214
+ border-right: none;
215
+ }
216
+
217
+ .ui-dynamic-form-title-minimal {
218
+ padding: 12px;
219
+ border-left: none;
220
+ border-right: none;
221
+ }
222
+
223
+ .ui-dynamic-form-title-outside {
224
+ padding: 12px 16px;
225
+ font-size: 20px;
226
+ }
227
+
228
+ .ui-dynamic-form-footer-common {
229
+ padding: 12px 16px;
230
+ gap: 12px;
231
+ margin: 0;
232
+ }
233
+
234
+ .input-light,
235
+ .input-default,
236
+ .input-dark {
237
+ font-size: 16px;
238
+ padding: 12px 8px;
239
+ min-height: 44px;
240
+ }
241
+
242
+ .ui-dynamic-form-input-label {
243
+ font-size: 16px;
244
+ padding-bottom: 8px;
245
+ }
246
+
247
+ .ui-dynamic-form-footer-actions-container {
248
+ flex-direction: column;
249
+ gap: 12px;
250
+ align-items: stretch;
251
+ width: 100%;
252
+ }
253
+
254
+ .ui-dynamic-form-footer-actions-left,
255
+ .ui-dynamic-form-footer-actions-right {
256
+ flex-direction: column;
257
+ gap: 8px;
258
+ width: 100%;
259
+ }
260
+
261
+ .ui-dynamic-form-footer-actions-left > div,
262
+ .ui-dynamic-form-footer-actions-right > div {
263
+ width: 100%;
264
+ }
265
+
266
+ .ui-dynamic-form-footer-action-button {
267
+ min-height: 44px;
268
+ padding: 12px 16px;
269
+ font-size: 16px;
270
+ width: 100%;
271
+ box-sizing: border-box;
272
+ white-space: nowrap;
273
+ overflow: hidden;
274
+ text-overflow: ellipsis;
275
+ }
276
+
277
+ .ui-dynamic-form-footer-action-button .v-btn__content {
278
+ white-space: nowrap !important;
279
+ overflow: hidden !important;
280
+ text-overflow: ellipsis !important;
281
+ max-width: 100% !important;
282
+ display: block !important;
283
+ }
284
+
285
+ .ui-dynamic-form-footer-action-primary,
286
+ .ui-dynamic-form-footer-action-secondary {
287
+ min-height: 44px;
288
+ font-size: 16px;
289
+ width: 100%;
290
+ box-sizing: border-box;
291
+ }
292
+
293
+ .ui-dynamic-form-footer-action-primary .v-btn__content,
294
+ .ui-dynamic-form-footer-action-secondary .v-btn__content {
295
+ white-space: nowrap !important;
296
+ overflow: hidden !important;
297
+ text-overflow: ellipsis !important;
298
+ max-width: 100% !important;
299
+ display: block !important;
300
+ }
301
+
302
+ .ui-dynamic-form-formfield-positioner .v-row {
303
+ margin-bottom: 16px;
304
+ flex-basis: 100% !important;
305
+ }
306
+
307
+ .ui-dynamic-form-formfield-positioner select,
308
+ .ui-dynamic-form-formfield-positioner textarea {
309
+ font-size: 16px;
310
+ min-height: 44px;
311
+ padding: 12px 8px;
312
+ }
313
+
314
+ .ui-dynamic-form-formfield-positioner input[type="checkbox"],
315
+ .ui-dynamic-form-formfield-positioner input[type="radio"] {
316
+ width: 20px;
317
+ height: 20px;
318
+ margin-right: 8px;
319
+ }
320
+
321
+ .ui-dynamic-form-formfield-positioner input[type="file"] {
322
+ font-size: 16px;
323
+ padding: 12px 8px;
324
+ }
325
+
326
+ .ui-dynamic-form-title-default h3 svg,
327
+ .ui-dynamic-form-title-minimal h3 svg,
328
+ .ui-dynamic-form-title-outside h3 svg {
329
+ width: 20px;
330
+ height: 20px;
331
+ }
332
+
333
+ .ui-dynamic-form-title-responsive {
334
+ gap: 15px !important;
335
+ flex-wrap: wrap;
336
+ }
337
+
338
+ .ui-dynamic-form-title-responsive img {
339
+ max-width: 32px;
340
+ height: auto;
341
+ }
342
+
343
+ .ui-dynamic-form-formfield-positioner {
344
+ -webkit-overflow-scrolling: touch;
345
+ }
346
+ }
347
+
348
+ @media only screen and (max-width: 480px) {
349
+ .ui-dynamic-form-formfield-positioner {
350
+ padding: 12px;
351
+ padding-top: 4px;
352
+ }
353
+
354
+ .ui-dynamic-form-title-default {
355
+ padding: 12px;
356
+ font-size: 20px;
357
+ }
358
+
359
+ .ui-dynamic-form-title-outside {
360
+ font-size: 18px;
361
+ }
362
+
363
+ .input-light,
364
+ .input-default,
365
+ .input-dark {
366
+ font-size: 16px;
367
+ padding: 10px 6px;
368
+ }
369
+
370
+ .ui-dynamic-form-input-label {
371
+ font-size: 14px;
372
+ }
373
+
374
+ .ui-dynamic-form-footer-action-button {
375
+ min-height: 48px;
376
+ font-size: 16px;
377
+ padding: 12px 16px;
378
+ }
379
+ }
380
+
148
381
  .cardCollapse-leave-active {
149
382
  transition: max-height 0.5s ease, opacity 0.2s ease;
150
383
  max-height: 100vh;
@@ -175,6 +408,28 @@ code {
175
408
  border-radius: 0px 0px 6px 6px;
176
409
  }
177
410
 
411
+ @media (min-width: 600px) {
412
+ .ui-dynamic-form-formfield-positioner .v-row:not(.ui-dynamic-form-header-row) {
413
+ flex-basis: calc(50% - 10px); /* Default 2 columns, adjust based on form_columns */
414
+ }
415
+
416
+ .ui-dynamic-form-formfield-positioner[data-columns="1"] .v-row:not(.ui-dynamic-form-header-row) {
417
+ flex-basis: 100%;
418
+ }
419
+
420
+ .ui-dynamic-form-formfield-positioner[data-columns="2"] .v-row:not(.ui-dynamic-form-header-row) {
421
+ flex-basis: calc(50% - 10px);
422
+ }
423
+
424
+ .ui-dynamic-form-formfield-positioner[data-columns="3"] .v-row:not(.ui-dynamic-form-header-row) {
425
+ flex-basis: calc(33.333% - 14px);
426
+ }
427
+
428
+ .ui-dynamic-form-formfield-positioner[data-columns="4"] .v-row:not(.ui-dynamic-form-header-row) {
429
+ flex-basis: calc(25% - 15px);
430
+ }
431
+ }
432
+
178
433
  .ui-dynamic-form-formfield-positioner h1,
179
434
  .ui-dynamic-form-formfield-positioner h2,
180
435
  .ui-dynamic-form-formfield-positioner h3 {