@mixd-id/web-scaffold 0.2.250801010 → 0.2.250801012
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/AccountIcon.md +16 -0
- package/docs/components/Ahref.md +35 -0
- package/docs/components/Alert.md +72 -0
- package/docs/components/ArrayList.md +39 -0
- package/docs/components/Article.md +28 -0
- package/docs/components/BarChart.md +81 -0
- package/docs/components/Block.md +23 -0
- package/docs/components/Box.md +15 -0
- package/docs/components/Button.md +68 -0
- package/docs/components/Card.md +67 -0
- package/docs/components/Carousel.md +70 -0
- package/docs/components/Cart.md +20 -0
- package/docs/components/CartIcon.md +29 -0
- package/docs/components/Chart.md +53 -0
- package/docs/components/ChartBar.md +34 -0
- package/docs/components/ChatTyping.md +21 -0
- package/docs/components/Checkbox.md +63 -0
- package/docs/components/CodeEditor.md +25 -0
- package/docs/components/CollapsiblePanel.md +41 -0
- package/docs/components/ColorPicker.md +52 -0
- package/docs/components/Confirm.md +62 -0
- package/docs/components/ContextMenu.md +76 -0
- package/docs/components/ContextMenuItem.md +29 -0
- package/docs/components/CopyToClipboard.md +43 -0
- package/docs/components/Countdown.md +47 -0
- package/docs/components/Datepicker.md +61 -0
- package/docs/components/Datetimepicker.md +57 -0
- package/docs/components/DayTimeRange.md +20 -0
- package/docs/components/Dropdown.md +65 -0
- package/docs/components/ErrorText.md +15 -0
- package/docs/components/FBLogin.md +21 -0
- package/docs/components/Flex.md +44 -0
- package/docs/components/GHeatMaps.md +16 -0
- package/docs/components/GSignIn.md +21 -0
- package/docs/components/Gmaps.md +16 -0
- package/docs/components/GmapsDirection.md +20 -0
- package/docs/components/Grid.md +36 -0
- package/docs/components/HTMLEditor.md +26 -0
- package/docs/components/IconMenu.md +20 -0
- package/docs/components/Image.md +78 -0
- package/docs/components/Link.md +33 -0
- package/docs/components/MultiDropdown.md +46 -0
- package/docs/components/Radio.md +55 -0
- package/docs/components/Slider.md +47 -0
- package/docs/components/Switch.md +43 -0
- package/docs/components/Table.md +31 -0
- package/docs/components/Tabs.md +65 -0
- package/docs/components/Text.md +30 -0
- package/docs/components/Textarea.md +66 -0
- package/docs/components/Textbox.md +97 -0
- package/docs/components/Timepicker.md +62 -0
- package/docs/components/Toast.md +59 -0
- package/docs/components/Uploader.md +51 -0
- package/docs/components/Video.md +54 -0
- package/package.json +65 -2
- package/docs/components/Dashboard.md +0 -56
- package/docs/components/Header2.md +0 -16
- package/log.txt +0 -7
- package/public/assets/dashboard/bar.png +0 -0
- package/public/assets/dashboard/doughnut.png +0 -0
- package/public/assets/dashboard/metric.png +0 -0
- package/public/assets/dashboard/pie.png +0 -0
- package/public/assets/dashboard/polar-area.png +0 -0
- package/public/assets/dashboard/virtual-table.png +0 -0
- package/public/static/dashboard/bar.png +0 -0
- package/public/static/dashboard/doughnut.png +0 -0
- package/public/static/dashboard/metric.png +0 -0
- package/public/static/dashboard/pie.png +0 -0
- package/public/static/dashboard/polar-area.png +0 -0
- package/public/static/dashboard/virtual-table.png +0 -0
- package/src/components/404.vue +0 -61
- package/src/components/AccountIcon.vue +0 -19
- package/src/components/Ahref.vue +0 -200
- package/src/components/Alert.vue +0 -257
- package/src/components/ArrayList.vue +0 -49
- package/src/components/Article.vue +0 -387
- package/src/components/Block.vue +0 -31
- package/src/components/Box.vue +0 -34
- package/src/components/Button.vue +0 -258
- package/src/components/Card.vue +0 -257
- package/src/components/Carousel.vue +0 -364
- package/src/components/Cart.vue +0 -192
- package/src/components/CartIcon.vue +0 -89
- package/src/components/Chart.vue +0 -485
- package/src/components/ChartBar.vue +0 -192
- package/src/components/ChatTyping.vue +0 -69
- package/src/components/Checkbox.vue +0 -200
- package/src/components/Checkout.vue +0 -373
- package/src/components/CheckoutDelivery.vue +0 -267
- package/src/components/CodeEditor.vue +0 -50
- package/src/components/CollapsiblePanel.vue +0 -70
- package/src/components/ColorPicker.vue +0 -165
- package/src/components/ColorPicker2.vue +0 -186
- package/src/components/ColorPicker3.vue +0 -100
- package/src/components/Confirm.vue +0 -180
- package/src/components/ContextMenu.vue +0 -265
- package/src/components/ContextMenuItem.vue +0 -53
- package/src/components/ConversationBuilder.vue +0 -161
- package/src/components/CopyToClipboard.vue +0 -34
- package/src/components/Countdown.vue +0 -264
- package/src/components/DGrid.vue +0 -21
- package/src/components/DGridItem.vue +0 -263
- package/src/components/Dashboard.vue +0 -243
- package/src/components/Dashboard2.vue +0 -118
- package/src/components/DashboardComponentSelector.vue +0 -96
- package/src/components/DashboardConfigs.vue +0 -202
- package/src/components/DataList.vue +0 -92
- package/src/components/Datepicker.vue +0 -399
- package/src/components/DayTimeRange.vue +0 -126
- package/src/components/Dropdown.vue +0 -224
- package/src/components/ErrorText.vue +0 -57
- package/src/components/FBLogin.vue +0 -194
- package/src/components/Feed.vue +0 -118
- package/src/components/Flex.vue +0 -44
- package/src/components/GHeatMaps.vue +0 -317
- package/src/components/GSignIn.vue +0 -166
- package/src/components/Gmaps.vue +0 -251
- package/src/components/GmapsDirection.vue +0 -191
- package/src/components/Grid.vue +0 -35
- package/src/components/HTMLEditor.vue +0 -588
- package/src/components/IconMenu.vue +0 -95
- package/src/components/IconMenu2.vue +0 -89
- package/src/components/IconPlus.vue +0 -89
- package/src/components/Image.vue +0 -263
- package/src/components/Image360.vue +0 -140
- package/src/components/ImageFullScreen.vue +0 -101
- package/src/components/ImagePreview.vue +0 -93
- package/src/components/ImageUploader.vue +0 -114
- package/src/components/ImportModal.vue +0 -260
- package/src/components/Link.vue +0 -95
- package/src/components/List.vue +0 -1381
- package/src/components/ListContextMenu.vue +0 -88
- package/src/components/ListItem.vue +0 -160
- package/src/components/ListPage1.vue +0 -1401
- package/src/components/ListPage1Filter.vue +0 -170
- package/src/components/ListView.vue +0 -961
- package/src/components/ListViewBarSummary.vue +0 -81
- package/src/components/ListViewLineSummary.vue +0 -75
- package/src/components/ListViewLiveBarSummary.vue +0 -52
- package/src/components/ListViewMapSummary.vue +0 -56
- package/src/components/ListViewSettings.vue +0 -514
- package/src/components/ListViewTableSummary.vue +0 -77
- package/src/components/LogViewerItem.vue +0 -116
- package/src/components/MarkdownEdit.vue +0 -128
- package/src/components/MarkdownPreview.vue +0 -102
- package/src/components/MenuItem1.vue +0 -36
- package/src/components/Modal.vue +0 -456
- package/src/components/MultiDropdown.vue +0 -124
- package/src/components/MultilineText.vue +0 -174
- package/src/components/OTPField.vue +0 -139
- package/src/components/ObjectTree.vue +0 -105
- package/src/components/PageBuilder.vue +0 -449
- package/src/components/Paragraph.vue +0 -40
- package/src/components/PresetSelectorFilterItem.vue +0 -203
- package/src/components/Radio.vue +0 -109
- package/src/components/SearchModal.vue +0 -153
- package/src/components/Slider.vue +0 -317
- package/src/components/SplitPane.vue +0 -129
- package/src/components/Svg.vue +0 -33
- package/src/components/SvgEditor.vue +0 -173
- package/src/components/Switch.vue +0 -101
- package/src/components/TabView.vue +0 -105
- package/src/components/Table.vue +0 -56
- package/src/components/TableView.vue +0 -200
- package/src/components/TableViewHead.vue +0 -159
- package/src/components/Tabs.vue +0 -131
- package/src/components/Test.vue +0 -23
- package/src/components/Testimonial.vue +0 -86
- package/src/components/Text.vue +0 -34
- package/src/components/TextBlock.vue +0 -50
- package/src/components/TextEditor.vue +0 -85
- package/src/components/TextWithTag.vue +0 -298
- package/src/components/Textarea.vue +0 -184
- package/src/components/Textbox.vue +0 -216
- package/src/components/Thumbnail.vue +0 -27
- package/src/components/Timepicker.vue +0 -125
- package/src/components/Toast.vue +0 -117
- package/src/components/TreeMenu.vue +0 -122
- package/src/components/TreeView.vue +0 -106
- package/src/components/TreeView2.vue +0 -38
- package/src/components/TreeViewItem.vue +0 -453
- package/src/components/TreeViewItem1.vue +0 -282
- package/src/components/TreeViewItem2.vue +0 -55
- package/src/components/Uploader.vue +0 -45
- package/src/components/Video.vue +0 -119
- package/src/components/VirtualGrid.vue +0 -297
- package/src/components/VirtualScroll.vue +0 -282
- package/src/components/VirtualTable.vue +0 -956
- package/src/components/YoutubeVideo.vue +0 -196
- package/src/configs/dashboard/bar.js +0 -10
- package/src/configs/dashboard/collection-1.js +0 -5
- package/src/configs/dashboard/data-table.js +0 -9
- package/src/configs/dashboard/doughnut.js +0 -7
- package/src/configs/dashboard/gheatmaps.js +0 -9
- package/src/configs/dashboard/grid-2.js +0 -34
- package/src/configs/dashboard/grid-3.js +0 -34
- package/src/configs/dashboard/grid-4.js +0 -34
- package/src/configs/dashboard/grid.js +0 -15
- package/src/configs/dashboard/metric.js +0 -10
- package/src/configs/dashboard/pie.js +0 -7
- package/src/configs/dashboard/polar-area.js +0 -7
- package/src/configs/dashboard/virtual-table.js +0 -9
- package/src/configs/icons-fa.json +0 -12
- package/src/configs/web-page-builder.js +0 -118
- package/src/defs/dashboard-preset.js +0 -22
- package/src/directives/intersect.js +0 -26
- package/src/hooks/device.js +0 -14
- package/src/index.css +0 -3
- package/src/index.js +0 -648
- package/src/middleware/http/trim-string.js +0 -20
- package/src/mixin/component.js +0 -306
- package/src/mixin/ready-state.js +0 -37
- package/src/stores/components.js +0 -36
- package/src/stores/datasource.js +0 -11
- package/src/themes/default/index.js +0 -303
- package/src/utils/dashboard.js +0 -140
- package/src/utils/event-bus.js +0 -8
- package/src/utils/helpers.cjs +0 -635
- package/src/utils/helpers.js +0 -635
- package/src/utils/helpers.mjs +0 -722
- package/src/utils/importer.js +0 -209
- package/src/utils/list.mjs +0 -1509
- package/src/utils/listpage1.js +0 -1507
- package/src/utils/listview.js +0 -1287
- package/src/utils/preset-selector.cjs +0 -1455
- package/src/utils/preset-selector.js +0 -1452
- package/src/utils/preset-selector.mjs +0 -234
- package/src/utils/queue.js +0 -63
- package/src/utils/selection.js +0 -43
- package/src/utils/web.js +0 -50
- package/src/utils/web.mjs +0 -120
- package/src/utils/wss.js +0 -296
- package/src/utils/wss.mjs +0 -285
- package/src/widgets/AhrefSetting.vue +0 -97
- package/src/widgets/ArticleSetting.vue +0 -457
- package/src/widgets/BackgroundColorSetting.vue +0 -153
- package/src/widgets/BackgroundSetting.vue +0 -132
- package/src/widgets/BlockSetting.vue +0 -49
- package/src/widgets/BorderColorSetting.vue +0 -57
- package/src/widgets/BorderSetting.vue +0 -201
- package/src/widgets/BotEditor/BotEditorActions.vue +0 -163
- package/src/widgets/BotEditor/BotEditorSettings.vue +0 -21
- package/src/widgets/BotEditor.vue +0 -248
- package/src/widgets/BoxSetting.vue +0 -53
- package/src/widgets/ButtonSetting.vue +0 -113
- package/src/widgets/CarouselSetting.vue +0 -181
- package/src/widgets/CartSetting.vue +0 -46
- package/src/widgets/CheckoutSetting.vue +0 -46
- package/src/widgets/CollapsiblePanelSetting.vue +0 -46
- package/src/widgets/ColumnSelector.vue +0 -104
- package/src/widgets/ComponentPropertyLabel.vue +0 -35
- package/src/widgets/ComponentPropertySelector.vue +0 -115
- package/src/widgets/ComponentSetting.vue +0 -2220
- package/src/widgets/ComponentSetting2.vue +0 -927
- package/src/widgets/ComponentSetting3.vue +0 -231
- package/src/widgets/ContactForm.vue +0 -193
- package/src/widgets/ContactFormSetting.vue +0 -395
- package/src/widgets/CountdownSetting.vue +0 -76
- package/src/widgets/Dashboard/BarChart.vue +0 -366
- package/src/widgets/Dashboard/BarChartSetting.vue +0 -317
- package/src/widgets/Dashboard/DataTable.vue +0 -125
- package/src/widgets/Dashboard/DataTableSetting.vue +0 -243
- package/src/widgets/Dashboard/DatasourceFilterSharing.vue +0 -93
- package/src/widgets/Dashboard/DatasourcePreview.vue +0 -93
- package/src/widgets/Dashboard/DatasourceSelector.vue +0 -122
- package/src/widgets/Dashboard/Doughnut.vue +0 -199
- package/src/widgets/Dashboard/DoughnutSetting.vue +0 -196
- package/src/widgets/Dashboard/GHeatMapsSetting.vue +0 -108
- package/src/widgets/Dashboard/InteractionEdit.vue +0 -228
- package/src/widgets/Dashboard/Metric.vue +0 -135
- package/src/widgets/Dashboard/MetricSetting.vue +0 -227
- package/src/widgets/Dashboard/Pie.vue +0 -188
- package/src/widgets/Dashboard/PieSetting.vue +0 -247
- package/src/widgets/Dashboard/PolarArea.vue +0 -201
- package/src/widgets/Dashboard/PolarAreaSetting.vue +0 -195
- package/src/widgets/Dashboard/SharingModal.vue +0 -115
- package/src/widgets/Dashboard/ViewSelector.vue +0 -183
- package/src/widgets/Dashboard/VirtualColumnEdit.vue +0 -97
- package/src/widgets/Dashboard/VirtualTableSetting.vue +0 -171
- package/src/widgets/Dashboard0.vue +0 -1856
- package/src/widgets/DataListSetting.vue +0 -102
- package/src/widgets/EffectSetting.vue +0 -94
- package/src/widgets/EmbeddedVideo.vue +0 -60
- package/src/widgets/EmbeddedVideoSetting.vue +0 -50
- package/src/widgets/FAQ.vue +0 -98
- package/src/widgets/FAQSetting.vue +0 -94
- package/src/widgets/FeatureList.vue +0 -131
- package/src/widgets/FeatureListSetting.vue +0 -233
- package/src/widgets/FiltersSetting.vue +0 -88
- package/src/widgets/FlexSetting.vue +0 -174
- package/src/widgets/GridSetting.vue +0 -165
- package/src/widgets/Header.vue +0 -15
- package/src/widgets/Header0.vue +0 -41
- package/src/widgets/Header0Setting.vue +0 -75
- package/src/widgets/Header2.vue +0 -65
- package/src/widgets/Header2Setting.vue +0 -193
- package/src/widgets/HeaderSetting.vue +0 -102
- package/src/widgets/IconList.vue +0 -51
- package/src/widgets/IconListSetting.vue +0 -188
- package/src/widgets/ImageSetting.vue +0 -119
- package/src/widgets/LayoutSetting.vue +0 -251
- package/src/widgets/LinkSetting.vue +0 -209
- package/src/widgets/LinkSettingModal.vue +0 -173
- package/src/widgets/LogViewer.vue +0 -85
- package/src/widgets/MarginPaddingSetting.vue +0 -58
- package/src/widgets/MarginSetting.vue +0 -142
- package/src/widgets/MenuEditor.vue +0 -256
- package/src/widgets/MenuItem1Setting.vue +0 -78
- package/src/widgets/ModalSetting.vue +0 -94
- package/src/widgets/MultiValueSetting.vue +0 -121
- package/src/widgets/MultiValueSetting2.vue +0 -147
- package/src/widgets/OGSettingModal.vue +0 -103
- package/src/widgets/PaddingSetting.vue +0 -142
- package/src/widgets/ParagraphSetting.vue +0 -89
- package/src/widgets/PositionSetting.vue +0 -209
- package/src/widgets/PresetBar.vue +0 -990
- package/src/widgets/PresetBarPivot.vue +0 -198
- package/src/widgets/PresetBarPivotColumnEdit.vue +0 -197
- package/src/widgets/PresetSelector.vue +0 -685
- package/src/widgets/Review.vue +0 -131
- package/src/widgets/ReviewSetting.vue +0 -201
- package/src/widgets/SearchModalSetting.vue +0 -70
- package/src/widgets/Share.vue +0 -164
- package/src/widgets/ShareSetting.vue +0 -99
- package/src/widgets/SizingSetting.vue +0 -306
- package/src/widgets/SpacingSetting.vue +0 -77
- package/src/widgets/StyleSetting.vue +0 -543
- package/src/widgets/StyleSetting2.vue +0 -90
- package/src/widgets/SvgSetting.vue +0 -133
- package/src/widgets/TableSetting.vue +0 -172
- package/src/widgets/TestimonialSetting.vue +0 -161
- package/src/widgets/TextBlockSetting.vue +0 -81
- package/src/widgets/ThumbnailSetting.vue +0 -49
- package/src/widgets/TransitionSetting.vue +0 -64
- package/src/widgets/TypographySetting.vue +0 -334
- package/src/widgets/UserActionBuilder/UserActionCondition.vue +0 -99
- package/src/widgets/UserActionBuilder/UserActionConsole.vue +0 -97
- package/src/widgets/UserActionBuilder/UserActionItem.vue +0 -273
- package/src/widgets/UserActionBuilder/UserActionOutput.vue +0 -152
- package/src/widgets/UserActionBuilder/UserActionOutputDelay.vue +0 -27
- package/src/widgets/UserActionBuilder/UserActionOutputLog.vue +0 -28
- package/src/widgets/UserActionBuilder/UserActionOutputReply.vue +0 -112
- package/src/widgets/UserActionBuilder/UserActionProps.vue +0 -213
- package/src/widgets/UserActionBuilder.vue +0 -314
- package/src/widgets/WebComponentSelector.vue +0 -205
- package/src/widgets/WebDatasourceSelector.vue +0 -153
- package/src/widgets/WebLayoutSelector.vue +0 -147
- package/src/widgets/WebPageBuilder.vue +0 -2161
- package/src/widgets/WebPageBuilder2.vue +0 -1091
- package/src/widgets/WebPageBuilder3.vue +0 -411
- package/src/widgets/WebPageBuilder4/BackgroundColorSetting.vue +0 -54
- package/src/widgets/WebPageBuilder4/BackgroundPositionSetting.vue +0 -75
- package/src/widgets/WebPageBuilder4/BackgroundRepeatSetting.vue +0 -72
- package/src/widgets/WebPageBuilder4/BackgroundSizeSetting.vue +0 -72
- package/src/widgets/WebPageBuilder4/BlurSetting.vue +0 -72
- package/src/widgets/WebPageBuilder4/BorderColorSetting.vue +0 -64
- package/src/widgets/WebPageBuilder4/BorderRadiusSetting.vue +0 -75
- package/src/widgets/WebPageBuilder4/BorderSizeSetting.vue +0 -69
- package/src/widgets/WebPageBuilder4/BorderStyleSetting.vue +0 -72
- package/src/widgets/WebPageBuilder4/BoxShadowSetting.vue +0 -73
- package/src/widgets/WebPageBuilder4/ButtonSetting.vue +0 -65
- package/src/widgets/WebPageBuilder4/CarouselSetting.vue +0 -178
- package/src/widgets/WebPageBuilder4/DisplaySetting.vue +0 -76
- package/src/widgets/WebPageBuilder4/FlexAlignSetting.vue +0 -71
- package/src/widgets/WebPageBuilder4/FlexDirectionSetting.vue +0 -70
- package/src/widgets/WebPageBuilder4/FlexJustifySetting.vue +0 -74
- package/src/widgets/WebPageBuilder4/FlexPropertySetting.vue +0 -71
- package/src/widgets/WebPageBuilder4/FlexSetting.vue +0 -96
- package/src/widgets/WebPageBuilder4/FlexWrapSetting.vue +0 -69
- package/src/widgets/WebPageBuilder4/GapSetting.vue +0 -75
- package/src/widgets/WebPageBuilder4/GrayscaleSetting.vue +0 -68
- package/src/widgets/WebPageBuilder4/GridSetting.vue +0 -216
- package/src/widgets/WebPageBuilder4/HeightSetting.vue +0 -98
- package/src/widgets/WebPageBuilder4/ImageSetting.vue +0 -102
- package/src/widgets/WebPageBuilder4/MarginSetting.vue +0 -73
- package/src/widgets/WebPageBuilder4/MaxHeightSetting.vue +0 -82
- package/src/widgets/WebPageBuilder4/MaxWidthSetting.vue +0 -90
- package/src/widgets/WebPageBuilder4/MinHeightSetting.vue +0 -81
- package/src/widgets/WebPageBuilder4/MinWidthSetting.vue +0 -101
- package/src/widgets/WebPageBuilder4/MultiValueSetting.vue +0 -163
- package/src/widgets/WebPageBuilder4/OpacitySetting.vue +0 -77
- package/src/widgets/WebPageBuilder4/OverflowSetting.vue +0 -81
- package/src/widgets/WebPageBuilder4/PaddingSetting.vue +0 -57
- package/src/widgets/WebPageBuilder4/PositionSetting.vue +0 -191
- package/src/widgets/WebPageBuilder4/PropertySetting.vue +0 -176
- package/src/widgets/WebPageBuilder4/TextSetting.vue +0 -72
- package/src/widgets/WebPageBuilder4/TreeView.vue +0 -46
- package/src/widgets/WebPageBuilder4/TreeViewItem.vue +0 -303
- package/src/widgets/WebPageBuilder4/WebPageComponentSelector.vue +0 -141
- package/src/widgets/WebPageBuilder4/WebPagePropertySelector.vue +0 -172
- package/src/widgets/WebPageBuilder4/WidthSetting.vue +0 -105
- package/src/widgets/WebPageBuilder4/ZIndexSetting.vue +0 -72
- package/src/widgets/WebPageBuilder4.vue +0 -798
- package/src/widgets/WebPagePreview.vue +0 -295
- package/src/widgets/WebPageSelector.vue +0 -173
- package/src/widgets/WebTemplateCreator.vue +0 -156
- package/src/widgets/YoutubeVideoSetting.vue +0 -68
- package/tailwind.config.js +0 -481
|
@@ -1,395 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.comp">
|
|
3
|
-
|
|
4
|
-
<div class="p-6 py-4">
|
|
5
|
-
<div class="flex flex-col gap-8">
|
|
6
|
-
<div class="flex flex-col gap-1">
|
|
7
|
-
<label class="flex-1 text-text-400">Text</label>
|
|
8
|
-
<Textbox class="mt-1" v-model="item.props.title" maxlength="40" placeholder="Title"
|
|
9
|
-
@keyup.enter="$emit('change')"/>
|
|
10
|
-
<Textarea class="mt-1" v-model="item.props.description" rows="2" placeholder="Description"
|
|
11
|
-
@blur="$emit('change')"/>
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
<div>
|
|
15
|
-
<div class="flex flex-row gap-4">
|
|
16
|
-
<label class="flex-1 text-text-400">Fields</label>
|
|
17
|
-
<button type="button" class="text-primary"
|
|
18
|
-
@click="(e) => $refs.fieldOpt.open(e.target)">
|
|
19
|
-
Add Field
|
|
20
|
-
</button>
|
|
21
|
-
</div>
|
|
22
|
-
<ListItem :items="item.props.fields"
|
|
23
|
-
class="mt-1 border-border-200 border-[1px] bg-base-300 rounded-lg overflow-hidden"
|
|
24
|
-
container-class="divide-y divide-border-50"
|
|
25
|
-
@reorder="(from, to) => { item.props.fields.splice(to, 0, item.props.fields.splice(from, 1)[0]); $emit('change') }">
|
|
26
|
-
<template v-slot="{ item:field, index }">
|
|
27
|
-
<div class="flex flex-row items-center gap-2 px-3">
|
|
28
|
-
<svg data-reorder 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>
|
|
29
|
-
<div>
|
|
30
|
-
<Checkbox v-model="field.required" @change="$emit('change')"/>
|
|
31
|
-
</div>
|
|
32
|
-
<div class="flex-1 p-2 text-ellipsis overflow-hidden whitespace-nowrap">
|
|
33
|
-
<label>{{ field.label ?? field.type }}</label>
|
|
34
|
-
</div>
|
|
35
|
-
<button class="text-sm text-primary" v-if="field._edit" @click="$refs[field._edit].open(field)">Edit</button>
|
|
36
|
-
<button type="button" @click="confirm($t('Remove this field?'), '', () => { item.props.fields.splice(index, 1); $emit('change') })">
|
|
37
|
-
<svg width="14" height="14" 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>
|
|
38
|
-
</button>
|
|
39
|
-
</div>
|
|
40
|
-
</template>
|
|
41
|
-
</ListItem>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
<div>
|
|
45
|
-
<div class="flex flex-row gap-4">
|
|
46
|
-
<label class="flex-1 text-text-400">On Submit</label>
|
|
47
|
-
<button ref="actionBtn" type="button" class="text-primary"
|
|
48
|
-
@click="(e) => $refs.actionOpt.open($refs.actionBtn)">
|
|
49
|
-
Add Action
|
|
50
|
-
</button>
|
|
51
|
-
</div>
|
|
52
|
-
<ListItem :items="onSubmit"
|
|
53
|
-
class="mt-1 bg-base-300 border-[1px] border-border-200 rounded-lg"
|
|
54
|
-
container-class="divide-y divide-border-50">
|
|
55
|
-
<template v-slot="{ item:action, index }">
|
|
56
|
-
<div v-if="action.type === 'send-whatsapp'">
|
|
57
|
-
<div v-if="action._edit" class="flex flex-row items-start gap-2 p-3">
|
|
58
|
-
<div class="flex-1 flex flex-col gap-2">
|
|
59
|
-
<label class="text-text-400 leading-1">Send whatsapp to</label>
|
|
60
|
-
<div class="flex flex-row gap-2">
|
|
61
|
-
<Textbox class="flex-1" v-model="action.number" type="tel"/>
|
|
62
|
-
<Button type="button" class="px-3"
|
|
63
|
-
:state="!action.number ? -1 : 1"
|
|
64
|
-
@click="delete action._edit;$emit('change')">OK</Button>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
<div v-else class="flex flex-row items-center gap-2 p-3 bg-base-500 rounded-lg">
|
|
69
|
-
<div class="flex-1 flex flex-row gap-2 items-center">
|
|
70
|
-
<svg width="14" height="14" class="fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/></svg>
|
|
71
|
-
<label>{{ action.number }}</label>
|
|
72
|
-
</div>
|
|
73
|
-
<button type="button" @click="action._edit = true">
|
|
74
|
-
<svg width="13" height="13" class="fill-text-300 hover:fill-primary-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z"/></svg>
|
|
75
|
-
</button>
|
|
76
|
-
<button type="button" @click="confirm($t('Remove this action?'), '', () => { item.props.onSubmit.splice(index, 1); $emit('change') })">
|
|
77
|
-
<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>
|
|
78
|
-
</button>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
|
|
82
|
-
<div v-else-if="action.type === 'send-whatsapp-referral'">
|
|
83
|
-
<div class="flex flex-row items-center gap-2 p-3 bg-base-300">
|
|
84
|
-
<div class="flex-1 flex flex-row gap-2 items-center">
|
|
85
|
-
<svg width="14" height="14" class="fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"/></svg>
|
|
86
|
-
<label>Send to Referral</label>
|
|
87
|
-
</div>
|
|
88
|
-
<button type="button" @click="confirm($t('Remove this item?'), '', () => { item.props.onSubmit.splice(index, 1); $emit('change') })">
|
|
89
|
-
<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>
|
|
90
|
-
</button>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
|
|
94
|
-
<div v-else-if="action.type === 'redirect'">
|
|
95
|
-
<div v-if="action._edit" class="flex flex-row items-start gap-2 p-3">
|
|
96
|
-
<div class="flex-1 flex flex-col gap-2">
|
|
97
|
-
<div>
|
|
98
|
-
<label class="text-text-400 leading-1">Redirect to</label>
|
|
99
|
-
<div class="flex flex-row gap-2">
|
|
100
|
-
<Textbox class="flex-1" v-model="action.target"/>
|
|
101
|
-
<Button type="button" class="px-3"
|
|
102
|
-
:state="!action.target ? -1 : 1"
|
|
103
|
-
@click="delete action._edit;$emit('change')">OK</Button>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
<div>
|
|
107
|
-
<label class="text-text-400 leading-1">Delay</label>
|
|
108
|
-
<Dropdown class="flex-1 w-[100px]" v-model="action.delay">
|
|
109
|
-
<option value="0">No delay</option>
|
|
110
|
-
<option value="1000">1s</option>
|
|
111
|
-
<option value="2000">2s</option>
|
|
112
|
-
<option value="3000">3s</option>
|
|
113
|
-
<option value="4000">4s</option>
|
|
114
|
-
<option value="5000">5s</option>
|
|
115
|
-
</Dropdown>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
<div v-else class="flex flex-row items-center gap-2 p-3 bg-base-500 rounded-lg">
|
|
120
|
-
<div class="flex-1 flex flex-row gap-2 items-center">
|
|
121
|
-
<svg width="14" height="14" class="fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM474.67,0H316a28,28,0,0,0-28,28V46.71A28,28,0,0,0,316.79,73.9L384,72,135.06,319.09l-.06.06a24,24,0,0,0,0,33.94l23.94,23.85.06.06a24,24,0,0,0,33.91-.09L440,128l-1.88,67.22V196a28,28,0,0,0,28,28H484a28,28,0,0,0,28-28V37.33h0A37.33,37.33,0,0,0,474.67,0Z"/></svg>
|
|
122
|
-
<div class="flex-1 line-clamp-1">{{ action.target }}</div>
|
|
123
|
-
</div>
|
|
124
|
-
<button type="button" @click="action._edit = true">
|
|
125
|
-
<svg width="13" height="13" class="fill-text-300 hover:fill-primary-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z"/></svg>
|
|
126
|
-
</button>
|
|
127
|
-
<button type="button" @click="confirm($t('Remove this action?'), '', () => { item.props.onSubmit.splice(index, 1); $emit('change') })">
|
|
128
|
-
<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>
|
|
129
|
-
</button>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
</template>
|
|
133
|
-
</ListItem>
|
|
134
|
-
</div>
|
|
135
|
-
|
|
136
|
-
<div>
|
|
137
|
-
<label class="text-text-400">Submit URL</label>
|
|
138
|
-
<div class="flex flex-row gap-2 mt-1">
|
|
139
|
-
<Dropdown v-model="item.props.submitMethod"
|
|
140
|
-
class="w-[100px]"
|
|
141
|
-
@change="$emit('change')">
|
|
142
|
-
<option value="get">GET</option>
|
|
143
|
-
<option value="post">POST</option>
|
|
144
|
-
</Dropdown>
|
|
145
|
-
<Textbox v-model="item.props.submitUrl"
|
|
146
|
-
class="flex-1"
|
|
147
|
-
@keyup.enter="$emit('change')"/>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
|
|
151
|
-
<div>
|
|
152
|
-
<label class="text-text-400">UTM</label>
|
|
153
|
-
<div class="mt-1 flex flex-row items-center gap-2">
|
|
154
|
-
<Textbox v-model="utm.source" placeholder="Source" @keyup.enter="$emit('change')" @blur="$emit('change')" />
|
|
155
|
-
<label>/</label>
|
|
156
|
-
<Textbox v-model="utm.medium" placeholder="Medium" @keyup.enter="$emit('change')" @blur="$emit('change')" />
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
|
|
160
|
-
<div class="flex flex-col gap-1">
|
|
161
|
-
<label class="text-text-400">Completed</label>
|
|
162
|
-
<Textbox v-model="item.props.completedTitle" />
|
|
163
|
-
<Textarea v-model="item.props.completedDesc" rows="4" />
|
|
164
|
-
</div>
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
|
|
168
|
-
<ComponentSetting2 :item="item"
|
|
169
|
-
:view-type="viewType"
|
|
170
|
-
:view-types="viewTypes"
|
|
171
|
-
:view-index="viewIndex"
|
|
172
|
-
defaultDisplay="block"
|
|
173
|
-
@change="$emit('change')" />
|
|
174
|
-
|
|
175
|
-
<ContextMenu ref="fieldOpt" position="bottom-right" class="border-border-200">
|
|
176
|
-
<div class="flex flex-col min-w-[120px] divide-y divide-text-100">
|
|
177
|
-
<button v-for="field in fields"
|
|
178
|
-
class="p-3 bg-base-500 text-left pl-8 hover:bg-text-50 disabled:bg-base-500 disabled:text-text-300"
|
|
179
|
-
@click="item.props.fields.push(field);$emit('change')"
|
|
180
|
-
:disabled="item.props.fields.findIndex((_) => _.type === field.type) >= 0">
|
|
181
|
-
{{ field.label }}
|
|
182
|
-
</button>
|
|
183
|
-
</div>
|
|
184
|
-
</ContextMenu>
|
|
185
|
-
|
|
186
|
-
<ContextMenu ref="actionOpt" position="bottom-right">
|
|
187
|
-
<div class="flex flex-col gap-1 p-1 min-w-[120px]">
|
|
188
|
-
<button class="p-3 bg-base-500 text-left pl-8 hover:bg-text-50"
|
|
189
|
-
@click="onSubmit.push({ type:'send-whatsapp', _edit:true })">Send Whatsapp</button>
|
|
190
|
-
<button class="p-3 bg-base-500 text-left pl-8 hover:bg-text-50" v-if="item.props.fields.includes('referralCode')"
|
|
191
|
-
@click="onSubmit.push({ type:'send-whatsapp-referral' });$emit('change')">Send Whatsapp to Referral</button>
|
|
192
|
-
<button class="p-3 bg-base-500 text-left pl-8 hover:bg-text-50"
|
|
193
|
-
@click="onSubmit.push({ type:'redirect', delay:'0', _edit:true })">Redirect</button>
|
|
194
|
-
</div>
|
|
195
|
-
</ContextMenu>
|
|
196
|
-
|
|
197
|
-
<Modal ref="positionEdit" width="360" height="480">
|
|
198
|
-
<template v-slot:head>
|
|
199
|
-
<div class="relative p-5">
|
|
200
|
-
<h3>Daftar Posisi</h3>
|
|
201
|
-
<div class="absolute top-0 right-0 p-2">
|
|
202
|
-
<button type="button" class="p-2" @click="$refs.positionEdit.close()">
|
|
203
|
-
<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">
|
|
204
|
-
<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"/>
|
|
205
|
-
</svg>
|
|
206
|
-
</button>
|
|
207
|
-
</div>
|
|
208
|
-
</div>
|
|
209
|
-
</template>
|
|
210
|
-
<template v-slot:foot="{ context }">
|
|
211
|
-
<div class="p-5">
|
|
212
|
-
<Button type="button" class="w-[100px]" @click="$util.removeEmpty(context.items);$refs.positionEdit.close();$emit('change')">OK</Button>
|
|
213
|
-
</div>
|
|
214
|
-
</template>
|
|
215
|
-
<template #default="{ context }">
|
|
216
|
-
<div class="flex-1 p-5">
|
|
217
|
-
<ListItem :items="context.items"
|
|
218
|
-
container-class="flex flex-col gap-2"
|
|
219
|
-
@reorder="(from, to) => { context.items.splice(to, 0, context.items.splice(from, 1)[0]); }">
|
|
220
|
-
<template v-slot="{ item, index }">
|
|
221
|
-
<div class="flex flex-row items-center gap-2">
|
|
222
|
-
<div class="flex-1">
|
|
223
|
-
<Textbox v-model="item.text" @keyup.enter="context.items.push({})">
|
|
224
|
-
<template #start>
|
|
225
|
-
<div v-if="context.items.length > 1" data-reorder class="self-stretch flex items-center justify-center px-2 bg-text-50">
|
|
226
|
-
<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>
|
|
227
|
-
</div>
|
|
228
|
-
</template>
|
|
229
|
-
</Textbox>
|
|
230
|
-
</div>
|
|
231
|
-
<div>
|
|
232
|
-
<button type="button" @click="context.items.splice(index, 1)">
|
|
233
|
-
<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>
|
|
234
|
-
</button>
|
|
235
|
-
</div>
|
|
236
|
-
</div>
|
|
237
|
-
</template>
|
|
238
|
-
</ListItem>
|
|
239
|
-
|
|
240
|
-
<div class="text-center p-3">
|
|
241
|
-
<button type="button" class="text-primary" @click="context.items.push({})">Tambah Posisi</button>
|
|
242
|
-
</div>
|
|
243
|
-
|
|
244
|
-
</div>
|
|
245
|
-
</template>
|
|
246
|
-
</Modal>
|
|
247
|
-
|
|
248
|
-
<Modal ref="topicModal" class="w-[360px] h-[480px]">
|
|
249
|
-
<template v-slot:head>
|
|
250
|
-
<div class="relative p-5">
|
|
251
|
-
<h3>Topic</h3>
|
|
252
|
-
|
|
253
|
-
<button type="button" class="absolute right-0 top-0 p-3" @click="$refs.topicModal.close()">
|
|
254
|
-
<svg width="18" height="18" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z"/></svg>
|
|
255
|
-
</button>
|
|
256
|
-
</div>
|
|
257
|
-
</template>
|
|
258
|
-
<template #foot="{ context }">
|
|
259
|
-
<div class="p-5">
|
|
260
|
-
<Button class="w-full" @click="$refs.topicModal.close()">OK</Button>
|
|
261
|
-
</div>
|
|
262
|
-
</template>
|
|
263
|
-
<template #default="{ context }">
|
|
264
|
-
<div class="flex-1 p-5 flex flex-col gap-4">
|
|
265
|
-
|
|
266
|
-
<div>
|
|
267
|
-
<label class="text-text-400">Label</label>
|
|
268
|
-
<Textbox v-model="context.label" />
|
|
269
|
-
</div>
|
|
270
|
-
|
|
271
|
-
<div>
|
|
272
|
-
<label class="text-text-400">Items</label>
|
|
273
|
-
<ListItem :items="context.items"
|
|
274
|
-
@reorder="(from, to) => { context.items.splice(to, 0, context.items.splice(from, 1)[0]); }"
|
|
275
|
-
body-class="flex flex-col divide-y divide-text-200 border-[1px] border-border-200 mt-1">
|
|
276
|
-
<template v-slot="{ item, index }">
|
|
277
|
-
<div class="flex flex-row items-center gap-3 px-3">
|
|
278
|
-
<div data-reorder>
|
|
279
|
-
<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>
|
|
280
|
-
</div>
|
|
281
|
-
<div class="flex-1">
|
|
282
|
-
<Textbox v-model="item.text" class="border-none" placeholder="Topic Name" />
|
|
283
|
-
</div>
|
|
284
|
-
<div>
|
|
285
|
-
<button type="button" @click="context.items.splice(index, 1)">
|
|
286
|
-
<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>
|
|
287
|
-
</button>
|
|
288
|
-
</div>
|
|
289
|
-
</div>
|
|
290
|
-
</template>
|
|
291
|
-
</ListItem>
|
|
292
|
-
|
|
293
|
-
<div class="text-center">
|
|
294
|
-
<button type="button" class="text-primary p-3" @click="context.items.push({})">Add Item</button>
|
|
295
|
-
</div>
|
|
296
|
-
</div>
|
|
297
|
-
|
|
298
|
-
<div>
|
|
299
|
-
<label class="text-text-400">Placeholder</label>
|
|
300
|
-
<Textbox v-model="context.placeholder" />
|
|
301
|
-
</div>
|
|
302
|
-
|
|
303
|
-
<br />
|
|
304
|
-
<br />
|
|
305
|
-
|
|
306
|
-
</div>
|
|
307
|
-
</template>
|
|
308
|
-
</Modal>
|
|
309
|
-
|
|
310
|
-
</div>
|
|
311
|
-
</template>
|
|
312
|
-
|
|
313
|
-
<script>
|
|
314
|
-
|
|
315
|
-
export default{
|
|
316
|
-
|
|
317
|
-
emits: [ 'change' ],
|
|
318
|
-
|
|
319
|
-
inject: [ 'confirm' ],
|
|
320
|
-
|
|
321
|
-
props: {
|
|
322
|
-
|
|
323
|
-
item: {
|
|
324
|
-
type: Object,
|
|
325
|
-
required: true
|
|
326
|
-
},
|
|
327
|
-
|
|
328
|
-
viewType: String,
|
|
329
|
-
|
|
330
|
-
viewIndex: Number,
|
|
331
|
-
|
|
332
|
-
viewTypes: Array,
|
|
333
|
-
|
|
334
|
-
},
|
|
335
|
-
|
|
336
|
-
computed: {
|
|
337
|
-
|
|
338
|
-
onSubmit(){
|
|
339
|
-
if(!Array.isArray(this.item.props.onSubmit))
|
|
340
|
-
this.item.props.onSubmit = []
|
|
341
|
-
return this.item.props.onSubmit
|
|
342
|
-
},
|
|
343
|
-
|
|
344
|
-
hasTopic(){
|
|
345
|
-
return this.item.props.fields.some(field => field.type === 'topic')
|
|
346
|
-
},
|
|
347
|
-
|
|
348
|
-
topics(){
|
|
349
|
-
if(!Array.isArray(this.item.props.topics))
|
|
350
|
-
this.item.props.topics = []
|
|
351
|
-
|
|
352
|
-
return this.item.props.topics
|
|
353
|
-
},
|
|
354
|
-
|
|
355
|
-
utm(){
|
|
356
|
-
if(!this.item.props.utm || typeof this.item.props.utm !== 'object')
|
|
357
|
-
this.item.props.utm = {}
|
|
358
|
-
return this.item.props.utm
|
|
359
|
-
},
|
|
360
|
-
|
|
361
|
-
},
|
|
362
|
-
|
|
363
|
-
data(){
|
|
364
|
-
return {
|
|
365
|
-
fields: [
|
|
366
|
-
{ type:'name', label:'Nama' },
|
|
367
|
-
{ type:'mobileNumber', label:'Nomor HP' },
|
|
368
|
-
{ type:'email', label:'Email' },
|
|
369
|
-
{ type:'topic', label:'Topik', _edit:'topicModal', items:[] },
|
|
370
|
-
{ type:'remark', label:'Pertanyaan' },
|
|
371
|
-
{ type:'referralCode', label:'Kode Referral (optional)' },
|
|
372
|
-
]
|
|
373
|
-
}
|
|
374
|
-
},
|
|
375
|
-
|
|
376
|
-
methods: {
|
|
377
|
-
|
|
378
|
-
addField(type){
|
|
379
|
-
this.item.props.fields.push({ type })
|
|
380
|
-
this.$emit('change')
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
</script>
|
|
388
|
-
|
|
389
|
-
<style module>
|
|
390
|
-
|
|
391
|
-
.comp{
|
|
392
|
-
@apply flex flex-col divide-y divide-border-50;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
</style>
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.comp">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<div>
|
|
6
|
-
<div class="flex flex-row gap-4 items-center cursor-pointer">
|
|
7
|
-
<strong class="flex-1 text-text-400">Countdown</strong>
|
|
8
|
-
</div>
|
|
9
|
-
<div class="h-[1px] bg-text-100 mt-2 mb-4"></div>
|
|
10
|
-
<div class="flex flex-col gap-4">
|
|
11
|
-
|
|
12
|
-
<div>
|
|
13
|
-
<label class="text-text-400">End Date</label>
|
|
14
|
-
<Datepicker mode="popup" v-model="item.props.value" />
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
<div>
|
|
18
|
-
<label class="text-text-400">Mode</label>
|
|
19
|
-
<Dropdown v-model="item.props.mode">
|
|
20
|
-
<option disabled selected>Choose Mode</option>
|
|
21
|
-
<option value="4">Day</option>
|
|
22
|
-
<option value="3">Hour</option>
|
|
23
|
-
<option value="2">Minute</option>
|
|
24
|
-
<option value="1">Second</option>
|
|
25
|
-
</Dropdown>
|
|
26
|
-
</div>
|
|
27
|
-
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<ComponentSetting2 :item="item"
|
|
32
|
-
:view-type="viewType"
|
|
33
|
-
:view-types="viewTypes"
|
|
34
|
-
default-display="block"
|
|
35
|
-
@change="$emit('change')" />
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<script>
|
|
40
|
-
|
|
41
|
-
export default{
|
|
42
|
-
|
|
43
|
-
emits: [ 'save' ],
|
|
44
|
-
|
|
45
|
-
inject: [ 'socketEmit2' ],
|
|
46
|
-
|
|
47
|
-
methods: {
|
|
48
|
-
|
|
49
|
-
save(){
|
|
50
|
-
this.$emit('save')
|
|
51
|
-
this.close()
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
props: {
|
|
57
|
-
|
|
58
|
-
item: Object,
|
|
59
|
-
|
|
60
|
-
viewTypes: Array,
|
|
61
|
-
|
|
62
|
-
viewType: String
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
</script>
|
|
69
|
-
|
|
70
|
-
<style module>
|
|
71
|
-
|
|
72
|
-
.comp{
|
|
73
|
-
@apply flex flex-col gap-8;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
</style>
|