@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,221 +1,163 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="$style.comp">
|
|
3
3
|
|
|
4
|
-
<div class="
|
|
5
|
-
<Tabs :items="tabItems" v-model="value.tabIndex" />
|
|
6
|
-
</div>
|
|
7
|
-
|
|
8
|
-
<div class="flex-1 overflow-y-auto flex flex-col">
|
|
9
|
-
<div v-if="value.tabIndex === 1" class="flex-1 flex flex-col gap-5 p-6">
|
|
10
|
-
|
|
11
|
-
<div class="flex flex-row items-center ">
|
|
12
|
-
<label class="flex-1">Active</label>
|
|
13
|
-
<Switch v-model="value.props.enabled" :readonly="readonly" />
|
|
14
|
-
</div>
|
|
4
|
+
<div class="p-5 flex flex-col gap-5">
|
|
15
5
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<
|
|
6
|
+
<div>
|
|
7
|
+
<div class="flex flex-row">
|
|
8
|
+
<label class="text-text-400 flex-1">Datasource</label>
|
|
9
|
+
<button type="button" class="text-primary" @click="dummyDatasource">Add</button>
|
|
19
10
|
</div>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
v-model="value.props.datasourceUid">
|
|
27
|
-
<option v-for="_datasource in datasource"
|
|
28
|
-
:value="_datasource.uid">
|
|
29
|
-
{{ _datasource.name }}
|
|
30
|
-
</option>
|
|
31
|
-
</Dropdown>
|
|
11
|
+
<div class="mt-2">
|
|
12
|
+
<div class="p-3 bg-base-500 flex flex-row gap-3">
|
|
13
|
+
<div class="flex-1">{{ datasource ? datasource.name : 'No datasource selected' }}</div>
|
|
14
|
+
<button v-if="datasource" type="button" @click="clear">
|
|
15
|
+
<svg width="14" height="14" class="fill-text-300 hover:fill-red-600" 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 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>
|
|
16
|
+
</button>
|
|
32
17
|
</div>
|
|
33
18
|
</div>
|
|
34
|
-
|
|
35
19
|
</div>
|
|
36
20
|
|
|
37
|
-
<div
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<
|
|
41
|
-
<template #start>
|
|
42
|
-
<div class="pl-3">
|
|
43
|
-
<svg width="14" height="14" class="fill-text-300" 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="M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z"/></svg>
|
|
44
|
-
</div>
|
|
45
|
-
</template>
|
|
46
|
-
</Textbox>
|
|
21
|
+
<div>
|
|
22
|
+
<div class="flex flex-row">
|
|
23
|
+
<label class="text-text-400 flex-1">Columns</label>
|
|
24
|
+
<button type="button" class="text-primary" @click="dummyColumns">Add</button>
|
|
47
25
|
</div>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<Checkbox v-model="item.visible" default="true" :disabled="readonly" />
|
|
26
|
+
<ListItem :items="item.props.columns"
|
|
27
|
+
class="mt-2"
|
|
28
|
+
@reorder="(from, to) => { item.props.columns.splice(to, 0, item.props.columns.splice(from, 1)[0]); }">
|
|
29
|
+
<template v-slot="{ item }">
|
|
30
|
+
<div class="flex flex-row items-center gap-3 p-3 bg-base-500 hover:bg-text-50">
|
|
31
|
+
<div data-reorder>
|
|
32
|
+
<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>
|
|
56
33
|
</div>
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<div
|
|
61
|
-
<button type="button" @click="
|
|
62
|
-
<svg width="
|
|
63
|
-
</button>
|
|
64
|
-
<button type="button" @click="moveDown(item)">
|
|
65
|
-
<svg width="11" height="11" class="fill-text-300 hover:fill-primary" 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>
|
|
34
|
+
<div class="flex-1">
|
|
35
|
+
{{ item.label ?? item.key }}
|
|
36
|
+
</div>
|
|
37
|
+
<div>
|
|
38
|
+
<button type="button" @click="">
|
|
39
|
+
<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>
|
|
66
40
|
</button>
|
|
67
41
|
</div>
|
|
68
42
|
</div>
|
|
69
43
|
</template>
|
|
70
|
-
</
|
|
71
|
-
|
|
44
|
+
</ListItem>
|
|
72
45
|
</div>
|
|
46
|
+
|
|
73
47
|
</div>
|
|
74
48
|
|
|
75
|
-
|
|
49
|
+
</div>
|
|
76
50
|
</template>
|
|
77
51
|
|
|
78
|
-
<script>
|
|
79
|
-
|
|
80
|
-
import WebPagePropertySelector from "../WebPageBuilder4/WebPagePropertySelector.vue";
|
|
81
|
-
import {defineAsyncComponent} from "vue";
|
|
82
|
-
import InteractionEdit from "./InteractionEdit.vue";
|
|
83
|
-
|
|
84
|
-
export default{
|
|
85
|
-
components: {
|
|
86
|
-
InteractionEdit,
|
|
87
|
-
HeightSetting: defineAsyncComponent(() => import('../WebPageBuilder4/HeightSetting.vue')),
|
|
88
|
-
WebPagePropertySelector
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
computed: {
|
|
92
|
-
|
|
93
|
-
interactions(){
|
|
94
|
-
if(!Array.isArray(this.value.props.interactions))
|
|
95
|
-
this.value.props.interactions = []
|
|
96
|
-
return this.value.props.interactions
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
selectedDatasource(){
|
|
100
|
-
return this.datasource.find(d => d.uid === this.value.props.datasourceUid)
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
definedProperties(){
|
|
104
|
-
const settings = []
|
|
105
|
-
|
|
106
|
-
for(let key in this.properties){
|
|
107
|
-
if(key in this.value.props){
|
|
108
|
-
settings.push(this.properties[key])
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
return settings
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
tabItems(){
|
|
116
|
-
return [
|
|
117
|
-
{ text:'General', value:1 },
|
|
118
|
-
this.value.props.datasourceUid ? { text:'Columns', value:2 } : null,
|
|
119
|
-
]
|
|
120
|
-
.filter(_ => _)
|
|
121
|
-
},
|
|
52
|
+
<script setup>
|
|
122
53
|
|
|
123
|
-
|
|
124
|
-
const searches = this.search.toLowerCase().split(' ').filter(_ => _.length > 2)
|
|
125
|
-
return (this.value.props.datasourceColumns ?? []).filter(_ => {
|
|
126
|
-
return !_.key.startsWith('_') &&
|
|
127
|
-
(searches.length < 1 || searches.every(search => _.label.toLowerCase().includes(search)))
|
|
128
|
-
})
|
|
129
|
-
},
|
|
54
|
+
import {computed, inject} from "vue";
|
|
130
55
|
|
|
131
|
-
|
|
56
|
+
const { item } = defineProps({
|
|
132
57
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
'height': { component:"HeightSetting", text:'Height', group:'Layout' }
|
|
137
|
-
},
|
|
138
|
-
search: ''
|
|
139
|
-
}
|
|
58
|
+
item: {
|
|
59
|
+
type: Object,
|
|
60
|
+
required: true
|
|
140
61
|
},
|
|
141
62
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
inject: [ 'uploadImage', 'viewTypes' ],
|
|
63
|
+
viewType: String,
|
|
145
64
|
|
|
146
|
-
|
|
65
|
+
viewIndex: Number,
|
|
147
66
|
|
|
148
|
-
|
|
67
|
+
viewTypes: Array,
|
|
149
68
|
|
|
150
|
-
|
|
69
|
+
})
|
|
151
70
|
|
|
152
|
-
|
|
71
|
+
const getPresetDatasource = inject('getPresetDatasource')
|
|
153
72
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
73
|
+
const datasource = computed(() => {
|
|
74
|
+
const datasources = getPresetDatasource()
|
|
75
|
+
return datasources[item.uid]
|
|
76
|
+
})
|
|
158
77
|
|
|
159
|
-
|
|
78
|
+
function clear(){
|
|
79
|
+
const datasources = getPresetDatasource()
|
|
80
|
+
delete datasources[item.uid]
|
|
81
|
+
}
|
|
160
82
|
|
|
161
|
-
|
|
83
|
+
function dummyColumns(){
|
|
162
84
|
|
|
163
|
-
|
|
85
|
+
item.props.columns = JSON.parse(JSON.stringify(datasource.value.columns))
|
|
164
86
|
|
|
165
|
-
|
|
166
|
-
this.$util.push(this.interactions, obj)
|
|
167
|
-
},
|
|
87
|
+
}
|
|
168
88
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
89
|
+
function dummyDatasource(){
|
|
90
|
+
|
|
91
|
+
const datasources = getPresetDatasource()
|
|
92
|
+
|
|
93
|
+
datasources[item.uid] = {
|
|
94
|
+
name: "idx_stocks_1",
|
|
95
|
+
columns: [
|
|
96
|
+
{ key:"code" },
|
|
97
|
+
{ key:"subtractHighLowClose", type:"fn", fn: {
|
|
98
|
+
name: "subtract",
|
|
99
|
+
type: "number",
|
|
100
|
+
args: ["IDXStocks.high", "IDXStocks.low", "IDXStocks.close" ]
|
|
101
|
+
}},
|
|
102
|
+
{ key:"addHighLowClose", type:"fn", fn: {
|
|
103
|
+
name: "add",
|
|
104
|
+
type: "number",
|
|
105
|
+
args: ["IDXStocks.high", "IDXStocks.low", "IDXStocks.close" ]
|
|
106
|
+
}},
|
|
107
|
+
{ key:"minHighLowClose", type:"fn", fn: {
|
|
108
|
+
name: "min",
|
|
109
|
+
type: "number",
|
|
110
|
+
args: ["IDXStocks.high", "IDXStocks.low", "IDXStocks.close" ]
|
|
111
|
+
}},
|
|
112
|
+
{ key:"maxHighLowClose", type:"fn", fn: {
|
|
113
|
+
name: "max",
|
|
114
|
+
type: "number",
|
|
115
|
+
args: ["IDXStocks.high", "IDXStocks.low", "IDXStocks.close" ]
|
|
116
|
+
}},
|
|
117
|
+
{ key:"maxCreatedAt", type:"fn", fn: {
|
|
118
|
+
name: "max",
|
|
119
|
+
type: "date",
|
|
120
|
+
args: ["IDXStocks.createdAt" ]
|
|
121
|
+
}},
|
|
122
|
+
{ key:"minCreatedAt", type:"fn", fn: {
|
|
123
|
+
name: "min",
|
|
124
|
+
type: "date",
|
|
125
|
+
args: ["IDXStocks.createdAt" ]
|
|
126
|
+
}},
|
|
127
|
+
],
|
|
128
|
+
tables: [
|
|
129
|
+
{ model:"IDXStocks" },
|
|
130
|
+
],
|
|
131
|
+
groups: [
|
|
132
|
+
{ key:"code" }
|
|
133
|
+
]
|
|
134
|
+
}
|
|
173
135
|
|
|
174
|
-
if(!this.value.tabIndex)
|
|
175
|
-
this.value.tabIndex = 1
|
|
176
|
-
},
|
|
177
136
|
|
|
178
|
-
|
|
179
|
-
this.value.props.datasourceColumns = (this.selectedDatasource.pivot?.enabled ?
|
|
180
|
-
this.selectedDatasource.pivot.columns :
|
|
181
|
-
this.selectedDatasource.columns)
|
|
182
|
-
.map((_, __) => ({
|
|
183
|
-
..._,
|
|
184
|
-
visible: __ < 10
|
|
185
|
-
}))
|
|
186
|
-
},
|
|
137
|
+
return
|
|
187
138
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
139
|
+
item.props.items = [
|
|
140
|
+
{
|
|
141
|
+
code: 'ADCP',
|
|
142
|
+
subtractHighLowClose: '-49',
|
|
143
|
+
addHighLowClose: '151',
|
|
144
|
+
minHighLowClose: '50',
|
|
145
|
+
maxHighLowClose: '51',
|
|
146
|
+
maxCreatedAt: '2025-08-22T06:20:18.000Z',
|
|
147
|
+
minCreatedAt: '2025-08-22T06:15:22.000Z',
|
|
148
|
+
id: 9
|
|
193
149
|
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
mounted() {
|
|
206
|
-
this.applyDefault()
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
watch: {
|
|
210
|
-
|
|
211
|
-
'value.props.datasourceUid'(to){
|
|
212
|
-
if(to){
|
|
213
|
-
this.generateColumns()
|
|
214
|
-
this.$emit('change')
|
|
215
|
-
}
|
|
150
|
+
{
|
|
151
|
+
code: 'ADES',
|
|
152
|
+
subtractHighLowClose: '-13150',
|
|
153
|
+
addHighLowClose: '41000',
|
|
154
|
+
minHighLowClose: '13525',
|
|
155
|
+
maxHighLowClose: '13925',
|
|
156
|
+
maxCreatedAt: '2025-08-22T06:20:18.000Z',
|
|
157
|
+
minCreatedAt: '2025-08-22T06:15:22.000Z',
|
|
158
|
+
id: 10
|
|
216
159
|
}
|
|
217
|
-
|
|
218
|
-
}
|
|
160
|
+
]
|
|
219
161
|
|
|
220
162
|
}
|
|
221
163
|
|
|
@@ -223,12 +165,7 @@ export default{
|
|
|
223
165
|
|
|
224
166
|
<style module>
|
|
225
167
|
|
|
226
|
-
.comp{
|
|
227
|
-
@apply flex-1 flex flex-col;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.columnTextbox input::placeholder{
|
|
231
|
-
@apply text-text;
|
|
168
|
+
.comp {
|
|
232
169
|
}
|
|
233
170
|
|
|
234
171
|
</style>
|