@mixd-id/web-scaffold 0.2.240706 → 0.2.250801009

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/docs/components/Dashboard.md +56 -0
  2. package/log.txt +7 -0
  3. package/package.json +27 -19
  4. package/src/components/404.vue +61 -0
  5. package/src/components/AccountIcon.vue +19 -0
  6. package/src/components/Ahref.vue +1 -1
  7. package/src/components/Alert.vue +4 -13
  8. package/src/components/ArrayList.vue +49 -0
  9. package/src/components/Article.vue +24 -30
  10. package/src/components/Button.vue +79 -167
  11. package/src/components/Card.vue +235 -0
  12. package/src/components/Carousel.vue +61 -60
  13. package/src/components/Cart.vue +192 -0
  14. package/src/components/CartIcon.vue +89 -0
  15. package/src/components/ChartBar.vue +2 -3
  16. package/src/components/Checkbox.vue +20 -11
  17. package/src/components/Checkout.vue +373 -0
  18. package/src/components/CheckoutDelivery.vue +267 -0
  19. package/src/components/CodeEditor.vue +5 -16
  20. package/src/components/CollapsiblePanel.vue +70 -0
  21. package/src/components/ColorPicker.vue +8 -3
  22. package/src/components/ColorPicker2.vue +41 -19
  23. package/src/components/ColorPicker3.vue +100 -0
  24. package/src/components/Confirm.vue +9 -7
  25. package/src/components/ContextMenu.vue +122 -206
  26. package/src/components/ContextMenuItem.vue +53 -0
  27. package/src/components/Dashboard.vue +243 -0
  28. package/src/components/Dashboard2.vue +118 -0
  29. package/src/components/DashboardComponentSelector.vue +96 -0
  30. package/src/components/DashboardConfigs.vue +202 -0
  31. package/src/components/Datepicker.vue +102 -41
  32. package/src/components/DayTimeRange.vue +3 -2
  33. package/src/components/Dropdown.vue +7 -4
  34. package/src/components/Flex.vue +14 -40
  35. package/src/components/GHeatMaps.vue +2 -2
  36. package/src/components/Grid.vue +6 -6
  37. package/src/components/HTMLEditor.vue +27 -14
  38. package/src/components/Image.vue +62 -108
  39. package/src/components/ImagePreview.vue +14 -4
  40. package/src/components/ImageUploader.vue +114 -0
  41. package/src/components/ImportModal.vue +3 -3
  42. package/src/components/Link.vue +62 -6
  43. package/src/components/List.vue +524 -403
  44. package/src/components/ListContextMenu.vue +88 -0
  45. package/src/components/ListItem.vue +5 -3
  46. package/src/components/ListPage1.vue +14 -15
  47. package/src/components/ListView.vue +5 -6
  48. package/src/components/ListViewSettings.vue +2 -2
  49. package/src/components/LogViewerItem.vue +1 -1
  50. package/src/components/MarkdownEdit.vue +128 -0
  51. package/src/components/MarkdownPreview.vue +102 -0
  52. package/src/components/MenuItem1.vue +36 -0
  53. package/src/components/Modal.vue +95 -43
  54. package/src/components/MultiDropdown.vue +124 -0
  55. package/src/components/MultilineText.vue +1 -4
  56. package/src/components/OTPField.vue +11 -17
  57. package/src/components/ObjectTree.vue +1 -1
  58. package/src/components/PageBuilder.vue +3 -3
  59. package/src/components/Paragraph.vue +1 -2
  60. package/src/components/PresetSelectorFilterItem.vue +107 -95
  61. package/src/components/Radio.vue +1 -1
  62. package/src/components/SearchModal.vue +153 -0
  63. package/src/components/Slider.vue +1 -1
  64. package/src/components/Svg.vue +1 -1
  65. package/src/components/SvgEditor.vue +173 -0
  66. package/src/components/Switch.vue +4 -5
  67. package/src/components/Table.vue +2 -2
  68. package/src/components/TableView.vue +2 -3
  69. package/src/components/TableViewHead.vue +2 -2
  70. package/src/components/Tabs.vue +1 -1
  71. package/src/components/Testimonial.vue +2 -2
  72. package/src/components/Text.vue +7 -22
  73. package/src/components/TextEditor.vue +3 -3
  74. package/src/components/TextWithTag.vue +61 -30
  75. package/src/components/Textarea.vue +11 -16
  76. package/src/components/Textbox.vue +9 -19
  77. package/src/components/Timepicker.vue +25 -15
  78. package/src/components/Toast.vue +5 -3
  79. package/src/components/TreeMenu.vue +122 -0
  80. package/src/components/TreeView.vue +15 -10
  81. package/src/components/TreeView2.vue +38 -0
  82. package/src/components/TreeViewItem.vue +58 -29
  83. package/src/components/TreeViewItem2.vue +55 -0
  84. package/src/components/Uploader.vue +45 -0
  85. package/src/components/Video.vue +119 -0
  86. package/src/components/VirtualGrid.vue +24 -7
  87. package/src/components/VirtualTable.vue +363 -128
  88. package/src/configs/dashboard/data-table.js +9 -0
  89. package/src/configs/web-page-builder.js +118 -0
  90. package/src/directives/intersect.js +26 -0
  91. package/src/hooks/device.js +14 -0
  92. package/src/index.js +62 -107
  93. package/src/mixin/component.js +147 -67
  94. package/src/themes/default/index.js +83 -155
  95. package/src/utils/dashboard.js +22 -962
  96. package/src/utils/helpers.cjs +635 -0
  97. package/src/utils/helpers.js +91 -60
  98. package/src/utils/helpers.mjs +245 -12
  99. package/src/utils/importer.js +22 -3
  100. package/src/utils/list.mjs +1509 -0
  101. package/src/utils/preset-selector.cjs +1455 -0
  102. package/src/utils/preset-selector.js +489 -95
  103. package/src/utils/preset-selector.mjs +59 -20
  104. package/src/utils/queue.js +63 -0
  105. package/src/utils/web.mjs +120 -0
  106. package/src/utils/wss.js +37 -29
  107. package/src/utils/wss.mjs +24 -19
  108. package/src/widgets/AhrefSetting.vue +16 -13
  109. package/src/widgets/ArticleSetting.vue +15 -27
  110. package/src/widgets/BackgroundColorSetting.vue +153 -0
  111. package/src/widgets/BorderColorSetting.vue +57 -0
  112. package/src/widgets/BotEditor/BotEditorActions.vue +3 -2
  113. package/src/widgets/BotEditor/BotEditorSettings.vue +21 -0
  114. package/src/widgets/BotEditor.vue +35 -15
  115. package/src/widgets/ButtonSetting.vue +12 -13
  116. package/src/widgets/CarouselSetting.vue +33 -45
  117. package/src/widgets/CartSetting.vue +46 -0
  118. package/src/widgets/CheckoutSetting.vue +46 -0
  119. package/src/widgets/CollapsiblePanelSetting.vue +46 -0
  120. package/src/widgets/ColumnSelector.vue +29 -5
  121. package/src/widgets/ComponentSetting.vue +1 -1
  122. package/src/widgets/ComponentSetting2.vue +112 -234
  123. package/src/widgets/ComponentSetting3.vue +1 -1
  124. package/src/widgets/ContactForm.vue +3 -3
  125. package/src/widgets/ContactFormSetting.vue +41 -30
  126. package/src/widgets/Dashboard/BarChart.vue +47 -11
  127. package/src/widgets/Dashboard/BarChartSetting.vue +1 -1
  128. package/src/widgets/Dashboard/DataTable.vue +125 -0
  129. package/src/widgets/Dashboard/DataTableSetting.vue +243 -0
  130. package/src/widgets/Dashboard/DatasourceSelector.vue +1 -1
  131. package/src/widgets/Dashboard/Doughnut.vue +49 -7
  132. package/src/widgets/Dashboard/DoughnutSetting.vue +2 -2
  133. package/src/widgets/Dashboard/Metric.vue +78 -19
  134. package/src/widgets/Dashboard/MetricSetting.vue +81 -28
  135. package/src/widgets/Dashboard/Pie.vue +55 -6
  136. package/src/widgets/Dashboard/PieSetting.vue +1 -1
  137. package/src/widgets/Dashboard/PolarArea.vue +49 -7
  138. package/src/widgets/Dashboard/PolarAreaSetting.vue +1 -1
  139. package/src/widgets/Dashboard/SharingModal.vue +4 -5
  140. package/src/widgets/Dashboard/ViewSelector.vue +2 -2
  141. package/src/widgets/Dashboard/VirtualTableSetting.vue +121 -184
  142. package/src/widgets/{Dashboard.vue → Dashboard0.vue} +426 -343
  143. package/src/widgets/EmbeddedVideoSetting.vue +7 -5
  144. package/src/widgets/FAQ.vue +16 -3
  145. package/src/widgets/FAQSetting.vue +53 -47
  146. package/src/widgets/FeatureList.vue +3 -0
  147. package/src/widgets/FeatureListSetting.vue +112 -102
  148. package/src/widgets/FlexSetting.vue +83 -106
  149. package/src/widgets/GridSetting.vue +71 -196
  150. package/src/widgets/Header2.vue +34 -71
  151. package/src/widgets/Header2Setting.vue +95 -179
  152. package/src/widgets/HeaderSetting.vue +16 -18
  153. package/src/widgets/IconListSetting.vue +69 -65
  154. package/src/widgets/ImageSetting.vue +33 -60
  155. package/src/widgets/LinkSetting.vue +60 -37
  156. package/src/widgets/LinkSettingModal.vue +173 -0
  157. package/src/widgets/LogViewer.vue +1 -1
  158. package/src/widgets/MarginSetting.vue +2 -2
  159. package/src/widgets/MenuEditor.vue +1 -1
  160. package/src/widgets/MenuItem1Setting.vue +78 -0
  161. package/src/widgets/ModalSetting.vue +42 -44
  162. package/src/widgets/MultiValueSetting.vue +2 -2
  163. package/src/widgets/MultiValueSetting2.vue +78 -45
  164. package/src/widgets/OGSettingModal.vue +103 -0
  165. package/src/widgets/PaddingSetting.vue +2 -2
  166. package/src/widgets/ParagraphSetting.vue +16 -13
  167. package/src/widgets/PositionSetting.vue +209 -0
  168. package/src/widgets/PresetBar.vue +359 -210
  169. package/src/widgets/PresetBarPivot.vue +31 -19
  170. package/src/widgets/PresetSelector.vue +29 -17
  171. package/src/widgets/SearchModalSetting.vue +70 -0
  172. package/src/widgets/Share.vue +1 -2
  173. package/src/widgets/ShareSetting.vue +67 -60
  174. package/src/widgets/StyleSetting.vue +227 -116
  175. package/src/widgets/TestimonialSetting.vue +97 -88
  176. package/src/widgets/TextBlockSetting.vue +16 -13
  177. package/src/widgets/UserActionBuilder/UserActionConsole.vue +30 -10
  178. package/src/widgets/UserActionBuilder/UserActionOutput.vue +2 -2
  179. package/src/widgets/UserActionBuilder/UserActionOutputReply.vue +64 -87
  180. package/src/widgets/UserActionBuilder/UserActionProps.vue +3 -3
  181. package/src/widgets/UserActionBuilder.vue +4 -16
  182. package/src/widgets/WebComponentSelector.vue +15 -11
  183. package/src/widgets/WebLayoutSelector.vue +41 -270
  184. package/src/widgets/WebPageBuilder.vue +693 -704
  185. package/src/widgets/WebPageBuilder2.vue +7 -7
  186. package/src/widgets/WebPageBuilder4/ButtonSetting.vue +0 -8
  187. package/src/widgets/WebPageBuilder4/CarouselSetting.vue +63 -7
  188. package/src/widgets/WebPageBuilder4/FlexAlignSetting.vue +3 -3
  189. package/src/widgets/WebPageBuilder4/FlexSetting.vue +1 -10
  190. package/src/widgets/WebPageBuilder4/MultiValueSetting.vue +2 -2
  191. package/src/widgets/WebPageBuilder4/PropertySetting.vue +0 -7
  192. package/src/widgets/WebPageBuilder4/WebPageComponentSelector.vue +1 -7
  193. package/src/widgets/WebPageBuilder4.vue +289 -575
  194. package/src/widgets/WebPageSelector.vue +1 -1
  195. package/src/widgets/YoutubeVideoSetting.vue +16 -13
  196. package/tailwind.config.js +3 -35
  197. package/docs/schema/user-action.json +0 -266
  198. package/src/App.vue +0 -25
  199. package/src/components/SearchButton.vue +0 -57
  200. package/src/entry-client.js +0 -27
  201. package/src/entry-server.js +0 -73
  202. package/src/events/event.js +0 -2
  203. package/src/main.js +0 -29
  204. package/src/mixin/website.js +0 -121
  205. package/src/router.js +0 -57
  206. package/src/widgets/MobileMenu.vue +0 -182
  207. package/src/widgets/WebPageBuilder4/ActionSetting.vue +0 -158
  208. package/src/widgets/WebPageBuilder4/ColorSetting.vue +0 -63
  209. package/src/widgets/WebPageBuilder4/DataSetting.vue +0 -92
  210. package/src/widgets/WebPageBuilder4/FontSizeSetting.vue +0 -76
  211. package/src/widgets/WebPageBuilder4/LinkSetting.vue +0 -68
  212. package/src/widgets/WebPageBuilder4/MobileMenuSetting.vue +0 -106
  213. package/src/widgets/WebPageBuilder4/Setting.vue +0 -73
  214. package/src/widgets/WebPageBuilder4/StyleSetting.vue +0 -77
  215. package/src/widgets/WebPageBuilder4/SvgSetting.vue +0 -207
  216. package/src/widgets/WebPageBuilder4/TextTransformSetting.vue +0 -70
  217. package/src/widgets/WebPageBuilder4/WebPageDataEdit.vue +0 -121
  218. package/test.json +0 -22
  219. /package/src/widgets/{Header1.vue → Header0.vue} +0 -0
  220. /package/src/widgets/{Header1Setting.vue → Header0Setting.vue} +0 -0
