@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.
Files changed (398) hide show
  1. package/docs/components/AccountIcon.md +16 -0
  2. package/docs/components/Ahref.md +35 -0
  3. package/docs/components/Alert.md +72 -0
  4. package/docs/components/ArrayList.md +39 -0
  5. package/docs/components/Article.md +28 -0
  6. package/docs/components/BarChart.md +81 -0
  7. package/docs/components/Block.md +23 -0
  8. package/docs/components/Box.md +15 -0
  9. package/docs/components/Button.md +68 -0
  10. package/docs/components/Card.md +67 -0
  11. package/docs/components/Carousel.md +70 -0
  12. package/docs/components/Cart.md +20 -0
  13. package/docs/components/CartIcon.md +29 -0
  14. package/docs/components/Chart.md +53 -0
  15. package/docs/components/ChartBar.md +34 -0
  16. package/docs/components/ChatTyping.md +21 -0
  17. package/docs/components/Checkbox.md +63 -0
  18. package/docs/components/CodeEditor.md +25 -0
  19. package/docs/components/CollapsiblePanel.md +41 -0
  20. package/docs/components/ColorPicker.md +52 -0
  21. package/docs/components/Confirm.md +62 -0
  22. package/docs/components/ContextMenu.md +76 -0
  23. package/docs/components/ContextMenuItem.md +29 -0
  24. package/docs/components/CopyToClipboard.md +43 -0
  25. package/docs/components/Countdown.md +47 -0
  26. package/docs/components/Datepicker.md +61 -0
  27. package/docs/components/Datetimepicker.md +57 -0
  28. package/docs/components/DayTimeRange.md +20 -0
  29. package/docs/components/Dropdown.md +65 -0
  30. package/docs/components/ErrorText.md +15 -0
  31. package/docs/components/FBLogin.md +21 -0
  32. package/docs/components/Flex.md +44 -0
  33. package/docs/components/GHeatMaps.md +16 -0
  34. package/docs/components/GSignIn.md +21 -0
  35. package/docs/components/Gmaps.md +16 -0
  36. package/docs/components/GmapsDirection.md +20 -0
  37. package/docs/components/Grid.md +36 -0
  38. package/docs/components/HTMLEditor.md +26 -0
  39. package/docs/components/IconMenu.md +20 -0
  40. package/docs/components/Image.md +78 -0
  41. package/docs/components/Link.md +33 -0
  42. package/docs/components/MultiDropdown.md +46 -0
  43. package/docs/components/Radio.md +55 -0
  44. package/docs/components/Slider.md +47 -0
  45. package/docs/components/Switch.md +43 -0
  46. package/docs/components/Table.md +31 -0
  47. package/docs/components/Tabs.md +65 -0
  48. package/docs/components/Text.md +30 -0
  49. package/docs/components/Textarea.md +66 -0
  50. package/docs/components/Textbox.md +97 -0
  51. package/docs/components/Timepicker.md +62 -0
  52. package/docs/components/Toast.md +59 -0
  53. package/docs/components/Uploader.md +51 -0
  54. package/docs/components/Video.md +54 -0
  55. package/package.json +65 -2
  56. package/docs/components/Dashboard.md +0 -56
  57. package/docs/components/Header2.md +0 -16
  58. package/log.txt +0 -7
  59. package/public/assets/dashboard/bar.png +0 -0
  60. package/public/assets/dashboard/doughnut.png +0 -0
  61. package/public/assets/dashboard/metric.png +0 -0
  62. package/public/assets/dashboard/pie.png +0 -0
  63. package/public/assets/dashboard/polar-area.png +0 -0
  64. package/public/assets/dashboard/virtual-table.png +0 -0
  65. package/public/static/dashboard/bar.png +0 -0
  66. package/public/static/dashboard/doughnut.png +0 -0
  67. package/public/static/dashboard/metric.png +0 -0
  68. package/public/static/dashboard/pie.png +0 -0
  69. package/public/static/dashboard/polar-area.png +0 -0
  70. package/public/static/dashboard/virtual-table.png +0 -0
  71. package/src/components/404.vue +0 -61
  72. package/src/components/AccountIcon.vue +0 -19
  73. package/src/components/Ahref.vue +0 -200
  74. package/src/components/Alert.vue +0 -257
  75. package/src/components/ArrayList.vue +0 -49
  76. package/src/components/Article.vue +0 -387
  77. package/src/components/Block.vue +0 -31
  78. package/src/components/Box.vue +0 -34
  79. package/src/components/Button.vue +0 -258
  80. package/src/components/Card.vue +0 -257
  81. package/src/components/Carousel.vue +0 -364
  82. package/src/components/Cart.vue +0 -192
  83. package/src/components/CartIcon.vue +0 -89
  84. package/src/components/Chart.vue +0 -485
  85. package/src/components/ChartBar.vue +0 -192
  86. package/src/components/ChatTyping.vue +0 -69
  87. package/src/components/Checkbox.vue +0 -200
  88. package/src/components/Checkout.vue +0 -373
  89. package/src/components/CheckoutDelivery.vue +0 -267
  90. package/src/components/CodeEditor.vue +0 -50
  91. package/src/components/CollapsiblePanel.vue +0 -70
  92. package/src/components/ColorPicker.vue +0 -165
  93. package/src/components/ColorPicker2.vue +0 -186
  94. package/src/components/ColorPicker3.vue +0 -100
  95. package/src/components/Confirm.vue +0 -180
  96. package/src/components/ContextMenu.vue +0 -265
  97. package/src/components/ContextMenuItem.vue +0 -53
  98. package/src/components/ConversationBuilder.vue +0 -161
  99. package/src/components/CopyToClipboard.vue +0 -34
  100. package/src/components/Countdown.vue +0 -264
  101. package/src/components/DGrid.vue +0 -21
  102. package/src/components/DGridItem.vue +0 -263
  103. package/src/components/Dashboard.vue +0 -243
  104. package/src/components/Dashboard2.vue +0 -118
  105. package/src/components/DashboardComponentSelector.vue +0 -96
  106. package/src/components/DashboardConfigs.vue +0 -202
  107. package/src/components/DataList.vue +0 -92
  108. package/src/components/Datepicker.vue +0 -399
  109. package/src/components/DayTimeRange.vue +0 -126
  110. package/src/components/Dropdown.vue +0 -224
  111. package/src/components/ErrorText.vue +0 -57
  112. package/src/components/FBLogin.vue +0 -194
  113. package/src/components/Feed.vue +0 -118
  114. package/src/components/Flex.vue +0 -44
  115. package/src/components/GHeatMaps.vue +0 -317
  116. package/src/components/GSignIn.vue +0 -166
  117. package/src/components/Gmaps.vue +0 -251
  118. package/src/components/GmapsDirection.vue +0 -191
  119. package/src/components/Grid.vue +0 -35
  120. package/src/components/HTMLEditor.vue +0 -588
  121. package/src/components/IconMenu.vue +0 -95
  122. package/src/components/IconMenu2.vue +0 -89
  123. package/src/components/IconPlus.vue +0 -89
  124. package/src/components/Image.vue +0 -263
  125. package/src/components/Image360.vue +0 -140
  126. package/src/components/ImageFullScreen.vue +0 -101
  127. package/src/components/ImagePreview.vue +0 -93
  128. package/src/components/ImageUploader.vue +0 -114
  129. package/src/components/ImportModal.vue +0 -260
  130. package/src/components/Link.vue +0 -95
  131. package/src/components/List.vue +0 -1381
  132. package/src/components/ListContextMenu.vue +0 -88
  133. package/src/components/ListItem.vue +0 -160
  134. package/src/components/ListPage1.vue +0 -1401
  135. package/src/components/ListPage1Filter.vue +0 -170
  136. package/src/components/ListView.vue +0 -961
  137. package/src/components/ListViewBarSummary.vue +0 -81
  138. package/src/components/ListViewLineSummary.vue +0 -75
  139. package/src/components/ListViewLiveBarSummary.vue +0 -52
  140. package/src/components/ListViewMapSummary.vue +0 -56
  141. package/src/components/ListViewSettings.vue +0 -514
  142. package/src/components/ListViewTableSummary.vue +0 -77
  143. package/src/components/LogViewerItem.vue +0 -116
  144. package/src/components/MarkdownEdit.vue +0 -128
  145. package/src/components/MarkdownPreview.vue +0 -102
  146. package/src/components/MenuItem1.vue +0 -36
  147. package/src/components/Modal.vue +0 -456
  148. package/src/components/MultiDropdown.vue +0 -124
  149. package/src/components/MultilineText.vue +0 -174
  150. package/src/components/OTPField.vue +0 -139
  151. package/src/components/ObjectTree.vue +0 -105
  152. package/src/components/PageBuilder.vue +0 -449
  153. package/src/components/Paragraph.vue +0 -40
  154. package/src/components/PresetSelectorFilterItem.vue +0 -203
  155. package/src/components/Radio.vue +0 -109
  156. package/src/components/SearchModal.vue +0 -153
  157. package/src/components/Slider.vue +0 -317
  158. package/src/components/SplitPane.vue +0 -129
  159. package/src/components/Svg.vue +0 -33
  160. package/src/components/SvgEditor.vue +0 -173
  161. package/src/components/Switch.vue +0 -101
  162. package/src/components/TabView.vue +0 -105
  163. package/src/components/Table.vue +0 -56
  164. package/src/components/TableView.vue +0 -200
  165. package/src/components/TableViewHead.vue +0 -159
  166. package/src/components/Tabs.vue +0 -131
  167. package/src/components/Test.vue +0 -23
  168. package/src/components/Testimonial.vue +0 -86
  169. package/src/components/Text.vue +0 -34
  170. package/src/components/TextBlock.vue +0 -50
  171. package/src/components/TextEditor.vue +0 -85
  172. package/src/components/TextWithTag.vue +0 -298
  173. package/src/components/Textarea.vue +0 -184
  174. package/src/components/Textbox.vue +0 -216
  175. package/src/components/Thumbnail.vue +0 -27
  176. package/src/components/Timepicker.vue +0 -125
  177. package/src/components/Toast.vue +0 -117
  178. package/src/components/TreeMenu.vue +0 -122
  179. package/src/components/TreeView.vue +0 -106
  180. package/src/components/TreeView2.vue +0 -38
  181. package/src/components/TreeViewItem.vue +0 -453
  182. package/src/components/TreeViewItem1.vue +0 -282
  183. package/src/components/TreeViewItem2.vue +0 -55
  184. package/src/components/Uploader.vue +0 -45
  185. package/src/components/Video.vue +0 -119
  186. package/src/components/VirtualGrid.vue +0 -297
  187. package/src/components/VirtualScroll.vue +0 -282
  188. package/src/components/VirtualTable.vue +0 -956
  189. package/src/components/YoutubeVideo.vue +0 -196
  190. package/src/configs/dashboard/bar.js +0 -10
  191. package/src/configs/dashboard/collection-1.js +0 -5
  192. package/src/configs/dashboard/data-table.js +0 -9
  193. package/src/configs/dashboard/doughnut.js +0 -7
  194. package/src/configs/dashboard/gheatmaps.js +0 -9
  195. package/src/configs/dashboard/grid-2.js +0 -34
  196. package/src/configs/dashboard/grid-3.js +0 -34
  197. package/src/configs/dashboard/grid-4.js +0 -34
  198. package/src/configs/dashboard/grid.js +0 -15
  199. package/src/configs/dashboard/metric.js +0 -10
  200. package/src/configs/dashboard/pie.js +0 -7
  201. package/src/configs/dashboard/polar-area.js +0 -7
  202. package/src/configs/dashboard/virtual-table.js +0 -9
  203. package/src/configs/icons-fa.json +0 -12
  204. package/src/configs/web-page-builder.js +0 -118
  205. package/src/defs/dashboard-preset.js +0 -22
  206. package/src/directives/intersect.js +0 -26
  207. package/src/hooks/device.js +0 -14
  208. package/src/index.css +0 -3
  209. package/src/index.js +0 -648
  210. package/src/middleware/http/trim-string.js +0 -20
  211. package/src/mixin/component.js +0 -306
  212. package/src/mixin/ready-state.js +0 -37
  213. package/src/stores/components.js +0 -36
  214. package/src/stores/datasource.js +0 -11
  215. package/src/themes/default/index.js +0 -303
  216. package/src/utils/dashboard.js +0 -140
  217. package/src/utils/event-bus.js +0 -8
  218. package/src/utils/helpers.cjs +0 -635
  219. package/src/utils/helpers.js +0 -635
  220. package/src/utils/helpers.mjs +0 -722
  221. package/src/utils/importer.js +0 -209
  222. package/src/utils/list.mjs +0 -1509
  223. package/src/utils/listpage1.js +0 -1507
  224. package/src/utils/listview.js +0 -1287
  225. package/src/utils/preset-selector.cjs +0 -1455
  226. package/src/utils/preset-selector.js +0 -1452
  227. package/src/utils/preset-selector.mjs +0 -234
  228. package/src/utils/queue.js +0 -63
  229. package/src/utils/selection.js +0 -43
  230. package/src/utils/web.js +0 -50
  231. package/src/utils/web.mjs +0 -120
  232. package/src/utils/wss.js +0 -296
  233. package/src/utils/wss.mjs +0 -285
  234. package/src/widgets/AhrefSetting.vue +0 -97
  235. package/src/widgets/ArticleSetting.vue +0 -457
  236. package/src/widgets/BackgroundColorSetting.vue +0 -153
  237. package/src/widgets/BackgroundSetting.vue +0 -132
  238. package/src/widgets/BlockSetting.vue +0 -49
  239. package/src/widgets/BorderColorSetting.vue +0 -57
  240. package/src/widgets/BorderSetting.vue +0 -201
  241. package/src/widgets/BotEditor/BotEditorActions.vue +0 -163
  242. package/src/widgets/BotEditor/BotEditorSettings.vue +0 -21
  243. package/src/widgets/BotEditor.vue +0 -248
  244. package/src/widgets/BoxSetting.vue +0 -53
  245. package/src/widgets/ButtonSetting.vue +0 -113
  246. package/src/widgets/CarouselSetting.vue +0 -181
  247. package/src/widgets/CartSetting.vue +0 -46
  248. package/src/widgets/CheckoutSetting.vue +0 -46
  249. package/src/widgets/CollapsiblePanelSetting.vue +0 -46
  250. package/src/widgets/ColumnSelector.vue +0 -104
  251. package/src/widgets/ComponentPropertyLabel.vue +0 -35
  252. package/src/widgets/ComponentPropertySelector.vue +0 -115
  253. package/src/widgets/ComponentSetting.vue +0 -2220
  254. package/src/widgets/ComponentSetting2.vue +0 -927
  255. package/src/widgets/ComponentSetting3.vue +0 -231
  256. package/src/widgets/ContactForm.vue +0 -193
  257. package/src/widgets/ContactFormSetting.vue +0 -395
  258. package/src/widgets/CountdownSetting.vue +0 -76
  259. package/src/widgets/Dashboard/BarChart.vue +0 -366
  260. package/src/widgets/Dashboard/BarChartSetting.vue +0 -317
  261. package/src/widgets/Dashboard/DataTable.vue +0 -125
  262. package/src/widgets/Dashboard/DataTableSetting.vue +0 -243
  263. package/src/widgets/Dashboard/DatasourceFilterSharing.vue +0 -93
  264. package/src/widgets/Dashboard/DatasourcePreview.vue +0 -93
  265. package/src/widgets/Dashboard/DatasourceSelector.vue +0 -122
  266. package/src/widgets/Dashboard/Doughnut.vue +0 -199
  267. package/src/widgets/Dashboard/DoughnutSetting.vue +0 -196
  268. package/src/widgets/Dashboard/GHeatMapsSetting.vue +0 -108
  269. package/src/widgets/Dashboard/InteractionEdit.vue +0 -228
  270. package/src/widgets/Dashboard/Metric.vue +0 -135
  271. package/src/widgets/Dashboard/MetricSetting.vue +0 -227
  272. package/src/widgets/Dashboard/Pie.vue +0 -188
  273. package/src/widgets/Dashboard/PieSetting.vue +0 -247
  274. package/src/widgets/Dashboard/PolarArea.vue +0 -201
  275. package/src/widgets/Dashboard/PolarAreaSetting.vue +0 -195
  276. package/src/widgets/Dashboard/SharingModal.vue +0 -115
  277. package/src/widgets/Dashboard/ViewSelector.vue +0 -183
  278. package/src/widgets/Dashboard/VirtualColumnEdit.vue +0 -97
  279. package/src/widgets/Dashboard/VirtualTableSetting.vue +0 -171
  280. package/src/widgets/Dashboard0.vue +0 -1856
  281. package/src/widgets/DataListSetting.vue +0 -102
  282. package/src/widgets/EffectSetting.vue +0 -94
  283. package/src/widgets/EmbeddedVideo.vue +0 -60
  284. package/src/widgets/EmbeddedVideoSetting.vue +0 -50
  285. package/src/widgets/FAQ.vue +0 -98
  286. package/src/widgets/FAQSetting.vue +0 -94
  287. package/src/widgets/FeatureList.vue +0 -131
  288. package/src/widgets/FeatureListSetting.vue +0 -233
  289. package/src/widgets/FiltersSetting.vue +0 -88
  290. package/src/widgets/FlexSetting.vue +0 -174
  291. package/src/widgets/GridSetting.vue +0 -165
  292. package/src/widgets/Header.vue +0 -15
  293. package/src/widgets/Header0.vue +0 -41
  294. package/src/widgets/Header0Setting.vue +0 -75
  295. package/src/widgets/Header2.vue +0 -65
  296. package/src/widgets/Header2Setting.vue +0 -193
  297. package/src/widgets/HeaderSetting.vue +0 -102
  298. package/src/widgets/IconList.vue +0 -51
  299. package/src/widgets/IconListSetting.vue +0 -188
  300. package/src/widgets/ImageSetting.vue +0 -119
  301. package/src/widgets/LayoutSetting.vue +0 -251
  302. package/src/widgets/LinkSetting.vue +0 -209
  303. package/src/widgets/LinkSettingModal.vue +0 -173
  304. package/src/widgets/LogViewer.vue +0 -85
  305. package/src/widgets/MarginPaddingSetting.vue +0 -58
  306. package/src/widgets/MarginSetting.vue +0 -142
  307. package/src/widgets/MenuEditor.vue +0 -256
  308. package/src/widgets/MenuItem1Setting.vue +0 -78
  309. package/src/widgets/ModalSetting.vue +0 -94
  310. package/src/widgets/MultiValueSetting.vue +0 -121
  311. package/src/widgets/MultiValueSetting2.vue +0 -147
  312. package/src/widgets/OGSettingModal.vue +0 -103
  313. package/src/widgets/PaddingSetting.vue +0 -142
  314. package/src/widgets/ParagraphSetting.vue +0 -89
  315. package/src/widgets/PositionSetting.vue +0 -209
  316. package/src/widgets/PresetBar.vue +0 -990
  317. package/src/widgets/PresetBarPivot.vue +0 -198
  318. package/src/widgets/PresetBarPivotColumnEdit.vue +0 -197
  319. package/src/widgets/PresetSelector.vue +0 -685
  320. package/src/widgets/Review.vue +0 -131
  321. package/src/widgets/ReviewSetting.vue +0 -201
  322. package/src/widgets/SearchModalSetting.vue +0 -70
  323. package/src/widgets/Share.vue +0 -164
  324. package/src/widgets/ShareSetting.vue +0 -99
  325. package/src/widgets/SizingSetting.vue +0 -306
  326. package/src/widgets/SpacingSetting.vue +0 -77
  327. package/src/widgets/StyleSetting.vue +0 -543
  328. package/src/widgets/StyleSetting2.vue +0 -90
  329. package/src/widgets/SvgSetting.vue +0 -133
  330. package/src/widgets/TableSetting.vue +0 -172
  331. package/src/widgets/TestimonialSetting.vue +0 -161
  332. package/src/widgets/TextBlockSetting.vue +0 -81
  333. package/src/widgets/ThumbnailSetting.vue +0 -49
  334. package/src/widgets/TransitionSetting.vue +0 -64
  335. package/src/widgets/TypographySetting.vue +0 -334
  336. package/src/widgets/UserActionBuilder/UserActionCondition.vue +0 -99
  337. package/src/widgets/UserActionBuilder/UserActionConsole.vue +0 -97
  338. package/src/widgets/UserActionBuilder/UserActionItem.vue +0 -273
  339. package/src/widgets/UserActionBuilder/UserActionOutput.vue +0 -152
  340. package/src/widgets/UserActionBuilder/UserActionOutputDelay.vue +0 -27
  341. package/src/widgets/UserActionBuilder/UserActionOutputLog.vue +0 -28
  342. package/src/widgets/UserActionBuilder/UserActionOutputReply.vue +0 -112
  343. package/src/widgets/UserActionBuilder/UserActionProps.vue +0 -213
  344. package/src/widgets/UserActionBuilder.vue +0 -314
  345. package/src/widgets/WebComponentSelector.vue +0 -205
  346. package/src/widgets/WebDatasourceSelector.vue +0 -153
  347. package/src/widgets/WebLayoutSelector.vue +0 -147
  348. package/src/widgets/WebPageBuilder.vue +0 -2161
  349. package/src/widgets/WebPageBuilder2.vue +0 -1091
  350. package/src/widgets/WebPageBuilder3.vue +0 -411
  351. package/src/widgets/WebPageBuilder4/BackgroundColorSetting.vue +0 -54
  352. package/src/widgets/WebPageBuilder4/BackgroundPositionSetting.vue +0 -75
  353. package/src/widgets/WebPageBuilder4/BackgroundRepeatSetting.vue +0 -72
  354. package/src/widgets/WebPageBuilder4/BackgroundSizeSetting.vue +0 -72
  355. package/src/widgets/WebPageBuilder4/BlurSetting.vue +0 -72
  356. package/src/widgets/WebPageBuilder4/BorderColorSetting.vue +0 -64
  357. package/src/widgets/WebPageBuilder4/BorderRadiusSetting.vue +0 -75
  358. package/src/widgets/WebPageBuilder4/BorderSizeSetting.vue +0 -69
  359. package/src/widgets/WebPageBuilder4/BorderStyleSetting.vue +0 -72
  360. package/src/widgets/WebPageBuilder4/BoxShadowSetting.vue +0 -73
  361. package/src/widgets/WebPageBuilder4/ButtonSetting.vue +0 -65
  362. package/src/widgets/WebPageBuilder4/CarouselSetting.vue +0 -178
  363. package/src/widgets/WebPageBuilder4/DisplaySetting.vue +0 -76
  364. package/src/widgets/WebPageBuilder4/FlexAlignSetting.vue +0 -71
  365. package/src/widgets/WebPageBuilder4/FlexDirectionSetting.vue +0 -70
  366. package/src/widgets/WebPageBuilder4/FlexJustifySetting.vue +0 -74
  367. package/src/widgets/WebPageBuilder4/FlexPropertySetting.vue +0 -71
  368. package/src/widgets/WebPageBuilder4/FlexSetting.vue +0 -96
  369. package/src/widgets/WebPageBuilder4/FlexWrapSetting.vue +0 -69
  370. package/src/widgets/WebPageBuilder4/GapSetting.vue +0 -75
  371. package/src/widgets/WebPageBuilder4/GrayscaleSetting.vue +0 -68
  372. package/src/widgets/WebPageBuilder4/GridSetting.vue +0 -216
  373. package/src/widgets/WebPageBuilder4/HeightSetting.vue +0 -98
  374. package/src/widgets/WebPageBuilder4/ImageSetting.vue +0 -102
  375. package/src/widgets/WebPageBuilder4/MarginSetting.vue +0 -73
  376. package/src/widgets/WebPageBuilder4/MaxHeightSetting.vue +0 -82
  377. package/src/widgets/WebPageBuilder4/MaxWidthSetting.vue +0 -90
  378. package/src/widgets/WebPageBuilder4/MinHeightSetting.vue +0 -81
  379. package/src/widgets/WebPageBuilder4/MinWidthSetting.vue +0 -101
  380. package/src/widgets/WebPageBuilder4/MultiValueSetting.vue +0 -163
  381. package/src/widgets/WebPageBuilder4/OpacitySetting.vue +0 -77
  382. package/src/widgets/WebPageBuilder4/OverflowSetting.vue +0 -81
  383. package/src/widgets/WebPageBuilder4/PaddingSetting.vue +0 -57
  384. package/src/widgets/WebPageBuilder4/PositionSetting.vue +0 -191
  385. package/src/widgets/WebPageBuilder4/PropertySetting.vue +0 -176
  386. package/src/widgets/WebPageBuilder4/TextSetting.vue +0 -72
  387. package/src/widgets/WebPageBuilder4/TreeView.vue +0 -46
  388. package/src/widgets/WebPageBuilder4/TreeViewItem.vue +0 -303
  389. package/src/widgets/WebPageBuilder4/WebPageComponentSelector.vue +0 -141
  390. package/src/widgets/WebPageBuilder4/WebPagePropertySelector.vue +0 -172
  391. package/src/widgets/WebPageBuilder4/WidthSetting.vue +0 -105
  392. package/src/widgets/WebPageBuilder4/ZIndexSetting.vue +0 -72
  393. package/src/widgets/WebPageBuilder4.vue +0 -798
  394. package/src/widgets/WebPagePreview.vue +0 -295
  395. package/src/widgets/WebPageSelector.vue +0 -173
  396. package/src/widgets/WebTemplateCreator.vue +0 -156
  397. package/src/widgets/YoutubeVideoSetting.vue +0 -68
  398. package/tailwind.config.js +0 -481
