@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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<div>
|
|
5
5
|
<Checkbox v-model="pivot.enabled"
|
|
6
6
|
@change="apply()">
|
|
7
|
-
|
|
7
|
+
Enabled
|
|
8
8
|
</Checkbox>
|
|
9
9
|
</div>
|
|
10
10
|
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
<div>
|
|
14
14
|
<div class="flex flex-row items-center gap-2">
|
|
15
15
|
<label>Groups</label>
|
|
16
|
-
<button type="button" @click="$refs.columnSelector.open(obj => addPivot('rows', obj),
|
|
16
|
+
<button type="button" @click="$refs.columnSelector.open(obj => addPivot('rows', obj), pivotColumns)">
|
|
17
17
|
<svg width="16" height="16" class="fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M432 256C432 269.3 421.3 280 408 280h-160v160c0 13.25-10.75 24.01-24 24.01S200 453.3 200 440v-160h-160c-13.25 0-24-10.74-24-23.99C16 242.8 26.75 232 40 232h160v-160c0-13.25 10.75-23.99 24-23.99S248 58.75 248 72v160h160C421.3 232 432 242.8 432 256z"/></svg>
|
|
18
18
|
</button>
|
|
19
19
|
</div>
|
|
20
20
|
<ListItem :items="pivot.rows"
|
|
21
21
|
@reorder="(from, to) => { pivot.rows.splice(to, 0, pivot.rows.splice(from, 1)[0]); apply() }"
|
|
22
|
-
class="mt-2 h-[25vh] overflow-y-auto border-[1px] border-
|
|
23
|
-
container-class="divide-y divide-
|
|
22
|
+
class="mt-2 h-[25vh] overflow-y-auto border-[1px] border-border-200 bg-base-300 rounded-lg p-0.5"
|
|
23
|
+
container-class="divide-y divide-border-50">
|
|
24
24
|
<template v-slot="{ item, index }">
|
|
25
25
|
<div class="flex flex-row items-center gap-3 p-2 bg-base-500 hover:bg-primary-100 first:rounded-t-md last:rounded-b-md">
|
|
26
26
|
<div data-reorder v-if="(pivot.rows ?? []).length > 1">
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
</strong>
|
|
34
34
|
<select v-if="item.type === 'date'"
|
|
35
35
|
v-model="item.aggregrate"
|
|
36
|
-
class="px-1 appearance-none bg-base-300 rounded-md border-[1px] border-
|
|
36
|
+
class="px-1 appearance-none bg-base-300 rounded-md border-[1px] border-border-50 outline-none"
|
|
37
37
|
@change="apply()">
|
|
38
38
|
<option value="hour">Hour</option>
|
|
39
39
|
<option value="date">Date</option>
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
</div>
|
|
59
59
|
<ListItem :items="pivot.values"
|
|
60
60
|
@reorder="(from, to) => { pivot.values.splice(to, 0, pivot.values.splice(from, 1)[0]); }"
|
|
61
|
-
class="mt-2 h-[25vh] overflow-y-auto border-[1px] border-
|
|
62
|
-
container-class="divide-y divide-
|
|
61
|
+
class="mt-2 h-[25vh] overflow-y-auto border-[1px] border-border-200 bg-base-300 rounded-lg p-0.5"
|
|
62
|
+
container-class="divide-y divide-border-50">
|
|
63
63
|
<template v-slot="{ item, index }">
|
|
64
64
|
<div class="flex flex-row items-center gap-3 p-2 bg-base-500 hover:bg-primary-100 first:rounded-t-md last:rounded-b-md">
|
|
65
65
|
<div data-reorder v-if="(pivot.values ?? []).length > 1">
|
|
@@ -71,15 +71,17 @@
|
|
|
71
71
|
{{ item.label ? item.label : item.key }}
|
|
72
72
|
</strong>
|
|
73
73
|
<select v-model="item.aggregrate"
|
|
74
|
-
class="px-1 appearance-none bg-base-300 w-[80px] rounded-md border-[1px] border-
|
|
74
|
+
class="px-1 appearance-none bg-base-300 w-[80px] rounded-md border-[1px] border-border-50 outline-none"
|
|
75
75
|
@change="apply()">
|
|
76
76
|
<option value="">Default</option>
|
|
77
77
|
<option value="count">Count</option>
|
|
78
78
|
<option value="countDistinct">Distinct Count</option>
|
|
79
|
-
<option
|
|
80
|
-
<option
|
|
81
|
-
<option v-if="[ 'number' ].includes(item.type)" value="
|
|
82
|
-
<option v-if="[ 'number' ].includes(item.type)" value="
|
|
79
|
+
<option value="first">First</option>
|
|
80
|
+
<option value="last">Last</option>
|
|
81
|
+
<option v-if="[ 'number', 'currency' ].includes(item.type)" value="sum">Sum</option>
|
|
82
|
+
<option v-if="[ 'number', 'currency' ].includes(item.type)" value="avg">Average</option>
|
|
83
|
+
<option v-if="[ 'number', 'currency' ].includes(item.type)" value="min">Min</option>
|
|
84
|
+
<option v-if="[ 'number', 'currency' ].includes(item.type)" value="max">Max</option>
|
|
83
85
|
</select>
|
|
84
86
|
</div>
|
|
85
87
|
<button type="button" @click="pivot.values.splice(index, 1); apply()">
|
|
@@ -100,8 +102,8 @@
|
|
|
100
102
|
</div>
|
|
101
103
|
<ListItem :items="pivot.columns"
|
|
102
104
|
@reorder="(from, to) => { pivot.columns.splice(to, 0, pivot.columns.splice(from, 1)[0]); pivot.manualColumns = true; apply() }"
|
|
103
|
-
class="mt-2 h-[25vh] overflow-y-auto border-[1px] border-
|
|
104
|
-
container-class="divide-y divide-
|
|
105
|
+
class="mt-2 h-[25vh] overflow-y-auto border-[1px] border-border-200 bg-base-300 rounded-lg p-0.5"
|
|
106
|
+
container-class="divide-y divide-border-50">
|
|
105
107
|
<template v-slot="{ item, index }">
|
|
106
108
|
<div class="flex flex-row gap-2 items-center px-2 bg-base-500">
|
|
107
109
|
<div data-reorder>
|
|
@@ -129,6 +131,8 @@
|
|
|
129
131
|
</div>
|
|
130
132
|
|
|
131
133
|
</div>
|
|
134
|
+
<br />
|
|
135
|
+
<br />
|
|
132
136
|
|
|
133
137
|
<ColumnSelector ref="columnSelector" />
|
|
134
138
|
|
|
@@ -147,6 +151,14 @@ export default{
|
|
|
147
151
|
|
|
148
152
|
emits: [ 'apply' ],
|
|
149
153
|
|
|
154
|
+
computed: {
|
|
155
|
+
|
|
156
|
+
pivotColumns(){
|
|
157
|
+
return this.columns.filter(_ => _.filterable === true && (_.pivot ?? true) !== false)
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
},
|
|
161
|
+
|
|
150
162
|
methods: {
|
|
151
163
|
|
|
152
164
|
apply(){
|
|
@@ -154,7 +166,11 @@ export default{
|
|
|
154
166
|
},
|
|
155
167
|
|
|
156
168
|
addPivot(type, obj){
|
|
157
|
-
|
|
169
|
+
if(!Array.isArray(this.pivot[type])){
|
|
170
|
+
this.pivot[type] = []
|
|
171
|
+
}
|
|
172
|
+
console.log(this.pivot[type])
|
|
173
|
+
|
|
158
174
|
this.pivot[type].push(Object.assign({}, obj))
|
|
159
175
|
this.apply()
|
|
160
176
|
},
|
|
@@ -179,8 +195,4 @@ export default{
|
|
|
179
195
|
|
|
180
196
|
}
|
|
181
197
|
|
|
182
|
-
.columnTextbox input::placeholder{
|
|
183
|
-
@apply text-text;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
198
|
</style>
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
</template>
|
|
53
53
|
|
|
54
54
|
<div v-if="mode === 'select'" class="flex-1 flex flex-col">
|
|
55
|
-
<div class="flex flex-col bg-base-300 border-t-[1px] border-b-[1px] border-
|
|
55
|
+
<div class="flex flex-col bg-base-300 border-t-[1px] border-b-[1px] border-border-50 divide-y divide-border-50">
|
|
56
56
|
<div v-for="(preset, idx) in config.presets"
|
|
57
57
|
class="px-6 text-left hover:bg-primary-200 hover:text-white flex flex-row items-center">
|
|
58
|
-
<div class="flex-1 py-4" @click="select(
|
|
58
|
+
<div class="flex-1 py-4" @click="select(preset)">
|
|
59
59
|
{{ preset.name }}
|
|
60
60
|
</div>
|
|
61
61
|
<button type="button"
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
|
|
70
70
|
<ContextMenu ref="contextMenu" position="bottom-right">
|
|
71
71
|
<template #default="{ context }">
|
|
72
|
-
<div class="flex flex-col min-w-[200px] divide-y divide-
|
|
72
|
+
<div class="flex flex-col min-w-[200px] divide-y divide-border-50">
|
|
73
73
|
|
|
74
74
|
<button class="w-full p-3 text-left flex flex-row gap-3" :class="appStyle.menuItem"
|
|
75
75
|
@click="edit(context.idx)">
|
|
@@ -103,10 +103,10 @@
|
|
|
103
103
|
<div v-else class="flex-1 flex flex-row">
|
|
104
104
|
|
|
105
105
|
<div v-if="tabIndex === 1" class="flex-1 flex flex-row">
|
|
106
|
-
<div class="w-[240px] border-r-[1px] border-
|
|
107
|
-
<div class="flex flex-col divide-y divide-
|
|
106
|
+
<div class="w-[240px] border-r-[1px] border-border-50 overflow-y-auto">
|
|
107
|
+
<div class="flex flex-col divide-y divide-border-50">
|
|
108
108
|
<ListItem :items="presetColumns"
|
|
109
|
-
body-class="divide-y divide-
|
|
109
|
+
body-class="divide-y divide-border-50"
|
|
110
110
|
@reorder="(from, to) => { presetColumns.splice(to, 0, presetColumns.splice(from, 1)[0]); }">
|
|
111
111
|
<template v-slot="{ item }">
|
|
112
112
|
<div class="flex flex-row items-center gap-3 px-3 p-2 hover:bg-primary-100"
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
<div class="flex-1 flex flex-row gap-2 items-center">
|
|
119
119
|
<div>
|
|
120
120
|
<div class="w-[14px] rounded-full h-[14px]"
|
|
121
|
-
:class="!('visible' in item) || item.visible ? 'bg-primary' : 'bg-text-
|
|
121
|
+
:class="!('visible' in item) || item.visible ? 'bg-primary' : 'bg-text-300'"></div>
|
|
122
122
|
</div>
|
|
123
123
|
{{ item.label ? item.label : item.key }}
|
|
124
124
|
</div>
|
|
@@ -150,9 +150,9 @@
|
|
|
150
150
|
</div>
|
|
151
151
|
|
|
152
152
|
<div v-if="tabIndex === 2" class="flex-1 flex flex-row">
|
|
153
|
-
<div class="w-[200px] border-r-[1px] border-
|
|
153
|
+
<div class="w-[200px] border-r-[1px] border-border-50 overflow-y-auto">
|
|
154
154
|
|
|
155
|
-
<div class="flex flex-col divide-y divide-
|
|
155
|
+
<div class="flex flex-col divide-y divide-border-50 border-b-[1px] border-border-50">
|
|
156
156
|
<button v-for="column in filterColumns"
|
|
157
157
|
type="button"
|
|
158
158
|
:disabled="filterColumnAdded(column)"
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
|
|
170
170
|
</div>
|
|
171
171
|
|
|
172
|
-
<div class="flex-1 flex flex-col divide-y divide-
|
|
172
|
+
<div class="flex-1 flex flex-col divide-y divide-border-50 overflow-y-auto">
|
|
173
173
|
|
|
174
174
|
<div v-for="(filter, idx) in preset.filters" class="p-6">
|
|
175
175
|
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
</div>
|
|
335
335
|
<ListItem :items="presetPivot.rows"
|
|
336
336
|
@reorder="(from, to) => { presetPivot.rows.splice(to, 0, presetPivot.rows.splice(from, 1)[0]); }"
|
|
337
|
-
class="mt-2 h-[200px] border-[1px] border-
|
|
337
|
+
class="mt-2 h-[200px] border-[1px] border-border-200">
|
|
338
338
|
<template v-slot="{ item, index }">
|
|
339
339
|
<div class="flex flex-row items-center gap-3 p-2 hover:bg-primary-100">
|
|
340
340
|
<div data-reorder>
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
</div>
|
|
372
372
|
<ListItem :items="presetPivot.columns"
|
|
373
373
|
@reorder="(from, to) => { presetPivot.columns.splice(to, 0, presetPivot.columns.splice(from, 1)[0]); }"
|
|
374
|
-
class="mt-2 h-[200px] border-[1px] border-
|
|
374
|
+
class="mt-2 h-[200px] border-[1px] border-border-200">
|
|
375
375
|
<template v-slot="{ item, index }">
|
|
376
376
|
<div class="flex flex-row items-center gap-3 p-2 hover:bg-primary-100">
|
|
377
377
|
<div data-reorder>
|
|
@@ -399,7 +399,7 @@
|
|
|
399
399
|
</div>
|
|
400
400
|
<ListItem :items="presetPivot.values"
|
|
401
401
|
@reorder="(from, to) => { presetPivot.values.splice(to, 0, presetPivot.values.splice(from, 1)[0]); }"
|
|
402
|
-
class="mt-2 h-[200px] border-[1px] border-
|
|
402
|
+
class="mt-2 h-[200px] border-[1px] border-border-200">
|
|
403
403
|
<template v-slot="{ item, index }">
|
|
404
404
|
<div class="flex flex-row items-center gap-3 p-2 hover:bg-primary-100">
|
|
405
405
|
<div data-reorder>
|
|
@@ -464,7 +464,7 @@ export default{
|
|
|
464
464
|
|
|
465
465
|
emits: [ 'select' ],
|
|
466
466
|
|
|
467
|
-
inject: [ 'appStyle', 'alert', 'confirm'
|
|
467
|
+
inject: [ 'appStyle', 'alert', 'confirm' ],
|
|
468
468
|
|
|
469
469
|
props: {
|
|
470
470
|
|
|
@@ -479,6 +479,18 @@ export default{
|
|
|
479
479
|
|
|
480
480
|
computed: {
|
|
481
481
|
|
|
482
|
+
configParams(){
|
|
483
|
+
if(!this.config.params)
|
|
484
|
+
this.config.params = {}
|
|
485
|
+
|
|
486
|
+
if(this.config.presets.length > 0 &&
|
|
487
|
+
(!this.config.params.presetIdx ||
|
|
488
|
+
!this.config.presets.find(_ => _.uid === this.config.params.presetIdx)))
|
|
489
|
+
this.config.params.presetIdx = this.config.presets[0].uid
|
|
490
|
+
|
|
491
|
+
return this.config.params
|
|
492
|
+
},
|
|
493
|
+
|
|
482
494
|
filterColumns(){
|
|
483
495
|
return JSON.parse(JSON.stringify(this.config.columns ?? []))
|
|
484
496
|
.filter(_ => !('filterable' in _) || _.filterable)
|
|
@@ -641,8 +653,8 @@ export default{
|
|
|
641
653
|
})
|
|
642
654
|
},
|
|
643
655
|
|
|
644
|
-
select(
|
|
645
|
-
this.
|
|
656
|
+
select(item){
|
|
657
|
+
this.configParams.presetIdx = item.uid
|
|
646
658
|
this.close()
|
|
647
659
|
this.$emit('select')
|
|
648
660
|
},
|
|
@@ -652,7 +664,7 @@ export default{
|
|
|
652
664
|
return 'boolean'
|
|
653
665
|
else if([ 'date' ].includes(type))
|
|
654
666
|
return 'date'
|
|
655
|
-
else if([ 'number' ].includes(type))
|
|
667
|
+
else if([ 'number', 'currency', 'decimal' ].includes(type))
|
|
656
668
|
return 'number'
|
|
657
669
|
else
|
|
658
670
|
return 'text'
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
|
|
4
|
+
<div class="p-6 py-4 flex flex-col gap-4">
|
|
5
|
+
|
|
6
|
+
<div>
|
|
7
|
+
<label class="flex-1 text-text-400">API Url</label>
|
|
8
|
+
<Textbox v-model="item.props.apiUrl"/>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<ComponentSetting2 :item="item"
|
|
14
|
+
:view-type="viewType"
|
|
15
|
+
:view-types="viewTypes"
|
|
16
|
+
:view-index="viewIndex"
|
|
17
|
+
defaultDisplay="block"
|
|
18
|
+
@change="$emit('change')" />
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
|
|
25
|
+
export default{
|
|
26
|
+
|
|
27
|
+
emits: [ 'change' ],
|
|
28
|
+
|
|
29
|
+
props: {
|
|
30
|
+
|
|
31
|
+
item: {
|
|
32
|
+
type: Object,
|
|
33
|
+
required: true
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
viewType: String,
|
|
37
|
+
|
|
38
|
+
viewIndex: Number,
|
|
39
|
+
|
|
40
|
+
viewTypes: Array,
|
|
41
|
+
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
data(){
|
|
45
|
+
return {
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
inject: [ ],
|
|
50
|
+
|
|
51
|
+
methods: {
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
computed: {
|
|
57
|
+
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style module>
|
|
65
|
+
|
|
66
|
+
.comp{
|
|
67
|
+
@apply flex flex-col divide-y divide-border-50;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
</style>
|
package/src/widgets/Share.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="$style.comp">
|
|
2
|
+
<div :class="$style.comp" :data-uid="uid">
|
|
3
3
|
<strong v-if="title" class="mr-6">{{ title }}</strong>
|
|
4
4
|
|
|
5
5
|
<div v-if="direction === 'vertical'" class="flex-1 flex flex-col divide-y divide-text-100 self-stretch">
|
|
@@ -110,7 +110,6 @@ export default{
|
|
|
110
110
|
},
|
|
111
111
|
|
|
112
112
|
waShareUrl(){
|
|
113
|
-
if(typeof window === 'undefined') return
|
|
114
113
|
return `https://wa.me/send?text=` + encodeURIComponent(this.currentUrl)
|
|
115
114
|
},
|
|
116
115
|
|
|
@@ -1,59 +1,64 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="$style.comp">
|
|
3
3
|
|
|
4
|
-
<div>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
4
|
+
<div class="p-6 py-4 flex flex-col gap-4">
|
|
5
|
+
<div>
|
|
6
|
+
<label class="text-text-400">Title</label>
|
|
7
|
+
<Textbox v-model="item.props.title" @keyup.enter="$emit('change')"/>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div>
|
|
11
|
+
<div class="flex flex-row items-center gap-4">
|
|
12
|
+
<label class="flex-1 text-text-400">Platform</label>
|
|
13
|
+
<button type="button" class="text-primary p-2" @click="(e) => $refs.contextMenu.open(e.target)">Add Platform</button>
|
|
14
|
+
</div>
|
|
15
|
+
<ListItem :items="item.props.channels"
|
|
16
|
+
class="border-[1px] border-border-200 bg-base-300 rounded-lg overflow-hidden"
|
|
17
|
+
container-class="divide-y divide-border-50"
|
|
18
|
+
@reorder="(from, to) => { item.props.channels.splice(to, 0, item.props.channels.splice(from, 1)[0]); $emit('change') }">
|
|
19
|
+
<template v-slot="{ item:channel, index }">
|
|
20
|
+
<div class="flex flex-row items-center gap-2 p-2">
|
|
21
|
+
<div data-reorder>
|
|
22
|
+
<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>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="flex-1">{{ channel.channel }}</div>
|
|
25
|
+
<div>
|
|
26
|
+
<button type="button" @click="confirm('Hapus channel ini?', '', () => { item.props.channels.splice(index, 1); $emit('change') })">
|
|
27
|
+
<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>
|
|
28
|
+
</button>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
</ListItem>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<ContextMenu ref="contextMenu" position="bottom-right">
|
|
37
|
+
<div class="flex flex-col min-w-[200px]">
|
|
38
|
+
<button type="button" class="p-3 disabled:text-text-300"
|
|
39
|
+
@click="item.props.channels.push({ channel:'facebook' });$emit('change')"
|
|
40
|
+
:disabled="item.props.channels.findIndex(_ => _.channel === 'facebook') > -1">Facebook</button>
|
|
41
|
+
|
|
42
|
+
<button type="button" class="p-3 disabled:text-text-300"
|
|
43
|
+
@click="item.props.channels.push({ channel:'twitter' });$emit('change')"
|
|
44
|
+
:disabled="item.props.channels.findIndex(_ => _.channel === 'twitter') > -1">Twitter</button>
|
|
45
|
+
|
|
46
|
+
<button type="button" class="p-3 disabled:text-text-300"
|
|
47
|
+
@click="item.props.channels.push({ channel:'whatsapp' });$emit('change')"
|
|
48
|
+
:disabled="item.props.channels.findIndex(_ => _.channel === 'whatsapp') > -1">Whatsapp</button>
|
|
49
|
+
|
|
50
|
+
<button type="button" class="p-3 disabled:text-text-300"
|
|
51
|
+
@click="item.props.channels.push({ channel:'instagram' });$emit('change')"
|
|
52
|
+
:disabled="item.props.channels.findIndex(_ => _.channel === 'instagram') > -1">Instagram</button>
|
|
53
|
+
</div>
|
|
54
|
+
</ContextMenu>
|
|
55
|
+
|
|
56
|
+
<ComponentSetting2 :item="item"
|
|
57
|
+
:view-type="viewType"
|
|
58
|
+
:view-types="viewTypes"
|
|
59
|
+
:view-index="viewIndex"
|
|
60
|
+
defaultDisplay="block"
|
|
61
|
+
@change="$emit('change')" />
|
|
57
62
|
|
|
58
63
|
</div>
|
|
59
64
|
</template>
|
|
@@ -68,14 +73,16 @@ export default{
|
|
|
68
73
|
|
|
69
74
|
props: {
|
|
70
75
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
item: {
|
|
77
|
+
type: Object,
|
|
78
|
+
required: true
|
|
79
|
+
},
|
|
75
80
|
|
|
76
|
-
|
|
81
|
+
viewType: String,
|
|
77
82
|
|
|
78
|
-
|
|
83
|
+
viewIndex: Number,
|
|
84
|
+
|
|
85
|
+
viewTypes: Array,
|
|
79
86
|
|
|
80
87
|
}
|
|
81
88
|
|
|
@@ -86,7 +93,7 @@ export default{
|
|
|
86
93
|
<style module>
|
|
87
94
|
|
|
88
95
|
.comp{
|
|
89
|
-
|
|
96
|
+
@apply flex flex-col divide-y divide-border-50;
|
|
90
97
|
}
|
|
91
98
|
|
|
92
99
|
</style>
|