@@ -1,55 +1,74 @@
1
1
  <template>
2
2
  <div :class="$style.comp">
3
3
 
4
- <div>
5
- <div class="flex flex-row gap-1 items-center cursor-pointer">
6
- <svg v-if="!expanded['custom']" width="12" height="12" @click="expanded['custom'] = !expanded['custom']" class="fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><path d="M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"/></svg>
7
- <svg v-else width="12" height="12" @click="expanded['custom'] = !expanded['custom']" class="fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"/></svg>
8
- <strong class="flex-1 text-text-400 line-clamp-1" @click="expanded['custom'] = !expanded['custom']">Custom Property</strong>
9
- <button type="button" class="text-primary" @click="$router.replace({ hash:'#select-property' })">
10
- <svg width="16" height="16" class="fill-text-300 hover:fill-primary-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M368 224H224V80c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v144H16c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h144v144c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V288h144c8.84 0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z"/></svg>
11
- </button>
4
+ <div class="flex flex-col divide-y divide-border-50">
5
+
6
+ <div v-for="(values, key) in viewedItems" class="p-6 py-4 relative">
7
+ <div class="absolute top-0 right-0">
8
+ <button type="button" class="p-3" @click="delete item.props[key]">
9
+ <svg width="14" height="14" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z"/></svg>
10
+ </button>
11
+ </div>
12
+
13
+ <component v-if="keys[key].values.type"
14
+ :is="keys[key].values.type"
15
+ :="keys[key].values"
16
+ :item="item"
17
+ :view-types="viewTypes"
18
+ :view-index="viewIndex"
19
+ :view-type="viewType"
20
+ :name="key"
21
+ :text="keys[key].text" />
22
+
23
+ <div v-else class="flex flex-col gap-1 mt-1">
24
+ <small class="flex-1 text-text-400">{{ keys[key].text }}</small>
25
+
26
+ <Dropdown v-model="values[viewIndex]" class="flex-1 w-full max-w-[300px]">
27
+ <option value="">Default</option>
28
+ <option v-for="kValue in keys[key].values" :value="`${viewType}${kValue[0]}`">{{ kValue[1] ?? kValue[0] }}</option>
29
+ </Dropdown>
30
+ </div>
31
+
12
32
  </div>
