@mixd-id/web-scaffold 0.2.240706 → 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 -403
- 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
package/src/mixin/website.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
const editComponents = {}
|
|
2
|
-
|
|
3
|
-
export const websiteMixin = {
|
|
4
|
-
|
|
5
|
-
computed: {
|
|
6
|
-
|
|
7
|
-
fontFamily(){
|
|
8
|
-
switch(this.page.style?.normal?.font){
|
|
9
|
-
|
|
10
|
-
case 'Poppins':
|
|
11
|
-
return `"Poppins", sans-serif`
|
|
12
|
-
|
|
13
|
-
case 'Lato':
|
|
14
|
-
return `"Lato", sans-serif`
|
|
15
|
-
|
|
16
|
-
case 'Nunito':
|
|
17
|
-
return `"Nunito", sans-serif`
|
|
18
|
-
|
|
19
|
-
case 'Quicksand':
|
|
20
|
-
return `"Quicksand", sans-serif`
|
|
21
|
-
|
|
22
|
-
default:
|
|
23
|
-
return ``
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
fontWeight(){
|
|
29
|
-
return `400`
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
boldFontWeight(){
|
|
33
|
-
switch(this.page.style?.normal?.font){
|
|
34
|
-
|
|
35
|
-
case 'Poppins':
|
|
36
|
-
return `600`
|
|
37
|
-
|
|
38
|
-
case 'Lato':
|
|
39
|
-
case 'Nunito':
|
|
40
|
-
case 'Quicksand':
|
|
41
|
-
return `700`
|
|
42
|
-
|
|
43
|
-
default:
|
|
44
|
-
return ``
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
boldFontStyle(){
|
|
50
|
-
return `normal`
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
methods: {
|
|
56
|
-
|
|
57
|
-
editModeClick(uid){
|
|
58
|
-
if('edit-mode' in this.$route.query){
|
|
59
|
-
window.parent.postMessage({
|
|
60
|
-
type: 'component-click',
|
|
61
|
-
uid
|
|
62
|
-
}, '*')
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
editRegisterComponent(uid, component){
|
|
67
|
-
editComponents[uid] = component
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
getPage(){
|
|
71
|
-
return this.page
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
mounted() {
|
|
77
|
-
|
|
78
|
-
this.page.editMode = 'edit-mode' in this.$route.query ?
|
|
79
|
-
this.$route.query['edit-mode'] : false
|
|
80
|
-
|
|
81
|
-
if(this.page.editMode){
|
|
82
|
-
window.addEventListener('message', (event) => {
|
|
83
|
-
switch((event.data ?? {}).action){
|
|
84
|
-
|
|
85
|
-
case 'load':
|
|
86
|
-
this.webStore.pages[this.$route.path] = event.data.page
|
|
87
|
-
break
|
|
88
|
-
|
|
89
|
-
case 'reload':
|
|
90
|
-
this.patch(this.$route.path)
|
|
91
|
-
break
|
|
92
|
-
|
|
93
|
-
case 'select':
|
|
94
|
-
if(editComponents[event.data.uid]){
|
|
95
|
-
editComponents[event.data.uid].select()
|
|
96
|
-
}
|
|
97
|
-
break
|
|
98
|
-
|
|
99
|
-
case 'update':
|
|
100
|
-
const page = JSON.parse(event.data.page)
|
|
101
|
-
Object.assign(this.page, page)
|
|
102
|
-
break
|
|
103
|
-
}
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
window.parent.postMessage({
|
|
107
|
-
type: 'mounted',
|
|
108
|
-
path: this.$route.path
|
|
109
|
-
}, '*')
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
provide() {
|
|
114
|
-
return {
|
|
115
|
-
editModeClick: this.editModeClick,
|
|
116
|
-
editRegisterComponent: this.editRegisterComponent,
|
|
117
|
-
getPage: this.getPage,
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
}
|
package/src/router.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createMemoryHistory,
|
|
3
|
-
createRouter as _createRouter,
|
|
4
|
-
createWebHistory
|
|
5
|
-
} from 'vue-router'
|
|
6
|
-
|
|
7
|
-
const routes = [
|
|
8
|
-
{ name:"", path:"/", component:() => import('./pages/Home.vue') },
|
|
9
|
-
{ name:"", path:"/test", component:() => import('./pages/Test.vue') },
|
|
10
|
-
{
|
|
11
|
-
name:"inbox",
|
|
12
|
-
path:"/inbox",
|
|
13
|
-
component:() => import('./pages/Inbox.vue'),
|
|
14
|
-
children: [
|
|
15
|
-
{ name:"message", path:":uid", component:() => import('./pages/Message.vue') },
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
name: 'playground',
|
|
20
|
-
path: '/playground',
|
|
21
|
-
component: () => import('./pages/Playground.vue'),
|
|
22
|
-
children: [
|
|
23
|
-
{ path:"initial", component: () => import('./pages/playground/Button.vue') },
|
|
24
|
-
{ path:"ahref", component: () => import('./pages/playground/Ahref.vue') },
|
|
25
|
-
{ path:"button", component: () => import('./pages/playground/Button.vue') },
|
|
26
|
-
{ path:"dropdown", component: () => import('./pages/playground/Dropdown.vue') },
|
|
27
|
-
{ path:"slider", component: () => import('./pages/playground/Slider.vue') },
|
|
28
|
-
{ path:"switch", component: () => import('./pages/playground/Switch.vue') },
|
|
29
|
-
{ path:"image", component: () => import('./pages/playground/Image.vue') },
|
|
30
|
-
{ path:"carousel", component: () => import('./pages/playground/Carousel.vue') },
|
|
31
|
-
{ path:"datepicker", component: () => import('./pages/playground/Datepicker.vue') },
|
|
32
|
-
{ path:"textbox", component: () => import('./pages/playground/Textbox.vue') },
|
|
33
|
-
{ path:"textarea", component: () => import('./pages/playground/Textarea.vue') },
|
|
34
|
-
|
|
35
|
-
{ path:"modal", component: () => import('./pages/playground/Modal.vue') },
|
|
36
|
-
{ path:"context-menu", component: () => import('./pages/playground/ContextMenu.vue') },
|
|
37
|
-
{ path:"list-item", component: () => import('./pages/playground/ListItem.vue') },
|
|
38
|
-
{ path:"toast", component: () => import('./pages/playground/Toast.vue') },
|
|
39
|
-
{ path:"alert", component: () => import('./pages/playground/Alert.vue') },
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
|
|
44
|
-
export function createRouter() {
|
|
45
|
-
return _createRouter({
|
|
46
|
-
history: import.meta.env.SSR ? createMemoryHistory() : createWebHistory(),
|
|
47
|
-
routes,
|
|
48
|
-
scrollBehavior(to, from, savedPosition) {
|
|
49
|
-
if(savedPosition){
|
|
50
|
-
return savedPosition
|
|
51
|
-
}
|
|
52
|
-
else{
|
|
53
|
-
return { top: 0 }
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
})
|
|
57
|
-
}
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Transition :name="cTransition">
|
|
3
|
-
<div v-if="computedOpen" :class="className" @click="close">
|
|
4
|
-
<div :class="$style.panel" @click.stop="">
|
|
5
|
-
<component v-for="item in items"
|
|
6
|
-
:is="item.type"
|
|
7
|
-
:key="item.key"
|
|
8
|
-
:="item" />
|
|
9
|
-
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</Transition>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
import {componentMixin} from "../mixin/component";
|
|
17
|
-
|
|
18
|
-
export default{
|
|
19
|
-
|
|
20
|
-
computed: {
|
|
21
|
-
|
|
22
|
-
className(){
|
|
23
|
-
return [
|
|
24
|
-
this.$style.comp,
|
|
25
|
-
this.$style[`mode-${this.mode}`]
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
computedOpen(){
|
|
30
|
-
return this.isOpen || this.debugOpen
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
cTransition(){
|
|
34
|
-
return this.transition ?? this._transition
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
data(){
|
|
40
|
-
return {
|
|
41
|
-
isOpen: false,
|
|
42
|
-
_transition: this.transition
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
mixins: [ componentMixin ],
|
|
47
|
-
|
|
48
|
-
methods: {
|
|
49
|
-
|
|
50
|
-
close(){
|
|
51
|
-
this.isOpen = false
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
open(){
|
|
55
|
-
this.isOpen = true
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
toggle(){
|
|
59
|
-
this.isOpen = !this.isOpen
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
mounted() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
props: {
|
|
71
|
-
|
|
72
|
-
debugOpen: [ Boolean, Number ],
|
|
73
|
-
|
|
74
|
-
items: Array,
|
|
75
|
-
|
|
76
|
-
id: String,
|
|
77
|
-
|
|
78
|
-
mode: {
|
|
79
|
-
type: String,
|
|
80
|
-
default: 'left'
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
transition: String
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
watch: {
|
|
88
|
-
|
|
89
|
-
mode: {
|
|
90
|
-
immediate: true,
|
|
91
|
-
handler(){
|
|
92
|
-
|
|
93
|
-
const defaultTransitions = {
|
|
94
|
-
left: 'slide-ltr',
|
|
95
|
-
right: 'slide-rtl',
|
|
96
|
-
top: 'slide-ttb',
|
|
97
|
-
middle: 'slide-mid',
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
this._transition = defaultTransitions[this.mode]
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
</script>
|
|
109
|
-
|
|
110
|
-
<style module>
|
|
111
|
-
|
|
112
|
-
.comp{
|
|
113
|
-
@apply fixed z-10 backdrop-blur-sm;
|
|
114
|
-
@apply flex flex-col;
|
|
115
|
-
}
|
|
116
|
-
.comp.mode-left{
|
|
117
|
-
@apply top-0 left-0 bottom-0 right-0;
|
|
118
|
-
}
|
|
119
|
-
.comp.mode-right{
|
|
120
|
-
@apply top-0 left-0 bottom-0 right-0;
|
|
121
|
-
@apply items-end;
|
|
122
|
-
}
|
|
123
|
-
.comp.mode-top{
|
|
124
|
-
@apply top-[48px] left-0 bottom-0 right-0;
|
|
125
|
-
@apply items-center;
|
|
126
|
-
}
|
|
127
|
-
.comp.mode-middle{
|
|
128
|
-
@apply top-0 left-0 bottom-0 right-0;
|
|
129
|
-
@apply items-center justify-center;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.panel{
|
|
133
|
-
@apply flex-1 flex flex-col w-full max-w-[80vw] bg-white;
|
|
134
|
-
}
|
|
135
|
-
.comp.mode-top .panel{
|
|
136
|
-
@apply max-w-[100vw];
|
|
137
|
-
}
|
|
138
|
-
.comp.mode-middle .panel{
|
|
139
|
-
@apply max-w-[90vw] max-h-[90vh];
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
</style>
|
|
143
|
-
|
|
144
|
-
<style>
|
|
145
|
-
|
|
146
|
-
.slide-ltr-enter-active,
|
|
147
|
-
.slide-ltr-enter-active {
|
|
148
|
-
transition: all 300ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
149
|
-
}
|
|
150
|
-
.slide-ltr-enter-from,
|
|
151
|
-
.slide-ltr-leave-to {
|
|
152
|
-
transform: translate3d(-50px, 0, 0);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.slide-rtl-enter-active,
|
|
156
|
-
.slide-rtl-enter-active {
|
|
157
|
-
transition: all 300ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
158
|
-
}
|
|
159
|
-
.slide-rtl-enter-from,
|
|
160
|
-
.slide-rtl-leave-to {
|
|
161
|
-
transform: translate3d(50px, 0, 0);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.slide-ttb-enter-active,
|
|
165
|
-
.slide-ttb-enter-active {
|
|
166
|
-
transition: all 300ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
167
|
-
}
|
|
168
|
-
.slide-ttb-enter-from,
|
|
169
|
-
.slide-ttb-leave-to {
|
|
170
|
-
transform: translate3d(0, -50px, 0);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.slide-mid-enter-active,
|
|
174
|
-
.slide-mid-enter-active {
|
|
175
|
-
transition: all 300ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
176
|
-
}
|
|
177
|
-
.slide-mid-enter-from,
|
|
178
|
-
.slide-mid-leave-to {
|
|
179
|
-
transform: scale3d(0.9, 0.9, 1);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
</style>
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.comp">
|
|
3
|
-
<div class="flex flex-row items-center">
|
|
4
|
-
<label class="flex-1">{{ $t('Action') }}</label>
|
|
5
|
-
<button type="button"
|
|
6
|
-
class="text-primary"
|
|
7
|
-
@click="open({})">
|
|
8
|
-
{{ $t('Add Action' ) }}
|
|
9
|
-
</button>
|
|
10
|
-
</div>
|
|
11
|
-
<ListItem :items="actions"
|
|
12
|
-
class="mt-1"
|
|
13
|
-
@reorder="(from, to) => { actions.splice(to, 0, actions.splice(from, 1)[0]);}">
|
|
14
|
-
<template v-slot="{ item, index }">
|
|
15
|
-
<div class="flex flex-row items-center gap-3 p-3">
|
|
16
|
-
<div data-reorder>
|
|
17
|
-
<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>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="flex-1 flex flex-row gap-2" @click="open(item, index)">
|
|
20
|
-
<div>{{ item.type }}</div>
|
|
21
|
-
<div class="flex-1 text-ellipsis overflow-hidden whitespace-nowrap">{{ item.name ?? item.target }}</div>
|
|
22
|
-
</div>
|
|
23
|
-
<button type="button" @click="actions.splice(index, 1)">
|
|
24
|
-
<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>
|
|
25
|
-
</button>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
</ListItem>
|
|
29
|
-
|
|
30
|
-
<Modal ref="modal" width="360" height="360">
|
|
31
|
-
<template v-slot:head>
|
|
32
|
-
<div class="relative p-5">
|
|
33
|
-
<h3>Add Action</h3>
|
|
34
|
-
<div class="absolute top-0 right-0 p-2">
|
|
35
|
-
<button type="button" class="p-2" @click="$refs.modal.close()">
|
|
36
|
-
<svg width="24" height="24" viewBox="0 0 24 24" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg">
|
|
37
|
-
<path d="M6.53034 5.46965C6.23745 5.17676 5.76257 5.17676 5.46968 5.46965C5.17679 5.76255 5.17679 6.23742 5.46968 6.53031L10.9393 12L5.46967 17.4697C5.17678 17.7626 5.17678 18.2374 5.46967 18.5303C5.76256 18.8232 6.23744 18.8232 6.53033 18.5303L12 13.0606L17.4697 18.5303C17.7626 18.8232 18.2375 18.8232 18.5303 18.5303C18.8232 18.2374 18.8232 17.7626 18.5303 17.4697L13.0607 12L18.5303 6.53032C18.8232 6.23743 18.8232 5.76256 18.5303 5.46966C18.2374 5.17677 17.7626 5.17677 17.4697 5.46966L12 10.9393L6.53034 5.46965Z"/>
|
|
38
|
-
</svg>
|
|
39
|
-
</button>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</template>
|
|
43
|
-
<template v-slot:foot>
|
|
44
|
-
<div class="p-5">
|
|
45
|
-
<Button class="w-[100px]" @click="add">
|
|
46
|
-
{{ $t('Add') }}
|
|
47
|
-
</Button>
|
|
48
|
-
</div>
|
|
49
|
-
</template>
|
|
50
|
-
<div class="flex-1 p-5 flex flex-col gap-5">
|
|
51
|
-
|
|
52
|
-
<div>
|
|
53
|
-
<label>Action</label>
|
|
54
|
-
<Dropdown v-model="action.type"
|
|
55
|
-
class="mt-1">
|
|
56
|
-
<option v-for="key in methodKeys" :value="key">{{ key }}</option>
|
|
57
|
-
</Dropdown>
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
<div>
|
|
61
|
-
<label>Target</label>
|
|
62
|
-
<Dropdown v-model="action.target" class="mt-1">
|
|
63
|
-
<option v-for="component in components" :value="component.props.id">
|
|
64
|
-
{{ component.name }}
|
|
65
|
-
</option>
|
|
66
|
-
</Dropdown>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
</div>
|
|
70
|
-
</Modal>
|
|
71
|
-
</div>
|
|
72
|
-
</template>
|
|
73
|
-
|
|
74
|
-
<script>
|
|
75
|
-
|
|
76
|
-
export default{
|
|
77
|
-
|
|
78
|
-
inject: [ 'getComponentIdWithType', 'viewTypes' ],
|
|
79
|
-
|
|
80
|
-
props: {
|
|
81
|
-
|
|
82
|
-
index: {
|
|
83
|
-
type: Number,
|
|
84
|
-
required: true
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
value: {
|
|
88
|
-
type: Object,
|
|
89
|
-
required: true
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
viewType: {
|
|
93
|
-
type: String,
|
|
94
|
-
required: true
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
computed: {
|
|
100
|
-
|
|
101
|
-
actions(){
|
|
102
|
-
if(!('actions' in this.value.props))
|
|
103
|
-
this.value.props.actions = []
|
|
104
|
-
return this.value.props.actions
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
components(){
|
|
108
|
-
this.log(this.methods, this.action)
|
|
109
|
-
return (this.methods ?? {})[this.action?.type] ?? []
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
methodKeys(){
|
|
113
|
-
return Object.keys(this.methods)
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
data(){
|
|
119
|
-
return {
|
|
120
|
-
methods: {},
|
|
121
|
-
action: null,
|
|
122
|
-
actionIndex: null
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
methods: {
|
|
127
|
-
|
|
128
|
-
add(){
|
|
129
|
-
const comp = this.components.find(comp => comp.props.id === this.action.target)
|
|
130
|
-
Object.assign(this.action, {
|
|
131
|
-
name: comp.name
|
|
132
|
-
})
|
|
133
|
-
|
|
134
|
-
this.actionIndex >= 0 ?
|
|
135
|
-
Object.assign(this.actions[this.actionIndex], this.action) :
|
|
136
|
-
this.actions.push(this.action)
|
|
137
|
-
this.$refs.modal.close()
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
open(action, index = -1){
|
|
141
|
-
this.methods = this.getComponentIdWithType()
|
|
142
|
-
this.action = action
|
|
143
|
-
this.actionIndex = index
|
|
144
|
-
this.$refs.modal.open()
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
</script>
|
|
152
|
-
|
|
153
|
-
<style module>
|
|
154
|
-
|
|
155
|
-
.comp{
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
</style>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.comp">
|
|
3
|
-
<div class="flex flex-row items-center">
|
|
4
|
-
<label class="flex-1">Text Color</label>
|
|
5
|
-
<ColorPicker2 v-model="textColor[index]" :prefix="viewType" :keys="keys" />
|
|
6
|
-
</div>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
|
|
12
|
-
export default{
|
|
13
|
-
|
|
14
|
-
inject: [ 'viewTypes' ],
|
|
15
|
-
|
|
16
|
-
props: {
|
|
17
|
-
|
|
18
|
-
index: {
|
|
19
|
-
type: Number,
|
|
20
|
-
required: true
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
value: {
|
|
24
|
-
type: Object,
|
|
25
|
-
required: true
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
viewType: {
|
|
29
|
-
type: String,
|
|
30
|
-
required: true
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
computed: {
|
|
36
|
-
|
|
37
|
-
textColor(){
|
|
38
|
-
if(!Array.isArray(this.value.props.textColor))
|
|
39
|
-
this.value.props.textColor = []
|
|
40
|
-
|
|
41
|
-
return this.value.props.textColor
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
data(){
|
|
47
|
-
return {
|
|
48
|
-
keys: [
|
|
49
|
-
[ 'text-' ]
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
</script>
|
|
57
|
-
|
|
58
|
-
<style module>
|
|
59
|
-
|
|
60
|
-
.comp{
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
</style>
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.comp">
|
|
3
|
-
|
|
4
|
-
<div v-if="value.mode === 1" class="flex flex-col gap-5">
|
|
5
|
-
|
|
6
|
-
<div>
|
|
7
|
-
<label>Key</label>
|
|
8
|
-
<Textbox v-model="value.key" class="mt-1" />
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<div class="flex flex-col">
|
|
12
|
-
<label>Data</label>
|
|
13
|
-
<VirtualTable :columns="value.columns"
|
|
14
|
-
:items="value.value"
|
|
15
|
-
class="mt-1 max-h-[50vh]">
|
|
16
|
-
<template #col-default="{ column }">
|
|
17
|
-
<Textbox v-model="column.key" />
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<template #col-_add>
|
|
21
|
-
<div class="flex-1 flex justify-center">
|
|
22
|
-
<button type="button" class="p-3"
|
|
23
|
-
@click="value.columns.push({ key:`Column ${value.columns.length}` })">
|
|
24
|
-
<svg width="16" height="16" class="fill-green-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256C397.4 512 512 397.4 512 256S397.4 0 256 0zM352 280H280V352c0 13.2-10.8 24-23.1 24C242.8 376 232 365.2 232 352V280H160C146.8 280 136 269.2 136 256c0-13.2 10.8-24 24-24H232V160c0-13.2 10.8-24 24-24C269.2 136 280 146.8 280 160v72h72C365.2 232 376 242.8 376 256C376 269.2 365.2 280 352 280z"/></svg>
|
|
25
|
-
</button>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<template #_add="{ item, index }">
|
|
30
|
-
<div class="flex-1 flex justify-center">
|
|
31
|
-
<button type="button" class="p-3"
|
|
32
|
-
@click="value.value.splice(index, 1)">
|
|
33
|
-
<svg width="16" height="16" class="fill-red-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256C397.4 512 512 397.4 512 256S397.4 0 256 0zM336.1 303c9.375 9.375 9.375 24.56 0 33.94c-9.381 9.381-24.56 9.373-33.94 0L256 289.9l-47.03 47.03c-9.381 9.381-24.56 9.373-33.94 0c-9.375-9.375-9.375-24.56 0-33.94l47.03-47.03L175 208.1c-9.375-9.375-9.375-24.56 0-33.94s24.56-9.375 33.94 0L256 222.1l47.03-47.03c9.375-9.375 24.56-9.375 33.94 0s9.375 24.56 0 33.94l-47.03 47.03L336.1 303z"/></svg>
|
|
34
|
-
</button>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<template #default="{ item, column }">
|
|
39
|
-
<Textbox v-model="item[column.key]" :placeholder="column.key" />
|
|
40
|
-
</template>
|
|
41
|
-
</VirtualTable>
|
|
42
|
-
|
|
43
|
-
<div class="w-[60px] bg-base-500 flex justify-center">
|
|
44
|
-
<button type="button" class="p-3"
|
|
45
|
-
@click="value.value.push({})">
|
|
46
|
-
<svg width="16" height="16" class="fill-green-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256C397.4 512 512 397.4 512 256S397.4 0 256 0zM352 280H280V352c0 13.2-10.8 24-23.1 24C242.8 376 232 365.2 232 352V280H160C146.8 280 136 269.2 136 256c0-13.2 10.8-24 24-24H232V160c0-13.2 10.8-24 24-24C269.2 136 280 146.8 280 160v72h72C365.2 232 376 242.8 376 256C376 269.2 365.2 280 352 280z"/></svg>
|
|
47
|
-
</button>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
</template>
|
|
55
|
-
|
|
56
|
-
<script>
|
|
57
|
-
|
|
58
|
-
import Textbox from "../../components/Textbox.vue";
|
|
59
|
-
|
|
60
|
-
export default{
|
|
61
|
-
components: {Textbox},
|
|
62
|
-
|
|
63
|
-
inject: [ 'viewTypes' ],
|
|
64
|
-
|
|
65
|
-
props: {
|
|
66
|
-
|
|
67
|
-
value: Object
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
computed: {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
data(){
|
|
78
|
-
return {
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
</script>
|
|
86
|
-
|
|
87
|
-
<style module>
|
|
88
|
-
|
|
89
|
-
.comp{
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
</style>
|