@mixd-id/web-scaffold 0.1.230406197 → 0.1.230406199
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/package.json +1 -1
- package/src/components/Button.vue +6 -1
- package/src/components/Carousel.vue +18 -15
- package/src/components/Image.vue +8 -0
- package/src/components/Modal.vue +4 -2
- package/src/widgets/ComponentSetting.vue +6 -0
- package/src/widgets/ContactForm.vue +12 -10
- package/src/widgets/ContactFormSetting.vue +42 -22
- package/src/widgets/ModalSetting.vue +1 -8
- package/src/widgets/StyleSetting.vue +48 -5
- package/src/widgets/WebDatasourceSelector.vue +43 -41
- package/src/widgets/WebPageBuilder.vue +13 -14
- package/tailwind.config.js +34 -32
package/package.json
CHANGED
|
@@ -360,21 +360,24 @@ export default{
|
|
|
360
360
|
@apply bg-primary-500;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
363
|
+
@media screen and (max-width: 768px){
|
|
364
|
+
.htmlNoScroll{
|
|
365
|
+
min-height: 100.3%;
|
|
366
|
+
overscroll-behavior-y: none;
|
|
367
|
+
height: 100%;
|
|
368
|
+
overflow: hidden;
|
|
369
|
+
}
|
|
370
|
+
.bodyNoScroll{
|
|
371
|
+
overscroll-behavior: none;
|
|
372
|
+
overscroll-behavior-y: none;
|
|
373
|
+
overflow: hidden;
|
|
374
|
+
position: fixed;
|
|
375
|
+
width: 100%;
|
|
376
|
+
margin: 0;
|
|
377
|
+
max-height: 100%;
|
|
378
|
+
-webkit-overflow-scrolling: touch;
|
|
379
|
+
}
|
|
378
380
|
}
|
|
379
381
|
|
|
382
|
+
|
|
380
383
|
</style>
|
package/src/components/Image.vue
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
</slot>
|
|
15
15
|
|
|
16
|
+
<div v-else-if="status === 2 && actualSrc.indexOf('<svg') >= 0" v-html="actualSrc"></div>
|
|
16
17
|
<img v-else-if="status === 2" :class="computedItemClass" :src="actualSrc" ref="img" />
|
|
17
18
|
|
|
18
19
|
<slot v-else-if="status === 3" name="error" :instance="this"></slot>
|
|
@@ -145,6 +146,10 @@ export default{
|
|
|
145
146
|
this.actualSrc = this.src
|
|
146
147
|
this.status = 2
|
|
147
148
|
}
|
|
149
|
+
else if(this.src.indexOf('<svg') >= 0){
|
|
150
|
+
this.actualSrc = this.src
|
|
151
|
+
this.status = 2
|
|
152
|
+
}
|
|
148
153
|
else{
|
|
149
154
|
const src = {}
|
|
150
155
|
|
|
@@ -231,6 +236,9 @@ export default{
|
|
|
231
236
|
reader.readAsDataURL(this.src)
|
|
232
237
|
this.status = 1
|
|
233
238
|
}
|
|
239
|
+
else{
|
|
240
|
+
this.status = 0
|
|
241
|
+
}
|
|
234
242
|
},
|
|
235
243
|
|
|
236
244
|
onClick(){
|
package/src/components/Modal.vue
CHANGED
|
@@ -79,6 +79,8 @@ export default{
|
|
|
79
79
|
|
|
80
80
|
height: String,
|
|
81
81
|
|
|
82
|
+
dock: String,
|
|
83
|
+
|
|
82
84
|
position: {
|
|
83
85
|
type: String,
|
|
84
86
|
default: 'bottom'
|
|
@@ -167,7 +169,7 @@ export default{
|
|
|
167
169
|
computedClass(){
|
|
168
170
|
return [
|
|
169
171
|
this.$style.modal,
|
|
170
|
-
this.$style['modal-' + this.position],
|
|
172
|
+
this.$style['modal-' + (this.dock ?? this.position)],
|
|
171
173
|
this.class,
|
|
172
174
|
this.mode === 'v-show' ? this.$style['v-show'] : '',
|
|
173
175
|
this.computedState ? this.$style.open : ''
|
|
@@ -188,7 +190,7 @@ export default{
|
|
|
188
190
|
return this.transition
|
|
189
191
|
}
|
|
190
192
|
else{
|
|
191
|
-
switch(this.position){
|
|
193
|
+
switch(this.dock ?? this.position){
|
|
192
194
|
case 'top':
|
|
193
195
|
return 'slidedown'
|
|
194
196
|
case 'bottom':
|
|
@@ -1460,10 +1460,16 @@ export default{
|
|
|
1460
1460
|
aspectRatio: [
|
|
1461
1461
|
[ 'Square', 'aspect-square' ],
|
|
1462
1462
|
[ '2/1', 'aspect-[2/1]' ],
|
|
1463
|
+
[ '3/1', 'aspect-[3/1]' ],
|
|
1463
1464
|
[ '4/1', 'aspect-[4/1]' ],
|
|
1464
1465
|
[ '4/3', 'aspect-[4/3]' ],
|
|
1466
|
+
[ '5/1', 'aspect-[5/1]' ],
|
|
1467
|
+
[ '6/1', 'aspect-[6/1]' ],
|
|
1468
|
+
[ '7/1', 'aspect-[7/1]' ],
|
|
1469
|
+
[ '8/1', 'aspect-[8/1]' ],
|
|
1465
1470
|
[ '8/3', 'aspect-[8/3]' ],
|
|
1466
1471
|
[ '8/5.6', 'aspect-[8/5.6]' ],
|
|
1472
|
+
[ '9/1', 'aspect-[9/1]' ],
|
|
1467
1473
|
[ 'Video (16:9)', 'aspect-video' ],
|
|
1468
1474
|
[ '1/2', 'aspect-[1/2]' ],
|
|
1469
1475
|
[ '2/3', 'aspect-[2/3]' ],
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="$style.comp" v-if="state === 1" :style="computedStyle">
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
<div v-if="title || description" class="flex flex-col gap-1">
|
|
5
|
+
<h2 v-if="title">{{ title }}</h2>
|
|
6
|
+
<p v-if="description" v-html="description"></p>
|
|
7
7
|
<CitySelector ref="citySelector" @change="setCity"/>
|
|
8
|
-
|
|
8
|
+
</div>
|
|
9
9
|
|
|
10
10
|
<div class="flex flex-col gap-4">
|
|
11
11
|
<div v-for="field in fields">
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<Dropdown v-else-if="field.type === 'topic'" v-model="form[field.type]"
|
|
27
27
|
class="bg-white text-xl md:w-[200px] max-w-full">
|
|
28
|
-
<option value="" disabled selected>Pilih Topik Pertanyaan</option>
|
|
28
|
+
<option value="" disabled selected>{{ field.placeholder ? field.placeholder : 'Pilih Topik Pertanyaan' }}</option>
|
|
29
29
|
<option v-for="item in field.items" :value="item.text">{{ item.text }}</option>
|
|
30
30
|
</Dropdown>
|
|
31
31
|
|
|
@@ -34,9 +34,11 @@
|
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
36
|
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
<div>
|
|
38
|
+
<Button ref="submitBtn" class="w-full" @click="submitForm" :state="!canSubmit ? -1 : 1">
|
|
39
|
+
<h5>Kirim</h5>
|
|
40
|
+
</Button>
|
|
41
|
+
</div>
|
|
40
42
|
|
|
41
43
|
</div>
|
|
42
44
|
<div :class="$style.comp" class="" v-else-if="state === 2">
|
|
@@ -152,9 +154,9 @@ export default{
|
|
|
152
154
|
<style module>
|
|
153
155
|
|
|
154
156
|
.comp{
|
|
155
|
-
@apply flex-1 w-full max-w-[480px]
|
|
157
|
+
@apply flex-1 w-full max-w-[480px] mx-auto rounded-lg overflow-hidden;
|
|
156
158
|
@apply border-text-200 border-[1px] p-6;
|
|
157
|
-
@apply flex flex-col
|
|
159
|
+
@apply flex flex-col gap-12 bg-base;
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
</style>
|
|
@@ -205,6 +205,10 @@
|
|
|
205
205
|
<template v-slot:head>
|
|
206
206
|
<div class="relative p-5">
|
|
207
207
|
<h3>Topic</h3>
|
|
208
|
+
|
|
209
|
+
<button type="button" class="absolute right-0 top-0 p-3" @click="$refs.topicModal.close()">
|
|
210
|
+
<svg width="18" height="18" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z"/></svg>
|
|
211
|
+
</button>
|
|
208
212
|
</div>
|
|
209
213
|
</template>
|
|
210
214
|
<template #foot="{ context }">
|
|
@@ -213,32 +217,48 @@
|
|
|
213
217
|
</div>
|
|
214
218
|
</template>
|
|
215
219
|
<template #default="{ context }">
|
|
216
|
-
<div class="flex-1 p-5 flex flex-col gap-
|
|
217
|
-
|
|
218
|
-
<
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
<div>
|
|
230
|
-
<
|
|
231
|
-
<svg width="
|
|
232
|
-
</
|
|
220
|
+
<div class="flex-1 p-5 flex flex-col gap-4">
|
|
221
|
+
|
|
222
|
+
<div>
|
|
223
|
+
<label class="text-text-400">Label</label>
|
|
224
|
+
<Textbox v-model="context.label" />
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
<div>
|
|
228
|
+
<label class="text-text-400">Items</label>
|
|
229
|
+
<ListItem :items="context.items"
|
|
230
|
+
@reorder="(from, to) => { context.items.splice(to, 0, context.items.splice(from, 1)[0]); }"
|
|
231
|
+
body-class="flex flex-col divide-y divide-text-200 border-[1px] border-text-200 mt-1">
|
|
232
|
+
<template v-slot="{ item, index }">
|
|
233
|
+
<div class="flex flex-row items-center gap-3 px-3">
|
|
234
|
+
<div data-reorder>
|
|
235
|
+
<svg width="14" height="14" class="fill-text-300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M496 288H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-128H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z"/></svg>
|
|
236
|
+
</div>
|
|
237
|
+
<div class="flex-1">
|
|
238
|
+
<Textbox v-model="item.text" class="border-none" placeholder="Topic Name" />
|
|
239
|
+
</div>
|
|
240
|
+
<div>
|
|
241
|
+
<button type="button" @click="context.items.splice(index, 1)">
|
|
242
|
+
<svg width="16" height="16" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z"/></svg>
|
|
243
|
+
</button>
|
|
244
|
+
</div>
|
|
233
245
|
</div>
|
|
234
|
-
</
|
|
235
|
-
</
|
|
236
|
-
|
|
246
|
+
</template>
|
|
247
|
+
</ListItem>
|
|
248
|
+
|
|
249
|
+
<div class="text-center">
|
|
250
|
+
<button type="button" class="text-primary p-3" @click="context.items.push({})">Add Item</button>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
237
253
|
|
|
238
|
-
<div
|
|
239
|
-
<
|
|
254
|
+
<div>
|
|
255
|
+
<label class="text-text-400">Placeholder</label>
|
|
256
|
+
<Textbox v-model="context.placeholder" />
|
|
240
257
|
</div>
|
|
241
258
|
|
|
259
|
+
<br />
|
|
260
|
+
<br />
|
|
261
|
+
|
|
242
262
|
</div>
|
|
243
263
|
</template>
|
|
244
264
|
</Modal>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<div class="col-span-2 flex flex-row items-center">
|
|
21
21
|
<label :class="$style.label" class="flex-1">Position</label>
|
|
22
22
|
<div class="flex flex-row items-center gap-1">
|
|
23
|
-
<Dropdown v-model="
|
|
23
|
+
<Dropdown v-model="item.props.dock">
|
|
24
24
|
<option disabled selected>Choose Position</option>
|
|
25
25
|
<option value="center">Center</option>
|
|
26
26
|
<option value="top">Top</option>
|
|
@@ -72,13 +72,6 @@ export default{
|
|
|
72
72
|
|
|
73
73
|
computed: {
|
|
74
74
|
|
|
75
|
-
position(){
|
|
76
|
-
if(!Array.isArray(this.item.props.position))
|
|
77
|
-
this.item.props.position = []
|
|
78
|
-
|
|
79
|
-
return this.item.props.position
|
|
80
|
-
}
|
|
81
|
-
|
|
82
75
|
}
|
|
83
76
|
|
|
84
77
|
}
|
|
@@ -135,13 +135,36 @@
|
|
|
135
135
|
</div>
|
|
136
136
|
</div>
|
|
137
137
|
|
|
138
|
-
<div
|
|
139
|
-
|
|
138
|
+
<div>
|
|
139
|
+
|
|
140
|
+
<div class="flex flex-row gap-4 items-center cursor-pointer">
|
|
141
|
+
<strong class="flex-1 text-text-400">Splash</strong>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<div class="mt-1 flex flex-col items-center gap-2">
|
|
145
|
+
<Image ref="splashImg"
|
|
146
|
+
:src="item.props.splash"
|
|
147
|
+
:editable="true"
|
|
148
|
+
@change="setSplash"
|
|
149
|
+
class="aspect-square bg-text-50 rounded-lg w-[100px]" />
|
|
150
|
+
|
|
151
|
+
<div class="flex flex-row gap-8">
|
|
152
|
+
<button type="button" class="text-primary"
|
|
153
|
+
@click="$refs.splashImg.edit()">
|
|
154
|
+
Upload
|
|
155
|
+
</button>
|
|
156
|
+
<button type="button" class="text-primary"
|
|
157
|
+
@click="removeSplash">
|
|
158
|
+
Remove
|
|
159
|
+
</button>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
140
163
|
</div>
|
|
141
164
|
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
-
</
|
|
165
|
+
<div class="p-6 text-center">
|
|
166
|
+
<button type="button" class="text-primary" @click="resetMedia">Reset to Default Style</button>
|
|
167
|
+
</div>
|
|
145
168
|
|
|
146
169
|
</div>
|
|
147
170
|
</template>
|
|
@@ -211,6 +234,26 @@ export default{
|
|
|
211
234
|
this.item.props.media[key] = { '*': {}, 'html, .html': {}, 'h1, h2, h3, h4, h5':{} }
|
|
212
235
|
}
|
|
213
236
|
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
setSplash(base64, file){
|
|
240
|
+
|
|
241
|
+
if(file.type.indexOf('image/svg') >= 0){
|
|
242
|
+
const reader = new FileReader();
|
|
243
|
+
|
|
244
|
+
reader.onload = (e) => {
|
|
245
|
+
this.item.props.splash = e.target.result
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
reader.readAsText(file);
|
|
249
|
+
}
|
|
250
|
+
else{
|
|
251
|
+
this.item.props.splash = base64
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
removeSplash(){
|
|
256
|
+
this.item.props.splash = null
|
|
214
257
|
}
|
|
215
258
|
|
|
216
259
|
},
|
|
@@ -19,45 +19,43 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
<div class="flex-1 p-6 flex flex-col gap-4">
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
<div>
|
|
28
|
-
<label class="text-text-400">Key</label>
|
|
29
|
-
<Textbox v-model="datasource.key" />
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div>
|
|
33
|
-
<label class="text-text-400">Model</label>
|
|
34
|
-
<Dropdown v-model="datasource.model">
|
|
22
|
+
<div>
|
|
23
|
+
<label class="text-text-400">Model</label>
|
|
24
|
+
<Dropdown v-model="datasource.type" @change="setType">
|
|
35
25
|
<option disabled selected>Select Model</option>
|
|
36
|
-
<option v-for="model in
|
|
26
|
+
<option v-for="model in datasources" :value="model.type">{{ model.name }}</option>
|
|
37
27
|
</Dropdown>
|
|
38
|
-
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div v-if="datasource.type">
|
|
39
31
|
|
|
40
|
-
<div>
|
|
41
|
-
<label class="text-text-400">Filters</label>
|
|
42
32
|
<div>
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
<option disabled selected>Choose Field</option>
|
|
46
|
-
<option v-for="column in modelColumns" :value="column.name">{{ column.name }}</option>
|
|
47
|
-
</Dropdown>
|
|
48
|
-
<Dropdown v-model="filter.operator">
|
|
49
|
-
<option disabled selected>Choose Operator</option>
|
|
50
|
-
<option value="=">=</option>
|
|
51
|
-
</Dropdown>
|
|
52
|
-
<Textbox v-model="filter.value" />
|
|
53
|
-
<button type="button" @click="datasource.filters.splice(idx, 1)">
|
|
54
|
-
<svg width="14" height="14" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z"/></svg>
|
|
55
|
-
</button>
|
|
56
|
-
</div>
|
|
33
|
+
<label class="text-text-400">Key</label>
|
|
34
|
+
<Textbox v-model="datasource.key" />
|
|
57
35
|
</div>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
36
|
+
|
|
37
|
+
<div v-if="datasource.filters">
|
|
38
|
+
<label class="text-text-400">Filters</label>
|
|
39
|
+
<div>
|
|
40
|
+
<div v-for="(filter, idx) in datasource.filters" class="flex flex-row gap-2">
|
|
41
|
+
<Dropdown v-model="filter.key">
|
|
42
|
+
<option disabled selected>Choose Field</option>
|
|
43
|
+
<option v-for="column in modelColumns" :value="column.name">{{ column.name }}</option>
|
|
44
|
+
</Dropdown>
|
|
45
|
+
<Dropdown v-model="filter.operator">
|
|
46
|
+
<option disabled selected>Choose Operator</option>
|
|
47
|
+
<option value="=">=</option>
|
|
48
|
+
</Dropdown>
|
|
49
|
+
<Textbox v-model="filter.value" />
|
|
50
|
+
<button type="button" @click="datasource.filters.splice(idx, 1)">
|
|
51
|
+
<svg width="14" height="14" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z"/></svg>
|
|
52
|
+
</button>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="p-3 text-center">
|
|
56
|
+
<button type="button" class="text-primary"
|
|
57
|
+
@click="datasource.filters.push({})">Add Filter</button>
|
|
58
|
+
</div>
|
|
61
59
|
</div>
|
|
62
60
|
</div>
|
|
63
61
|
|
|
@@ -89,7 +87,7 @@ export default{
|
|
|
89
87
|
},
|
|
90
88
|
|
|
91
89
|
create(){
|
|
92
|
-
this.datasource = {
|
|
90
|
+
this.datasource = {}
|
|
93
91
|
this.isOpen = true
|
|
94
92
|
},
|
|
95
93
|
|
|
@@ -102,12 +100,17 @@ export default{
|
|
|
102
100
|
if(this.useDatasource){
|
|
103
101
|
this.socketEmit2(this.useDatasource[0], {})
|
|
104
102
|
.then(res => {
|
|
105
|
-
this.
|
|
103
|
+
this.datasources = res.datasources
|
|
106
104
|
})
|
|
107
105
|
.catch(err => console.error(err))
|
|
108
106
|
}
|
|
109
107
|
},
|
|
110
108
|
|
|
109
|
+
setType(){
|
|
110
|
+
const datasource = this.datasources.filter(_ => _.type === this.datasource.type).pop()
|
|
111
|
+
Object.assign(this.datasource, datasource)
|
|
112
|
+
}
|
|
113
|
+
|
|
111
114
|
},
|
|
112
115
|
|
|
113
116
|
mounted() {
|
|
@@ -117,13 +120,12 @@ export default{
|
|
|
117
120
|
computed: {
|
|
118
121
|
|
|
119
122
|
canApply(){
|
|
120
|
-
return this.datasource.
|
|
121
|
-
this.datasource.key
|
|
122
|
-
this.datasource.model
|
|
123
|
+
return this.datasource.type &&
|
|
124
|
+
this.datasource.key
|
|
123
125
|
},
|
|
124
126
|
|
|
125
127
|
modelColumns(){
|
|
126
|
-
return (this.
|
|
128
|
+
return (this.datasources.filter(_ => _.name === this.datasource.model).pop() ?? {}).columns ?? []
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
},
|
|
@@ -131,7 +133,7 @@ export default{
|
|
|
131
133
|
data(){
|
|
132
134
|
return {
|
|
133
135
|
isOpen: false,
|
|
134
|
-
|
|
136
|
+
datasources: null,
|
|
135
137
|
datasource: {
|
|
136
138
|
filters: []
|
|
137
139
|
},
|
|
@@ -540,8 +540,7 @@
|
|
|
540
540
|
@postMessageToIframe="onPostMessageToIframe"/>
|
|
541
541
|
</div>
|
|
542
542
|
|
|
543
|
-
|
|
544
|
-
<div class="p-5 text-center" v-if="useTemplateCreator">
|
|
543
|
+
<div class="p-5 text-center" v-if="useTemplateCreator && currentItem.type !== 'Style'">
|
|
545
544
|
<button type="button" class="text-primary"
|
|
546
545
|
@click="openTemplateCreator">
|
|
547
546
|
Save as Template
|
|
@@ -670,7 +669,7 @@ export default{
|
|
|
670
669
|
|
|
671
670
|
this.pageHistory.commit()
|
|
672
671
|
|
|
673
|
-
|
|
672
|
+
this.store.selectedComponent = [ component.uid ]
|
|
674
673
|
|
|
675
674
|
this.$refs.webPageComponentSelector.close()
|
|
676
675
|
},
|
|
@@ -748,13 +747,11 @@ export default{
|
|
|
748
747
|
}
|
|
749
748
|
|
|
750
749
|
for(let key in component.props){
|
|
751
|
-
if(!this.compClasses.includes(key) &&
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
}*/
|
|
757
|
-
instance[key] = value
|
|
750
|
+
if(!this.compClasses.includes(key) &&
|
|
751
|
+
!this.containerClasses.includes(key) &&
|
|
752
|
+
!this.itemClasses.includes(key) &&
|
|
753
|
+
![ 'enabled' ].includes(key)){
|
|
754
|
+
instance[key] = component.props[key]
|
|
758
755
|
}
|
|
759
756
|
}
|
|
760
757
|
|
|
@@ -1635,9 +1632,11 @@ export default{
|
|
|
1635
1632
|
'textTransform', 'whitespace', 'textOverflow', 'textDecoration',
|
|
1636
1633
|
'boxShadow', 'opacity',
|
|
1637
1634
|
'colSpan', 'rowSpan',
|
|
1638
|
-
'flex', 'flexAlign', 'flexJustify', '
|
|
1635
|
+
'flex', 'flexAlign', 'flexJustify', 'flexBasis', 'flexColumns',
|
|
1636
|
+
'zIndex',
|
|
1639
1637
|
|
|
1640
1638
|
'autoFlow', 'alignItems', 'justifyContent',
|
|
1639
|
+
'letterSpacing',
|
|
1641
1640
|
|
|
1642
1641
|
'animate',
|
|
1643
1642
|
|
|
@@ -1646,12 +1645,12 @@ export default{
|
|
|
1646
1645
|
containerClasses: [
|
|
1647
1646
|
'containerVariant', 'containerGridColumn', 'containerGap'
|
|
1648
1647
|
],
|
|
1649
|
-
host: null,
|
|
1650
|
-
iframeStyle: {},
|
|
1651
|
-
iframeSrc: '',
|
|
1652
1648
|
itemClasses: [
|
|
1653
1649
|
'itemMinWidth', 'itemRatio', 'itemVariant'
|
|
1654
1650
|
],
|
|
1651
|
+
host: null,
|
|
1652
|
+
iframeStyle: {},
|
|
1653
|
+
iframeSrc: '',
|
|
1655
1654
|
layouts: [],
|
|
1656
1655
|
prevData: null,
|
|
1657
1656
|
previewModes: [
|
package/tailwind.config.js
CHANGED
|
@@ -30,7 +30,8 @@ module.exports = {
|
|
|
30
30
|
|
|
31
31
|
'justify-normal', 'justify-start', 'justify-end', 'justify-center', 'justify-between', 'justify-around', 'justify-evenly',
|
|
32
32
|
|
|
33
|
-
'aspect-[2/1]', 'aspect-[
|
|
33
|
+
'aspect-[2/1]', 'aspect-[3/1]', 'aspect-[4/1]', 'aspect-[4/3]', 'aspect-[5/1]', 'aspect-[6/1]', 'aspect-[7/1]',
|
|
34
|
+
'aspect-[8/1]', 'aspect-[8/3]', 'aspect-[8/5.6]', 'aspect-[9/1]', 'aspect-video',
|
|
34
35
|
'aspect-[1/2]', 'aspect-[2/3]', 'aspect-[3/4]', 'aspect-[8/9]',
|
|
35
36
|
|
|
36
37
|
'hidden', 'block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table',
|
|
@@ -48,21 +49,21 @@ module.exports = {
|
|
|
48
49
|
'overflow-x-hidden', 'overflow-y-auto', 'overflow-y-hidden', 'overflow-x-clip', 'overflow-y-clip', 'overflow-x-visible',
|
|
49
50
|
'overflow-y-visible', 'overflow-x-scroll', 'overflow-y-scroll',
|
|
50
51
|
|
|
51
|
-
'p-1', 'p-2', 'p-3', 'p-4', 'p-5', 'p-6', 'p-7', 'p-8',
|
|
52
|
-
'px-1', 'px-2', 'px-3', 'px-4', 'px-5', 'px-6', 'px-7', 'px-8',
|
|
53
|
-
'py-1', 'py-2', 'py-3', 'py-4', 'py-5', 'py-6', 'py-7', 'py-8',
|
|
54
|
-
'pl-1', 'pl-2', 'pl-3', 'pl-4', 'pl-5', 'pl-6', 'pl-7', 'pl-8',
|
|
55
|
-
'pt-1', 'pt-2', 'pt-3', 'pt-4', 'pt-5', 'pt-6', 'pt-7', 'pt-8',
|
|
56
|
-
'pr-1', 'pr-2', 'pr-3', 'pr-4', 'pr-5', 'pr-6', 'pr-7', 'pr-8',
|
|
57
|
-
'pb-1', 'pb-2', 'pb-3', 'pb-4', 'pb-5', 'pb-6', 'pb-7', 'pb-8',
|
|
58
|
-
|
|
59
|
-
'm-1', 'm-2', 'm-3', 'm-4', 'm-5', 'm-6', 'm-7', 'm-8',
|
|
60
|
-
'mx-1', 'mx-2', 'mx-3', 'mx-4', 'mx-5', 'mx-6', 'mx-7', 'mx-8',
|
|
61
|
-
'my-1', 'my-2', 'my-3', 'my-4', 'my-5', 'my-6', 'my-7', 'my-8',
|
|
62
|
-
'ml-1', 'ml-2', 'ml-3', 'ml-4', 'ml-5', 'ml-6', 'ml-7', 'ml-8',
|
|
63
|
-
'mt-1', 'mt-2', 'mt-3', 'mt-4', 'mt-5', 'mt-6', 'mt-7', 'mt-8',
|
|
64
|
-
'mr-1', 'mr-2', 'mr-3', 'mr-4', 'mr-5', 'mr-6', 'mr-7', 'mr-8',
|
|
65
|
-
'mb-1', 'mb-2', 'mb-3', 'mb-4', 'mb-5', 'mb-6', 'mb-7', 'mb-8',
|
|
52
|
+
'p-1', 'p-2', 'p-3', 'p-4', 'p-5', 'p-6', 'p-7', 'p-8', 'p-9', 'p-10', 'p-11', 'p-12',
|
|
53
|
+
'px-1', 'px-2', 'px-3', 'px-4', 'px-5', 'px-6', 'px-7', 'px-8', 'px-9', 'px-10', 'px-11', 'px-12',
|
|
54
|
+
'py-1', 'py-2', 'py-3', 'py-4', 'py-5', 'py-6', 'py-7', 'py-8', 'py-9', 'py-10', 'py-11', 'py-12',
|
|
55
|
+
'pl-1', 'pl-2', 'pl-3', 'pl-4', 'pl-5', 'pl-6', 'pl-7', 'pl-8', 'pl-9', 'pl-10', 'pl-11', 'pl-12',
|
|
56
|
+
'pt-1', 'pt-2', 'pt-3', 'pt-4', 'pt-5', 'pt-6', 'pt-7', 'pt-8', 'pt-9', 'pt-10', 'pt-11', 'pt-12',
|
|
57
|
+
'pr-1', 'pr-2', 'pr-3', 'pr-4', 'pr-5', 'pr-6', 'pr-7', 'pr-8', 'pr-9', 'pr-10', 'pr-11', 'pr-12',
|
|
58
|
+
'pb-1', 'pb-2', 'pb-3', 'pb-4', 'pb-5', 'pb-6', 'pb-7', 'pb-8', 'pb-9', 'pb-10', 'pb-11', 'pb-12',
|
|
59
|
+
|
|
60
|
+
'm-1', 'm-2', 'm-3', 'm-4', 'm-5', 'm-6', 'm-7', 'm-8', 'm-9', 'm-10', 'm-11', 'm-12',
|
|
61
|
+
'mx-1', 'mx-2', 'mx-3', 'mx-4', 'mx-5', 'mx-6', 'mx-7', 'mx-8', 'mx-9', 'mx-10', 'mx-11', 'mx-12',
|
|
62
|
+
'my-1', 'my-2', 'my-3', 'my-4', 'my-5', 'my-6', 'my-7', 'my-8', 'my-9', 'my-10', 'my-11', 'my-12',
|
|
63
|
+
'ml-1', 'ml-2', 'ml-3', 'ml-4', 'ml-5', 'ml-6', 'ml-7', 'ml-8', 'ml-9', 'ml-10', 'ml-11', 'ml-12',
|
|
64
|
+
'mt-1', 'mt-2', 'mt-3', 'mt-4', 'mt-5', 'mt-6', 'mt-7', 'mt-8', 'mt-9', 'mt-10', 'mt-11', 'mt-12',
|
|
65
|
+
'mr-1', 'mr-2', 'mr-3', 'mr-4', 'mr-5', 'mr-6', 'mr-7', 'mr-8', 'mr-9', 'mr-10', 'mr-11', 'mr-12',
|
|
66
|
+
'mb-1', 'mb-2', 'mb-3', 'mb-4', 'mb-5', 'mb-6', 'mb-7', 'mb-8', 'mb-9', 'mb-10', 'mb-11', 'mb-12',
|
|
66
67
|
'mx-auto',
|
|
67
68
|
|
|
68
69
|
'w-1', 'w-2', 'w-3', 'w-4', 'w-5', 'w-6', 'w-8', 'w-10', 'w-12', 'w-16',
|
|
@@ -246,7 +247,8 @@ module.exports = {
|
|
|
246
247
|
|
|
247
248
|
'md:justify-normal', 'md:justify-start', 'md:justify-end', 'md:justify-center', 'md:justify-between', 'md:justify-around', 'md:justify-evenly',
|
|
248
249
|
|
|
249
|
-
'md:aspect-[2/1]', 'md:aspect-[
|
|
250
|
+
'md:aspect-[2/1]', 'md:aspect-[3/1]', 'md:aspect-[4/1]', 'md:aspect-[4/3]', 'md:aspect-[5/1]', 'md:aspect-[6/1]', 'md:aspect-[7/1]',
|
|
251
|
+
'md:aspect-[8/1]', 'md:aspect-[8/3]', 'md:aspect-[8/5.6]', 'md:aspect-[9/1]', 'md:aspect-video',
|
|
250
252
|
'md:aspect-[1/2]', 'md:aspect-[2/3]', 'md:aspect-[3/4]', 'md:aspect-[8/9]',
|
|
251
253
|
|
|
252
254
|
'md:hidden', 'md:block', 'md:inline-block', 'md:inline', 'md:flex', 'md:inline-flex', 'md:table', 'md:inline-table',
|
|
@@ -264,21 +266,21 @@ module.exports = {
|
|
|
264
266
|
'md:overflow-x-hidden', 'md:overflow-y-auto', 'md:overflow-y-hidden', 'md:overflow-x-clip', 'md:overflow-y-clip', 'md:overflow-x-visible',
|
|
265
267
|
'md:overflow-y-visible', 'md:overflow-x-scroll', 'md:overflow-y-scroll',
|
|
266
268
|
|
|
267
|
-
'md:p-1', 'md:p-2', 'md:p-3', 'md:p-4', 'md:p-5', 'md:p-6', 'md:p-7', 'md:p-8',
|
|
268
|
-
'md:px-1', 'md:px-2', 'md:px-3', 'md:px-4', 'md:px-5', 'md:px-6', 'md:px-7', 'md:px-8',
|
|
269
|
-
'md:py-1', 'md:py-2', 'md:py-3', 'md:py-4', 'md:py-5', 'md:py-6', 'md:py-7', 'md:py-8',
|
|
270
|
-
'md:pl-1', 'md:pl-2', 'md:pl-3', 'md:pl-4', 'md:pl-5', 'md:pl-6', 'md:pl-7', 'md:pl-8',
|
|
271
|
-
'md:pt-1', 'md:pt-2', 'md:pt-3', 'md:pt-4', 'md:pt-5', 'md:pt-6', 'md:pt-7', 'md:pt-8',
|
|
272
|
-
'md:pr-1', 'md:pr-2', 'md:pr-3', 'md:pr-4', 'md:pr-5', 'md:pr-6', 'md:pr-7', 'md:pr-8',
|
|
273
|
-
'md:pb-1', 'md:pb-2', 'md:pb-3', 'md:pb-4', 'md:pb-5', 'md:pb-6', 'md:pb-7', 'md:pb-8',
|
|
274
|
-
|
|
275
|
-
'md:m-1', 'md:m-2', 'md:m-3', 'md:m-4', 'md:m-5', 'md:m-6', 'md:m-7', 'md:m-8',
|
|
276
|
-
'md:mx-1', 'md:mx-2', 'md:mx-3', 'md:mx-4', 'md:mx-5', 'md:mx-6', 'md:mx-7', 'md:mx-8',
|
|
277
|
-
'md:my-1', 'md:my-2', 'md:my-3', 'md:my-4', 'md:my-5', 'md:my-6', 'md:my-7', 'md:my-8',
|
|
278
|
-
'md:ml-1', 'md:ml-2', 'md:ml-3', 'md:ml-4', 'md:ml-5', 'md:ml-6', 'md:ml-7', 'md:ml-8',
|
|
279
|
-
'md:mt-1', 'md:mt-2', 'md:mt-3', 'md:mt-4', 'md:mt-5', 'md:mt-6', 'md:mt-7', 'md:mt-8',
|
|
280
|
-
'md:mr-1', 'md:mr-2', 'md:mr-3', 'md:mr-4', 'md:mr-5', 'md:mr-6', 'md:mr-7', 'md:mr-8',
|
|
281
|
-
'md:mb-1', 'md:mb-2', 'md:mb-3', 'md:mb-4', 'md:mb-5', 'md:mb-6', 'md:mb-7', 'md:mb-8',
|
|
269
|
+
'md:p-1', 'md:p-2', 'md:p-3', 'md:p-4', 'md:p-5', 'md:p-6', 'md:p-7', 'md:p-8', 'md:p-9', 'md:p-10', 'md:p-11', 'md:p-12',
|
|
270
|
+
'md:px-1', 'md:px-2', 'md:px-3', 'md:px-4', 'md:px-5', 'md:px-6', 'md:px-7', 'md:px-8', 'md:px-9', 'md:px-10', 'md:px-11', 'md:px-12',
|
|
271
|
+
'md:py-1', 'md:py-2', 'md:py-3', 'md:py-4', 'md:py-5', 'md:py-6', 'md:py-7', 'md:py-8', 'md:py-9', 'md:py-10', 'md:py-11', 'md:py-12',
|
|
272
|
+
'md:pl-1', 'md:pl-2', 'md:pl-3', 'md:pl-4', 'md:pl-5', 'md:pl-6', 'md:pl-7', 'md:pl-8', 'md:pl-9', 'md:pl-10', 'md:pl-11', 'md:pl-12',
|
|
273
|
+
'md:pt-1', 'md:pt-2', 'md:pt-3', 'md:pt-4', 'md:pt-5', 'md:pt-6', 'md:pt-7', 'md:pt-8', 'md:pt-9', 'md:pt-10', 'md:pt-11', 'md:pt-12',
|
|
274
|
+
'md:pr-1', 'md:pr-2', 'md:pr-3', 'md:pr-4', 'md:pr-5', 'md:pr-6', 'md:pr-7', 'md:pr-8', 'md:pr-9', 'md:pr-10', 'md:pr-11', 'md:pr-12',
|
|
275
|
+
'md:pb-1', 'md:pb-2', 'md:pb-3', 'md:pb-4', 'md:pb-5', 'md:pb-6', 'md:pb-7', 'md:pb-8', 'md:pb-9', 'md:pb-10', 'md:pb-11', 'md:pb-12',
|
|
276
|
+
|
|
277
|
+
'md:m-1', 'md:m-2', 'md:m-3', 'md:m-4', 'md:m-5', 'md:m-6', 'md:m-7', 'md:m-8', 'md:m-9', 'md:m-10', 'md:m-11', 'md:m-12',
|
|
278
|
+
'md:mx-1', 'md:mx-2', 'md:mx-3', 'md:mx-4', 'md:mx-5', 'md:mx-6', 'md:mx-7', 'md:mx-8', 'md:mx-9', 'md:mx-10', 'md:mx-11', 'md:mx-12',
|
|
279
|
+
'md:my-1', 'md:my-2', 'md:my-3', 'md:my-4', 'md:my-5', 'md:my-6', 'md:my-7', 'md:my-8', 'md:my-9', 'md:my-10', 'md:my-11', 'md:my-12',
|
|
280
|
+
'md:ml-1', 'md:ml-2', 'md:ml-3', 'md:ml-4', 'md:ml-5', 'md:ml-6', 'md:ml-7', 'md:ml-8', 'md:ml-9', 'md:ml-10', 'md:ml-11', 'md:ml-12',
|
|
281
|
+
'md:mt-1', 'md:mt-2', 'md:mt-3', 'md:mt-4', 'md:mt-5', 'md:mt-6', 'md:mt-7', 'md:mt-8', 'md:mt-9', 'md:mt-10', 'md:mt-11', 'md:mt-12',
|
|
282
|
+
'md:mr-1', 'md:mr-2', 'md:mr-3', 'md:mr-4', 'md:mr-5', 'md:mr-6', 'md:mr-7', 'md:mr-8', 'md:mr-9', 'md:mr-10', 'md:mr-11', 'md:mr-12',
|
|
283
|
+
'md:mb-1', 'md:mb-2', 'md:mb-3', 'md:mb-4', 'md:mb-5', 'md:mb-6', 'md:mb-7', 'md:mb-8', 'md:mb-9', 'md:mb-10', 'md:mb-11', 'md:mb-12',
|
|
282
284
|
'md:mx-auto',
|
|
283
285
|
|
|
284
286
|
'md:w-1', 'md:w-2', 'md:w-3', 'md:w-4', 'md:w-5', 'md:w-6', 'md:w-8', 'md:w-10', 'md:w-12', 'md:w-16',
|