@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,514 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="styleComp">
|
|
3
|
-
<div class="border-r-[1px] border-border-50 bg-base-400">
|
|
4
|
-
|
|
5
|
-
<div class="p-6 flex flex-row">
|
|
6
|
-
<h3 class="md:flex-1">Presets</h3>
|
|
7
|
-
<button type="button" @click="addPreset" class="ml-4">
|
|
8
|
-
<svg width="21" height="21" class="fill-text-300 hover:fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M376 232H216V72c0-4.42-3.58-8-8-8h-32c-4.42 0-8 3.58-8 8v160H8c-4.42 0-8 3.58-8 8v32c0 4.42 3.58 8 8 8h160v160c0 4.42 3.58 8 8 8h32c4.42 0 8-3.58 8-8V280h160c4.42 0 8-3.58 8-8v-32c0-4.42-3.58-8-8-8z"/></svg>
|
|
9
|
-
</button>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<div class="flex-1 overflow-y-auto">
|
|
13
|
-
<div v-for="(preset, idx) in config.presets"
|
|
14
|
-
class="p-2 py-4 md:py-2 flex flex-row gap-2 px-4 items-center hover:bg-primary-50 cursor-pointer"
|
|
15
|
-
:class="config.presetIdx === idx ? 'bg-primary-100' : ''">
|
|
16
|
-
<div @click="config.presetIdx = idx" class="flex-1 p-1 overflow-x-hidden whitespace-nowrap text-ellipsis">
|
|
17
|
-
<label>{{ preset.name }}</label>
|
|
18
|
-
</div>
|
|
19
|
-
<button type="button" @click="$refs.presetMenu.open($event.target, { idx })">
|
|
20
|
-
<svg width="16" height="16" class="fill-text-300 hover:fill-primary-500 pointer-events-none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M304 256c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48zm120-48c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm-336 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z"/></svg>
|
|
21
|
-
</button>
|
|
22
|
-
<button type="button" class="hidden px-2" v-if="config.presets.length > 1" @click="removePreset(idx)">
|
|
23
|
-
<svg width="16" height="16" viewBox="0 0 24 24" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg">
|
|
24
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 10.25C10.4142 10.25 10.75 10.5858 10.75 11V16C10.75 16.4142 10.4142 16.75 10 16.75C9.58579 16.75 9.25 16.4142 9.25 16V11C9.25 10.5858 9.58579 10.25 10 10.25Z"/>
|
|
25
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 10.25C14.4142 10.25 14.75 10.5858 14.75 11V16C14.75 16.4142 14.4142 16.75 14 16.75C13.5858 16.75 13.25 16.4142 13.25 16V11C13.25 10.5858 13.5858 10.25 14 10.25Z"/>
|
|
26
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 2.25C8.48122 2.25 7.25 3.48122 7.25 5V5.25H3C2.58579 5.25 2.25 5.58579 2.25 6C2.25 6.41421 2.58579 6.75 3 6.75H4.25V19C4.25 20.5188 5.48122 21.75 7 21.75H17C18.5188 21.75 19.75 20.5188 19.75 19V6.75H21C21.4142 6.75 21.75 6.41421 21.75 6C21.75 5.58579 21.4142 5.25 21 5.25H16.75V5C16.75 3.48122 15.5188 2.25 14 2.25H10ZM15.25 5.25V5C15.25 4.30964 14.6904 3.75 14 3.75H10C9.30964 3.75 8.75 4.30964 8.75 5V5.25H15.25ZM5.75 6.75V19C5.75 19.6904 6.30964 20.25 7 20.25H17C17.6904 20.25 18.25 19.6904 18.25 19V6.75H5.75Z"/>
|
|
27
|
-
</svg>
|
|
28
|
-
</button>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<ContextMenu ref="presetMenu">
|
|
32
|
-
<template #default="{ context }">
|
|
33
|
-
<div class="p-3 flex flex-col">
|
|
34
|
-
<button type="button"
|
|
35
|
-
@click="detailMode = true"
|
|
36
|
-
class="md:hidden w-full text-left p-2 px-3 hover:bg-text-50 rounded-lg">
|
|
37
|
-
Open
|
|
38
|
-
</button>
|
|
39
|
-
<button type="button"
|
|
40
|
-
@click="duplicatePreset(context.idx)"
|
|
41
|
-
class="w-full text-left p-2 px-3 hover:bg-text-50 rounded-lg">
|
|
42
|
-
Duplicate
|
|
43
|
-
</button>
|
|
44
|
-
<button type="button" v-if="config.presets.length > 1"
|
|
45
|
-
@click="removePreset(context.idx)"
|
|
46
|
-
class="w-full text-left p-2 px-3 hover:bg-text-50 rounded-lg">
|
|
47
|
-
Remove
|
|
48
|
-
</button>
|
|
49
|
-
</div>
|
|
50
|
-
</template>
|
|
51
|
-
</ContextMenu>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<div>
|
|
57
|
-
<div class="p-6 pb-0">
|
|
58
|
-
<div class="flex flex-row items-center gap-4 mb-3">
|
|
59
|
-
<button type="button" class="md:hidden" @click="detailMode = false">
|
|
60
|
-
<svg width="19" height="19" class="fill-text-300 hover:fill-primary-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48H48C21.49 32 0 53.49 0 80zm472 224H197.333v-96H472v96zm0 40v84c0 6.627-5.373 12-12 12H197.333v-96H472zM40 208h117.333v96H40v-96zm157.333-40V72H460c6.627 0 12 5.373 12 12v84H197.333zm-40-96v96H40V84c0-6.627 5.373-12 12-12h105.333zM40 344h117.333v96H52c-6.627 0-12-5.373-12-12v-84z"/></svg>
|
|
61
|
-
</button>
|
|
62
|
-
<div class="flex-1 flex flex-row items-center gap-2">
|
|
63
|
-
<input ref="title" class="flex-1 text-xl bg-transparent outline-none" :value="preset.name" maxlength="30"
|
|
64
|
-
@blur="preset.name = $event.target.value"
|
|
65
|
-
@keyup.enter="preset.name = $event.target.value" />
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<div class="flex justify-center">
|
|
70
|
-
<Tabs v-model="presetTab" :items="tabItems" @change="tabChanged"/>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<div class="flex-1 overflow-y-auto px-6 mb-6">
|
|
75
|
-
|
|
76
|
-
<div class="p-2 mt-6 flex flex-col" v-if="!presetTab || presetTab === 'column'">
|
|
77
|
-
<ListItem :items="presetColumns" @reorder="reorderColumns">
|
|
78
|
-
<template v-slot="{ item }">
|
|
79
|
-
<div class="flex flex-row items-center gap-2" :key="item">
|
|
80
|
-
<div class="cursor-move" data-reorder>
|
|
81
|
-
<svg class="fill-text-200" width="21" height="21" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
82
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 16C4 15.4477 4.44772 15 5 15H19C19.5523 15 20 15.4477 20 16C20 16.5523 19.5523 17 19 17H5C4.44772 17 4 16.5523 4 16Z"/>
|
|
83
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 8C4 7.44772 4.44772 7 5 7H19C19.5523 7 20 7.44772 20 8C20 8.55228 19.5523 9 19 9H5C4.44772 9 4 8.55228 4 8Z"/>
|
|
84
|
-
</svg>
|
|
85
|
-
</div>
|
|
86
|
-
<Checkbox v-model="item.visible" :true-value="true" :false-value="false" @change="$emit('change')">
|
|
87
|
-
{{ item.label ?? item.key }}
|
|
88
|
-
</Checkbox>
|
|
89
|
-
</div>
|
|
90
|
-
</template>
|
|
91
|
-
</ListItem>
|
|
92
|
-
</div>
|
|
93
|
-
|
|
94
|
-
<div class="flex flex-col" v-else-if="presetTab === 'filter'">
|
|
95
|
-
<div v-if="filterableColumns.length > 0">
|
|
96
|
-
<ListPage1Filter v-if="preset.filters" v-for="filter in preset.filters"
|
|
97
|
-
:filter="filter" :column="config.columns[config.columns.findIndex((_) => _.key === filter.key)]"
|
|
98
|
-
@remove="removeFilter(filter)" @change="$emit('change')"/>
|
|
99
|
-
<div class="py-8">
|
|
100
|
-
<Dropdown @change="addFilter" v-model="presetFilterSelector">
|
|
101
|
-
<option value="" disabled selected>{{ $t('Add Filter')}}</option>
|
|
102
|
-
<option v-for="column in filterableColumns" :value="column.key">{{ column.label ?? column.key }}</option>
|
|
103
|
-
</Dropdown>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
<div v-else>
|
|
107
|
-
<div class="p-6 text-center">
|
|
108
|
-
<label>Filter not available</label>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
<div class="flex flex-col" v-else-if="presetTab === 'sort'">
|
|
114
|
-
<div v-if="sortableColumns.length > 0" class="my-8">
|
|
115
|
-
<div v-for="sort in preset.sorts" class="py-4">
|
|
116
|
-
<div class="flex flex-row items-center gap-2">
|
|
117
|
-
<div class="flex-1">
|
|
118
|
-
<Dropdown v-model="sort.key" @change="$emit('change')">
|
|
119
|
-
<option value="" disabled selected>{{ $t('Add Sort') }}</option>
|
|
120
|
-
<option v-for="column in sortableColumns" :value="column.key">{{ column.label ?? column.key }}</option>
|
|
121
|
-
</Dropdown>
|
|
122
|
-
</div>
|
|
123
|
-
<div>
|
|
124
|
-
<Dropdown v-model="sort.type" @change="$emit('change')" class="w-[80px]">
|
|
125
|
-
<option value="">Asc</option>
|
|
126
|
-
<option value="desc">Desc</option>
|
|
127
|
-
</Dropdown>
|
|
128
|
-
</div>
|
|
129
|
-
<button type="button" @click="removeSort(sort)">
|
|
130
|
-
<svg width="21" height="21" class="fill-text-100 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
131
|
-
<path class="secondary" fill-rule="evenodd" d="M15.78 14.36a1 1 0 0 1-1.42 1.42l-2.82-2.83-2.83 2.83a1 1 0 1 1-1.42-1.42l2.83-2.82L7.3 8.7a1 1 0 0 1 1.42-1.42l2.83 2.83 2.82-2.83a1 1 0 0 1 1.42 1.42l-2.83 2.83 2.83 2.82z"/>
|
|
132
|
-
</svg>
|
|
133
|
-
</button>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
<div v-if="preset.sorts && preset.sorts.length > 0" class="h-[1px] my-4 bg-text-100"></div>
|
|
137
|
-
<div class="py-4">
|
|
138
|
-
<Dropdown @change="addSort" v-model="presetSortSelector">
|
|
139
|
-
<option value="" disabled selected>{{ $t('Add Sort') }}</option>
|
|
140
|
-
<option v-for="column in sortableColumns" :value="column.key">{{ column.label ?? column.key }}</option>
|
|
141
|
-
</Dropdown>
|
|
142
|
-
</div>
|
|
143
|
-
</div>
|
|
144
|
-
<div v-else>
|
|
145
|
-
<div class="p-6 text-center">
|
|
146
|
-
<label>Sort not available</label>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
|
|
151
|
-
<div class="flex flex-col gap-3 py-8" v-else-if="presetTab === 'summary'">
|
|
152
|
-
|
|
153
|
-
<div v-if="config.summaryOpenIdx === -1">
|
|
154
|
-
|
|
155
|
-
<div class="border-border-50 border-[1px] rounded-lg overflow-hidden divide-y divide-border-50">
|
|
156
|
-
<div v-for="(summary, idx) in preset.summaries">
|
|
157
|
-
<div class="flex flex-row items-center gap-3 px-2">
|
|
158
|
-
<div class="p-2">
|
|
159
|
-
<Checkbox :value="summary.enabled" @change="selectSummary(idx)" />
|
|
160
|
-
</div>
|
|
161
|
-
<div class="flex-1" @click="config.summaryOpenIdx = idx">
|
|
162
|
-
<label>{{ summary.title }}</label>
|
|
163
|
-
</div>
|
|
164
|
-
<button type="button" class="px-2" v-if="preset.summaries.length > 1" @click="removeSummary(summary)">
|
|
165
|
-
<svg width="16" height="16" viewBox="0 0 24 24" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg">
|
|
166
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 10.25C10.4142 10.25 10.75 10.5858 10.75 11V16C10.75 16.4142 10.4142 16.75 10 16.75C9.58579 16.75 9.25 16.4142 9.25 16V11C9.25 10.5858 9.58579 10.25 10 10.25Z"/>
|
|
167
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 10.25C14.4142 10.25 14.75 10.5858 14.75 11V16C14.75 16.4142 14.4142 16.75 14 16.75C13.5858 16.75 13.25 16.4142 13.25 16V11C13.25 10.5858 13.5858 10.25 14 10.25Z"/>
|
|
168
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 2.25C8.48122 2.25 7.25 3.48122 7.25 5V5.25H3C2.58579 5.25 2.25 5.58579 2.25 6C2.25 6.41421 2.58579 6.75 3 6.75H4.25V19C4.25 20.5188 5.48122 21.75 7 21.75H17C18.5188 21.75 19.75 20.5188 19.75 19V6.75H21C21.4142 6.75 21.75 6.41421 21.75 6C21.75 5.58579 21.4142 5.25 21 5.25H16.75V5C16.75 3.48122 15.5188 2.25 14 2.25H10ZM15.25 5.25V5C15.25 4.30964 14.6904 3.75 14 3.75H10C9.30964 3.75 8.75 4.30964 8.75 5V5.25H15.25ZM5.75 6.75V19C5.75 19.6904 6.30964 20.25 7 20.25H17C17.6904 20.25 18.25 19.6904 18.25 19V6.75H5.75Z"/>
|
|
169
|
-
</svg>
|
|
170
|
-
</button>
|
|
171
|
-
</div>
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
|
-
|
|
175
|
-
<div class="p-2 text-center">
|
|
176
|
-
<button type="button" @click="addSummary">
|
|
177
|
-
<svg width="21" height="21" viewBox="0 0 24 24" class="fill-text-300 hover:fill-primary" xmlns="http://www.w3.org/2000/svg">
|
|
178
|
-
<path d="M12.75 5C12.75 4.58579 12.4142 4.25 12 4.25C11.5858 4.25 11.25 4.58579 11.25 5V11.25H5C4.58579 11.25 4.25 11.5858 4.25 12C4.25 12.4142 4.58579 12.75 5 12.75H11.25V19C11.25 19.4142 11.5858 19.75 12 19.75C12.4142 19.75 12.75 19.4142 12.75 19V12.75H19C19.4142 12.75 19.75 12.4142 19.75 12C19.75 11.5858 19.4142 11.25 19 11.25H12.75V5Z"/>
|
|
179
|
-
</svg>
|
|
180
|
-
</button>
|
|
181
|
-
</div>
|
|
182
|
-
</div>
|
|
183
|
-
|
|
184
|
-
<div v-if="config.summaryOpenIdx > -1">
|
|
185
|
-
|
|
186
|
-
<div class="flex flex-row items-center p-3 py-1">
|
|
187
|
-
<label class="text-text-400 flex-1">Enabled</label>
|
|
188
|
-
<Checkbox v-model="openedPresetSummary.enabled"/>
|
|
189
|
-
</div>
|
|
190
|
-
|
|
191
|
-
<div class="h-[1px] bg-text-50 my-1"></div>
|
|
192
|
-
|
|
193
|
-
<div class="flex flex-row items-center p-3 py-1">
|
|
194
|
-
<label class="text-text-400 flex-1">{{ $t('Title') }}</label>
|
|
195
|
-
<Textbox v-model="openedPresetSummary.title" class="mt-1" />
|
|
196
|
-
</div>
|
|
197
|
-
|
|
198
|
-
<div class="h-[1px] bg-text-50 my-1"></div>
|
|
199
|
-
|
|
200
|
-
<div class="flex flex-row items-center p-3 py-1">
|
|
201
|
-
<label class="text-text-400 flex-1">Hide Details</label>
|
|
202
|
-
<Checkbox v-model="openedPresetSummary.hideDetails"/>
|
|
203
|
-
</div>
|
|
204
|
-
|
|
205
|
-
<div class="h-[1px] bg-text-50 my-1"></div>
|
|
206
|
-
|
|
207
|
-
<div class="p-3">
|
|
208
|
-
<label class="text-text-400 flex-1">Type</label>
|
|
209
|
-
<div class="mt-2">
|
|
210
|
-
<Dropdown v-model="openedPresetSummary.mode" class="flex-1">
|
|
211
|
-
<option value="table">{{ $t('Table') }}</option>
|
|
212
|
-
<option value="bar">{{ $t('Bar Chart') }}</option>
|
|
213
|
-
<option value="liveBar">{{ $t('Live Bar Chart') }}</option>
|
|
214
|
-
<option value="line">{{ $t('Line Chart') }}</option>
|
|
215
|
-
<option value="map">{{ $t('Maps') }}</option>
|
|
216
|
-
</Dropdown>
|
|
217
|
-
</div>
|
|
218
|
-
<div v-if="[ 'bar', 'line' ].includes(openedPresetSummary.mode)" class="mt-1">
|
|
219
|
-
<Checkbox v-model="openedPresetSummary.hideLegends">Hide Legend</Checkbox>
|
|
220
|
-
</div>
|
|
221
|
-
</div>
|
|
222
|
-
|
|
223
|
-
<ListViewTableSummary v-if="openedPresetSummary.mode === 'table'"
|
|
224
|
-
:summary="openedPresetSummary" />
|
|
225
|
-
|
|
226
|
-
<ListViewBarSummary v-else-if="openedPresetSummary.mode === 'bar'"
|
|
227
|
-
:summary="openedPresetSummary" :columns="filterableColumns" />
|
|
228
|
-
|
|
229
|
-
<ListViewLiveBarSummary v-else-if="openedPresetSummary.mode === 'liveBar'"
|
|
230
|
-
:summary="openedPresetSummary" :columns="filterableColumns" />
|
|
231
|
-
|
|
232
|
-
<ListViewLineSummary v-else-if="openedPresetSummary.mode === 'line'"
|
|
233
|
-
:summary="openedPresetSummary" :columns="filterableColumns" />
|
|
234
|
-
|
|
235
|
-
<ListViewMapSummary v-else-if="openedPresetSummary.mode === 'map'"
|
|
236
|
-
:summary="openedPresetSummary" :columns="filterableColumns" />
|
|
237
|
-
|
|
238
|
-
<div class="p-3 mt-8">
|
|
239
|
-
<Button class="w-[80px]" variant="secondary" @click="config.summaryOpenIdx = -1">OK</Button>
|
|
240
|
-
</div>
|
|
241
|
-
|
|
242
|
-
</div>
|
|
243
|
-
|
|
244
|
-
</div>
|
|
245
|
-
|
|
246
|
-
</div>
|
|
247
|
-
</div>
|
|
248
|
-
</div>
|
|
249
|
-
</template>
|
|
250
|
-
|
|
251
|
-
<script>
|
|
252
|
-
|
|
253
|
-
export default{
|
|
254
|
-
|
|
255
|
-
emits: [ 'change' ],
|
|
256
|
-
|
|
257
|
-
props: {
|
|
258
|
-
config: Object
|
|
259
|
-
},
|
|
260
|
-
|
|
261
|
-
methods: {
|
|
262
|
-
|
|
263
|
-
addPreset(){
|
|
264
|
-
this.config.presets.push({
|
|
265
|
-
name: "Untitled",
|
|
266
|
-
columns: []
|
|
267
|
-
})
|
|
268
|
-
},
|
|
269
|
-
|
|
270
|
-
removePreset(index){
|
|
271
|
-
if(this.config.presets.length <= 1) return
|
|
272
|
-
this.config.presets.splice(index, 1)
|
|
273
|
-
this.config.presetIdx = this.config.presets[index] ? index : this.config.presets.length - 1
|
|
274
|
-
},
|
|
275
|
-
|
|
276
|
-
duplicatePreset(index){
|
|
277
|
-
this.config.presets.push(JSON.parse(JSON.stringify(this.config.presets[index])))
|
|
278
|
-
this.config.presetIdx = this.config.presets.length - 1
|
|
279
|
-
},
|
|
280
|
-
|
|
281
|
-
addFilter(key){
|
|
282
|
-
|
|
283
|
-
const column = this.presetColumns.find((_) => _.key === key)
|
|
284
|
-
|
|
285
|
-
if(!this.preset.filters){
|
|
286
|
-
this.preset.filters = []
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
let filters = [{}]
|
|
290
|
-
switch(column.type){
|
|
291
|
-
case 'date':
|
|
292
|
-
case 'enum':
|
|
293
|
-
filters = [{ value:[] }]
|
|
294
|
-
break
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
this.preset.filters.push({
|
|
298
|
-
enabled: true,
|
|
299
|
-
key: column.key,
|
|
300
|
-
label: column.label,
|
|
301
|
-
type: column.type,
|
|
302
|
-
typeParams: column.typeParams,
|
|
303
|
-
filters
|
|
304
|
-
})
|
|
305
|
-
|
|
306
|
-
this.presetFilterSelector = null
|
|
307
|
-
},
|
|
308
|
-
|
|
309
|
-
addSort(key){
|
|
310
|
-
|
|
311
|
-
const column = this.preset.columns.filter((_) => _.key === key).pop()
|
|
312
|
-
|
|
313
|
-
if(!this.preset.sorts){
|
|
314
|
-
this.preset.sorts = []
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
this.preset.sorts.push({
|
|
318
|
-
key: column.key,
|
|
319
|
-
label: column.label
|
|
320
|
-
})
|
|
321
|
-
|
|
322
|
-
this.presetSortSelector = null
|
|
323
|
-
|
|
324
|
-
this.$emit('change')
|
|
325
|
-
},
|
|
326
|
-
|
|
327
|
-
removeFilter(filter){
|
|
328
|
-
this.preset.filters.splice(this.preset.filters.indexOf(filter), 1)
|
|
329
|
-
this.$emit('change')
|
|
330
|
-
},
|
|
331
|
-
|
|
332
|
-
removeSort(sort){
|
|
333
|
-
this.preset.sorts.splice(this.preset.sorts.indexOf(sort), 1)
|
|
334
|
-
this.$emit('change')
|
|
335
|
-
},
|
|
336
|
-
|
|
337
|
-
reorderColumns(from, to){
|
|
338
|
-
this.preset.columns.splice(to, 0, this.preset.columns.splice(from, 1)[0])
|
|
339
|
-
},
|
|
340
|
-
|
|
341
|
-
selectPreset(preset){
|
|
342
|
-
this.config.presetIdx = this.config.presets.findIndex((_) => _ === preset)
|
|
343
|
-
this.$emit('change')
|
|
344
|
-
},
|
|
345
|
-
|
|
346
|
-
tabChanged(value){
|
|
347
|
-
if(value === 'summary'){
|
|
348
|
-
this.config.summaryOpenIdx = -1
|
|
349
|
-
}
|
|
350
|
-
},
|
|
351
|
-
|
|
352
|
-
addSummary(){
|
|
353
|
-
|
|
354
|
-
if(!this.preset.summaries)
|
|
355
|
-
this.preset.summaries = []
|
|
356
|
-
|
|
357
|
-
this.preset.summaries.push({
|
|
358
|
-
title: "New Summary",
|
|
359
|
-
table: { rows: [{}], columns:[{}], values:[{}] },
|
|
360
|
-
bar: { rows: [{}], columns:[{}], values:[{}] },
|
|
361
|
-
line: { rows: [{}], columns:[{}], values:[{}] },
|
|
362
|
-
map: {}
|
|
363
|
-
})
|
|
364
|
-
|
|
365
|
-
this.configs.summaryOpenIdx = this.preset.summaries.length - 1
|
|
366
|
-
},
|
|
367
|
-
|
|
368
|
-
selectSummary(idx){
|
|
369
|
-
for(let i in this.preset.summaries){
|
|
370
|
-
this.preset.summaries[i].enabled = parseInt(i) === idx
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
},
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
inject: [],
|
|
378
|
-
|
|
379
|
-
computed: {
|
|
380
|
-
|
|
381
|
-
styleComp(){
|
|
382
|
-
return [
|
|
383
|
-
this.$style.comp,
|
|
384
|
-
this.$style['comp-' + this.mediaPrefix],
|
|
385
|
-
this.detailMode ? this.$style['detailMode'] : ''
|
|
386
|
-
]
|
|
387
|
-
.join(' ')
|
|
388
|
-
},
|
|
389
|
-
|
|
390
|
-
filterableColumns(){
|
|
391
|
-
return Object.values(this.config.columns).filter((_) => _.filterable)
|
|
392
|
-
},
|
|
393
|
-
|
|
394
|
-
sortableColumns(){
|
|
395
|
-
return Object.values(this.config.columns).filter((_) => _.sortable)
|
|
396
|
-
},
|
|
397
|
-
|
|
398
|
-
preset(){
|
|
399
|
-
return this.config.presets[this.config.presetIdx] ?? {}
|
|
400
|
-
},
|
|
401
|
-
|
|
402
|
-
presetColumns(){
|
|
403
|
-
if(!this.preset.columns) return []
|
|
404
|
-
|
|
405
|
-
const presetColumns = {}
|
|
406
|
-
this.preset.columns.forEach((column, _index) => {
|
|
407
|
-
presetColumns[column.key] = {
|
|
408
|
-
...column,
|
|
409
|
-
_index
|
|
410
|
-
}
|
|
411
|
-
})
|
|
412
|
-
|
|
413
|
-
this.preset.columns = this.config.columns.map((column, index) => {
|
|
414
|
-
const _sort = {
|
|
415
|
-
index: presetColumns[column.key] ? presetColumns[column.key]._index : index,
|
|
416
|
-
isUser: !!presetColumns[column.key]
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
return {
|
|
420
|
-
...column,
|
|
421
|
-
...(presetColumns[column.key] ?? {}),
|
|
422
|
-
_sort
|
|
423
|
-
}
|
|
424
|
-
})
|
|
425
|
-
.sort((a, b) => {
|
|
426
|
-
if(a._sort.index < b._sort.index) return -1
|
|
427
|
-
if(a._sort.index > b._sort.index) return 1
|
|
428
|
-
return a._sort.isUser ? 1 : -1
|
|
429
|
-
})
|
|
430
|
-
.map((column) => {
|
|
431
|
-
delete column._sort
|
|
432
|
-
delete column._index
|
|
433
|
-
return column
|
|
434
|
-
})
|
|
435
|
-
|
|
436
|
-
return this.preset.columns
|
|
437
|
-
},
|
|
438
|
-
|
|
439
|
-
presetAppearances(){
|
|
440
|
-
return this.preset.appearances ?? {}
|
|
441
|
-
},
|
|
442
|
-
|
|
443
|
-
presetSortedColumns(){
|
|
444
|
-
const c = {};
|
|
445
|
-
(this.preset.sorts ?? []).forEach((_) => c[_.key] = _.type);
|
|
446
|
-
return c
|
|
447
|
-
},
|
|
448
|
-
|
|
449
|
-
presetCurrentFilters(){
|
|
450
|
-
if(!this.preset.filters) return []
|
|
451
|
-
return this.preset.filters.filter((_) => _.key === this.selectedColumn)
|
|
452
|
-
},
|
|
453
|
-
|
|
454
|
-
openedPresetSummary(){
|
|
455
|
-
return ((this.preset ?? {}).summaries ?? [])[this.config.summaryOpenIdx] ?? undefined
|
|
456
|
-
},
|
|
457
|
-
|
|
458
|
-
},
|
|
459
|
-
|
|
460
|
-
data(){
|
|
461
|
-
return {
|
|
462
|
-
tabItems: [
|
|
463
|
-
{ text:'Columns', value:'column' },
|
|
464
|
-
{ text:'Filters', value:'filter' },
|
|
465
|
-
{ text:'Sorts', value:'sort' },
|
|
466
|
-
{ text:'Summary', value:'summary' },
|
|
467
|
-
],
|
|
468
|
-
presetFilterSelector: null,
|
|
469
|
-
presetSortSelector: null,
|
|
470
|
-
mediaPrefix: null,
|
|
471
|
-
detailMode: false,
|
|
472
|
-
presetTab: 'column'
|
|
473
|
-
}
|
|
474
|
-
},
|
|
475
|
-
|
|
476
|
-
mounted() {
|
|
477
|
-
this.mediaPrefix = this.$el.clientWidth <= 480 ? 'sm' : 'md'
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
</script>
|
|
483
|
-
|
|
484
|
-
<style module>
|
|
485
|
-
|
|
486
|
-
.comp{
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
.comp-sm{
|
|
490
|
-
}
|
|
491
|
-
.comp-sm>*:first-child{
|
|
492
|
-
|
|
493
|
-
}
|
|
494
|
-
.comp-sm>*:last-child{
|
|
495
|
-
@apply hidden;
|
|
496
|
-
}
|
|
497
|
-
.comp-sm.detailMode>*:first-child{
|
|
498
|
-
@apply hidden;
|
|
499
|
-
}
|
|
500
|
-
.comp-sm.detailMode>*:last-child{
|
|
501
|
-
@apply block;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
.comp-md{
|
|
505
|
-
@apply flex flex-row gap-4;
|
|
506
|
-
}
|
|
507
|
-
.comp-md>*:first-child{
|
|
508
|
-
@apply w-[200px] flex flex-col;
|
|
509
|
-
}
|
|
510
|
-
.comp-md>*:last-child{
|
|
511
|
-
@apply flex-1 flex flex-col;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
</style>
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.comp">
|
|
3
|
-
|
|
4
|
-
<div class="p-3">
|
|
5
|
-
<label class="text-text-400 flex-1">{{ $t('Row') }}</label>
|
|
6
|
-
<div class="flex flex-row mt-2 gap-2">
|
|
7
|
-
<Dropdown v-model="summary.table.rows[0].key" class="flex-1">
|
|
8
|
-
<option value="" disabled selected>{{ $t('Add Column') }}</option>
|
|
9
|
-
<option v-for="column in filterableColumns" :value="column.key">{{ column.label ?? column.key }}</option>
|
|
10
|
-
</Dropdown>
|
|
11
|
-
<Dropdown v-model="summary.table.rows[0].format" class="w-[100px]">
|
|
12
|
-
<option value="">{{ $t('Default') }}</option>
|
|
13
|
-
<option value="date">{{ $t('Date') }}</option>
|
|
14
|
-
<option value="month">{{ $t('Month') }}</option>
|
|
15
|
-
<option value="quarter">{{ $t('Quarterly') }}</option>
|
|
16
|
-
<option value="year">{{ $t('Year') }}</option>
|
|
17
|
-
</Dropdown>
|
|
18
|
-
</div>
|
|
19
|
-
<Checkbox class="mt-2" v-model="summary.table.showRowTotal">
|
|
20
|
-
Row Total
|
|
21
|
-
</Checkbox>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<div class="p-3">
|
|
25
|
-
<label class="text-text-400 flex-1">{{$t('Column') }}</label>
|
|
26
|
-
<div>
|
|
27
|
-
<Dropdown v-model="summary.table.columns[0].key" class="flex-1">
|
|
28
|
-
<option value="" disabled selected>{{ $t('Add Column') }}</option>
|
|
29
|
-
<option value="(none)">{{ $t('(None)') }}</option>
|
|
30
|
-
<option v-for="column in filterableColumns" :value="column.key">{{ column.label ?? column.key }}</option>
|
|
31
|
-
</Dropdown>
|
|
32
|
-
</div>
|
|
33
|
-
<Checkbox class="mt-2" v-model="summary.table.showColumnTotal">
|
|
34
|
-
Column Total
|
|
35
|
-
</Checkbox>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
<div class="p-3">
|
|
39
|
-
<label class="text-text-400 flex-1">Values</label>
|
|
40
|
-
<div class="flex flex-row mt-2 gap-2">
|
|
41
|
-
<Dropdown v-model="summary.table.values[0].aggregrate" class="flex-1">
|
|
42
|
-
<option value="" disabled selected>{{ $t('Select') }}</option>
|
|
43
|
-
<option value="count">{{ $t('Count') }}</option>
|
|
44
|
-
<option value="max">{{ $t('Max') }}</option>
|
|
45
|
-
<option value="min">{{ $t('Min') }}</option>
|
|
46
|
-
<option value="avg">{{ $t('Avg') }}</option>
|
|
47
|
-
</Dropdown>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
</div>
|
|
52
|
-
</template>
|
|
53
|
-
|
|
54
|
-
<script>
|
|
55
|
-
|
|
56
|
-
export default{
|
|
57
|
-
|
|
58
|
-
props: {
|
|
59
|
-
|
|
60
|
-
summary: {
|
|
61
|
-
type: Object,
|
|
62
|
-
required: true
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
</script>
|
|
70
|
-
|
|
71
|
-
<style module>
|
|
72
|
-
|
|
73
|
-
.comp{
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
</style>
|