@@ -1,685 +0,0 @@
1
- <template>
2
- <Modal :state="isOpen"
3
- :width="width"
4
- :height="height"
5
- :dismissable="dismissable"
6
- @dismiss="close">
7
- <template v-slot:head>
8
-
9
- <div v-if="mode === 'select'" class="relative p-6">
10
- <h3>Select Preset</h3>
11
- <div class="absolute top-0 right-0 p-2">
12
- <button type="button" class="p-2" @click="close">
13
- <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">
14
- <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"/>
15
- </svg>
16
- </button>
17
- </div>
18
- </div>
19
-
20
- <div v-else class="relative p-6 flex flex-col gap-2">
21
-
22
- <Textbox placeholder="Preset Name" class="w-[360px] bg-transparent border-none text-xl font-bold"
23
- item-class="p-0" v-model="preset.name" />
24
-
25
- <div class="absolute top-0 right-0 p-2">
26
- <button type="button" class="p-2" @click="close">
27
- <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">
28
- <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"/>
29
- </svg>
30
- </button>
31
- </div>
32
-
33
- <div class="flex items-center justify-center">
34
- <Tabs :items="tabItems[type]" v-model="tabIndex" />
35
- </div>
36
-
37
- </div>
38
-
39
- </template>
40
-
41
- <template v-slot:foot>
42
-
43
- <div v-if="mode === 'select'" class="p-6">
44
-
45
- </div>
46
-
47
- <div v-else class="p-6 flex flex-row gap-3">
48
- <Button class="w-[80px]" @click="apply()">Apply</Button>
49
- <Button class="w-[120px]" variant="secondary" @click="apply(true)">Apply & Select</Button>
50
- </div>
51
-
52
- </template>
53
-
54
- <div v-if="mode === 'select'" class="flex-1 flex flex-col">
55
- <div class="flex flex-col bg-base-300 border-t-[1px] border-b-[1px] border-border-50 divide-y divide-border-50">
56
- <div v-for="(preset, idx) in config.presets"
57
- class="px-6 text-left hover:bg-primary-200 hover:text-white flex flex-row items-center">
58
- <div class="flex-1 py-4" @click="select(preset)">
59
- {{ preset.name }}
60
- </div>
61
- <button type="button"
62
- class="pl-2 py-2"
63
- ref="btn"
64
- @click="$refs.contextMenu.open($refs.btn[idx], { idx })">
65
- <svg width="16" height="16" class="fill-text-300 hover:fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512"><path d="M64 208c26.5 0 48 21.5 48 48s-21.5 48-48 48-48-21.5-48-48 21.5-48 48-48zM16 104c0 26.5 21.5 48 48 48s48-21.5 48-48-21.5-48-48-48-48 21.5-48 48zm0 304c0 26.5 21.5 48 48 48s48-21.5 48-48-21.5-48-48-48-48 21.5-48 48z"/></svg>
66
- </button>
67
- </div>
68
- </div>
69
-
70
- <ContextMenu ref="contextMenu" position="bottom-right">
71
- <template #default="{ context }">
72
- <div class="flex flex-col min-w-[200px] divide-y divide-border-50">
73
-
74
- <button class="w-full p-3 text-left flex flex-row gap-3" :class="appStyle.menuItem"
75
- @click="edit(context.idx)">
76
- <div class="w-[24px]">
77
- <svg width="16" height="16" class="mx-auto fill-text-300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"/></svg>
78
- </div>
79
- Edit
80
- </button>
81
-
82
- <button class="w-full p-3 text-left flex flex-row gap-3" :class="appStyle.menuItem"
83
- @click="duplicate(context.idx)">
84
- <div class="w-[24px]">
85
- <svg width="16" height="16" class="mx-auto fill-text-300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg>
86
- </div>
87
- Duplicate
88
- </button>
89
-
90
- <button v-if="config.presets.length > 1" class="w-full p-3 text-left flex flex-row gap-3 text-red-500" :class="appStyle.menuItem"
91
- @click="remove(context.idx)">
92
- <div class="w-[24px]">
93
- <svg width="19" height="19" class="mx-auto fill-text-300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M469.65 181.65l-11.31-11.31c-6.25-6.25-16.38-6.25-22.63 0L384 222.06l-51.72-51.72c-6.25-6.25-16.38-6.25-22.63 0l-11.31 11.31c-6.25 6.25-6.25 16.38 0 22.63L350.06 256l-51.72 51.72c-6.25 6.25-6.25 16.38 0 22.63l11.31 11.31c6.25 6.25 16.38 6.25 22.63 0L384 289.94l51.72 51.72c6.25 6.25 16.38 6.25 22.63 0l11.31-11.31c6.25-6.25 6.25-16.38 0-22.63L417.94 256l51.72-51.72c6.24-6.25 6.24-16.38-.01-22.63zM576 64H205.26C188.28 64 172 70.74 160 82.74L9.37 233.37c-12.5 12.5-12.5 32.76 0 45.25L160 429.25c12 12 28.28 18.75 45.25 18.75H576c35.35 0 64-28.65 64-64V128c0-35.35-28.65-64-64-64zm16 320c0 8.82-7.18 16-16 16H205.26c-4.27 0-8.29-1.66-11.31-4.69L54.63 256l139.31-139.31c3.02-3.02 7.04-4.69 11.31-4.69H576c8.82 0 16 7.18 16 16v256z"/></svg>
94
- </div>
95
- Remove
96
- </button>
97
-
98
- </div>
99
- </template>
100
- </ContextMenu>
101
- </div>
102
-
103
- <div v-else class="flex-1 flex flex-row">
104
-
105
- <div v-if="tabIndex === 1" class="flex-1 flex flex-row">
106
- <div class="w-[240px] border-r-[1px] border-border-50 overflow-y-auto">
107
- <div class="flex flex-col divide-y divide-border-50">
108
- <ListItem :items="presetColumns"
109
- body-class="divide-y divide-border-50"
110
- @reorder="(from, to) => { presetColumns.splice(to, 0, presetColumns.splice(from, 1)[0]); }">
111
- <template v-slot="{ item }">
112
- <div class="flex flex-row items-center gap-3 px-3 p-2 hover:bg-primary-100"
113
- :class="item.key === presetColumnKey ? 'bg-primary-200' : ''"
114
- @click="presetColumnKey = item.key">
115
- <div data-reorder>
116
- <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>
117
- </div>
118
- <div class="flex-1 flex flex-row gap-2 items-center">
119
- <div>
120
- <div class="w-[14px] rounded-full h-[14px]"
121
- :class="!('visible' in item) || item.visible ? 'bg-primary' : 'bg-text-300'"></div>
122
- </div>
123
- {{ item.label ? item.label : item.key }}
124
- </div>
125
- </div>
126
- </template>
127
- </ListItem>
128
- </div>
129
- </div>
130
- <div class="flex-1 p-6 overflow-y-auto">
131
-
132
- <div v-if="presetColumn" class="flex flex-col gap-5">
133
- <div>
134
- <Checkbox v-model="presetColumn.visible" :default="1">
135
- Visible
136
- </Checkbox>
137
- </div>
138
-
139
- <div>
140
- <label class="text-text-400">Label</label>
141
- <Textbox v-model="presetColumn.label" />
142
- </div>
143
- </div>
144
-
145
- <div v-else class="flex-1 flex items-center justify-center">
146
- <label class="text-text-300">No selected column</label>
147
- </div>
148
-
149
- </div>
150
- </div>
151
-
152
- <div v-if="tabIndex === 2" class="flex-1 flex flex-row">
153
- <div class="w-[200px] border-r-[1px] border-border-50 overflow-y-auto">
154
-
155
- <div class="flex flex-col divide-y divide-border-50 border-b-[1px] border-border-50">
156
- <button v-for="column in filterColumns"
157
- type="button"
158
- :disabled="filterColumnAdded(column)"
159
- class="px-6 py-3 text-left flex flex-row items-center gap-2"
160
- @click="add(column)">
161
- <div class="flex-1" :class="filterColumnAdded(column) ? 'text-text-300' : ''">
162
- {{ column.label ?? column.key }}
163
- </div>
164
- <button type="button" v-if="!filterColumnAdded(column)">
165
- <svg width="14" height="14" class="fill-green-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M384 240v32c0 6.6-5.4 12-12 12h-88v88c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-88h-88c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h88v-88c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v88h88c6.6 0 12 5.4 12 12zm120 16c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-48 0c0-110.5-89.5-200-200-200S56 145.5 56 256s89.5 200 200 200 200-89.5 200-200z"/></svg>
166
- </button>
167
- </button>
168
- </div>
169
-
170
- </div>
171
-
172
- <div class="flex-1 flex flex-col divide-y divide-border-50 overflow-y-auto">
173
-
174
- <div v-for="(filter, idx) in preset.filters" class="p-6">
175
-
176
- <component v-if="column(filter.key).type === 'component'"
177
- :is="column(filter.key).component?.name ? column(filter.key).component.name : column(filter.key).component"
178
- :="column(filter.key).component?.props ? column(filter.key).component.props : {}"
179
- :filter="filter"
180
- @remove="preset.filters.splice(idx, 1)">
181
- </component>
182
-
183
- <div v-else class="flex flex-row items-start gap-2">
184
- <Checkbox v-model="filter.enabled" :default="true" />
185
- <div class="flex-1 flex flex-col gap-3">
186
- <div class="flex-1 flex flex-row gap-3">
187
- <strong class="flex-1">{{ column(filter.key).label ?? filter.key }}</strong>
188
- <select v-model="filter.modifier"
189
- class="appearance-none bg-text-50 min-w-[60px] text-text-400 px-2 outline-none">
190
- <option value="and">And</option>
191
- <option value="or">Or</option>
192
- </select>
193
- <button type="button" @click="filter.value.push({})">
194
- <svg width="14" height="14" class="fill-text-300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M432 256C432 269.3 421.3 280 408 280h-160v160c0 13.25-10.75 24.01-24 24.01S200 453.3 200 440v-160h-160c-13.25 0-24-10.74-24-23.99C16 242.8 26.75 232 40 232h160v-160c0-13.25 10.75-23.99 24-23.99S248 58.75 248 72v160h160C421.3 232 432 242.8 432 256z"/></svg>
195
- </button>
196
- </div>
197
- <div v-if="Array.isArray(filter.value)" class="flex flex-col gap-2">
198
- <PresetSelectorFilterItem v-for="(filterVal, filterIdx) in filter.value"
199
- :column="column(filter.key)"
200
- :type="typeOf(column(filter.key).type)"
201
- :value="filterVal"
202
- :index="filterIdx"
203
- @remove="filter.value.splice(filterIdx, 1)" />
204
- </div>
205
- <PresetSelectorFilterItem v-else
206
- :column="column(filter.key)"
207
- :type="typeOf(column(filter.key).type)"
208
- :value="filter" />
209
- </div>
210
- <button type="button" class="p-1" @click="preset.filters.splice(idx, 1)">
211
- <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="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>
212
- </button>
213
- </div>
214
-
215
- </div>
216
-
217
- </div>
218
- </div>
219
-
220
- <div v-else-if="tabIndex === 4" class="flex-1 flex flex-col gap-6 p-6">
221
-
222
- <div>
223
- <label>Select Type:</label>
224
- <div class="mt-2">
225
- <Radio type="button" v-model="presetChart.type" value="bar">
226
- Bar
227
- </Radio>
228
- <Radio type="button" v-model="presetChart.type" value="line">
229
- Line
230
- </Radio>
231
- </div>
232
- </div>
233
-
234
- <div>
235
- <Checkbox v-model="presetChart.showLegend">
236
- Show Legend
237
- </Checkbox>
238
- <Checkbox v-if="presetChart.type === 'bar'" v-model="presetChart.stack">
239
- Stacked
240
- </Checkbox>
241
- </div>
242
-
243
- <div>
244
- <div class="flex flex-row gap-2">
245
- <label>X Axis</label>
246
-
247
- <button type="button" @click="xAxis.push({})">
248
- <svg width="16" height="16" class="fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M432 256C432 269.3 421.3 280 408 280h-160v160c0 13.25-10.75 24.01-24 24.01S200 453.3 200 440v-160h-160c-13.25 0-24-10.74-24-23.99C16 242.8 26.75 232 40 232h160v-160c0-13.25 10.75-23.99 24-23.99S248 58.75 248 72v160h160C421.3 232 432 242.8 432 256z"/></svg>
249
- </button>
250
- </div>
251
- <ListItem :items="xAxis"
252
- class="mt-2"
253
- body-class="flex flex-col gap-1"
254
- @reorder="(from, to) => { xAxis.splice(to, 0, xAxis.splice(from, 1)[0]); }">
255
- <template v-slot="{ item, index }">
256
- <div class="flex flex-row items-center gap-3">
257
- <div data-reorder>
258
- <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>
259
- </div>
260
- <div class="flex flex-row gap-2">
261
- <Dropdown class="w-[150px]" v-model="item.key">
262
- <option v-for="column in config.columns" :value="column.key">{{ column.label }}</option>
263
- </Dropdown>
264
- <Dropdown class="w-[150px]" v-model="item.aggregrate">
265
- <option value="none">None</option>
266
- <option value="count">Count</option>
267
- <option value="date">Date</option>
268
- </Dropdown>
269
- </div>
270
- <div>
271
- <button type="button" @click="xAxis.splice(index, 1)">
272
- <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>
273
- </button>
274
- </div>
275
- </div>
276
- </template>
277
- </ListItem>
278
- </div>
279
-
280
- <div>
281
- <div class="flex flex-row gap-2">
282
- <label>Y Axis</label>
283
-
284
- <button type="button" @click="yAxis.push({})">
285
- <svg width="16" height="16" class="fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M432 256C432 269.3 421.3 280 408 280h-160v160c0 13.25-10.75 24.01-24 24.01S200 453.3 200 440v-160h-160c-13.25 0-24-10.74-24-23.99C16 242.8 26.75 232 40 232h160v-160c0-13.25 10.75-23.99 24-23.99S248 58.75 248 72v160h160C421.3 232 432 242.8 432 256z"/></svg>
286
- </button>
287
- </div>
288
- <ListItem :items="yAxis"
289
- class="mt-2"
290
- body-class="flex flex-col gap-1"
291
- @reorder="(from, to) => { yAxis.splice(to, 0, yAxis.splice(from, 1)[0]); }">
292
- <template v-slot="{ item, index }">
293
- <div class="flex flex-row items-center gap-3">
294
- <div data-reorder>
295
- <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>
296
- </div>
297
- <div class="flex flex-row gap-2">
298
- <Dropdown class="w-[150px]" v-model="item.aggregrate">
299
- <option value="none">None</option>
300
- <option value="count">Count</option>
301
- </Dropdown>
302
- <Dropdown class="w-[150px]" v-model="item.key">
303
- <option v-for="column in config.columns" :value="column.key">{{ column.label }}</option>
304
- </Dropdown>
305
- </div>
306
- <div>
307
- <button type="button" @click="yAxis.splice(index, 1)">
308
- <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>
309
- </button>
310
- </div>
311
- </div>
312
- </template>
313
- </ListItem>
314
- </div>
315
-
316
- </div>
317
-
318
- <div v-else-if="tabIndex === 5" class="flex-1 flex flex-col gap-6 p-6">
319
-
320
- <div>
321
- <Checkbox v-model="presetPivot.enabled">
322
- Pivot Enabled
323
- </Checkbox>
324
- </div>
325
-
326
- <div class="grid grid-cols-3 gap-6">
327
-
328
- <div>
329
- <div class="flex flex-row items-center gap-2">
330
- <label>Rows</label>
331
- <button type="button" @click="$refs.columnSelector.open({ type:'rows' })">
332
- <svg width="16" height="16" class="fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M432 256C432 269.3 421.3 280 408 280h-160v160c0 13.25-10.75 24.01-24 24.01S200 453.3 200 440v-160h-160c-13.25 0-24-10.74-24-23.99C16 242.8 26.75 232 40 232h160v-160c0-13.25 10.75-23.99 24-23.99S248 58.75 248 72v160h160C421.3 232 432 242.8 432 256z"/></svg>
333
- </button>
334
- </div>
335
- <ListItem :items="presetPivot.rows"
336
- @reorder="(from, to) => { presetPivot.rows.splice(to, 0, presetPivot.rows.splice(from, 1)[0]); }"
337
- class="mt-2 h-[200px] border-[1px] border-border-200">
338
- <template v-slot="{ item, index }">
339
- <div class="flex flex-row items-center gap-3 p-2 hover:bg-primary-100">
340
- <div data-reorder>
341
- <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>
342
- </div>
343
- <div class="flex-1 flex flex-row gap-3">
344
- <div class="flex-1">
345
- {{ item.label ? item.label : item.key }}
346
- </div>
347
- <select v-if="item.type === 'date'"
348
- v-model="item.aggregrate"
349
- class="appearance-none bg-text-50 outline-none">
350
- <option value="date">Date</option>
351
- <option value="month">Month</option>
352
- <option value="year">Year</option>
353
- </select>
354
- </div>
355
- <div>
356
- <button type="button" @click="presetPivot.rows.splice(index, 1)">
357
- <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>
358
- </button>
359
- </div>
360
- </div>
361
- </template>
362
- </ListItem>
363
- </div>
364
-
365
- <div>
366
- <div class="flex flex-row items-center gap-2">
367
- <label>Columns</label>
368
- <button type="button" @click="$refs.columnSelector.open({ type:'columns' })">
369
- <svg width="16" height="16" class="fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M432 256C432 269.3 421.3 280 408 280h-160v160c0 13.25-10.75 24.01-24 24.01S200 453.3 200 440v-160h-160c-13.25 0-24-10.74-24-23.99C16 242.8 26.75 232 40 232h160v-160c0-13.25 10.75-23.99 24-23.99S248 58.75 248 72v160h160C421.3 232 432 242.8 432 256z"/></svg>
370
- </button>
371
- </div>
372
- <ListItem :items="presetPivot.columns"
373
- @reorder="(from, to) => { presetPivot.columns.splice(to, 0, presetPivot.columns.splice(from, 1)[0]); }"
374
- class="mt-2 h-[200px] border-[1px] border-border-200">
375
- <template v-slot="{ item, index }">
376
- <div class="flex flex-row items-center gap-3 p-2 hover:bg-primary-100">
377
- <div data-reorder>
378
- <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>
379
- </div>
380
- <div class="flex-1">
381
- {{ item.label ? item.label : item.key }}
382
- </div>
383
- <div>
384
- <button type="button" @click="presetPivot.columns.splice(index, 1)">
385
- <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>
386
- </button>
387
- </div>
388
- </div>
389
- </template>
390
- </ListItem>
391
- </div>
392
-
393
- <div>
394
- <div class="flex flex-row items-center gap-2">
395
- <label>Values</label>
396
- <button type="button" @click="$refs.columnSelector.open({ type:'values' })">
397
- <svg width="16" height="16" class="fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M432 256C432 269.3 421.3 280 408 280h-160v160c0 13.25-10.75 24.01-24 24.01S200 453.3 200 440v-160h-160c-13.25 0-24-10.74-24-23.99C16 242.8 26.75 232 40 232h160v-160c0-13.25 10.75-23.99 24-23.99S248 58.75 248 72v160h160C421.3 232 432 242.8 432 256z"/></svg>
398
- </button>
399
- </div>
400
- <ListItem :items="presetPivot.values"
401
- @reorder="(from, to) => { presetPivot.values.splice(to, 0, presetPivot.values.splice(from, 1)[0]); }"
402
- class="mt-2 h-[200px] border-[1px] border-border-200">
403
- <template v-slot="{ item, index }">
404
- <div class="flex flex-row items-center gap-3 p-2 hover:bg-primary-100">
405
- <div data-reorder>
406
- <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>
407
- </div>
408
- <div class="flex-1 flex flex-row gap-3">
409
- <div class="flex-1">
410
- {{ item.label ? item.label : item.key }}
411
- </div>
412
- <select v-model="item.aggregrate"
413
- class="appearance-none bg-transparent outline-none">
414
- <option value="count">Count</option>
415
- <option v-if="[ 'number' ].includes(item.type)" value="sum">Sum</option>
416
- <option v-if="[ 'number' ].includes(item.type)" value="avg">Average</option>
417
- <option v-if="[ 'number' ].includes(item.type)" value="min">Min</option>
418
- <option v-if="[ 'number' ].includes(item.type)" value="max">Max</option>
419
- </select>
420
- </div>
421
- <div>
422
- <button type="button" @click="presetPivot.values.splice(index, 1)">
423
- <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>
424
- </button>
425
- </div>
426
- </div>
427
- </template>
428
- </ListItem>
429
- </div>
430
-
431
- </div>
432
-
433
- <ColumnSelector ref="columnSelector"
434
- :columns="config.columns"
435
- @select="(obj, context) => addPivot(context.type, obj)" />
436
-
437
- </div>
438
-
439
- <div v-else-if="tabIndex === 9" class="flex-1 p-6 flex flex-col gap-6">
440
-
441
- <div>
442
- <strong>Preset</strong>
443
- <ObjectTree :value="preset" />
444
- </div>
445
-
446
- <div>
447
- <strong>Config</strong>
448
- <ObjectTree :value="config" />
449
- </div>
450
-
451
- </div>
452
-
453
- </div>
454
-
455
- </Modal>
456
- </template>
457
-
458
- <script>
459
-
460
- import PresetSelectorFilterItem from "../components/PresetSelectorFilterItem.vue";
461
-
462
- export default{
463
- components: {PresetSelectorFilterItem},
464
-
465
- emits: [ 'select' ],
466
-
467
- inject: [ 'appStyle', 'alert', 'confirm' ],
468
-
469
- props: {
470
-
471
- config: Object,
472
-
473
- type: {
474
- type: String,
475
- default: 'list'
476
- },
477
-
478
- },
479
-
480
- computed: {
481
-
482
- configParams(){
483
- if(!this.config.params)
484
- this.config.params = {}
485
-
486
- if(this.config.presets.length > 0 &&
487
- (!this.config.params.presetIdx ||
488
- !this.config.presets.find(_ => _.uid === this.config.params.presetIdx)))
489
- this.config.params.presetIdx = this.config.presets[0].uid
490
-
491
- return this.config.params
492
- },
493
-
494
- filterColumns(){
495
- return JSON.parse(JSON.stringify(this.config.columns ?? []))
496
- .filter(_ => !('filterable' in _) || _.filterable)
497
- .sort((a, b) => (a.label ?? a.key).localeCompare(b.label ?? b.key))
498
- },
499
-
500
- dismissable(){
501
- return true
502
- },
503
-
504
- height(){
505
- switch(this.mode){
506
- case 'select': return 420
507
- default: return 540
508
- }
509
- },
510
-
511
- mode(){
512
- return this.preset ?
513
- 'edit' :
514
- 'select'
515
- },
516
-
517
- presetChart(){
518
- if(!this.preset.chart){
519
- this.preset.chart = {}
520
- }
521
-
522
- return this.preset.chart
523
- },
524
-
525
- xAxis(){
526
- if(!this.presetChart.xAxis){
527
- this.presetChart.xAxis = []
528
- }
529
- return this.presetChart.xAxis
530
- },
531
-
532
- yAxis(){
533
- if(!this.presetChart.yAxis){
534
- this.presetChart.yAxis = []
535
- }
536
- return this.presetChart.yAxis
537
- },
538
-
539
- presetColumns(){
540
- if(!Array.isArray(this.preset.columns)){
541
- this.preset.columns = JSON.parse(JSON.stringify(this.config.columns))
542
- }
543
- return this.preset.columns
544
- },
545
-
546
- presetPivot(){
547
- if(!this.preset.pivot){
548
- this.preset.pivot = { rows:[], columns:[], values:[] }
549
- }
550
- return this.preset.pivot
551
- },
552
-
553
- presetColumn(){
554
- return (this.preset.columns ?? [])[(this.preset.columns ?? []).findIndex(_ => _.key === this.presetColumnKey)]
555
- },
556
-
557
- width(){
558
- switch(this.mode){
559
- case 'select': return 360
560
- default: return 640
561
- }
562
- },
563
-
564
- },
565
-
566
- data(){
567
- return {
568
- isOpen: false,
569
- preset: null,
570
- tabItems: {
571
- list: [
572
- ...((this.config ?? {}).columns !== false ? [{ text:'Columns', value:1 }] : []),
573
- ...((this.config ?? {}).filters !== false ? [{ text:'Filters', value:2 }] : []),
574
- ...((this.config ?? {}).sorts !== false ? [{ text:'Sorts', value:3 }] : []),
575
- ...((this.config ?? {}).pivot !== false ? [{ text:'Pivot', value:5 }] : []),
576
- ...('debug' in this.$route.query || import.meta.env.DEV ? [{ text:'Debug', value:9 }] : []),
577
- ],
578
- chart: [
579
- ...((this.config ?? {}).filters !== false ? [{ text:'Filters', value:2 }] : []),
580
- ...((this.config ?? {}).chart !== false ? [{ text:'Chart', value:4 }] : []),
581
- ]
582
- },
583
- tabIndex: 2,
584
- presetColumnKey: null,
585
- }
586
- },
587
-
588
- methods: {
589
-
590
- add(column){
591
- if(!Array.isArray(this.preset.filters))
592
- this.preset.filters = []
593
-
594
- this.preset.filters.push({ key:column.key, value:column.type !== 'component' ? [{}] : null })
595
- },
596
-
597
- addPivot(type, obj){
598
- this.presetPivot[type].push(Object.assign({}, obj))
599
- },
600
-
601
- apply(select){
602
- this.config.presets[this.presetIdx] = this.preset
603
- this.preset = null
604
-
605
- if(select){
606
- this.config.presetIdx = this.presetIdx
607
- this.close()
608
- this.$emit('select')
609
- }
610
- },
611
-
612
- column(key){
613
- return this.config.columns.filter(_ => _.key === key).pop() ?? {}
614
- },
615
-
616
- edit(idx){
617
- this.preset = JSON.parse(JSON.stringify([ this.config.presets[idx] ]))[0]
618
- this.presetIdx = idx
619
- },
620
-
621
- filterColumnAdded(column){
622
- return (this.preset.filters ?? []).findIndex(_ => _.key === column.key) >= 0
623
- },
624
-
625
- open(){
626
- this.preset = null
627
- this.isOpen = true
628
- },
629
-
630
- close(){
631
- this.preset ?
632
- this.preset = null :
633
- this.isOpen = false
634
- },
635
-
636
- duplicate(idx){
637
- this.config.presets.push({
638
- ...JSON.parse(JSON.stringify(this.config.presets[idx])),
639
- name: `${this.config.presets[idx].name} (Copy)`
640
- })
641
- },
642
-
643
- remove(idx){
644
- if(this.config.presets.length <= 1){
645
- this.alert('Unable to remove the last preset')
646
- return
647
- }
648
-
649
- this.confirm('Remove this preset?', () => {
650
- this.config.presets.splice(idx, 1)
651
- if(this.config.presetIdx >= this.config.presets.length)
652
- this.config.presetIdx = this.config.presets.length - 1
653
- })
654
- },
655
-
656
- select(item){
657
- this.configParams.presetIdx = item.uid
658
- this.close()
659
- this.$emit('select')
660
- },
661
-
662
- typeOf(type){
663
- if([ 'boolean' ].includes(type))
664
- return 'boolean'
665
- else if([ 'date' ].includes(type))
666
- return 'date'
667
- else if([ 'number', 'currency', 'decimal' ].includes(type))
668
- return 'number'
669
- else
670
- return 'text'
671
- }
672
-
673
- }
674
-
675
- }
676
-
677
- </script>
678
-
679
- <style module>
680
-
681
- .comp{
682
-
683
- }
684
-
685
- </style>