@mixd-id/web-scaffold 0.1.230406219 → 0.1.230406221
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/ColorPicker2.vue +164 -0
- package/src/components/ConversationBuilder.vue +161 -0
- package/src/components/Modal.vue +24 -5
- package/src/components/Svg.vue +33 -0
- package/src/components/YoutubeVideo.vue +19 -2
- package/src/index.js +8 -2
- package/src/themes/default/index.js +10 -2
- package/src/widgets/AhrefSetting.vue +1 -1
- package/src/widgets/ArticleSetting.vue +1 -1
- package/src/widgets/BlockSetting.vue +1 -1
- package/src/widgets/BoxSetting.vue +1 -1
- package/src/widgets/ButtonSetting.vue +1 -1
- package/src/widgets/CarouselSetting.vue +2 -2
- package/src/widgets/ComponentSetting2.vue +987 -0
- package/src/widgets/ContactFormSetting.vue +2 -2
- package/src/widgets/CountdownSetting.vue +1 -1
- package/src/widgets/DataListSetting.vue +1 -1
- package/src/widgets/EmbeddedVideoSetting.vue +1 -1
- package/src/widgets/FAQSetting.vue +1 -1
- package/src/widgets/FeatureListSetting.vue +1 -1
- package/src/widgets/FlexSetting.vue +27 -5
- package/src/widgets/HeaderSetting.vue +1 -1
- package/src/widgets/ImageSetting.vue +55 -36
- package/src/widgets/LinkSetting.vue +3 -4
- package/src/widgets/ModalSetting.vue +12 -3
- package/src/widgets/MultiValueSetting2.vue +114 -0
- package/src/widgets/ParagraphSetting.vue +1 -1
- package/src/widgets/ReviewSetting.vue +1 -1
- package/src/widgets/ShareSetting.vue +1 -1
- package/src/widgets/SvgSetting.vue +108 -0
- package/src/widgets/WebDatasourceSelector.vue +2 -2
- package/src/widgets/WebPageBuilder.vue +7 -8
- package/src/widgets/YoutubeVideoSetting.vue +1 -1
- package/tailwind.config.js +8 -0
package/package.json
CHANGED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
<div :class="circleClass" :style="circleStyle"
|
|
4
|
+
@click="mode === 'hex' ? $refs.inputColor.click() : $refs.contextMenu.open($refs.btn)"
|
|
5
|
+
ref="btn"></div>
|
|
6
|
+
<input type="color" :class="$style.inputColor" ref="inputColor"
|
|
7
|
+
@change="select($refs.inputColor.value)"/>
|
|
8
|
+
|
|
9
|
+
<ContextMenu ref="contextMenu" :dismiss="false">
|
|
10
|
+
<div class="p-4 flex flex-col gap-4">
|
|
11
|
+
<div class="grid grid-cols-10 gap-4">
|
|
12
|
+
<div v-for="color in values">
|
|
13
|
+
<div v-if="mode === 'class'" :class="`${$style.circle} bg-${color}`"
|
|
14
|
+
@click="select(`${color}`)"></div>
|
|
15
|
+
<div v-else :class="`${$style.circle}`" :style="{ backgroundColor: color }"
|
|
16
|
+
@click="select(`${color}`)"></div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="grid grid-cols-2 gap-4">
|
|
20
|
+
<button type="button" @click="select('')"
|
|
21
|
+
class="w-full p-1 border-text-100 border-[1px] rounded-lg">None</button>
|
|
22
|
+
<button type="button" v-if="mode !== 'class' && Boolean(customColor)"
|
|
23
|
+
class="w-full p-1 border-text-100 border-[1px] rounded-lg"
|
|
24
|
+
@click="$refs.inputColor.click()">Custom</button>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</ContextMenu>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
|
|
33
|
+
import {hexToRgb, rgbToHex} from "../utils/helpers.mjs";
|
|
34
|
+
|
|
35
|
+
export default{
|
|
36
|
+
|
|
37
|
+
emits: [ 'change', 'update:modelValue' ],
|
|
38
|
+
|
|
39
|
+
props: {
|
|
40
|
+
|
|
41
|
+
mode: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: 'class' // class|hex
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
keys: {
|
|
47
|
+
type: Array,
|
|
48
|
+
default: [
|
|
49
|
+
[ 'bg-' ],
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
values: {
|
|
54
|
+
type: Array,
|
|
55
|
+
default: [
|
|
56
|
+
'primary-50', 'primary-100', 'primary-200', 'primary-300', 'primary-400', 'primary-500',
|
|
57
|
+
'primary-600', 'primary-700', 'primary-800', 'primary-900',
|
|
58
|
+
'gray-50', 'gray-100', 'gray-200', 'gray-300', 'gray-400', 'gray-500', 'gray-600', 'gray-700',
|
|
59
|
+
'gray-800', 'gray-900',
|
|
60
|
+
'red-50', 'red-100', 'red-200', 'red-300', 'red-400', 'red-500', 'red-600', 'red-700',
|
|
61
|
+
'red-800', 'red-900',
|
|
62
|
+
'amber-50', 'amber-100', 'amber-200', 'amber-300', 'amber-400', 'amber-500', 'amber-600',
|
|
63
|
+
'amber-700', 'amber-800', 'amber-900',
|
|
64
|
+
'lime-50', 'lime-100', 'lime-200','lime-300', 'lime-400', 'lime-500', 'lime-600', 'lime-700',
|
|
65
|
+
'lime-800', 'lime-900',
|
|
66
|
+
'blue-50', 'blue-100', 'blue-200', 'blue-300', 'blue-400', 'blue-500', 'blue-600', 'blue-700',
|
|
67
|
+
'blue-800', 'blue-900',
|
|
68
|
+
'black', 'white', 'transparent',
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
customColor: undefined,
|
|
73
|
+
|
|
74
|
+
modelValue: String,
|
|
75
|
+
|
|
76
|
+
prefix: String,
|
|
77
|
+
|
|
78
|
+
valueType: String,
|
|
79
|
+
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
methods: {
|
|
83
|
+
|
|
84
|
+
select(color){
|
|
85
|
+
if(this.mode === 'class'){
|
|
86
|
+
this.$emit('update:modelValue', color ? this.keys[0][0] + color : '')
|
|
87
|
+
}
|
|
88
|
+
else{
|
|
89
|
+
if(this.valueType === 'rgb'){
|
|
90
|
+
const hex = hexToRgb(color)
|
|
91
|
+
this.$emit('update:modelValue', `${hex.r},${hex.g},${hex.b}`)
|
|
92
|
+
}
|
|
93
|
+
else{
|
|
94
|
+
this.$emit('update:modelValue', color)
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
this.$emit('change')
|
|
98
|
+
this.$refs.contextMenu.close()
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
computed:{
|
|
104
|
+
|
|
105
|
+
customColorCount(){
|
|
106
|
+
const count = parseInt(this.customColor)
|
|
107
|
+
return isNaN(count) ? 0 : count
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
circleClass(){
|
|
111
|
+
return [
|
|
112
|
+
this.$style.circle,
|
|
113
|
+
this.mode === 'class' ?
|
|
114
|
+
(this.modelValue ?? '').replace('text-', 'bg-').replace('border-', 'bg-') :
|
|
115
|
+
''
|
|
116
|
+
]
|
|
117
|
+
.filter(_=>_)
|
|
118
|
+
.join(' ')
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
circleStyle(){
|
|
122
|
+
if(this.mode !== 'class'){
|
|
123
|
+
|
|
124
|
+
let value = this.modelValue
|
|
125
|
+
if(this.valueType === 'rgb'){
|
|
126
|
+
value = rgbToHex(...(this.modelValue ?? '').split(','))
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return {
|
|
130
|
+
'background-color': value ?? ''
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
data(){
|
|
138
|
+
return {
|
|
139
|
+
customColors: []
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
</script>
|
|
146
|
+
|
|
147
|
+
<style module>
|
|
148
|
+
|
|
149
|
+
.comp{
|
|
150
|
+
@apply relative;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.circle{
|
|
154
|
+
@apply w-[24px] h-[24px] rounded-full cursor-pointer border-[2px] border-text-200;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.inputColor{
|
|
158
|
+
@apply absolute top-0 left-0;
|
|
159
|
+
width: 0;
|
|
160
|
+
height: 0;
|
|
161
|
+
opacity: 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
</style>
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
|
|
4
|
+
<div class="flex-1 p-4 overflow-y-auto">
|
|
5
|
+
|
|
6
|
+
<div class="flex flex-col gap-2 mx-auto max-w-[540px]">
|
|
7
|
+
|
|
8
|
+
<div v-for="(sequence, index) in conversation.sequences">
|
|
9
|
+
|
|
10
|
+
<div v-if="index < 1" class="py-3">
|
|
11
|
+
<div class="bg-green-100 p-2 rounded-lg text-black max-w-[60%]">
|
|
12
|
+
[NSC-KPG]
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<div v-else class="py-3">
|
|
16
|
+
<div class="bg-green-100 p-2 rounded-lg text-black max-w-[60%] h-[36px]"></div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="border-t-[1px] border-dashed border-text-300"></div>
|
|
20
|
+
|
|
21
|
+
<div>
|
|
22
|
+
<div v-for="out in sequence.out">
|
|
23
|
+
<pre>{{ out }}</pre>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<button type="button" @click="sequence.out.push({})">Add Out</button>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="border-t-[1px] border-dashed border-text-300"></div>
|
|
30
|
+
|
|
31
|
+
<div v-if="index > 0">
|
|
32
|
+
<div v-for="fallback in sequence.fallback">
|
|
33
|
+
<pre>{{ fallback }}</pre>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<button type="button" @click="sequence.fallback.push({})">Add Fallback</button>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<button @click="conversation.sequences.push({ in:{}, out:[], fallback:[] })">Add Sequence</button>
|
|
42
|
+
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div class="w-[400px] bg-base-400 p-6">
|
|
48
|
+
|
|
49
|
+
<div class="flex flex-col gap-6">
|
|
50
|
+
<div>
|
|
51
|
+
<label class="text-text-400">Type</label>
|
|
52
|
+
<Dropdown class="mt-1">
|
|
53
|
+
<option>Whatsapp</option>
|
|
54
|
+
<option>Livechat</option>
|
|
55
|
+
</Dropdown>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div>
|
|
59
|
+
<div class="flex flex-row gap-2">
|
|
60
|
+
<label class="text-text-400">Criteria</label>
|
|
61
|
+
<button type="button" class="text-primary" @click="">Add Criteria</button>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="mt-1">
|
|
64
|
+
<div class="flex flex-row gap-2">
|
|
65
|
+
<Dropdown class="w-[100px]">
|
|
66
|
+
<option>Text</option>
|
|
67
|
+
</Dropdown>
|
|
68
|
+
<Dropdown class="w-[100px]">
|
|
69
|
+
<option>Starts with</option>
|
|
70
|
+
</Dropdown>
|
|
71
|
+
<Textbox />
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
81
|
+
|
|
82
|
+
<script>
|
|
83
|
+
|
|
84
|
+
export default{
|
|
85
|
+
|
|
86
|
+
data(){
|
|
87
|
+
return {
|
|
88
|
+
conversation: {
|
|
89
|
+
isActive: 1,
|
|
90
|
+
name: 'Conversation 1',
|
|
91
|
+
description: 'Conversation 1 Description',
|
|
92
|
+
startDate: '2023-01-01',
|
|
93
|
+
endDate: '2023-01-01',
|
|
94
|
+
sequences: [
|
|
95
|
+
|
|
96
|
+
/*{
|
|
97
|
+
id: 1,
|
|
98
|
+
in: {
|
|
99
|
+
type: 'whatsapp',
|
|
100
|
+
filters: [
|
|
101
|
+
{ key:'text', operator:'contains', value:'halo' }
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
out: [
|
|
105
|
+
{
|
|
106
|
+
type: 'whatsapp',
|
|
107
|
+
text: 'Halo, selamat datang di NSC-PNK, silahkan masukkan nama dan alamat anda'
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
type: 'whatsapp',
|
|
111
|
+
text: 'Nama:<br/>Alamat:<br/>Propinsi:<br/>Kota:'
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
{
|
|
117
|
+
id: 2,
|
|
118
|
+
in: {
|
|
119
|
+
type: 'whatsapp',
|
|
120
|
+
filters: [
|
|
121
|
+
{ key:'text', operator:'contains', value:'nama:' },
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
out: [
|
|
125
|
+
{
|
|
126
|
+
type: 'whatsapp',
|
|
127
|
+
text: 'Terima kasih, kami akan segera menghubungi anda'
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
type: 'send-api',
|
|
131
|
+
text: 'Send API'
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'leave-chat',
|
|
135
|
+
text: 'Leave Chat'
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
fallback: [
|
|
139
|
+
{
|
|
140
|
+
type: 'whatsapp',
|
|
141
|
+
text: 'Maaf, kami tidak mengerti'
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}*/
|
|
145
|
+
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
</script>
|
|
154
|
+
|
|
155
|
+
<style module>
|
|
156
|
+
|
|
157
|
+
.comp{
|
|
158
|
+
@apply flex flex-row;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
</style>
|
package/src/components/Modal.vue
CHANGED
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
|
|
46
46
|
<script>
|
|
47
47
|
|
|
48
|
+
import {componentMixin} from "../mixin/component";
|
|
49
|
+
|
|
48
50
|
let modals = []
|
|
49
51
|
|
|
50
52
|
const registerModal = (modal) => {
|
|
@@ -66,7 +68,9 @@ const unRegisterModal = (modal) => {
|
|
|
66
68
|
|
|
67
69
|
export default{
|
|
68
70
|
|
|
69
|
-
|
|
71
|
+
mixins: [ componentMixin ],
|
|
72
|
+
|
|
73
|
+
emits: [ 'submit', 'apply', 'dismiss', 'show', 'hide' ],
|
|
70
74
|
|
|
71
75
|
props:{
|
|
72
76
|
class:{ type: String, default: '' },
|
|
@@ -95,6 +99,8 @@ export default{
|
|
|
95
99
|
default: false
|
|
96
100
|
},
|
|
97
101
|
|
|
102
|
+
debugState: undefined,
|
|
103
|
+
|
|
98
104
|
mode: 'v-if', // v-if or v-show
|
|
99
105
|
|
|
100
106
|
items: Array,
|
|
@@ -111,6 +117,15 @@ export default{
|
|
|
111
117
|
this._state = false
|
|
112
118
|
},
|
|
113
119
|
|
|
120
|
+
dismiss(){
|
|
121
|
+
if(this.hash){
|
|
122
|
+
this.$router.push({ hash: this.$route.hash.replace(this.hash, '') })
|
|
123
|
+
}
|
|
124
|
+
else{
|
|
125
|
+
this.$emit('dismiss')
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
|
|
114
129
|
onAfterLeave(){
|
|
115
130
|
let overlay = document.querySelector('.bW9k')
|
|
116
131
|
if(overlay){
|
|
@@ -128,18 +143,19 @@ export default{
|
|
|
128
143
|
|
|
129
144
|
onDismiss(e){
|
|
130
145
|
if(this.computedState && this.dismissable && this.$refs.modal && e.target.classList.contains('bW9k')){
|
|
131
|
-
this
|
|
146
|
+
this.dismiss()
|
|
132
147
|
}
|
|
133
148
|
},
|
|
134
149
|
|
|
135
150
|
onKeyDown(e){
|
|
136
151
|
if(this.dismissable && this.$refs.modal && e.keyCode === 27){
|
|
137
|
-
|
|
152
|
+
this.dismiss()
|
|
138
153
|
}
|
|
139
154
|
},
|
|
140
155
|
|
|
141
156
|
setState(to){
|
|
142
157
|
if(to){
|
|
158
|
+
this.isDisabled = 0
|
|
143
159
|
let overlay = document.querySelector('.bW9k')
|
|
144
160
|
if(overlay){
|
|
145
161
|
overlay.classList.add('bW9l')
|
|
@@ -206,7 +222,8 @@ export default{
|
|
|
206
222
|
},
|
|
207
223
|
|
|
208
224
|
computedState(){
|
|
209
|
-
return this.
|
|
225
|
+
return (this.debugState && this.editMode) ? Boolean(this.debugState) :
|
|
226
|
+
(this.state ? Boolean(this.state) : this._state)
|
|
210
227
|
},
|
|
211
228
|
|
|
212
229
|
currentState(){
|
|
@@ -245,7 +262,9 @@ export default{
|
|
|
245
262
|
},
|
|
246
263
|
|
|
247
264
|
mounted() {
|
|
248
|
-
|
|
265
|
+
if(document.querySelector('.bW9k')){
|
|
266
|
+
document.querySelector('.bW9k').addEventListener('click', this.onDismiss)
|
|
267
|
+
}
|
|
249
268
|
window.addEventListener('keydown', this.onKeyDown)
|
|
250
269
|
|
|
251
270
|
this.$nextTick(() => {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" :viewBox="viewBox" :width="svgWidth" :height="svgHeight" v-html="html" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
|
|
7
|
+
import {componentMixin} from "../mixin/component";
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
|
|
11
|
+
mixins: [ componentMixin ],
|
|
12
|
+
|
|
13
|
+
props: {
|
|
14
|
+
|
|
15
|
+
html: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: ''
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
viewBox: String,
|
|
21
|
+
|
|
22
|
+
svgWidth: [ String, Number ],
|
|
23
|
+
|
|
24
|
+
svgHeight: [ String, Number ],
|
|
25
|
+
|
|
26
|
+
},
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<style module>
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
</style>
|
|
@@ -19,11 +19,19 @@
|
|
|
19
19
|
<script>
|
|
20
20
|
|
|
21
21
|
import { componentMixin } from '../mixin/component'
|
|
22
|
+
import {parseBoolean} from "../utils/helpers.mjs";
|
|
22
23
|
|
|
23
24
|
const callbacks = []
|
|
25
|
+
const t0 = new Date().getTime()
|
|
24
26
|
const initScript = (callback, id) => {
|
|
27
|
+
if(callback){
|
|
28
|
+
callbacks.push([ callback, id ])
|
|
29
|
+
}
|
|
25
30
|
|
|
26
|
-
|
|
31
|
+
if((new Date().getTime() - t0) < 1200){
|
|
32
|
+
window.setTimeout(() => initScript(), 1000)
|
|
33
|
+
return
|
|
34
|
+
}
|
|
27
35
|
|
|
28
36
|
let script = document.getElementById('youtube-iframe-api')
|
|
29
37
|
if(!script){
|
|
@@ -65,6 +73,11 @@ export default{
|
|
|
65
73
|
default: 0
|
|
66
74
|
},
|
|
67
75
|
|
|
76
|
+
autoplay: {
|
|
77
|
+
type: [ Number, String, Boolean ],
|
|
78
|
+
default: 0
|
|
79
|
+
}
|
|
80
|
+
|
|
68
81
|
},
|
|
69
82
|
|
|
70
83
|
computed: {
|
|
@@ -87,6 +100,10 @@ export default{
|
|
|
87
100
|
]
|
|
88
101
|
.filter(_ => _)
|
|
89
102
|
.join(' ')
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
isAutoplay(){
|
|
106
|
+
return parseBoolean(this.autoplay) ? 1 : 0
|
|
90
107
|
}
|
|
91
108
|
|
|
92
109
|
},
|
|
@@ -129,7 +146,7 @@ export default{
|
|
|
129
146
|
width: '100%',
|
|
130
147
|
videoId: this.videoId,
|
|
131
148
|
playerVars: {
|
|
132
|
-
autoplay:
|
|
149
|
+
autoplay: this.isAutoplay,
|
|
133
150
|
controls: 1,
|
|
134
151
|
},
|
|
135
152
|
events: {
|
package/src/index.js
CHANGED
|
@@ -280,9 +280,9 @@ export default{
|
|
|
280
280
|
app.config.globalProperties.$observe = observeInit()
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
app.config.globalProperties.$screenPrefix = ref(util.calculateMediaPrefix(
|
|
283
|
+
app.config.globalProperties.$screenPrefix = ref(util.calculateMediaPrefix(document.documentElement.clientWidth))
|
|
284
284
|
const onWindowResize = throttle(() => {
|
|
285
|
-
app.config.globalProperties.$screenPrefix.value = util.calculateMediaPrefix(
|
|
285
|
+
app.config.globalProperties.$screenPrefix.value = util.calculateMediaPrefix(document.documentElement.clientWidth)
|
|
286
286
|
resizeEvents.forEach((fn) => fn())
|
|
287
287
|
}, 1000, { leading:true })
|
|
288
288
|
|
|
@@ -364,6 +364,7 @@ export default{
|
|
|
364
364
|
app.component('Box', defineAsyncComponent(() => import("./components/Box.vue")))
|
|
365
365
|
app.component('ChartBar', defineAsyncComponent(() => import("./components/ChartBar.vue")))
|
|
366
366
|
app.component('ColorPicker', defineAsyncComponent(() => import("./components/ColorPicker.vue")))
|
|
367
|
+
app.component('ColorPicker2', defineAsyncComponent(() => import("./components/ColorPicker2.vue")))
|
|
367
368
|
app.component('Confirm', defineAsyncComponent(() => import("./components/Confirm.vue")))
|
|
368
369
|
app.component('SearchButton', defineAsyncComponent(() => import("./components/SearchButton.vue")))
|
|
369
370
|
app.component('ChatTyping', defineAsyncComponent(() => import("./components/ChatTyping.vue")))
|
|
@@ -429,6 +430,8 @@ export default{
|
|
|
429
430
|
app.component('TextEditor', defineAsyncComponent(() => import("./components/TextEditor.vue")))
|
|
430
431
|
app.component('DataList', defineAsyncComponent(() => import("./components/DataList.vue")))
|
|
431
432
|
app.component('YoutubeVideo', defineAsyncComponent(() => import("./components/YoutubeVideo.vue")))
|
|
433
|
+
app.component('Svg', defineAsyncComponent(() => import("./components/Svg.vue")))
|
|
434
|
+
app.component('ConversationBuilder', defineAsyncComponent(() => import("./components/ConversationBuilder.vue")))
|
|
432
435
|
|
|
433
436
|
app.component('AhrefSetting', defineAsyncComponent(() => import("./widgets/AhrefSetting.vue")))
|
|
434
437
|
app.component('ArticleSetting', defineAsyncComponent(() => import("./widgets/ArticleSetting.vue")))
|
|
@@ -438,6 +441,7 @@ export default{
|
|
|
438
441
|
app.component('CarouselSetting', defineAsyncComponent(() => import("./widgets/CarouselSetting.vue")))
|
|
439
442
|
app.component('CountdownSetting', defineAsyncComponent(() => import("./widgets/CountdownSetting.vue")))
|
|
440
443
|
app.component('ComponentSetting', defineAsyncComponent(() => import("./widgets/ComponentSetting.vue")))
|
|
444
|
+
app.component('ComponentSetting2', defineAsyncComponent(() => import("./widgets/ComponentSetting2.vue")))
|
|
441
445
|
app.component('ContactForm', defineAsyncComponent(() => import("./widgets/ContactForm.vue")))
|
|
442
446
|
app.component('ContactFormSetting', defineAsyncComponent(() => import("./widgets/ContactFormSetting.vue")))
|
|
443
447
|
app.component('EmbeddedVideo', defineAsyncComponent(() => import("./widgets/EmbeddedVideo.vue")))
|
|
@@ -459,6 +463,7 @@ export default{
|
|
|
459
463
|
app.component('ImageSetting', defineAsyncComponent(() => import("./widgets/ImageSetting.vue")))
|
|
460
464
|
app.component('MarginSetting', defineAsyncComponent(() => import("./widgets/MarginSetting.vue")))
|
|
461
465
|
app.component('MultiValueSetting', defineAsyncComponent(() => import("./widgets/MultiValueSetting.vue")))
|
|
466
|
+
app.component('MultiValueSetting2', defineAsyncComponent(() => import("./widgets/MultiValueSetting2.vue")))
|
|
462
467
|
app.component('PaddingSetting', defineAsyncComponent(() => import("./widgets/PaddingSetting.vue")))
|
|
463
468
|
app.component('ParagraphSetting', defineAsyncComponent(() => import("./widgets/ParagraphSetting.vue")))
|
|
464
469
|
app.component('Review', defineAsyncComponent(() => import("./widgets/Review.vue")))
|
|
@@ -479,5 +484,6 @@ export default{
|
|
|
479
484
|
app.component('ModalSetting', defineAsyncComponent(() => import("./widgets/ModalSetting.vue")))
|
|
480
485
|
app.component('DataListSetting', defineAsyncComponent(() => import("./widgets/DataListSetting.vue")))
|
|
481
486
|
app.component('YoutubeVideoSetting', defineAsyncComponent(() => import("./widgets/YoutubeVideoSetting.vue")))
|
|
487
|
+
app.component('SvgSetting', defineAsyncComponent(() => import("./widgets/SvgSetting.vue")))
|
|
482
488
|
}
|
|
483
489
|
}
|
|
@@ -52,7 +52,10 @@ const plugin = Plugin(function({ addBase, config, theme }) {
|
|
|
52
52
|
"--secondary-600": '99, 100, 101',
|
|
53
53
|
"--secondary-700": '77, 78, 78',
|
|
54
54
|
"--secondary-800": '55, 56, 56',
|
|
55
|
-
"--secondary-900": '33, 33, 34'
|
|
55
|
+
"--secondary-900": '33, 33, 34',
|
|
56
|
+
|
|
57
|
+
'--whatsapp-100': '179, 206, 201',
|
|
58
|
+
'--whatsapp-500': '0, 93, 75',
|
|
56
59
|
|
|
57
60
|
},
|
|
58
61
|
|
|
@@ -273,7 +276,12 @@ const plugin = Plugin(function({ addBase, config, theme }) {
|
|
|
273
276
|
800: "rgba(var(--text-800), <alpha-value>)",
|
|
274
277
|
900: "rgba(var(--text-900), <alpha-value>)",
|
|
275
278
|
DEFAULT: "rgba(var(--text), 1)"
|
|
276
|
-
}
|
|
279
|
+
},
|
|
280
|
+
whatsapp: {
|
|
281
|
+
100: "rgba(var(--whatsapp-100), <alpha-value>)",
|
|
282
|
+
500: "rgba(var(--whatsapp-500), <alpha-value>)",
|
|
283
|
+
DEFAULT: "rgba(var(--whatsapp), <alpha-value>)"
|
|
284
|
+
},
|
|
277
285
|
}
|
|
278
286
|
}
|
|
279
287
|
}
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</div>
|
|
52
52
|
</div>
|
|
53
53
|
|
|
54
|
-
<
|
|
54
|
+
<ComponentSetting2 :item="item"
|
|
55
55
|
:view-type="viewType"
|
|
56
56
|
:view-types="viewTypes"
|
|
57
57
|
defaultDisplay="flex"
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
<template #default="{ context }">
|
|
89
89
|
<div class="flex-1 p-5 flex flex-col gap-4">
|
|
90
90
|
<ImageSetting :item="context.item" :view-types="viewTypes" :view-type="context.viewType" />
|
|
91
|
-
<
|
|
91
|
+
<ComponentSetting2 :item="context.item" :view-types="viewTypes" :view-type="context.viewType" />
|
|
92
92
|
</div>
|
|
93
93
|
</template>
|
|
94
94
|
</Modal>
|