13
33
 
14
- <div class="h-[1px] bg-text-100 mt-2 mb-4"></div>
34
+ <div class="p-3">
35
+ <div class="text-center">
36
+ <button type="button" class="text-primary p-3" ref="addBtn" @click="select">Add Property</button>
37
+ </div>
15
38
 
16
- <div v-if="expanded['custom']" class="flex flex-col gap-10">
39
+ <ContextMenu ref="contextMenu"
40
+ position="bottom"
41
+ @dismiss="search = ''"
42
+ class="rounded-none"
43
+ @open="$refs.search.select()">
44
+ <div class="flex flex-col min-w-[200px] h-[80vh]" @click.stop>
17
45
 
18
- <div v-for="(values, key) in viewedItems">
19
- <div class="flex flex-row items-center gap-2">
20
- <label class="flex-1 text-text-400">{{ keys[key].text }}</label>
21
- <button type="button" v-if="values.length < 2" @click="values.push('')">
22
- <svg width="16" height="16" class="fill-text-300 hover:fill-primary-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M352 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 12zm96-160v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"/></svg>
23
- </button>
24
- <button type="button" @click="delete item.props[key]">
25
- <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>
26
- </button>
27
- </div>
28
- <div class="mt-1 flex flex-row gap-2">
29
- <div v-for="(_, index) in values" class="items-start">
30
- <div class="flex flex-row items-center" v-if="values.length > 1">
31
- <small class="flex-1 text-text-300">{{ viewTypes[index].text }}</small>
32
- <button type="button" v-if="index > 0" @click="values.splice(index, 1)">
33
- <svg width="11" height="11" 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>
34
- </button>
35
- </div>
36
- <div class="flex flex-row items-start gap-2">
37
- <Dropdown v-if="Array.isArray(keys[key].values)" v-model="values[index]" class="flex-1 max-w-[300px]">
38
- <option value="">Default</option>
39
- <option v-for="kValue in keys[key].values" :value="`${viewTypes[index].value}${kValue[0]}`">{{ kValue[1] ?? kValue[0] }}</option>
40
- </Dropdown>
41
- <component v-else
42
- :is="keys[key].values.type"
43
- :="keys[key].values"
44
- :keys="componentKeysForIndex(keys[key].values, index)"
45
- v-model="values[index]"
46
- class="flex-1 max-w-[300px]" />
46
+ <div class="p-3">
47
+ <strong>Select Property</strong>
48
+ <Textbox ref="search" class="mt-3" v-model="search" placeholder="Search..." :clearable="true" @clear="search = ''"></Textbox>
49
+ </div>
50
+
51
+ <div class="flex-1 flex flex-col gap-3 overflow-y-auto px-3">
52
+ <div v-for="group in viewedGroups" class="flex flex-col gap-2">
53
+ <div class="px-5">
54
+ <strong class="text-text-400">{{ group.text }}</strong>
55
+ </div>
56
+ <div class="h-[1px] bg-text-100"></div>
57
+ <div class="">
58
+ <div v-for="item in group.items">
59
+ <button :class="appStyle.menuItem"
60
+ type="button" @click="add(item);$refs.contextMenu.close()">
61
+ {{ item.text }}
62
+ </button>
63
+ </div>
64
+ </div>
47
65
  </div>
