@mixd-id/web-scaffold 0.2.240706 → 0.2.250801010
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 +83 -169
- package/src/components/Card.vue +257 -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 +12 -5
- 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 +528 -403
- package/src/components/ListContextMenu.vue +88 -0
- package/src/components/ListItem.vue +6 -4
- 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 +40 -26
- 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 +16 -22
- 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 +151 -67
- package/src/themes/default/index.js +118 -159
- 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 +38 -36
- 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 +145 -236
- 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 +365 -150
- 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 +1019 -707
- 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,113 +1,114 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex flex-
|
|
3
|
-
<div class="flex-1 flex flex-
|
|
4
|
-
|
|
5
|
-
<div v-if="type === 'date'" class="flex-1 flex flex-row gap-2">
|
|
6
|
-
<div class="flex-1 flex flex-row gap-2">
|
|
7
|
-
<Dropdown v-model="value.operator"
|
|
8
|
-
:readonly="readonly"
|
|
9
|
-
:class="![ 'yesterday', 'today', 'thisWeek', 'thisMonth', 'lastMonth', 'thisYear' ].includes(value.operator) ? 'w-[100px]' : 'w-full'"
|
|
10
|
-
@change="apply">
|
|
11
|
-
<option value="=">=</option>
|
|
12
|
-
<option value=">">></option>
|
|
13
|
-
<option value=">=">>=</option>
|
|
14
|
-
<option value="<"><</option>
|
|
15
|
-
<option value="<="><=</option>
|
|
16
|
-
<option value="between">Between</option>
|
|
17
|
-
<option value="yesterday">Yesterday</option>
|
|
18
|
-
<option value="today">Today</option>
|
|
19
|
-
<option value="thisWeek">This Week</option>
|
|
20
|
-
<option value="thisMonth">This Month</option>
|
|
21
|
-
<option value="lastMonth">Last Month</option>
|
|
22
|
-
<option value="thisYear">This Year</option>
|
|
23
|
-
</Dropdown>
|
|
24
|
-
<div v-if="![ 'yesterday', 'today', 'thisWeek', 'thisMonth', 'lastMonth', 'thisYear' ].includes(value.operator)"
|
|
25
|
-
class="flex-1 flex flex-row gap-2">
|
|
26
|
-
<Datepicker class="flex-1"
|
|
27
|
-
mode="popup"
|
|
28
|
-
:readonly="readonly"
|
|
29
|
-
v-model="value.value"
|
|
30
|
-
@change="apply" />
|
|
31
|
-
<Datepicker v-if="value.operator === 'between'"
|
|
32
|
-
class="flex-1"
|
|
33
|
-
:readonly="readonly"
|
|
34
|
-
mode="popup"
|
|
35
|
-
v-model="value.value2"
|
|
36
|
-
@change="apply" />
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<div v-else-if="type === 'number'" class="flex flex-row gap-2">
|
|
2
|
+
<div class="flex flex-col">
|
|
3
|
+
<div v-if="type === 'date'" class="flex-1 flex flex-row gap-2">
|
|
4
|
+
<div class="flex-1 flex flex-row gap-2">
|
|
42
5
|
<Dropdown v-model="value.operator"
|
|
43
|
-
class="w-[100px]"
|
|
44
6
|
:readonly="readonly"
|
|
7
|
+
:class="![ 'yesterday', 'today', 'thisWeek', 'thisMonth', 'lastMonth', 'thisYear', 'null' ].includes(value.operator) ? 'w-[100px]' : 'w-full'"
|
|
45
8
|
@change="apply">
|
|
46
9
|
<option value="=">=</option>
|
|
47
10
|
<option value=">">></option>
|
|
48
11
|
<option value=">=">>=</option>
|
|
49
12
|
<option value="<"><</option>
|
|
50
13
|
<option value="<="><=</option>
|
|
51
|
-
<option value="
|
|
52
|
-
<option value="
|
|
14
|
+
<option value="between">Between</option>
|
|
15
|
+
<option value="yesterday">Yesterday</option>
|
|
16
|
+
<option value="today">Today</option>
|
|
17
|
+
<option value="thisWeek">This Week</option>
|
|
18
|
+
<option value="thisMonth">This Month</option>
|
|
19
|
+
<option value="lastMonth">Last Month</option>
|
|
20
|
+
<option value="thisYear">This Year</option>
|
|
21
|
+
<option value="null">No Value</option>
|
|
53
22
|
</Dropdown>
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
23
|
+
<div v-if="![ 'yesterday', 'today', 'thisWeek', 'thisMonth', 'lastMonth', 'thisYear', 'null' ].includes(value.operator)"
|
|
24
|
+
class="flex-1 flex flex-row gap-2">
|
|
25
|
+
<Datepicker class="flex-1"
|
|
26
|
+
mode="popup"
|
|
27
|
+
:readonly="readonly"
|
|
28
|
+
v-model="value.value"
|
|
29
|
+
@change="apply" />
|
|
30
|
+
<Datepicker v-if="value.operator === 'between'"
|
|
31
|
+
class="flex-1"
|
|
32
|
+
:readonly="readonly"
|
|
33
|
+
mode="popup"
|
|
34
|
+
v-model="value.value2"
|
|
35
|
+
@change="apply" />
|
|
36
|
+
</div>
|
|
59
37
|
</div>
|
|
38
|
+
</div>
|
|
60
39
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
40
|
+
<div v-else-if="type === 'number'" class="flex flex-row gap-2">
|
|
41
|
+
<Dropdown v-model="value.operator"
|
|
42
|
+
class="w-[100px]"
|
|
43
|
+
:readonly="readonly"
|
|
44
|
+
@change="apply">
|
|
45
|
+
<option value="=">=</option>
|
|
46
|
+
<option value=">">></option>
|
|
47
|
+
<option value=">=">>=</option>
|
|
48
|
+
<option value="<"><</option>
|
|
49
|
+
<option value="<="><=</option>
|
|
50
|
+
<option value="in">Multiple with comma</option>
|
|
51
|
+
<option value="notIn">Except with comma</option>
|
|
52
|
+
</Dropdown>
|
|
53
|
+
<Textbox v-model="value.value"
|
|
54
|
+
class="flex-1"
|
|
55
|
+
:readonly="readonly"
|
|
56
|
+
@keyup.enter="apply"
|
|
57
|
+
@blur="apply" />
|
|
58
|
+
</div>
|
|
67
59
|
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
<div v-else-if="type === 'boolean'" class="flex flex-row gap-2">
|
|
61
|
+
<Radio :name="value.key"
|
|
62
|
+
:readonly="readonly" :value="true" v-model="value.value" @change="apply">True</Radio>
|
|
63
|
+
<Radio :name="value.key"
|
|
64
|
+
:readonly="readonly" :value="false" v-model="value.value" @change="apply">False</Radio>
|
|
65
|
+
</div>
|
|
70
66
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
class="flex-1"
|
|
74
|
-
:readonly="readonly"
|
|
75
|
-
:value="param.value"
|
|
76
|
-
@change="apply">
|
|
77
|
-
{{ param.text }}
|
|
78
|
-
</Checkbox>
|
|
67
|
+
<div v-else-if="type === 'enum' && Array.isArray(cTypeParams) && cTypeParams.length > 0"
|
|
68
|
+
class="flex flex-col gap-1">
|
|
79
69
|
|
|
80
|
-
|
|
70
|
+
<Checkbox v-for="param in cTypeParams"
|
|
71
|
+
v-model="cValue.value"
|
|
72
|
+
class="flex-1"
|
|
73
|
+
:readonly="readonly"
|
|
74
|
+
:value="param.value"
|
|
75
|
+
@change="apply">
|
|
76
|
+
{{ param.text }}
|
|
77
|
+
</Checkbox>
|
|
81
78
|
|
|
82
|
-
|
|
83
|
-
<component :is="column.component"
|
|
84
|
-
:value="value"
|
|
85
|
-
:readonly="readonly"
|
|
86
|
-
@change="apply" />
|
|
87
|
-
</div>
|
|
79
|
+
</div>
|
|
88
80
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
@change="apply">
|
|
93
|
-
<option value="eq">Equal</option>
|
|
94
|
-
<option value="not">Not Equal</option>
|
|
95
|
-
<option value="startsWith">Starts With</option>
|
|
96
|
-
<option value="endsWith">Ends With</option>
|
|
97
|
-
<option value="contains">Contains</option>
|
|
98
|
-
<option value="notContains">Not Contains</option>
|
|
99
|
-
<option value="in">Multiple with comma</option>
|
|
100
|
-
<option value="notIn">Except with comma</option>
|
|
101
|
-
<option value="regex">Regex</option>
|
|
102
|
-
</Dropdown>
|
|
103
|
-
<Textbox v-model="value.value"
|
|
81
|
+
<div v-else-if="type === 'component'">
|
|
82
|
+
<component :is="column.component"
|
|
83
|
+
:value="value"
|
|
104
84
|
:readonly="readonly"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
@blur="apply" />
|
|
108
|
-
</div>
|
|
85
|
+
@change="apply" />
|
|
86
|
+
</div>
|
|
109
87
|
|
|
88
|
+
<div v-else class="flex flex-row gap-2">
|
|
89
|
+
<Dropdown v-model="value.operator"
|
|
90
|
+
:class="![ 'notEmpty' ].includes(value.operator) ? 'w-[100px]' : 'w-full'"
|
|
91
|
+
:readonly="readonly"
|
|
92
|
+
@change="apply">
|
|
93
|
+
<option value="eq">Equal</option>
|
|
94
|
+
<option value="not">Not Equal</option>
|
|
95
|
+
<option value="startsWith">Starts With</option>
|
|
96
|
+
<option value="endsWith">Ends With</option>
|
|
97
|
+
<option value="contains">Contains</option>
|
|
98
|
+
<option value="notContains">Not Contains</option>
|
|
99
|
+
<option value="in">Multiple with comma</option>
|
|
100
|
+
<option value="notIn">Except with comma</option>
|
|
101
|
+
<option value="regex">Regex</option>
|
|
102
|
+
<option value="notEmpty">Not Empty</option>
|
|
103
|
+
</Dropdown>
|
|
104
|
+
<Textbox v-if="![ 'notEmpty' ].includes(value.operator)"
|
|
105
|
+
v-model="value.value"
|
|
106
|
+
:readonly="readonly"
|
|
107
|
+
class="flex-1"
|
|
108
|
+
@keyup.enter="apply"
|
|
109
|
+
@blur="apply" />
|
|
110
110
|
</div>
|
|
111
|
+
|
|
111
112
|
</div>
|
|
112
113
|
|
|
113
114
|
</template>
|
|
@@ -125,6 +126,8 @@ export default{
|
|
|
125
126
|
default: {}
|
|
126
127
|
},
|
|
127
128
|
|
|
129
|
+
enabled: Boolean,
|
|
130
|
+
|
|
128
131
|
type: String,
|
|
129
132
|
|
|
130
133
|
typeParams: Array,
|
|
@@ -167,13 +170,22 @@ export default{
|
|
|
167
170
|
methods: {
|
|
168
171
|
|
|
169
172
|
apply(){
|
|
173
|
+
if(this.enabled === false) return
|
|
170
174
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
175
|
+
switch(this.type){
|
|
176
|
+
|
|
177
|
+
case 'bool':
|
|
178
|
+
case 'boolean':
|
|
179
|
+
this.$emit('change')
|
|
180
|
+
break
|
|
176
181
|
|
|
182
|
+
default:
|
|
183
|
+
if((!this.valueRequired && this.value.operator) ||
|
|
184
|
+
(this.value.operator && this.value.operator !== 'between' && this.value.value) ||
|
|
185
|
+
(this.value.operator === 'between' && !!this.value.value && !!this.value.value2)){
|
|
186
|
+
this.$emit('change')
|
|
187
|
+
}
|
|
188
|
+
}
|
|
177
189
|
}
|
|
178
190
|
|
|
179
191
|
}
|
package/src/components/Radio.vue
CHANGED
|
@@ -85,7 +85,7 @@ export default{
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.indicator{
|
|
88
|
-
@apply w-[21px] h-[21px] border-[1px] rounded-full border-
|
|
88
|
+
@apply w-[21px] h-[21px] border-[1px] rounded-full border-border-200 bg-base-300;
|
|
89
89
|
@apply flex items-center justify-center overflow-hidden;
|
|
90
90
|
transition: border 300ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
91
91
|
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Modal ref="modal"
|
|
3
|
+
:hash="hash"
|
|
4
|
+
width="600"
|
|
5
|
+
position="top"
|
|
6
|
+
:dismissable="true"
|
|
7
|
+
class="bg-transparent border-none md:top-[10px]"
|
|
8
|
+
@dismiss="$refs.modal.close()"
|
|
9
|
+
@show="$refs.searchText.select();">
|
|
10
|
+
<template v-slot:head>
|
|
11
|
+
<div class="relative p-5 bg-base-300">
|
|
12
|
+
|
|
13
|
+
<Textbox ref="searchText"
|
|
14
|
+
v-model="search"
|
|
15
|
+
:clearable="true"
|
|
16
|
+
@clear="search = ''"
|
|
17
|
+
@keyup="dummify"
|
|
18
|
+
:placeholder="placeholder">
|
|
19
|
+
<template #start>
|
|
20
|
+
<svg width="14" height="14" class="fill-text ml-3" 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="M504.1 471l-134-134C399.1 301.5 415.1 256.8 415.1 208c0-114.9-93.13-208-208-208S-.0002 93.13-.0002 208S93.12 416 207.1 416c48.79 0 93.55-16.91 129-45.04l134 134C475.7 509.7 481.9 512 488 512s12.28-2.344 16.97-7.031C514.3 495.6 514.3 480.4 504.1 471zM48 208c0-88.22 71.78-160 160-160s160 71.78 160 160s-71.78 160-160 160S48 296.2 48 208z"/></svg>
|
|
21
|
+
</template>
|
|
22
|
+
</Textbox>
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<template #default>
|
|
28
|
+
<div class="flex-1 flex flex-col min-h-[60vh]">
|
|
29
|
+
|
|
30
|
+
<Transition name="slidedown">
|
|
31
|
+
<div v-if="searchHistories.length > 0" class="bg-base-300 divide-y divide-border-50">
|
|
32
|
+
<div v-for="history in searchHistories" class="p-5 py-3 flex flex-row gap-3">
|
|
33
|
+
<router-link :to="history.target" class="flex-1">
|
|
34
|
+
{{ history.name }}
|
|
35
|
+
</router-link>
|
|
36
|
+
<button type="button" class="text-primary">Remove</button>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</Transition>
|
|
40
|
+
|
|
41
|
+
<Transition name="slidedown">
|
|
42
|
+
<div v-if="recommendations.length > 0" class="bg-base-300 py-6">
|
|
43
|
+
|
|
44
|
+
<div class="px-5">
|
|
45
|
+
<label>Recommended Products</label>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div class="p-2">
|
|
49
|
+
<div class="overflow-x-auto flex flex-row gap-2 flex-nowrap">
|
|
50
|
+
<router-link v-for="item in recommendations"
|
|
51
|
+
:to="item.target"
|
|
52
|
+
class="shrink-0 w-[30vw] md:w-[16vw]">
|
|
53
|
+
<Image :src="item.imageUrl" />
|
|
54
|
+
<div class="p-3">
|
|
55
|
+
<label>{{ item.name }}</label>
|
|
56
|
+
</div>
|
|
57
|
+
</router-link>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
</div>
|
|
62
|
+
</Transition>
|
|
63
|
+
|
|
64
|
+
<div class="flex-1" @click="$refs.modal.close()"></div>
|
|
65
|
+
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
</Modal>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<script>
|
|
73
|
+
|
|
74
|
+
export default {
|
|
75
|
+
|
|
76
|
+
props: {
|
|
77
|
+
|
|
78
|
+
apiUrl: String,
|
|
79
|
+
|
|
80
|
+
hash: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: '#search'
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
height: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: '16px'
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
placeholder: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: 'Search...'
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
width: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: '16px'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
methods: {
|
|
102
|
+
|
|
103
|
+
open(){
|
|
104
|
+
this.$refs.modal.open()
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
data(){
|
|
110
|
+
return {
|
|
111
|
+
searchHistories: [],
|
|
112
|
+
recommendations: [],
|
|
113
|
+
search: ''
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
watch: {
|
|
118
|
+
|
|
119
|
+
search(){
|
|
120
|
+
if(this.search.length > 0){
|
|
121
|
+
this.searchHistories = [
|
|
122
|
+
{ id: 1, name: 'Search History 1', target:{ path:'search', query:{ k:'Search History 1' }} },
|
|
123
|
+
{ id: 1, name: 'Search History 2', target:{ path:'search', query:{ k:'Search History 2' }} },
|
|
124
|
+
{ id: 1, name: 'Search History 3', target:{ path:'search', query:{ k:'Search History 3' }} },
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
else{
|
|
128
|
+
this.searchHistories = []
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
this.recommendations = [
|
|
132
|
+
{ name:'Speaker', imageUrl:'https://assets.devialet.com/fr-fr/media/dvl_media/Phantom_01_2x.png?twic=v1/background=transparent/cover=600x780', target:{ path:'/product-1' } },
|
|
133
|
+
{ name:'Portable Speaker', imageUrl:'https://assets.devialet.com/fr-fr/media/dvl_media/Mania_02_2x.jpg?twic=v1/background=transparent/cover=600x780', target:{ path:'/product-1' } },
|
|
134
|
+
{ name:'Soundbar', imageUrl:'https://assets.devialet.com/fr-fr/media/dvl_media/Gemini_03_2x.png?twic=v1/background=transparent/cover=600x780', target:{ path:'/product-1' } },
|
|
135
|
+
{ name:'Speaker', imageUrl:'https://assets.devialet.com/fr-fr/media/dvl_media/Phantom_01_2x.png?twic=v1/background=transparent/cover=600x780', target:{ path:'/product-1' } },
|
|
136
|
+
{ name:'Portable Speaker', imageUrl:'https://assets.devialet.com/fr-fr/media/dvl_media/Mania_02_2x.jpg?twic=v1/background=transparent/cover=600x780', target:{ path:'/product-1' } },
|
|
137
|
+
{ name:'Soundbar', imageUrl:'https://assets.devialet.com/fr-fr/media/dvl_media/Gemini_03_2x.png?twic=v1/background=transparent/cover=600x780', target:{ path:'/product-1' } },
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
</script>
|
|
146
|
+
|
|
147
|
+
<style module>
|
|
148
|
+
|
|
149
|
+
.comp{
|
|
150
|
+
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
</style>
|
|
@@ -299,7 +299,7 @@ export default{
|
|
|
299
299
|
|
|
300
300
|
.slider>div:nth-child(1)>div:nth-child(2),
|
|
301
301
|
.slider>div:nth-child(1)>div:nth-child(3){
|
|
302
|
-
@apply absolute w-[2.5rem] h-[2.5rem] rounded-full bg-white shadow-sm border-[1px] border-
|
|
302
|
+
@apply absolute w-[2.5rem] h-[2.5rem] rounded-full bg-white shadow-sm border-[1px] border-border-200;
|
|
303
303
|
@apply flex;
|
|
304
304
|
top: 50%;
|
|
305
305
|
transform: translate3d(0, -50%, 0);
|
package/src/components/Svg.vue
CHANGED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
|
|
4
|
+
<div>
|
|
5
|
+
<small class="text-text-400">SVG Text</small>
|
|
6
|
+
<code ref="code"
|
|
7
|
+
contenteditable="true"
|
|
8
|
+
spellcheck="false"
|
|
9
|
+
@paste="onPaste"
|
|
10
|
+
@blur="textChanged">
|
|
11
|
+
{{ modelValue }}
|
|
12
|
+
</code>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="flex flex-row gap-3">
|
|
16
|
+
<div>
|
|
17
|
+
<small class="text-text-400">Width</small>
|
|
18
|
+
<Textbox ref="widthText"
|
|
19
|
+
class="w-[100px]"
|
|
20
|
+
maxlength="6"
|
|
21
|
+
v-model="attrs.width"
|
|
22
|
+
@change="sizeChanged"
|
|
23
|
+
@keyup.enter="sizeChanged">
|
|
24
|
+
<template #end>
|
|
25
|
+
<button type="button" class="pr-3" @click="$refs.sizeMenu.open($refs.widthText, { key:'width' })">
|
|
26
|
+
<svg width="11" height="11" class="fill-text-300 hover:fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z"/></svg>
|
|
27
|
+
</button>
|
|
28
|
+
</template>
|
|
29
|
+
</Textbox>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div>
|
|
33
|
+
<small class="text-text-400">Height</small>
|
|
34
|
+
<Textbox ref="heightText"
|
|
35
|
+
class="w-[100px]"
|
|
36
|
+
maxlength="6"
|
|
37
|
+
v-model="attrs.height"
|
|
38
|
+
@change="sizeChanged"
|
|
39
|
+
@keyup.enter="sizeChanged">
|
|
40
|
+
<template #end>
|
|
41
|
+
<button type="button" class="pr-3" @click="$refs.sizeMenu.open($refs.heightText, { key:'height' })">
|
|
42
|
+
<svg width="11" height="11" class="fill-text-300 hover:fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z"/></svg>
|
|
43
|
+
</button>
|
|
44
|
+
</template>
|
|
45
|
+
</Textbox>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div>
|
|
49
|
+
<small class="text-text-400">Fill</small>
|
|
50
|
+
<Textbox ref="fillText"
|
|
51
|
+
class="w-[100px]"
|
|
52
|
+
maxlength="6"
|
|
53
|
+
v-model="attrs.fill"
|
|
54
|
+
@change="sizeChanged"
|
|
55
|
+
@keyup.enter="sizeChanged">
|
|
56
|
+
<template #end>
|
|
57
|
+
<button type="button" class="pr-3" @click="$refs.sizeMenu.open($refs.fillText, { key:'fill' })">
|
|
58
|
+
<svg width="11" height="11" class="fill-text-300 hover:fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z"/></svg>
|
|
59
|
+
</button>
|
|
60
|
+
</template>
|
|
61
|
+
</Textbox>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<ContextMenu ref="sizeMenu" position="bottom-right">
|
|
66
|
+
<template #default="{ context }">
|
|
67
|
+
<div class="flex flex-col divide-y divide-border-50">
|
|
68
|
+
<button v-for="value in defaultValues[context?.key]"
|
|
69
|
+
type="button"
|
|
70
|
+
class="menu-item p-3"
|
|
71
|
+
@click="attrs[context.key] = value; sizeChanged()">
|
|
72
|
+
{{ value }}
|
|
73
|
+
</button>
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
76
|
+
</ContextMenu>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
<script setup>
|
|
81
|
+
|
|
82
|
+
import {ref, useTemplateRef} from "vue";
|
|
83
|
+
|
|
84
|
+
const attrs = ref({
|
|
85
|
+
width: '',
|
|
86
|
+
height: '',
|
|
87
|
+
fill: ''
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
const size = [
|
|
91
|
+
'11px',
|
|
92
|
+
'12px',
|
|
93
|
+
'13px',
|
|
94
|
+
'14px',
|
|
95
|
+
'16px',
|
|
96
|
+
'18px',
|
|
97
|
+
'21px',
|
|
98
|
+
'24px',
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
const defaultValues = ref({
|
|
102
|
+
height: size,
|
|
103
|
+
width: size,
|
|
104
|
+
fill: [
|
|
105
|
+
'#000',
|
|
106
|
+
'#fff'
|
|
107
|
+
]
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
const { modelValue } = defineProps({
|
|
111
|
+
modelValue: String
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
const emit = defineEmits(['update:modelValue'])
|
|
115
|
+
const code = useTemplateRef('code')
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
function onPaste(e) {
|
|
119
|
+
e.preventDefault()
|
|
120
|
+
let text = (e.clipboardData || window.clipboardData).getData("text");
|
|
121
|
+
|
|
122
|
+
for(let key in attrs.value){
|
|
123
|
+
const match = text.match(new RegExp(`${key}="([^"]*)"`))
|
|
124
|
+
if(match && match[1]){
|
|
125
|
+
attrs.value[key] = match[1]
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
emit('update:modelValue', text)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function textChanged(){
|
|
133
|
+
emit('update:modelValue', code.value.innerText)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function sizeChanged(){
|
|
137
|
+
let curValue = modelValue ?? ''
|
|
138
|
+
|
|
139
|
+
let text = []
|
|
140
|
+
for(let key in attrs.value){
|
|
141
|
+
if(attrs.value[key] && attrs.value[key].length > 0){
|
|
142
|
+
text.push(`${key}="${attrs.value[key]}"`)
|
|
143
|
+
|
|
144
|
+
curValue = curValue.replace(new RegExp(`${key}="[^"]*"`, 'g'), '')
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
text = text.length > 0 ? ' ' + text.join(' ') : ''
|
|
148
|
+
|
|
149
|
+
curValue = curValue.replace(/<svg /, `<svg${text} `)
|
|
150
|
+
|
|
151
|
+
emit('update:modelValue', curValue)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
</script>
|
|
155
|
+
|
|
156
|
+
<style module>
|
|
157
|
+
|
|
158
|
+
.comp{
|
|
159
|
+
@apply flex flex-col gap-3;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.comp code{
|
|
163
|
+
@apply border-[1px] border-border-200 bg-base-300 rounded-lg flex flex-col overflow-hidden;
|
|
164
|
+
@apply p-6;
|
|
165
|
+
white-space: pre-wrap;
|
|
166
|
+
tab-size: 1rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.comp [contenteditable]{
|
|
170
|
+
outline: 0px solid transparent;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
</style>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import {parseBoolean, uid} from "../utils/helpers.mjs"
|
|
12
12
|
|
|
13
13
|
export default{
|
|
14
14
|
|
|
@@ -63,7 +63,6 @@ export default{
|
|
|
63
63
|
<style module>
|
|
64
64
|
|
|
65
65
|
.switch{
|
|
66
|
-
@apply h-[var(--h-cp)];
|
|
67
66
|
@apply text-left flex items-center;
|
|
68
67
|
}
|
|
69
68
|
|
|
@@ -76,12 +75,12 @@ export default{
|
|
|
76
75
|
}
|
|
77
76
|
|
|
78
77
|
.switch label{
|
|
79
|
-
@apply w-[3rem] inline-block rounded-2xl bg-base-
|
|
80
|
-
@apply border-[1px] border-
|
|
78
|
+
@apply w-[3rem] inline-block rounded-2xl bg-base-300 h-[2rem];
|
|
79
|
+
@apply border-[1px] border-border-200 hover:border-border-300;
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
.switch label>span{
|
|
84
|
-
@apply mt-[.2rem] mx-1 w-[1.4rem] h-[1.4rem] inline-block align-middle rounded-full bg-text-
|
|
83
|
+
@apply mt-[.2rem] mx-1 w-[1.4rem] h-[1.4rem] inline-block align-middle rounded-full bg-text-300;
|
|
85
84
|
transition: margin 200ms ease;
|
|
86
85
|
}
|
|
87
86
|
|
package/src/components/Table.vue
CHANGED
|
@@ -41,7 +41,7 @@ export default{
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.comp table{
|
|
44
|
-
@apply border-[1px] border-
|
|
44
|
+
@apply border-[1px] border-border-200 border-collapse;
|
|
45
45
|
table-layout: fixed;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -50,7 +50,7 @@ export default{
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.comp th, .comp td{
|
|
53
|
-
@apply border-[1px] border-
|
|
53
|
+
@apply border-[1px] border-border-200 p-3;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
</style>
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
|
|
36
36
|
import TableViewHead from "./TableViewHead.vue";
|
|
37
37
|
import dayjs from "dayjs";
|
|
38
|
-
import { h } from "vue";
|
|
39
38
|
|
|
40
39
|
const DEFAULT_COLUMN_WIDTH = 125
|
|
41
40
|
|
|
@@ -171,7 +170,7 @@ export default{
|
|
|
171
170
|
}
|
|
172
171
|
|
|
173
172
|
.comp tbody td{
|
|
174
|
-
@apply relative border-b-[1px] border-
|
|
173
|
+
@apply relative border-b-[1px] border-border-50;
|
|
175
174
|
}
|
|
176
175
|
|
|
177
176
|
.comp td,
|
|
@@ -198,4 +197,4 @@ export default{
|
|
|
198
197
|
@apply bg-text-50
|
|
199
198
|
}
|
|
200
199
|
|
|
201
|
-
</style>
|
|
200
|
+
</style>
|