@mixd-id/web-scaffold 0.2.240705 → 0.2.250801009
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/docs/components/Dashboard.md +56 -0
- package/log.txt +7 -0
- package/package.json +27 -19
- package/src/components/404.vue +61 -0
- package/src/components/AccountIcon.vue +19 -0
- package/src/components/Ahref.vue +1 -1
- package/src/components/Alert.vue +4 -13
- package/src/components/ArrayList.vue +49 -0
- package/src/components/Article.vue +24 -30
- package/src/components/Button.vue +79 -167
- package/src/components/Card.vue +235 -0
- package/src/components/Carousel.vue +61 -60
- package/src/components/Cart.vue +192 -0
- package/src/components/CartIcon.vue +89 -0
- package/src/components/ChartBar.vue +2 -3
- package/src/components/Checkbox.vue +20 -11
- package/src/components/Checkout.vue +373 -0
- package/src/components/CheckoutDelivery.vue +267 -0
- package/src/components/CodeEditor.vue +5 -16
- package/src/components/CollapsiblePanel.vue +70 -0
- package/src/components/ColorPicker.vue +8 -3
- package/src/components/ColorPicker2.vue +41 -19
- package/src/components/ColorPicker3.vue +100 -0
- package/src/components/Confirm.vue +9 -7
- package/src/components/ContextMenu.vue +122 -206
- package/src/components/ContextMenuItem.vue +53 -0
- package/src/components/Dashboard.vue +243 -0
- package/src/components/Dashboard2.vue +118 -0
- package/src/components/DashboardComponentSelector.vue +96 -0
- package/src/components/DashboardConfigs.vue +202 -0
- package/src/components/Datepicker.vue +102 -41
- package/src/components/DayTimeRange.vue +3 -2
- package/src/components/Dropdown.vue +7 -4
- package/src/components/Flex.vue +14 -40
- package/src/components/GHeatMaps.vue +2 -2
- package/src/components/Grid.vue +6 -6
- package/src/components/HTMLEditor.vue +27 -14
- package/src/components/Image.vue +62 -108
- package/src/components/ImagePreview.vue +14 -4
- package/src/components/ImageUploader.vue +114 -0
- package/src/components/ImportModal.vue +3 -3
- package/src/components/Link.vue +62 -6
- package/src/components/List.vue +524 -402
- package/src/components/ListContextMenu.vue +88 -0
- package/src/components/ListItem.vue +5 -3
- package/src/components/ListPage1.vue +14 -15
- package/src/components/ListView.vue +5 -6
- package/src/components/ListViewSettings.vue +2 -2
- package/src/components/LogViewerItem.vue +1 -1
- package/src/components/MarkdownEdit.vue +128 -0
- package/src/components/MarkdownPreview.vue +102 -0
- package/src/components/MenuItem1.vue +36 -0
- package/src/components/Modal.vue +95 -43
- package/src/components/MultiDropdown.vue +124 -0
- package/src/components/MultilineText.vue +1 -4
- package/src/components/OTPField.vue +11 -17
- package/src/components/ObjectTree.vue +1 -1
- package/src/components/PageBuilder.vue +3 -3
- package/src/components/Paragraph.vue +1 -2
- package/src/components/PresetSelectorFilterItem.vue +107 -95
- package/src/components/Radio.vue +1 -1
- package/src/components/SearchModal.vue +153 -0
- package/src/components/Slider.vue +1 -1
- package/src/components/Svg.vue +1 -1
- package/src/components/SvgEditor.vue +173 -0
- package/src/components/Switch.vue +4 -5
- package/src/components/Table.vue +2 -2
- package/src/components/TableView.vue +2 -3
- package/src/components/TableViewHead.vue +2 -2
- package/src/components/Tabs.vue +1 -1
- package/src/components/Testimonial.vue +2 -2
- package/src/components/Text.vue +7 -22
- package/src/components/TextEditor.vue +3 -3
- package/src/components/TextWithTag.vue +61 -30
- package/src/components/Textarea.vue +11 -16
- package/src/components/Textbox.vue +9 -19
- package/src/components/Timepicker.vue +25 -15
- package/src/components/Toast.vue +5 -3
- package/src/components/TreeMenu.vue +122 -0
- package/src/components/TreeView.vue +15 -10
- package/src/components/TreeView2.vue +38 -0
- package/src/components/TreeViewItem.vue +58 -29
- package/src/components/TreeViewItem2.vue +55 -0
- package/src/components/Uploader.vue +45 -0
- package/src/components/Video.vue +119 -0
- package/src/components/VirtualGrid.vue +24 -7
- package/src/components/VirtualTable.vue +363 -128
- package/src/configs/dashboard/data-table.js +9 -0
- package/src/configs/web-page-builder.js +118 -0
- package/src/directives/intersect.js +26 -0
- package/src/hooks/device.js +14 -0
- package/src/index.js +62 -107
- package/src/mixin/component.js +147 -67
- package/src/themes/default/index.js +83 -155
- package/src/utils/dashboard.js +22 -962
- package/src/utils/helpers.cjs +635 -0
- package/src/utils/helpers.js +91 -60
- package/src/utils/helpers.mjs +245 -12
- package/src/utils/importer.js +22 -3
- package/src/utils/list.mjs +1509 -0
- package/src/utils/preset-selector.cjs +1455 -0
- package/src/utils/preset-selector.js +489 -95
- package/src/utils/preset-selector.mjs +59 -20
- package/src/utils/queue.js +63 -0
- package/src/utils/web.mjs +120 -0
- package/src/utils/wss.js +37 -29
- package/src/utils/wss.mjs +24 -19
- package/src/widgets/AhrefSetting.vue +16 -13
- package/src/widgets/ArticleSetting.vue +15 -27
- package/src/widgets/BackgroundColorSetting.vue +153 -0
- package/src/widgets/BorderColorSetting.vue +57 -0
- package/src/widgets/BotEditor/BotEditorActions.vue +3 -2
- package/src/widgets/BotEditor/BotEditorSettings.vue +21 -0
- package/src/widgets/BotEditor.vue +35 -15
- package/src/widgets/ButtonSetting.vue +12 -13
- package/src/widgets/CarouselSetting.vue +33 -45
- package/src/widgets/CartSetting.vue +46 -0
- package/src/widgets/CheckoutSetting.vue +46 -0
- package/src/widgets/CollapsiblePanelSetting.vue +46 -0
- package/src/widgets/ColumnSelector.vue +29 -5
- package/src/widgets/ComponentSetting.vue +1 -1
- package/src/widgets/ComponentSetting2.vue +112 -234
- package/src/widgets/ComponentSetting3.vue +1 -1
- package/src/widgets/ContactForm.vue +3 -3
- package/src/widgets/ContactFormSetting.vue +41 -30
- package/src/widgets/Dashboard/BarChart.vue +47 -11
- package/src/widgets/Dashboard/BarChartSetting.vue +1 -1
- package/src/widgets/Dashboard/DataTable.vue +125 -0
- package/src/widgets/Dashboard/DataTableSetting.vue +243 -0
- package/src/widgets/Dashboard/DatasourceSelector.vue +1 -1
- package/src/widgets/Dashboard/Doughnut.vue +49 -7
- package/src/widgets/Dashboard/DoughnutSetting.vue +2 -2
- package/src/widgets/Dashboard/Metric.vue +78 -19
- package/src/widgets/Dashboard/MetricSetting.vue +81 -28
- package/src/widgets/Dashboard/Pie.vue +55 -6
- package/src/widgets/Dashboard/PieSetting.vue +1 -1
- package/src/widgets/Dashboard/PolarArea.vue +49 -7
- package/src/widgets/Dashboard/PolarAreaSetting.vue +1 -1
- package/src/widgets/Dashboard/SharingModal.vue +4 -5
- package/src/widgets/Dashboard/ViewSelector.vue +2 -2
- package/src/widgets/Dashboard/VirtualTableSetting.vue +121 -184
- package/src/widgets/{Dashboard.vue → Dashboard0.vue} +426 -343
- package/src/widgets/EmbeddedVideoSetting.vue +7 -5
- package/src/widgets/FAQ.vue +16 -3
- package/src/widgets/FAQSetting.vue +53 -47
- package/src/widgets/FeatureList.vue +3 -0
- package/src/widgets/FeatureListSetting.vue +112 -102
- package/src/widgets/FlexSetting.vue +83 -106
- package/src/widgets/GridSetting.vue +71 -196
- package/src/widgets/Header2.vue +34 -71
- package/src/widgets/Header2Setting.vue +95 -179
- package/src/widgets/HeaderSetting.vue +16 -18
- package/src/widgets/IconListSetting.vue +69 -65
- package/src/widgets/ImageSetting.vue +33 -60
- package/src/widgets/LinkSetting.vue +60 -37
- package/src/widgets/LinkSettingModal.vue +173 -0
- package/src/widgets/LogViewer.vue +1 -1
- package/src/widgets/MarginSetting.vue +2 -2
- package/src/widgets/MenuEditor.vue +1 -1
- package/src/widgets/MenuItem1Setting.vue +78 -0
- package/src/widgets/ModalSetting.vue +42 -44
- package/src/widgets/MultiValueSetting.vue +2 -2
- package/src/widgets/MultiValueSetting2.vue +78 -45
- package/src/widgets/OGSettingModal.vue +103 -0
- package/src/widgets/PaddingSetting.vue +2 -2
- package/src/widgets/ParagraphSetting.vue +16 -13
- package/src/widgets/PositionSetting.vue +209 -0
- package/src/widgets/PresetBar.vue +359 -210
- package/src/widgets/PresetBarPivot.vue +31 -19
- package/src/widgets/PresetSelector.vue +29 -17
- package/src/widgets/SearchModalSetting.vue +70 -0
- package/src/widgets/Share.vue +1 -2
- package/src/widgets/ShareSetting.vue +67 -60
- package/src/widgets/StyleSetting.vue +227 -116
- package/src/widgets/TestimonialSetting.vue +97 -88
- package/src/widgets/TextBlockSetting.vue +16 -13
- package/src/widgets/UserActionBuilder/UserActionConsole.vue +30 -10
- package/src/widgets/UserActionBuilder/UserActionOutput.vue +2 -2
- package/src/widgets/UserActionBuilder/UserActionOutputReply.vue +64 -87
- package/src/widgets/UserActionBuilder/UserActionProps.vue +3 -3
- package/src/widgets/UserActionBuilder.vue +4 -16
- package/src/widgets/WebComponentSelector.vue +15 -11
- package/src/widgets/WebLayoutSelector.vue +41 -270
- package/src/widgets/WebPageBuilder.vue +693 -704
- package/src/widgets/WebPageBuilder2.vue +7 -7
- package/src/widgets/WebPageBuilder4/ButtonSetting.vue +0 -8
- package/src/widgets/WebPageBuilder4/CarouselSetting.vue +63 -7
- package/src/widgets/WebPageBuilder4/FlexAlignSetting.vue +3 -3
- package/src/widgets/WebPageBuilder4/FlexSetting.vue +1 -10
- package/src/widgets/WebPageBuilder4/MultiValueSetting.vue +2 -2
- package/src/widgets/WebPageBuilder4/PropertySetting.vue +0 -7
- package/src/widgets/WebPageBuilder4/WebPageComponentSelector.vue +1 -7
- package/src/widgets/WebPageBuilder4.vue +289 -575
- package/src/widgets/WebPageSelector.vue +1 -1
- package/src/widgets/YoutubeVideoSetting.vue +16 -13
- package/tailwind.config.js +3 -35
- package/docs/schema/user-action.json +0 -266
- package/src/App.vue +0 -25
- package/src/components/SearchButton.vue +0 -57
- package/src/entry-client.js +0 -27
- package/src/entry-server.js +0 -73
- package/src/events/event.js +0 -2
- package/src/main.js +0 -29
- package/src/mixin/website.js +0 -121
- package/src/router.js +0 -57
- package/src/widgets/MobileMenu.vue +0 -182
- package/src/widgets/WebPageBuilder4/ActionSetting.vue +0 -158
- package/src/widgets/WebPageBuilder4/ColorSetting.vue +0 -63
- package/src/widgets/WebPageBuilder4/DataSetting.vue +0 -92
- package/src/widgets/WebPageBuilder4/FontSizeSetting.vue +0 -76
- package/src/widgets/WebPageBuilder4/LinkSetting.vue +0 -68
- package/src/widgets/WebPageBuilder4/MobileMenuSetting.vue +0 -106
- package/src/widgets/WebPageBuilder4/Setting.vue +0 -73
- package/src/widgets/WebPageBuilder4/StyleSetting.vue +0 -77
- package/src/widgets/WebPageBuilder4/SvgSetting.vue +0 -207
- package/src/widgets/WebPageBuilder4/TextTransformSetting.vue +0 -70
- package/src/widgets/WebPageBuilder4/WebPageDataEdit.vue +0 -121
- package/test.json +0 -22
- /package/src/widgets/{Header1.vue → Header0.vue} +0 -0
- /package/src/widgets/{Header1Setting.vue → Header0Setting.vue} +0 -0
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
2
|
+
<div :class="$style.comp">
|
|
3
3
|
|
|
4
|
-
<div class="flex flex-col
|
|
5
|
-
<div>
|
|
6
|
-
<strong class="flex-1 text-text-400">Article</strong>
|
|
7
|
-
<div class="h-[1px] bg-text-100 mt-2"></div>
|
|
8
|
-
</div>
|
|
4
|
+
<div class="flex flex-col">
|
|
9
5
|
|
|
10
|
-
<div class="
|
|
11
|
-
<
|
|
12
|
-
<div class="flex flex-row bg-text-50 mt-1">
|
|
6
|
+
<div class="p-6 py-4">
|
|
7
|
+
<small class="text-text-400">Format</small>
|
|
8
|
+
<div class="flex flex-row flex-wrap bg-text-50 mt-1">
|
|
13
9
|
<button class="p-3" type="button" @click="format('bold')">
|
|
14
10
|
<svg width="14" height="14" class="fill-text-400 hover:fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M0 64C0 46.3 14.3 32 32 32H80 96 224c70.7 0 128 57.3 128 128c0 31.3-11.3 60.1-30 82.3c37.1 22.4 62 63.1 62 109.7c0 70.7-57.3 128-128 128H96 80 32c-17.7 0-32-14.3-32-32s14.3-32 32-32H48V256 96H32C14.3 96 0 81.7 0 64zM224 224c35.3 0 64-28.7 64-64s-28.7-64-64-64H112V224H224zM112 288V416H256c35.3 0 64-28.7 64-64s-28.7-64-64-64H224 112z"/></svg>
|
|
15
11
|
</button>
|
|
@@ -61,17 +57,6 @@
|
|
|
61
57
|
</div>
|
|
62
58
|
</div>
|
|
63
59
|
|
|
64
|
-
<div class="flex flex-row gap-4">
|
|
65
|
-
<label class="flex-1 text-text-400">Color</label>
|
|
66
|
-
<ColorPicker v-for="(_viewType, index) in viewTypes"
|
|
67
|
-
v-show="_viewType.value === viewType"
|
|
68
|
-
v-model="textColor[index]"
|
|
69
|
-
@change="$emit('change')"
|
|
70
|
-
:prefix="`${viewType}text-`"
|
|
71
|
-
:custom-color="true">
|
|
72
|
-
</ColorPicker>
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
60
|
<ContextMenu ref="headingContext">
|
|
76
61
|
<div class="flex flex-col">
|
|
77
62
|
<button class="p-3 text-4xl text-left hover:bg-primary-200" type="button" @click="format('formatBlock', 'h1')">
|
|
@@ -240,13 +225,14 @@
|
|
|
240
225
|
|
|
241
226
|
</div>
|
|
242
227
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
228
|
+
<ComponentSetting2 :item="item"
|
|
229
|
+
:view-type="viewType"
|
|
230
|
+
:view-types="viewTypes"
|
|
231
|
+
:view-index="viewIndex"
|
|
232
|
+
defaultDisplay="block"
|
|
233
|
+
@change="$emit('change')" />
|
|
248
234
|
|
|
249
|
-
|
|
235
|
+
</div>
|
|
250
236
|
</template>
|
|
251
237
|
|
|
252
238
|
<script>
|
|
@@ -270,6 +256,8 @@ export default{
|
|
|
270
256
|
|
|
271
257
|
viewType: String,
|
|
272
258
|
|
|
259
|
+
viewIndex: Number,
|
|
260
|
+
|
|
273
261
|
viewTypes: Array,
|
|
274
262
|
|
|
275
263
|
},
|
|
@@ -463,7 +451,7 @@ export default{
|
|
|
463
451
|
<style module>
|
|
464
452
|
|
|
465
453
|
.comp{
|
|
466
|
-
@apply flex flex-col
|
|
454
|
+
@apply flex flex-col divide-y divide-border-50;
|
|
467
455
|
}
|
|
468
456
|
|
|
469
457
|
</style>
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
|
|
4
|
+
<div>
|
|
5
|
+
<small class="text-text-400">Background Color</small>
|
|
6
|
+
<ColorPicker3 class="mt-1" v-model="bgColors[this.viewIndex]" />
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<div>
|
|
10
|
+
<div class="flex flex-row">
|
|
11
|
+
<small class="flex-1 text-text-400">Background Image</small>
|
|
12
|
+
<button v-if="bgImages[viewIndex]" type="button" class="text-primary text-sm"
|
|
13
|
+
@click="delete bgImages[viewIndex]">Remove</button>
|
|
14
|
+
</div>
|
|
15
|
+
<Image :src="imageSrc(bgImages[viewIndex])"
|
|
16
|
+
:editable="true"
|
|
17
|
+
item-class="object-contain"
|
|
18
|
+
ref="image"
|
|
19
|
+
class="mt-1 w-[80px] bg-text-50 aspect-square rounded-lg border-[1px] border-border-200"
|
|
20
|
+
@click="$refs.image.edit()"
|
|
21
|
+
@change="(_, file) => upload(file)" />
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="grid grid-cols-2 gap-3">
|
|
25
|
+
<div>
|
|
26
|
+
<small class="text-text-400">Position</small>
|
|
27
|
+
<Dropdown v-model="bgPosition[viewIndex]">
|
|
28
|
+
<option value="">-</option>
|
|
29
|
+
<option value="bg-center">Center</option>
|
|
30
|
+
<option value="bg-top">Top</option>
|
|
31
|
+
<option value="bg-right">Right</option>
|
|
32
|
+
<option value="bg-bottom">Bottom</option>
|
|
33
|
+
<option value="bg-left">Left</option>
|
|
34
|
+
<option value="bg-top-right">Top Right</option>
|
|
35
|
+
<option value="bg-top-left">Top Left</option>
|
|
36
|
+
<option value="bg-bottom-right">Bottom Right</option>
|
|
37
|
+
<option value="bg-bottom-left">Bottom Left</option>
|
|
38
|
+
</Dropdown>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div>
|
|
42
|
+
<small class="text-text-400">Size</small>
|
|
43
|
+
<Dropdown v-model="bgSize[viewIndex]">
|
|
44
|
+
<option value="">-</option>
|
|
45
|
+
<option value="bg-auto">Auto</option>
|
|
46
|
+
<option value="bg-cover">Cover</option>
|
|
47
|
+
<option value="bg-contain">Contain</option>
|
|
48
|
+
<option value="bg-50%">50%</option>
|
|
49
|
+
<option value="bg-20%">20%</option>
|
|
50
|
+
<option value="bg-10%">10%</option>
|
|
51
|
+
</Dropdown>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div>
|
|
55
|
+
<small class="text-text-400">Repeat</small>
|
|
56
|
+
<Dropdown v-model="bgRepeat[viewIndex]">
|
|
57
|
+
<option value="">-</option>
|
|
58
|
+
<option value="bg-repeat">Repeat</option>
|
|
59
|
+
<option value="bg-no-repeat">No Repeat</option>
|
|
60
|
+
<option value="bg-repeat-x">Repeat X</option>
|
|
61
|
+
<option value="bg-repeat-y">Repeat Y</option>
|
|
62
|
+
<option value="bg-repeat-round">Repeat Round</option>
|
|
63
|
+
<option value="bg-repeat-space">Repeat Space</option>
|
|
64
|
+
</Dropdown>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<script>
|
|
72
|
+
import ColorPicker3 from "../components/ColorPicker3.vue"
|
|
73
|
+
|
|
74
|
+
export default{
|
|
75
|
+
|
|
76
|
+
components: { ColorPicker3 },
|
|
77
|
+
|
|
78
|
+
inject: [ 'alert', 'imageSrc', 'uploadImage' ],
|
|
79
|
+
|
|
80
|
+
computed: {
|
|
81
|
+
|
|
82
|
+
bgColors(){
|
|
83
|
+
if(!Array.isArray(this.item.props.bgColors))
|
|
84
|
+
this.item.props.bgColors = []
|
|
85
|
+
|
|
86
|
+
return this.item.props.bgColors
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
bgImages(){
|
|
90
|
+
if(!Array.isArray(this.item.props.bgImages))
|
|
91
|
+
this.item.props.bgImages = []
|
|
92
|
+
return this.item.props.bgImages
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
bgPosition(){
|
|
96
|
+
if(!Array.isArray(this.item.props.bgPosition))
|
|
97
|
+
this.item.props.bgPosition = []
|
|
98
|
+
return this.item.props.bgPosition
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
bgRepeat(){
|
|
102
|
+
if(!Array.isArray(this.item.props.bgRepeat))
|
|
103
|
+
this.item.props.bgRepeat = []
|
|
104
|
+
return this.item.props.bgRepeat
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
bgSize(){
|
|
108
|
+
if(!Array.isArray(this.item.props.bgSize))
|
|
109
|
+
this.item.props.bgSize = []
|
|
110
|
+
return this.item.props.bgSize
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
methods: {
|
|
116
|
+
|
|
117
|
+
upload(file){
|
|
118
|
+
this.uploadImage(file)
|
|
119
|
+
.then((res) => {
|
|
120
|
+
this.bgImages[this.viewIndex] = res.name
|
|
121
|
+
})
|
|
122
|
+
.catch(err => this.alert(err))
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
props:{
|
|
129
|
+
|
|
130
|
+
item: {
|
|
131
|
+
type: Object,
|
|
132
|
+
required: true
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
viewIndex: Number,
|
|
136
|
+
|
|
137
|
+
viewType: String,
|
|
138
|
+
|
|
139
|
+
viewTypes: Array,
|
|
140
|
+
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
</script>
|
|
146
|
+
|
|
147
|
+
<style module>
|
|
148
|
+
|
|
149
|
+
.comp{
|
|
150
|
+
@apply flex flex-col gap-4
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
</style>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
|
|
4
|
+
<div>
|
|
5
|
+
<small class="text-text-400">Border Color</small>
|
|
6
|
+
<ColorPicker3 class="mt-1" v-model="bdColor[this.viewIndex]" />
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import ColorPicker3 from "../components/ColorPicker3.vue"
|
|
14
|
+
|
|
15
|
+
export default{
|
|
16
|
+
|
|
17
|
+
components: { ColorPicker3 },
|
|
18
|
+
|
|
19
|
+
inject: [ 'alert', 'imageSrc', 'uploadImage' ],
|
|
20
|
+
|
|
21
|
+
computed: {
|
|
22
|
+
|
|
23
|
+
bdColor(){
|
|
24
|
+
if(!Array.isArray(this.item.props.bdColor))
|
|
25
|
+
this.item.props.bdColor = []
|
|
26
|
+
|
|
27
|
+
return this.item.props.bdColor
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
props:{
|
|
33
|
+
|
|
34
|
+
item: {
|
|
35
|
+
type: Object,
|
|
36
|
+
required: true
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
viewIndex: Number,
|
|
40
|
+
|
|
41
|
+
viewType: String,
|
|
42
|
+
|
|
43
|
+
viewTypes: Array,
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<style module>
|
|
52
|
+
|
|
53
|
+
.comp{
|
|
54
|
+
@apply flex flex-col gap-4
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
</style>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
<div v-else class="flex-1 flex flex-col">
|
|
7
7
|
|
|
8
|
-
<div class="flex flex-row items-center p-2 pt-3 px-6 bg-base-300 border-b-[1px] border-
|
|
8
|
+
<div class="flex flex-row items-center p-2 pt-3 px-6 bg-base-300 border-b-[1px] border-border-50">
|
|
9
9
|
<div class="flex-1">
|
|
10
10
|
<strong>{{ action.name }}</strong>
|
|
11
11
|
</div>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
23
|
<div :style="sidebarStyle"
|
|
24
|
-
class="relative flex flex-col border-l-[1px] border-
|
|
24
|
+
class="relative flex flex-col border-l-[1px] border-border-50 panel-400 overflow-hidden">
|
|
25
25
|
<div :class="$style.resize1"
|
|
26
26
|
@mousedown="(e) => $util.dragResize(e, resize1)"></div>
|
|
27
27
|
|
|
@@ -112,6 +112,7 @@ export default{
|
|
|
112
112
|
this.socket.send(`${this.controller}.open-action`, { uid })
|
|
113
113
|
.then(_ => {
|
|
114
114
|
this.action = _.item
|
|
115
|
+
this.config.selectedUid = this.action.uid
|
|
115
116
|
this.initialAction = JSON.stringify(this.action)
|
|
116
117
|
})
|
|
117
118
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div v-if="cConfig" :class="$style.comp">
|
|
3
3
|
|
|
4
4
|
<div :style="sidebarStyle"
|
|
5
|
-
class="relative flex flex-col border-r-[1px] border-
|
|
5
|
+
class="relative flex flex-col border-r-[1px] border-border-50 panel-400 overflow-hidden">
|
|
6
6
|
|
|
7
7
|
<div v-if="page !== 'Actions'" class="flex-1 flex flex-col">
|
|
8
8
|
<div class="p-5">
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
<div class="flex-1">
|
|
14
14
|
|
|
15
|
-
<div class="flex flex-col divide-y divide-
|
|
15
|
+
<div class="flex flex-col divide-y divide-border-50 border-y-[1px] border-border-50">
|
|
16
16
|
<router-link :to="{ query:{ t:'actions' } }" type="button" class="p-3 px-5 text-left">Actions</router-link>
|
|
17
17
|
<router-link :to="{ query:{ t:'knowledge' } }" type="button" class="p-3 px-5 text-left">Knowledge</router-link>
|
|
18
18
|
<router-link :to="{ query:{ t:'classifications' } }" type="button" class="p-3 px-5 text-left">Classifications</router-link>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<br />
|
|
34
34
|
|
|
35
35
|
<ListItem :items="actions"
|
|
36
|
-
container-class="divide-y divide-
|
|
36
|
+
container-class="divide-y divide-border-50"
|
|
37
37
|
@reorder="(from, to) => { actions.splice(to, 0, actions.splice(from, 1)[0]); }">
|
|
38
38
|
<template v-slot="{ item }">
|
|
39
39
|
<div class="p-3 hover:bg-base-500 flex flex-row gap-3 items-center">
|
|
@@ -53,14 +53,13 @@
|
|
|
53
53
|
|
|
54
54
|
</div>
|
|
55
55
|
|
|
56
|
-
<div class="flex flex-col border-t-[1px] border-
|
|
56
|
+
<div class="flex flex-col border-t-[1px] border-border-50 relative" :style="bottombarStyle">
|
|
57
57
|
<div :class="$style.resize2"
|
|
58
58
|
@mousedown="(e) => $util.dragResize(e, resize2)"></div>
|
|
59
59
|
|
|
60
60
|
<UserActionConsole class="flex-1"
|
|
61
61
|
ref="console"
|
|
62
|
-
|
|
63
|
-
@test-reset="testReset" />
|
|
62
|
+
:controller="controller" />
|
|
64
63
|
|
|
65
64
|
</div>
|
|
66
65
|
|
|
@@ -85,6 +84,7 @@ import {capitalize} from "../utils/helpers.mjs";
|
|
|
85
84
|
import BotEditorActions from "./BotEditor/BotEditorActions.vue";
|
|
86
85
|
import VirtualGrid from "../components/VirtualGrid.vue";
|
|
87
86
|
import UserActionConsole from "./UserActionBuilder/UserActionConsole.vue";
|
|
87
|
+
import BotEditorSettings from "./BotEditor/BotEditorSettings.vue";
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
export default{
|
|
@@ -93,6 +93,7 @@ export default{
|
|
|
93
93
|
UserActionConsole,
|
|
94
94
|
VirtualGrid,
|
|
95
95
|
BotEditorActions,
|
|
96
|
+
BotEditorSettings,
|
|
96
97
|
},
|
|
97
98
|
|
|
98
99
|
inject: [ 'alert', 'confirm', 'socket', 'toast' ],
|
|
@@ -140,12 +141,17 @@ export default{
|
|
|
140
141
|
data(){
|
|
141
142
|
return {
|
|
142
143
|
actions: null,
|
|
144
|
+
user: null,
|
|
143
145
|
page: '',
|
|
144
146
|
}
|
|
145
147
|
},
|
|
146
148
|
|
|
147
149
|
methods: {
|
|
148
150
|
|
|
151
|
+
getUser(){
|
|
152
|
+
return this.user
|
|
153
|
+
},
|
|
154
|
+
|
|
149
155
|
load(){
|
|
150
156
|
|
|
151
157
|
},
|
|
@@ -157,6 +163,13 @@ export default{
|
|
|
157
163
|
})
|
|
158
164
|
},
|
|
159
165
|
|
|
166
|
+
open(id){
|
|
167
|
+
this.socket.send(`${this.controller}.open`, { id })
|
|
168
|
+
.then(res => {
|
|
169
|
+
this.user = res.user
|
|
170
|
+
})
|
|
171
|
+
},
|
|
172
|
+
|
|
160
173
|
resize1(w) {
|
|
161
174
|
if (this.sidebar.width + w >= 200 && this.sidebar.width + w <= 600) {
|
|
162
175
|
this.sidebar.width += w
|
|
@@ -169,14 +182,6 @@ export default{
|
|
|
169
182
|
}
|
|
170
183
|
},
|
|
171
184
|
|
|
172
|
-
testMessage(){
|
|
173
|
-
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
testReset(){
|
|
177
|
-
|
|
178
|
-
},
|
|
179
|
-
|
|
180
185
|
},
|
|
181
186
|
|
|
182
187
|
props: {
|
|
@@ -186,6 +191,14 @@ export default{
|
|
|
186
191
|
|
|
187
192
|
controller: String,
|
|
188
193
|
|
|
194
|
+
id: String,
|
|
195
|
+
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
provide(){
|
|
199
|
+
return {
|
|
200
|
+
getUser: this.getUser
|
|
201
|
+
}
|
|
189
202
|
},
|
|
190
203
|
|
|
191
204
|
watch: {
|
|
@@ -197,6 +210,13 @@ export default{
|
|
|
197
210
|
}
|
|
198
211
|
},
|
|
199
212
|
|
|
213
|
+
id: {
|
|
214
|
+
immediate: true,
|
|
215
|
+
handler(to){
|
|
216
|
+
this.open(to)
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
|
|
200
220
|
page: {
|
|
201
221
|
immediate: true,
|
|
202
222
|
handler(to){
|
|
@@ -222,7 +242,7 @@ export default{
|
|
|
222
242
|
}
|
|
223
243
|
|
|
224
244
|
.resize2 {
|
|
225
|
-
@apply h-[3px] cursor-n-resize absolute top-0 right-0 left-0
|
|
245
|
+
@apply h-[3px] cursor-n-resize absolute top-0 right-0 left-0 z-50;
|
|
226
246
|
}
|
|
227
247
|
|
|
228
248
|
</style>
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="$style.comp">
|
|
3
3
|
|
|
4
|
-
<div class="flex flex-col gap-4">
|
|
5
|
-
<div>
|
|
6
|
-
<strong class="flex-1 text-text-400">Button</strong>
|
|
7
|
-
<div class="h-[1px] bg-text-100 mt-2"></div>
|
|
8
|
-
</div>
|
|
4
|
+
<div class="p-6 py-4 flex flex-col gap-4">
|
|
9
5
|
|
|
10
6
|
<div>
|
|
11
7
|
<label class="flex-1 text-text-400">Text</label>
|
|
@@ -48,11 +44,12 @@
|
|
|
48
44
|
</div>
|
|
49
45
|
</div>
|
|
50
46
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
<ComponentSetting2 :item="item"
|
|
48
|
+
:view-type="viewType"
|
|
49
|
+
:view-types="viewTypes"
|
|
50
|
+
:view-index="viewIndex"
|
|
51
|
+
defaultDisplay="block"
|
|
52
|
+
@change="$emit('change')" />
|
|
56
53
|
|
|
57
54
|
</div>
|
|
58
55
|
</template>
|
|
@@ -72,9 +69,11 @@ export default{
|
|
|
72
69
|
required: true
|
|
73
70
|
},
|
|
74
71
|
|
|
75
|
-
|
|
72
|
+
viewType: String,
|
|
73
|
+
|
|
74
|
+
viewIndex: Number,
|
|
76
75
|
|
|
77
|
-
|
|
76
|
+
viewTypes: Array,
|
|
78
77
|
|
|
79
78
|
},
|
|
80
79
|
|
|
@@ -108,7 +107,7 @@ export default{
|
|
|
108
107
|
<style module>
|
|
109
108
|
|
|
110
109
|
.comp{
|
|
111
|
-
|
|
110
|
+
@apply flex flex-col divide-y divide-border-50;
|
|
112
111
|
}
|
|
113
112
|
|
|
114
113
|
</style>
|
|
@@ -1,51 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="$style.comp">
|
|
3
3
|
|
|
4
|
-
<div>
|
|
5
|
-
<div class="flex flex-row gap-1 items-center cursor-pointer">
|
|
6
|
-
<svg v-if="!expanded['carousel']" width="12" height="12" @click="expanded['carousel'] = !expanded['carousel']" class="fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><path d="M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"/></svg>
|
|
7
|
-
<svg v-else width="12" height="12" @click="expanded['carousel'] = !expanded['carousel']" class="fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"/></svg>
|
|
8
|
-
<strong class="flex-1 text-text-400 line-clamp-1" @click="expanded['carousel'] = !expanded['carousel']">Carousel</strong>
|
|
9
|
-
<button type="button" class="text-primary" @click="$router.replace({ hash:'#select-property' })">
|
|
10
|
-
<svg width="16" height="16" class="fill-text-300 hover:fill-primary-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M368 224H224V80c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v144H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h144v144c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V288h144c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"/></svg>
|
|
11
|
-
</button>
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
<div class="h-[1px] bg-text-100 mt-2 mb-4"></div>
|
|
4
|
+
<div class="flex flex-col">
|
|
15
5
|
|
|
16
|
-
<div
|
|
6
|
+
<div class="p-6 py-4 grid grid-cols-2 gap-4">
|
|
17
7
|
|
|
18
8
|
<div>
|
|
19
9
|
<div class="flex flex-row items-center gap-2">
|
|
20
10
|
<label class="flex-1 text-text-400">Gap</label>
|
|
21
|
-
<button type="button" v-if="containerGap.length < 2" @click="containerGap.push('')">
|
|
22
|
-
<svg width="16" height="16" class="fill-text-300 hover:fill-primary-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M352 240v32c0 6.6-5.4 12-12 12h-88v88c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-88h-88c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h88v-88c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v88h88c6.6 0 12 5.4 12 12zm96-160v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"/></svg>
|
|
23
|
-
</button>
|
|
24
11
|
</div>
|
|
25
12
|
<div class="flex flex-row gap-2">
|
|
26
|
-
<
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
<option :value="`${viewType}gap-0`">0</option>
|
|
36
|
-
<option :value="`${viewType}gap-1`">1</option>
|
|
37
|
-
<option :value="`${viewType}gap-2`">2</option>
|
|
38
|
-
<option :value="`${viewType}gap-3`">3</option>
|
|
39
|
-
<option :value="`${viewType}gap-4`">4</option>
|
|
40
|
-
<option :value="`${viewType}gap-5`">5</option>
|
|
41
|
-
<option :value="`${viewType}gap-6`">6</option>
|
|
42
|
-
</Dropdown>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
13
|
+
<Dropdown v-model="containerGap[viewIndex]" class="mt-1 w-full" @change="apply">
|
|
14
|
+
<option :value="`${viewType}gap-0`">0</option>
|
|
15
|
+
<option :value="`${viewType}gap-1`">1</option>
|
|
16
|
+
<option :value="`${viewType}gap-2`">2</option>
|
|
17
|
+
<option :value="`${viewType}gap-3`">3</option>
|
|
18
|
+
<option :value="`${viewType}gap-4`">4</option>
|
|
19
|
+
<option :value="`${viewType}gap-5`">5</option>
|
|
20
|
+
<option :value="`${viewType}gap-6`">6</option>
|
|
21
|
+
</Dropdown>
|
|
45
22
|
</div>
|
|
46
23
|
</div>
|
|
47
24
|
|
|
48
|
-
<div
|
|
25
|
+
<div>
|
|
49
26
|
<div>
|
|
50
27
|
<label class="text-text-400">Autoplay</label>
|
|
51
28
|
<Dropdown v-model="item.props.autoPlay" class="mt-1" @change="apply">
|
|
@@ -53,17 +30,25 @@
|
|
|
53
30
|
<option v-for="i in 10" :value="i * 1000">{{ i }} seconds</option>
|
|
54
31
|
</Dropdown>
|
|
55
32
|
</div>
|
|
33
|
+
</div>
|
|
56
34
|
|
|
35
|
+
<div class="col-span-2">
|
|
57
36
|
<div class="flex flex-row gap-4">
|
|
58
37
|
<div>
|
|
59
38
|
<label class="text-text-400">Legend</label>
|
|
60
|
-
<div class="mt-1
|
|
39
|
+
<div class="mt-1">
|
|
61
40
|
<Checkbox v-model="item.props.useLegend" @change="apply"/>
|
|
62
41
|
</div>
|
|
63
42
|
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<label class="text-text-400">Prev/Next</label>
|
|
45
|
+
<div class="mt-1">
|
|
46
|
+
<Checkbox v-model="item.props.useNextPrev" @change="apply"/>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
64
49
|
<div>
|
|
65
50
|
<label class="text-text-400">Infinite</label>
|
|
66
|
-
<div class="mt-1
|
|
51
|
+
<div class="mt-1">
|
|
67
52
|
<Checkbox v-model="item.props.infinite" @change="apply"/>
|
|
68
53
|
</div>
|
|
69
54
|
</div>
|
|
@@ -74,11 +59,12 @@
|
|
|
74
59
|
|
|
75
60
|
</div>
|
|
76
61
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
62
|
+
<ComponentSetting2 :item="item"
|
|
63
|
+
:view-type="viewType"
|
|
64
|
+
:view-types="viewTypes"
|
|
65
|
+
:view-index="viewIndex"
|
|
66
|
+
defaultDisplay="block"
|
|
67
|
+
@change="$emit('change')" />
|
|
82
68
|
|
|
83
69
|
<Modal ref="imageModal" width="320" height="640">
|
|
84
70
|
<template #head="{ context }">
|
|
@@ -134,9 +120,11 @@ export default{
|
|
|
134
120
|
required: true
|
|
135
121
|
},
|
|
136
122
|
|
|
137
|
-
|
|
123
|
+
viewType: String,
|
|
124
|
+
|
|
125
|
+
viewIndex: Number,
|
|
138
126
|
|
|
139
|
-
|
|
127
|
+
viewTypes: Array,
|
|
140
128
|
|
|
141
129
|
},
|
|
142
130
|
|
|
@@ -187,7 +175,7 @@ export default{
|
|
|
187
175
|
<style module>
|
|
188
176
|
|
|
189
177
|
.comp{
|
|
190
|
-
|
|
178
|
+
@apply flex flex-col divide-y divide-border-50;
|
|
191
179
|
}
|
|
192
180
|
|
|
193
181
|
</style>
|