48
66
  </div>
49
- </div>
50
- </div>
51
67
 
68
+ </div>
69
+ </ContextMenu>
52
70
  </div>
71
+
53
72
  </div>
54
73
 
55
74
  <Modal ref="modal" width="480" height="480" hash="#select-property"
@@ -58,7 +77,7 @@
58
77
  <div class="relative p-6 flex flex-col gap-4">
59
78
  <h3>Add Property</h3>
60
79
  <div class="absolute top-0 right-0 p-2">
61
- <button type="button" class="p-2" @click="$router.replace({ hash:'' })">
80
+ <button type="button" class="p-2" @click="$router.replace({ hash:$route.hash.replace('#select-property', '') })">
62
81
  <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">
63
82
  <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"/>
64
83
  </svg>
@@ -101,7 +120,7 @@ export default{
101
120
 
102
121
  emits: [ 'change' ],
103
122
 
104
- inject: [ 'imageUrl', 'store', 'uploadImage' ],
123
+ inject: [ 'appStyle', 'getRightPane' ],
105
124
 
106
125
  props: {
107
126
 
@@ -110,79 +129,39 @@ export default{
110
129
  required: true
111
130
  },
112
131
 
132
+ viewIndex: Number,
133
+
113
134
  viewType: String,
114
135
 
115
136
  viewTypes: Array,
116
137
 
117
- excludes: Array,
138
+ excludes: {
139
+ type: Array,
140
+ default: []
141
+ },
118
142
 
119
143
  },
120
144
 
121
145
  methods: {
122
146
 
123
147
  add(item){
124
- if(!this.item.props[item.key])
148
+ if(!Array.isArray(this.item.props[item.key]))
125
149
  this.item.props[item.key] = []
126
150
 
127
151
  this.item.props[item.key].push('')
128
152
 
129
- this.$router.replace({ hash:'' })
130
- },
131
-
132
- componentKeysForIndex(values, index){
133
-
134
- let keys
135
- if(values.keys){
136
-
137
- const prefix = this.viewTypes[index].value
138
-
139
- keys = values.keys.map(arr => {
140
- arr = arr.map(_ => prefix + _)
141
- return arr
142
- })
143
- }
144
- return keys
153
+ this.$router.replace({ hash:this.$route.hash.replace('#select-property', '') })
145
154
  },
146
155
 
147
- emptyComponentText(key, index){
148
- if(index > 0){
149
- let text = '-'
150
- for(let i = index - 1 ; i >= 0 ; i--){
151
- let prevValue = this[key][i]
152
- if(prevValue && typeof prevValue === 'string'){
153
- prevValue = prevValue.substring(prevValue.indexOf(':') + 1)
154
- const prevOpt = this.components[key].filter(_ => _[1] === prevValue).pop()
155
- if(prevOpt){
156
- text = prevOpt[0]
157
- break
158
- }
159
- }
160
- }
161
- return text
162
- }
163
- return '-'
156
+ select(){
157
+ const ref = this.getRightPane() ?? this.$refs.addBtn
158
+ this.$refs.contextMenu.open(ref)
164
159
  },
165
160
 
166
161
  },
167
162
 
168
163
  computed: {
169
164
 
170
- componentStore(){
171
- if(this.store && this.store.components){
172
- if(!this.store.components.compsetting)
173
- this.store.components.compsetting = {}
174
-
175
- return this.store.components.compsetting
176
- }
177
- return {}
178
- },
179
-
180
- expanded(){
181
- if(!this.componentStore['expanded'])
182
- this.componentStore['expanded'] = {}
183
- return this.componentStore['expanded']
184
- },
185
-
186
165
  keys(){
187
166
  const items = {}
188
167
 
@@ -200,11 +179,8 @@ export default{
200
179
  let items = {}
201
180
 
202
181
  for(let key in this.item.props){
203
- if(this.keys[key] && (!Array.isArray(this.excludes) || !this.excludes.includes(key)) &&
204
- (
205
- Array.isArray(this.item.props[key]) &&
206
- this.item.props[key].length > 0
207
- )){
182
+ if(this.keys[key] && !this.excludes.includes(key) &&
183
+ ( Array.isArray(this.item.props[key]) && this.item.props[key].length > 0)){
208
184
  items[key] = this.item.props[key]
209
185
  }
210
186
  }
@@ -267,13 +243,7 @@ export default{
267
243
  [ 'aspect-[8/9]', '8/9' ],
268
244
  ]},
269
245
 
270
- { text:'Position', key:'position', values: [
271
- [ 'static', 'Static' ],
272
- [ 'fixed', 'Fixed' ],
273
- [ 'absolute', 'Absolute' ],
274
- [ 'relative', 'Relative' ],
275
- [ 'sticky', 'Sticky' ],
276
- ]},
246
+ { text:'Position', key:'position', values: { type: 'PositionSetting' }},
277
247
 
278
248
  { text:'Display', key:'display', values: [
279
249
  [ 'hidden', 'Hidden' ],
@@ -306,74 +276,14 @@ export default{
306
276
  [ 'overflow-y-scroll', 'Y Scroll' ],
307
277
  ]},
308
278
 
309
- { text:'Top', key:'top', values: [
310
- [ 'top-0', '0' ],
311
- [ 'top-4', '4' ],
312
- [ 'top-6', '6' ],
313
- [ 'top-8', '8' ],
314
- [ 'top-12', '12' ],
315
- [ 'top-16', '16' ],
316
- [ 'top-20', '20' ],
317
- [ 'top-24', '24' ],
318
- [ 'top-28', '28' ],
319
- [ 'top-32', '32' ],
320
- [ 'top-36', '36' ],
321
- [ 'top-48', '48' ],
322
- ]},
323
-
324
- { text:'Left', key:'left', values: [
325
- [ 'left-0', '0' ],
326
- [ 'left-4', '4' ],
327
- [ 'left-6', '6' ],
328
- [ 'left-8', '8' ],
329
- [ 'left-12', '12' ],
330
- [ 'left-16', '16' ],
331
- [ 'left-20', '20' ],
332
- [ 'left-24', '24' ],
333
- [ 'left-28', '28' ],
334
- [ 'left-32', '32' ],
335
- [ 'left-36', '36' ],
336
- [ 'left-48', '48' ],
337
- ]},
338
-
339
- { text:'Right', key:'right', values: [
340
- [ 'right-0', '0' ],
341
- [ 'right-4', '4' ],
342
- [ 'right-6', '6' ],
343
- [ 'right-8', '8' ],
344
- [ 'right-12', '12' ],
345
- [ 'right-16', '16' ],
346
- [ 'right-20', '20' ],
347
- [ 'right-24', '24' ],
348
- [ 'right-28', '28' ],
349
- [ 'right-32', '32' ],
350
- [ 'right-36', '36' ],
351
- [ 'right-48', '48' ],
352
- ]},
353
-
354
- { text:'Bottom', key:'bottom', values: [
355
- [ 'bottom-0', '0' ],
356
- [ 'bottom-4', '4' ],
357
- [ 'bottom-6', '6' ],
358
- [ 'bottom-8', '8' ],
359
- [ 'bottom-12', '12' ],
360
- [ 'bottom-16', '16' ],
361
- [ 'bottom-20', '20' ],
362
- [ 'bottom-24', '24' ],
363
- [ 'bottom-28', '28' ],
364
- [ 'bottom-32', '32' ],
365
- [ 'bottom-36', '36' ],
366
- [ 'bottom-48', '48' ],
367
- ]},
368
-
369
- { text:'Z Index', key:'zIndex', zIndex: [
279
+ { text:'Z Index', key:'zIndex', values: [
370
280
  [ 'z-0', '0' ],
371
281
  [ 'z-10', '10' ],
372
282
  [ 'z-20', '20' ],
373
283
  [ 'z-30', '30' ],
374
284
  [ 'z-40', '40' ],
375
285
  [ 'z-50', '50' ],
376
- ]}
286
+ ]},
377
287
 
378
288
  ]},
379
289
 
@@ -390,9 +300,9 @@ export default{
390
300
  { text:'Flex Align', key:'flexAlign', values: [
391
301
  [ 'items-start', 'Start' ],
392
302
  [ 'items-end', 'End' ],
393
- [ 'Center', 'items-center' ],
394
- [ 'Baseline', 'items-baseline' ],
395
- [ 'Stretch', 'items-stretch' ],
303
+ [ 'items-center', 'Center' ],
304
+ [ 'items-baseline', 'Baseline' ],
305
+ [ 'items-stretch', 'Stretch' ],
396
306
  ]},
397
307
 
398
308
  { text:'Flex Basis', key:'flexBasis', values: [
@@ -480,49 +390,13 @@ export default{
480
390
 
481
391
  { text:'Backgrounds', items: [
482
392
 
483
- { text:'Background Color', key:'bgColors', values:{
484
- type:'ColorPicker2',
485
- keys: [ ['bg-']]
486
- }},
487
-
488
- { text:'Background Position', key:'bgPosition', values: [
489
- [ 'bg-center', 'Center' ],
490
- [ 'bg-top', 'Top' ],
491
- [ 'bg-right', 'Right' ],
492
- [ 'bg-bottom', 'Bottom' ],
493
- [ 'bg-left', 'Left' ],
494
- [ 'bg-top-right', 'Top Right' ],
495
- [ 'bg-top-left', 'Top Left' ],
496
- [ 'bg-bottom-right', 'Bottom Right' ],
497
- [ 'bg-bottom-left', 'Bottom Left' ],
498
- ]},
499
-
500
- { text:'Background Repeat', bgRepeat:'', values: [
501
- [ 'bg-repeat', 'Repeat' ],
502
- [ 'bg-no-repeat', 'No Repeat' ],
503
- [ 'bg-repeat-x', 'Repeat X' ],
504
- [ 'bg-repeat-y', 'Repeat Y' ],
505
- [ 'bg-repeat-round', 'Repeat Round' ],
506
- [ 'bg-repeat-space', 'Repeat Space' ],
507
- ]},
508
-
509
- { text:'Background Size', key:'bgSize', values: [
510
- [ 'bg-auto', 'Auto' ],
511
- [ 'bg-cover', 'Cover' ],
512
- [ 'bg-contain', 'Contain' ],
513
- [ 'bg-50%', '50%' ],
514
- [ 'bg-20%', '20%' ],
515
- [ 'bg-10%', '10%' ],
516
- ]}
393
+ { text:'Background', key:'bgColors', values:{ type:'BackgroundColorSetting' }},
517
394
 
518
395
  ]},
519
396
 
520
397
  { text:'Borders', items: [
521
398
 
522
- { text:'Border Color', key:'bdColor', values:{
523
- type:'ColorPicker2',
524
- keys: [ ['border-']]
525
- }},
399
+ { text:'Border Color', key:'bdColor', values:{ type:'BorderColorSetting' }},
526
400
 
527
401
  { text:'Border Size', key:'bdSize', values: {
528
402
  type: 'MultiValueSetting2',
@@ -533,10 +407,10 @@ export default{
533
407
  { text:'Border Radius', key:'bdRadius', values: [
534
408
  [ 'rounded-none', 'None' ],
535
409
  [ 'rounded', 'Normal' ],
536
- [ 'rounded-sm', 'Sm' ],
537
- [ 'rounded-md', 'Md' ],
538
- [ 'rounded-lg', 'Lg' ],
539
- [ 'rounded-xl', 'Xl' ],
410
+ [ 'rounded-sm', 'Small' ],
411
+ [ 'rounded-md', 'Medium' ],
412
+ [ 'rounded-lg', 'Large' ],
413
+ [ 'rounded-xl', 'Extra Large' ],
540
414
  [ 'rounded-2xl', '2xl' ],
541
415
  [ 'rounded-3xl', '3xl' ],
542
416
  [ 'rounded-full', 'Full' ],
@@ -678,16 +552,16 @@ export default{
678
552
  [ 'h-32', '32' ],
679
553
  [ 'h-36', '36' ],
680
554
  [ 'h-48', '48' ],
681
- [ 'h-10vh', '10vh' ],
682
- [ 'h-20vh', '20vh' ],
683
- [ 'h-30vh', '30vh' ],
684
- [ 'h-40vh', '40vh' ],
685
- [ 'h-50vh', '50vh' ],
686
- [ 'h-60vh', '60vh' ],
687
- [ 'h-70vh', '70vh' ],
688
- [ 'h-80vh', '80vh' ],
689
- [ 'h-90vh', '90vh' ],
690
- [ 'h-100vh', '100vh' ]
555
+ [ 'h-[10vh]', '10vh' ],
556
+ [ 'h-[20vh]', '20vh' ],
557
+ [ 'h-[30vh]', '30vh' ],
558
+ [ 'h-[40vh]', '40vh' ],
559
+ [ 'h-[50vh]', '50vh' ],
560
+ [ 'h-[60vh]', '60vh' ],
561
+ [ 'h-[70vh]', '70vh' ],
562
+ [ 'h-[80vh]', '80vh' ],
563
+ [ 'h-[90vh]', '90vh' ],
564
+ [ 'h-[100vh]', '100vh' ]
691
565
  ]},
692
566
 
693
567
  { text:'Min Height', key:'minHeight', values: [
@@ -821,17 +695,15 @@ export default{
821
695
  [ 'w-[360px]', '360px' ],
822
696
  [ 'w-[420px]', '420px' ],
823
697
  [ 'w-[480px]', '480px' ],
824
- [ 'w-1/12', '1/12' ],
825
- [ 'w-2/12', '2/12' ],
826
- [ 'w-3/12', '3/12' ],
827
- [ 'w-4/12', '4/12' ],
828
- [ 'w-5/12', '5/12' ],
829
- [ 'w-6/12', '6/12' ],
830
- [ 'w-7/12', '7/12' ],
831
- [ 'w-8/12', '8/12' ],
832
- [ 'w-9/12', '9/12' ],
833
- [ 'w-10/12', '10/12' ],
834
- [ 'w-11/12', '11/12' ],
698
+ [ 'w-[10vw]', '10vw' ],
699
+ [ 'w-[20vw]', '20vw' ],
700
+ [ 'w-[30vw]', '30vw' ],
701
+ [ 'w-[40vw]', '40vw' ],
702
+ [ 'w-[50vw]', '50vw' ],
703
+ [ 'w-[60vw]', '60vw' ],
704
+ [ 'w-[70vw]', '70vw' ],
705
+ [ 'w-[80vw]', '80vw' ],
706
+ [ 'w-[90vw]', '90vw' ],
835
707
  ]}
836
708
 
837
709
  ]},
@@ -912,6 +784,12 @@ export default{
912
784
  [ 'text-end', 'End' ],
913
785
  ]},
914
786
 
787
+ { text:'Text Color', key:'textColor', values:{
788
+ type:'ColorPicker2',
789
+ keys: [ ['text-']],
790
+ title: "Text Color"
791
+ }},
792
+
915
793
  { text:'Text Decoration', key:'textDecoration', values: [
916
794
  [ 'underline', 'Underline' ],
917
795
  [ 'overline', 'Overline' ],
@@ -225,7 +225,7 @@ export default{
225
225
  <style module>
226
226
 
227
227
  .comp{
228
- @apply flex-1 flex flex-col divide-y divide-text-50;
228
+ @apply flex-1 flex flex-col divide-y divide-border-50;
229
229
  }
230
230
 
231
231
  </style>
@@ -35,7 +35,7 @@
35
35
  </div>
36
36
 
37
37
  <div>
38
- <Button ref="submitBtn" class="w-full" @click="submitForm" :state="!canSubmit ? -1 : 1">
38
+ <Button ref="submitBtn" class="w-full" @click="submitForm" :state="canSubmit ? 1 : -1">
39
39
  <h5>Kirim</h5>
40
40
  </Button>
41
41
  </div>
@@ -106,7 +106,7 @@ export default{
106
106
  this.$refs.submitBtn.setState(2)
107
107
  this.axios({
108
108
  method: this.submitMethod ?? 'post',
109
- url: import.meta.env.VITE_API_HOST + this.submitUrl,
109
+ url: this.submitUrl,
110
110
  data: {
111
111
  url: this.$route.path,
112
112
  host: location.hostname,
@@ -186,7 +186,7 @@ export default{
186
186
 
187
187
  .comp{
188
188
  @apply flex-1 w-full max-w-[480px] mx-auto rounded-lg overflow-hidden;
189
- @apply border-text-200 border-[1px] p-6;
189
+ @apply border-border-200 border-[1px] p-6;
190
190
  @apply flex flex-col gap-12 bg-base;
191
191
  }
192
192