@mixd-id/web-scaffold 0.1.2301231369 → 0.2.240702

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 (249) hide show
  1. package/LICENSE +1 -0
  2. package/docs/components/Header2.md +16 -0
  3. package/docs/components/TreeView.md +0 -0
  4. package/package.json +22 -5
  5. package/src/App.vue +9 -1
  6. package/src/components/Ahref.vue +175 -9
  7. package/src/components/Alert.vue +181 -75
  8. package/src/components/Article.vue +393 -0
  9. package/src/components/Block.vue +31 -0
  10. package/src/components/Box.vue +34 -0
  11. package/src/components/Button.vue +208 -129
  12. package/src/components/Carousel.vue +194 -124
  13. package/src/components/Chart.vue +485 -0
  14. package/src/components/ChartBar.vue +193 -0
  15. package/src/components/Checkbox.vue +95 -55
  16. package/src/components/CodeEditor.vue +61 -0
  17. package/src/components/ColorPicker.vue +158 -0
  18. package/src/components/ColorPicker2.vue +164 -0
  19. package/src/components/Confirm.vue +178 -0
  20. package/src/components/ContextMenu.vue +164 -76
  21. package/src/components/ConversationBuilder.vue +161 -0
  22. package/src/components/CopyToClipboard.vue +6 -31
  23. package/src/components/Countdown.vue +104 -53
  24. package/src/components/DGrid.vue +21 -0
  25. package/src/components/DGridItem.vue +263 -0
  26. package/src/components/DataList.vue +92 -0
  27. package/src/components/Datepicker.vue +65 -41
  28. package/src/components/DayTimeRange.vue +125 -0
  29. package/src/components/Dropdown.vue +32 -9
  30. package/src/components/ErrorText.vue +30 -9
  31. package/src/components/FBLogin.vue +194 -0
  32. package/src/components/Flex.vue +70 -0
  33. package/src/components/GSignIn.vue +166 -0
  34. package/src/components/Gmaps.vue +35 -11
  35. package/src/components/Grid.vue +24 -20
  36. package/src/components/HTMLEditor.vue +258 -79
  37. package/src/components/IconMenu.vue +95 -0
  38. package/src/components/IconMenu2.vue +89 -0
  39. package/src/components/IconPlus.vue +89 -0
  40. package/src/components/Image.vue +161 -59
  41. package/src/components/Image360.vue +2 -2
  42. package/src/components/ImagePreview.vue +23 -11
  43. package/src/components/ImportModal.vue +27 -14
  44. package/src/components/Link.vue +39 -0
  45. package/src/components/List.vue +1177 -0
  46. package/src/components/ListItem.vue +32 -21
  47. package/src/components/ListPage1.vue +88 -17
  48. package/src/components/ListPage1Filter.vue +2 -2
  49. package/src/components/ListView.vue +962 -0
  50. package/src/components/ListViewBarSummary.vue +81 -0
  51. package/src/components/ListViewLineSummary.vue +75 -0
  52. package/src/components/ListViewLiveBarSummary.vue +52 -0
  53. package/src/components/ListViewMapSummary.vue +56 -0
  54. package/src/components/ListViewSettings.vue +514 -0
  55. package/src/components/ListViewTableSummary.vue +77 -0
  56. package/src/components/LogViewerItem.vue +116 -0
  57. package/src/components/Modal.vue +274 -122
  58. package/src/components/MultilineText.vue +177 -0
  59. package/src/components/OTPField.vue +5 -6
  60. package/src/components/ObjectTree.vue +105 -0
  61. package/src/components/PageBuilder.vue +449 -0
  62. package/src/components/Paragraph.vue +41 -0
  63. package/src/components/PresetSelectorFilterItem.vue +178 -0
  64. package/src/components/Radio.vue +62 -87
  65. package/src/components/SearchButton.vue +1 -1
  66. package/src/components/Slider.vue +107 -75
  67. package/src/components/Svg.vue +33 -0
  68. package/src/components/Switch.vue +15 -5
  69. package/src/components/TabView.vue +0 -1
  70. package/src/components/Table.vue +56 -0
  71. package/src/components/TableViewHead.vue +2 -2
  72. package/src/components/Tabs.vue +68 -11
  73. package/src/components/Test.vue +23 -0
  74. package/src/components/Testimonial.vue +86 -0
  75. package/src/components/Text.vue +49 -0
  76. package/src/components/TextBlock.vue +50 -0
  77. package/src/components/TextWithTag.vue +225 -0
  78. package/src/components/Textarea.vue +22 -16
  79. package/src/components/Textbox.vue +83 -62
  80. package/src/components/Thumbnail.vue +27 -0
  81. package/src/components/Timepicker.vue +15 -8
  82. package/src/components/Toast.vue +60 -38
  83. package/src/components/TreeView.vue +101 -0
  84. package/src/components/TreeViewItem.vue +424 -0
  85. package/src/components/TreeViewItem1.vue +282 -0
  86. package/src/components/VirtualGrid.vue +284 -0
  87. package/src/components/VirtualScroll.vue +88 -21
  88. package/src/components/VirtualTable.vue +277 -71
  89. package/src/components/YoutubeVideo.vue +196 -0
  90. package/src/configs/icons-fa.json +12 -0
  91. package/src/events/event.js +2 -0
  92. package/src/index.js +477 -53
  93. package/src/main.js +0 -9
  94. package/src/middleware/http/trim-string.js +20 -0
  95. package/src/mixin/component.js +222 -0
  96. package/src/mixin/website.js +121 -0
  97. package/src/stores/components.js +36 -0
  98. package/src/themes/default/index.js +178 -34
  99. package/src/utils/helpers.js +378 -7
  100. package/src/utils/helpers.mjs +274 -16
  101. package/src/utils/importer.js +60 -26
  102. package/src/utils/listpage1.js +403 -267
  103. package/src/utils/listview.js +1287 -0
  104. package/src/utils/preset-selector.js +1055 -0
  105. package/src/utils/preset-selector.mjs +185 -0
  106. package/src/utils/selection.js +15 -36
  107. package/src/utils/web.js +50 -0
  108. package/src/utils/wss.js +294 -0
  109. package/src/utils/wss.mjs +280 -0
  110. package/src/widgets/AhrefSetting.vue +94 -0
  111. package/src/widgets/ArticleSetting.vue +469 -0
  112. package/src/widgets/BackgroundSetting.vue +132 -0
  113. package/src/widgets/BlockSetting.vue +49 -0
  114. package/src/widgets/BorderSetting.vue +201 -0
  115. package/src/widgets/BoxSetting.vue +53 -0
  116. package/src/widgets/ButtonSetting.vue +114 -0
  117. package/src/widgets/CarouselSetting.vue +193 -0
  118. package/src/widgets/ColumnSelector.vue +80 -0
  119. package/src/widgets/ComponentPropertyLabel.vue +35 -0
  120. package/src/widgets/ComponentPropertySelector.vue +115 -0
  121. package/src/widgets/ComponentSetting.vue +2220 -0
  122. package/src/widgets/ComponentSetting2.vue +1018 -0
  123. package/src/widgets/ComponentSetting3.vue +231 -0
  124. package/src/widgets/ContactForm.vue +193 -0
  125. package/src/widgets/ContactFormSetting.vue +384 -0
  126. package/src/widgets/CountdownSetting.vue +76 -0
  127. package/src/widgets/DataListSetting.vue +102 -0
  128. package/src/widgets/EffectSetting.vue +94 -0
  129. package/src/widgets/EmbeddedVideo.vue +60 -0
  130. package/src/widgets/EmbeddedVideoSetting.vue +48 -0
  131. package/src/widgets/FAQ.vue +85 -0
  132. package/src/widgets/FAQSetting.vue +88 -0
  133. package/src/widgets/FeatureList.vue +128 -0
  134. package/src/widgets/FeatureListSetting.vue +223 -0
  135. package/src/widgets/FiltersSetting.vue +88 -0
  136. package/src/widgets/FlexSetting.vue +197 -0
  137. package/src/widgets/GridSetting.vue +290 -0
  138. package/src/widgets/Header.vue +15 -0
  139. package/src/widgets/Header1.vue +41 -0
  140. package/src/widgets/Header1Setting.vue +75 -0
  141. package/src/widgets/Header2.vue +102 -0
  142. package/src/widgets/Header2Setting.vue +277 -0
  143. package/src/widgets/HeaderSetting.vue +104 -0
  144. package/src/widgets/IconList.vue +51 -0
  145. package/src/widgets/IconListSetting.vue +184 -0
  146. package/src/widgets/ImageSetting.vue +146 -0
  147. package/src/widgets/LayoutSetting.vue +251 -0
  148. package/src/widgets/LinkSetting.vue +186 -0
  149. package/src/widgets/LogViewer.vue +85 -0
  150. package/src/widgets/MarginPaddingSetting.vue +58 -0
  151. package/src/widgets/MarginSetting.vue +142 -0
  152. package/src/widgets/MenuEditor.vue +256 -0
  153. package/src/widgets/MobileMenu.vue +182 -0
  154. package/src/widgets/ModalSetting.vue +96 -0
  155. package/src/widgets/MultiValueSetting.vue +121 -0
  156. package/src/widgets/MultiValueSetting2.vue +114 -0
  157. package/src/widgets/PaddingSetting.vue +142 -0
  158. package/src/widgets/ParagraphSetting.vue +86 -0
  159. package/src/widgets/PresetBar.vue +880 -0
  160. package/src/widgets/PresetBarPivotColumnEdit.vue +197 -0
  161. package/src/widgets/PresetSelector.vue +673 -0
  162. package/src/widgets/Review.vue +131 -0
  163. package/src/widgets/ReviewSetting.vue +201 -0
  164. package/src/widgets/Share.vue +165 -0
  165. package/src/widgets/ShareSetting.vue +92 -0
  166. package/src/widgets/SizingSetting.vue +306 -0
  167. package/src/widgets/SpacingSetting.vue +77 -0
  168. package/src/widgets/StyleSetting.vue +328 -0
  169. package/src/widgets/StyleSetting2.vue +90 -0
  170. package/src/widgets/SvgSetting.vue +133 -0
  171. package/src/widgets/TableSetting.vue +172 -0
  172. package/src/widgets/TestimonialSetting.vue +152 -0
  173. package/src/widgets/TextBlockSetting.vue +78 -0
  174. package/src/widgets/ThumbnailSetting.vue +49 -0
  175. package/src/widgets/TransitionSetting.vue +64 -0
  176. package/src/widgets/TypographySetting.vue +334 -0
  177. package/src/widgets/UserActionBuilder/UserActionItem.vue +165 -0
  178. package/src/widgets/UserActionBuilder/UserActionOutput.vue +126 -0
  179. package/src/widgets/UserActionBuilder.vue +457 -0
  180. package/src/widgets/WebComponentSelector.vue +201 -0
  181. package/src/widgets/WebDatasourceSelector.vue +153 -0
  182. package/src/widgets/WebLayoutSelector.vue +376 -0
  183. package/src/widgets/WebPageBuilder.vue +1849 -0
  184. package/src/widgets/WebPageBuilder2.vue +1091 -0
  185. package/src/widgets/WebPageBuilder3.vue +411 -0
  186. package/src/widgets/WebPageBuilder4/ActionSetting.vue +158 -0
  187. package/src/widgets/WebPageBuilder4/BackgroundColorSetting.vue +54 -0
  188. package/src/widgets/WebPageBuilder4/BackgroundPositionSetting.vue +75 -0
  189. package/src/widgets/WebPageBuilder4/BackgroundRepeatSetting.vue +72 -0
  190. package/src/widgets/WebPageBuilder4/BackgroundSizeSetting.vue +72 -0
  191. package/src/widgets/WebPageBuilder4/BlurSetting.vue +72 -0
  192. package/src/widgets/WebPageBuilder4/BorderColorSetting.vue +64 -0
  193. package/src/widgets/WebPageBuilder4/BorderRadiusSetting.vue +75 -0
  194. package/src/widgets/WebPageBuilder4/BorderSizeSetting.vue +69 -0
  195. package/src/widgets/WebPageBuilder4/BorderStyleSetting.vue +72 -0
  196. package/src/widgets/WebPageBuilder4/BoxShadowSetting.vue +73 -0
  197. package/src/widgets/WebPageBuilder4/ButtonSetting.vue +73 -0
  198. package/src/widgets/WebPageBuilder4/CarouselSetting.vue +122 -0
  199. package/src/widgets/WebPageBuilder4/ColorSetting.vue +63 -0
  200. package/src/widgets/WebPageBuilder4/DataSetting.vue +92 -0
  201. package/src/widgets/WebPageBuilder4/DisplaySetting.vue +76 -0
  202. package/src/widgets/WebPageBuilder4/FlexAlignSetting.vue +71 -0
  203. package/src/widgets/WebPageBuilder4/FlexDirectionSetting.vue +70 -0
  204. package/src/widgets/WebPageBuilder4/FlexJustifySetting.vue +74 -0
  205. package/src/widgets/WebPageBuilder4/FlexPropertySetting.vue +71 -0
  206. package/src/widgets/WebPageBuilder4/FlexSetting.vue +105 -0
  207. package/src/widgets/WebPageBuilder4/FlexWrapSetting.vue +69 -0
  208. package/src/widgets/WebPageBuilder4/FontSizeSetting.vue +76 -0
  209. package/src/widgets/WebPageBuilder4/GapSetting.vue +75 -0
  210. package/src/widgets/WebPageBuilder4/GrayscaleSetting.vue +68 -0
  211. package/src/widgets/WebPageBuilder4/GridSetting.vue +166 -0
  212. package/src/widgets/WebPageBuilder4/HeightSetting.vue +95 -0
  213. package/src/widgets/WebPageBuilder4/ImageSetting.vue +102 -0
  214. package/src/widgets/WebPageBuilder4/LinkSetting.vue +68 -0
  215. package/src/widgets/WebPageBuilder4/MarginSetting.vue +70 -0
  216. package/src/widgets/WebPageBuilder4/MaxHeightSetting.vue +82 -0
  217. package/src/widgets/WebPageBuilder4/MaxWidthSetting.vue +90 -0
  218. package/src/widgets/WebPageBuilder4/MinHeightSetting.vue +81 -0
  219. package/src/widgets/WebPageBuilder4/MinWidthSetting.vue +101 -0
  220. package/src/widgets/WebPageBuilder4/MobileMenuSetting.vue +106 -0
  221. package/src/widgets/WebPageBuilder4/MultiValueSetting.vue +155 -0
  222. package/src/widgets/WebPageBuilder4/OpacitySetting.vue +77 -0
  223. package/src/widgets/WebPageBuilder4/OverflowSetting.vue +81 -0
  224. package/src/widgets/WebPageBuilder4/PaddingSetting.vue +53 -0
  225. package/src/widgets/WebPageBuilder4/PositionSetting.vue +191 -0
  226. package/src/widgets/WebPageBuilder4/PropertySetting.vue +183 -0
  227. package/src/widgets/WebPageBuilder4/Setting.vue +73 -0
  228. package/src/widgets/WebPageBuilder4/StyleSetting.vue +77 -0
  229. package/src/widgets/WebPageBuilder4/SvgSetting.vue +207 -0
  230. package/src/widgets/WebPageBuilder4/TextSetting.vue +72 -0
  231. package/src/widgets/WebPageBuilder4/TextTransformSetting.vue +70 -0
  232. package/src/widgets/WebPageBuilder4/TreeView.vue +43 -0
  233. package/src/widgets/WebPageBuilder4/TreeViewItem.vue +329 -0
  234. package/src/widgets/WebPageBuilder4/WebPageComponentSelector.vue +147 -0
  235. package/src/widgets/WebPageBuilder4/WebPageDataEdit.vue +121 -0
  236. package/src/widgets/WebPageBuilder4/WebPagePropertySelector.vue +172 -0
  237. package/src/widgets/WebPageBuilder4/WidthSetting.vue +105 -0
  238. package/src/widgets/WebPageBuilder4/ZIndexSetting.vue +72 -0
  239. package/src/widgets/WebPageBuilder4.vue +1084 -0
  240. package/src/widgets/WebPagePreview.vue +295 -0
  241. package/src/widgets/WebPageSelector.vue +173 -0
  242. package/src/widgets/WebTemplateCreator.vue +156 -0
  243. package/src/widgets/YoutubeVideoSetting.vue +65 -0
  244. package/tailwind.config.js +513 -0
  245. package/test.json +22 -0
  246. package/public/images/mixd-logo2.png +0 -0
  247. package/src/components/ButtonGroup.vue +0 -101
  248. package/src/components/DynamicTemplate.vue +0 -44
  249. package/src/components/GridColumn.vue +0 -31
@@ -0,0 +1,201 @@
1
+ <template>
2
+ <div class="grid grid-cols-2 gap-4">
3
+
4
+ <div v-if="'bdColor' in item.props" class="col-span-2">
5
+ <ComponentPropertyLabel label="Border Color"
6
+ :removable="removable"
7
+ @remove="delete item.props.bdColor" />
8
+ <ColorPicker v-for="(_, idx) in viewTypes"
9
+ v-show="viewType === _.value"
10
+ v-model="bdColor[idx]"
11
+ :prefix="`${viewType}border-`">
12
+ </ColorPicker>
13
+ </div>
14
+
15
+ <div v-if="'bdSize' in item.props" class="col-span-2">
16
+ <ComponentPropertyLabel label="Border Size"
17
+ :removable="removable"
18
+ @remove="delete item.props.bdSize" />
19
+ <MultiValueSetting v-model="bdSize"
20
+ :viewTypes="viewTypes"
21
+ :viewType="viewType"
22
+ :keys="[['border'], ['border-x', 'border-y'], ['border-l', 'border-t', 'border-r', 'border-b']]"
23
+ :values="[['', 'Normal'], ['-0', '0'], ['-2', '2'], ['-4', '4'], ['-8', '8']]" />
24
+ </div>
25
+
26
+ <div v-if="'bdRadius' in item.props" class="col-span-2">
27
+ <ComponentPropertyLabel label="Border Radius"
28
+ :removable="removable"
29
+ @remove="delete item.props.bdRadius" />
30
+ <Dropdown v-for="(_, idx) in viewTypes"
31
+ v-show="viewType === _.value"
32
+ v-model="bdRadius[idx]"
33
+ @change="$emit('change')">
34
+ <option value="">Default</option>
35
+ <option :value="`${viewType}rounded-none`">None</option>
36
+ <option :value="`${viewType}rounded`">Normal</option>
37
+ <option :value="`${viewType}rounded-sm`">Sm</option>
38
+ <option :value="`${viewType}rounded-md`">Md</option>
39
+ <option :value="`${viewType}rounded-lg`">Lg</option>
40
+ <option :value="`${viewType}rounded-xl`">Xl</option>
41
+ <option :value="`${viewType}rounded-2xl`">2xl</option>
42
+ <option :value="`${viewType}rounded-3xl`">3xl</option>
43
+ <option :value="`${viewType}rounded-full`">Full</option>
44
+ </Dropdown>
45
+ </div>
46
+
47
+ <div v-if="'bdStyle' in item.props" class="col-span-2">
48
+ <ComponentPropertyLabel label="Border Style"
49
+ :removable="removable"
50
+ @remove="delete item.props.bdStyle" />
51
+ <Dropdown v-for="(_, idx) in viewTypes"
52
+ v-show="viewType === _.value"
53
+ v-model="bdStyle[idx]"
54
+ @change="$emit('change')">
55
+ <option value="">Default</option>
56
+ <option :value="`${viewType}border-solid`">Solid</option>
57
+ <option :value="`${viewType}border-dashed`">Dashed</option>
58
+ <option :value="`${viewType}border-dotted`">Dotted</option>
59
+ <option :value="`${viewType}border-double`">Double</option>
60
+ <option :value="`${viewType}border-hidden`">Hidden</option>
61
+ <option :value="`${viewType}border-none`">None</option>
62
+ </Dropdown>
63
+ </div>
64
+
65
+ <div v-if="'outlineStyle' in item.props">
66
+ <ComponentPropertyLabel label="Outline Style"
67
+ :removable="removable"
68
+ @remove="delete item.props.outlineStyle" />
69
+ <Dropdown v-for="(_, idx) in viewTypes"
70
+ v-show="viewType === _.value"
71
+ v-model="outlineStyle[idx]"
72
+ @change="$emit('change')">
73
+ <option value="">Default</option>
74
+ <option :value="`${viewType}outline-dashed`">Dashed</option>
75
+ <option :value="`${viewType}outline-dotted`">Dotted</option>
76
+ <option :value="`${viewType}outline-double`">Double</option>
77
+ <option :value="`${viewType}outline-none`">None</option>
78
+ </Dropdown>
79
+ </div>
80
+
81
+ <div v-if="'outlineStyle' in item.props">
82
+ <ComponentPropertyLabel label="Outline Style"
83
+ :removable="removable"
84
+ @remove="delete item.props.outlineStyle" />
85
+ <Dropdown v-for="(_, idx) in viewTypes"
86
+ v-show="viewType === _.value"
87
+ v-model="outlineStyle[idx]"
88
+ @change="$emit('change')">
89
+ <option value="">Default</option>
90
+ <option :value="`${viewType}outline-dashed`">Dashed</option>
91
+ <option :value="`${viewType}outline-dotted`">Dotted</option>
92
+ <option :value="`${viewType}outline-double`">Double</option>
93
+ <option :value="`${viewType}outline-none`">None</option>
94
+ </Dropdown>
95
+ </div>
96
+
97
+ <div v-if="'outlineWidth' in item.props">
98
+ <ComponentPropertyLabel label="Outline Width"
99
+ :removable="removable"
100
+ @remove="delete item.props.outlineWidth" />
101
+ <Dropdown v-for="(_, idx) in viewTypes"
102
+ v-show="viewType === _.value"
103
+ v-model="outlineWidth[idx]"
104
+ @change="$emit('change')">
105
+ <option value="">Default</option>
106
+ <option :value="`${viewType}outline-0`">0</option>
107
+ <option :value="`${viewType}outline-2`">2</option>
108
+ <option :value="`${viewType}outline-4`">4</option>
109
+ <option :value="`${viewType}outline-8`">8</option>
110
+ </Dropdown>
111
+ </div>
112
+
113
+ </div>
114
+ </template>
115
+
116
+ <script>
117
+
118
+ export default{
119
+
120
+ emits: [ 'change' ],
121
+
122
+ inject: [ 'viewTypes', 'initPropValue' ],
123
+
124
+ props: {
125
+ config: Object,
126
+
127
+ item: {
128
+ type: Object,
129
+ required: true
130
+ },
131
+
132
+ removable: Boolean
133
+ },
134
+
135
+ computed: {
136
+
137
+ bdColor(){
138
+ this.initPropValue(this.item.props, 'bdColor')
139
+ return this.item.props.bdColor
140
+ },
141
+
142
+ bdSize(){
143
+ this.initPropValue(this.item.props, 'bdSize')
144
+ return this.item.props.bdSize
145
+ },
146
+
147
+ bdRadius(){
148
+ this.initPropValue(this.item.props, 'bdRadius')
149
+ return this.item.props.bdRadius
150
+ },
151
+
152
+ bdStyle(){
153
+ this.initPropValue(this.item.props, 'bdStyle')
154
+ return this.item.props.bdStyle
155
+ },
156
+
157
+ divideColor(){
158
+ this.initPropValue(this.item.props, 'divideColor')
159
+ return this.item.props.divideColor
160
+ },
161
+
162
+ divideWidth(){
163
+ this.initPropValue(this.item.props, 'divideWidth')
164
+ return this.item.props.divideWidth
165
+ },
166
+
167
+ divideStyle(){
168
+ this.initPropValue(this.item.props, 'divideStyle')
169
+ return this.item.props.divideStyle
170
+ },
171
+
172
+ outlineColor(){
173
+ this.initPropValue(this.item.props, 'outlineColor')
174
+ return this.item.props.outlineColor
175
+ },
176
+
177
+ outlineStyle(){
178
+ this.initPropValue(this.item.props, 'outlineStyle')
179
+ return this.item.props.outlineStyle
180
+ },
181
+
182
+ outlineWidth(){
183
+ this.initPropValue(this.item.props, 'outlineWidth')
184
+ return this.item.props.outlineWidth
185
+ },
186
+
187
+ viewType(){
188
+ return this.config.viewType
189
+ },
190
+
191
+ },
192
+
193
+ data(){
194
+ return {
195
+ _config: {},
196
+ }
197
+ }
198
+
199
+ }
200
+
201
+ </script>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <div>
3
+ <div>
4
+ <label class="text-text-400">Title</label>
5
+ <Textbox v-model="item.props.title" />
6
+ </div>
7
+
8
+ <ComponentSetting2 :item="item"
9
+ :view-type="viewType"
10
+ :view-types="viewTypes"
11
+ default-display="block"
12
+ @change="$emit('change')" />
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+
18
+ export default{
19
+
20
+ emits: [ 'save' ],
21
+
22
+ inject: [ 'socketEmit2' ],
23
+
24
+ methods: {
25
+
26
+ save(){
27
+ this.$emit('save')
28
+ this.close()
29
+ }
30
+
31
+ },
32
+
33
+ props: {
34
+
35
+ item: Object,
36
+
37
+ viewTypes: Array,
38
+
39
+ viewType: String
40
+
41
+ }
42
+
43
+ }
44
+
45
+ </script>
46
+
47
+ <style module>
48
+
49
+ .comp{
50
+
51
+ }
52
+
53
+ </style>
@@ -0,0 +1,114 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+
4
+ <div class="flex flex-col gap-4">
5
+ <div>
6
+ <strong class="flex-1 text-text-400">Button</strong>
7
+ <div class="h-[1px] bg-text-100 mt-2"></div>
8
+ </div>
9
+
10
+ <div>
11
+ <label class="flex-1 text-text-400">Text</label>
12
+ <Textbox v-model="item.props.text" @keyup.enter="$emit('change')"/>
13
+ </div>
14
+
15
+ <div>
16
+ <label class="flex-1 text-text-400">Target</label>
17
+ <div class="flex flex-row items-center gap-2">
18
+ <Dropdown class="w-[70px]"
19
+ v-model="item.props.targetType"
20
+ @change="item.props.target= ''; $emit('change')">
21
+ <option value="">URL</option>
22
+ <option value="section">Section</option>
23
+ </Dropdown>
24
+ <Dropdown v-if="item.props.targetType === 'section'"
25
+ v-model="item.props.target"
26
+ @change="$emit('change')"
27
+ class="flex-1">
28
+ <option value="" disabled>-Select-</option>
29
+ <option v-for="comp in compUids" :value="comp.uid">{{ comp.name }}</option>
30
+ </Dropdown>
31
+ <Textbox class="flex-1" v-else v-model="item.props.target"
32
+ @keyup.enter="$emit('change')"
33
+ @blur="$emit('change')"/>
34
+ </div>
35
+ </div>
36
+
37
+ <div>
38
+ <label class="flex-1 text-text-400">Variant</label>
39
+ <Dropdown v-model="item.props.variant"
40
+ @change="$emit('change')">
41
+ <option value="primary">Primary</option>
42
+ <option value="secondary">Secondary</option>
43
+ <option value="red">Red</option>
44
+ <option value="minimal">Minimal</option>
45
+ <option value="outline">Outline</option>
46
+ <option value="">Not Set</option>
47
+ </Dropdown>
48
+ </div>
49
+ </div>
50
+
51
+ <ComponentSetting2 :item="item"
52
+ :view-type="viewType"
53
+ :view-types="viewTypes"
54
+ defaultDisplay="flex"
55
+ @change="$emit('change')" />
56
+
57
+ </div>
58
+ </template>
59
+
60
+ <script>
61
+
62
+ import {getComponentUids} from "../utils/helpers.mjs";
63
+
64
+ export default{
65
+
66
+ emits: [ 'change' ],
67
+
68
+ props: {
69
+
70
+ item: {
71
+ type: Object,
72
+ required: true
73
+ },
74
+
75
+ viewType: String,
76
+
77
+ viewTypes: Array,
78
+
79
+ },
80
+
81
+ data(){
82
+ return {
83
+ }
84
+ },
85
+
86
+ inject: [ 'confirm', 'imageSrc', 'getPage' ],
87
+
88
+ computed: {
89
+
90
+ compUids(){
91
+ if(this.item.props.targetType === 'section'){
92
+ const page = this.getPage()
93
+ const components = page.components
94
+ return getComponentUids(components, [ this.item.uid ])
95
+ }
96
+ }
97
+
98
+ },
99
+
100
+ methods: {
101
+
102
+ }
103
+
104
+ }
105
+
106
+ </script>
107
+
108
+ <style module>
109
+
110
+ .comp{
111
+ @apply flex flex-col gap-6;
112
+ }
113
+
114
+ </style>
@@ -0,0 +1,193 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+
4
+ <div>
5
+ <div class="flex flex-row gap-1 items-center cursor-pointer">
6
+ <svg v-if="!expanded['carousel']" width="12" height="12" @click="expanded['carousel'] = !expanded['carousel']" 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['carousel'] = !expanded['carousel']" 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['carousel'] = !expanded['carousel']">Carousel</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>
12
+ </div>
13
+
14
+ <div class="h-[1px] bg-text-100 mt-2 mb-4"></div>
15
+
16
+ <div v-if="expanded['carousel']" class="flex flex-col gap-8">
17
+
18
+ <div>
19
+ <div class="flex flex-row items-center gap-2">
20
+ <label class="flex-1 text-text-400">Gap</label>
21
+ <button type="button" v-if="containerGap.length < 2" @click="containerGap.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
+ </div>
25
+ <div class="flex flex-row gap-2">
26
+ <div v-for="(_, index) in containerGap" class="items-start">
27
+ <div class="flex flex-row">
28
+ <small class="w-[60px] flex-1 text-text-300">{{ viewTypes[index].text }}</small>
29
+ <button type="button" v-if="index > 0" @click="containerGap.splice(index, 1)">
30
+ <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>
31
+ </button>
32
+ </div>
33
+ <div class="flex flex-row items-start gap-2">
34
+ <Dropdown v-model="containerGap[index]" class="mt-1 min-w-[100px]" @change="apply">
35
+ <option :value="`${viewType}gap-0`">0</option>
36
+ <option :value="`${viewType}gap-1`">1</option>
37
+ <option :value="`${viewType}gap-2`">2</option>
38
+ <option :value="`${viewType}gap-3`">3</option>
39
+ <option :value="`${viewType}gap-4`">4</option>
40
+ <option :value="`${viewType}gap-5`">5</option>
41
+ <option :value="`${viewType}gap-6`">6</option>
42
+ </Dropdown>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ </div>
47
+
48
+ <div class="grid grid-cols-2 gap-4">
49
+ <div>
50
+ <label class="text-text-400">Autoplay</label>
51
+ <Dropdown v-model="item.props.autoPlay" class="mt-1" @change="apply">
52
+ <option value="0">None</option>
53
+ <option v-for="i in 10" :value="i * 1000">{{ i }} seconds</option>
54
+ </Dropdown>
55
+ </div>
56
+
57
+ <div class="flex flex-row gap-4">
58
+ <div>
59
+ <label class="text-text-400">Legend</label>
60
+ <div class="mt-1 py-2">
61
+ <Checkbox v-model="item.props.useLegend" @change="apply"/>
62
+ </div>
63
+ </div>
64
+ <div>
65
+ <label class="text-text-400">Infinite</label>
66
+ <div class="mt-1 py-2">
67
+ <Checkbox v-model="item.props.infinite" @change="apply"/>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </div>
72
+
73
+ </div>
74
+
75
+ </div>
76
+
77
+ <ComponentSetting2 :item="item"
78
+ :view-type="viewType"
79
+ :view-types="viewTypes"
80
+ defaultDisplay="flex"
81
+ @change="apply" />
82
+
83
+ <Modal ref="imageModal" width="320" height="640">
84
+ <template #head="{ context }">
85
+ <div class="relative p-5">
86
+ <h3>Image</h3>
87
+ <div class="absolute top-0 right-0 p-2">
88
+ <button type="button" class="p-2" @click="$refs.imageModal.close()">
89
+ <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">
90
+ <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"/>
91
+ </svg>
92
+ </button>
93
+ </div>
94
+ <div class="flex justify-center mt-4">
95
+ <Tabs v-model="context.viewType" variant="button" :items="viewTypes" />
96
+ </div>
97
+ </div>
98
+ </template>
99
+ <template #foot="{ context }">
100
+ <div class="p-5">
101
+ <Button type="button" class="w-full" @click="context.index >= 0 ?
102
+ item.items[context.index] = context.item :
103
+ item.items.push(context.item);
104
+ $refs.imageModal.close();
105
+ apply
106
+ ">
107
+ OK
108
+ </Button>
109
+ </div>
110
+ </template>
111
+ <template #default="{ context }">
112
+ <div class="flex-1 p-5 flex flex-col gap-4">
113
+ <ImageSetting :item="context.item" :view-types="viewTypes" :view-type="context.viewType" />
114
+ <ComponentSetting2 :item="context.item" :view-types="viewTypes" :view-type="context.viewType" />
115
+ </div>
116
+ </template>
117
+ </Modal>
118
+
119
+ </div>
120
+ </template>
121
+
122
+ <script>
123
+
124
+ export default{
125
+
126
+ emits: [ 'change' ],
127
+
128
+ inject: [ 'confirm', 'imageUrl', 'store' ],
129
+
130
+ props: {
131
+
132
+ item: {
133
+ type: Object,
134
+ required: true
135
+ },
136
+
137
+ viewType: String,
138
+
139
+ viewTypes: Array,
140
+
141
+ },
142
+
143
+ methods: {
144
+
145
+ apply(){
146
+ this.$emit('change')
147
+ }
148
+
149
+ },
150
+
151
+ computed: {
152
+
153
+ componentStore(){
154
+ if(this.store && this.store.components){
155
+ if(!this.store.components.compsetting)
156
+ this.store.components.compsetting = {}
157
+
158
+ return this.store.components.compsetting
159
+ }
160
+ return {}
161
+ },
162
+
163
+ expanded(){
164
+ if(!this.componentStore['expanded'])
165
+ this.componentStore['expanded'] = {}
166
+ return this.componentStore['expanded']
167
+ },
168
+
169
+ items(){
170
+ if(!Array.isArray(this.item.items))
171
+ this.item.items = []
172
+ return this.item.items
173
+ },
174
+
175
+ containerGap(){
176
+ if(!Array.isArray(this.item.props.containerGap))
177
+ this.item.props.containerGap = []
178
+ return this.item.props.containerGap
179
+ },
180
+
181
+ }
182
+
183
+ }
184
+
185
+ </script>
186
+
187
+ <style module>
188
+
189
+ .comp{
190
+ @apply flex flex-col gap-8;
191
+ }
192
+
193
+ </style>
@@ -0,0 +1,80 @@
1
+ <template>
2
+ <Modal :state="isOpen" width="320" height="400">
3
+ <template v-slot:head>
4
+ <div class="relative p-5">
5
+ <h3>{{ $t('Select Column') }}</h3>
6
+ <div class="absolute top-0 right-0 p-2">
7
+ <button type="button" class="p-2" @click="close">
8
+ <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">
9
+ <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"/>
10
+ </svg>
11
+ </button>
12
+ </div>
13
+ </div>
14
+ </template>
15
+ <template #foot>
16
+ <div class="pb-6"></div>
17
+ </template>
18
+ <div class="flex-1 px-3">
19
+
20
+ <div class="flex flex-col divide-y divide-text-50 bg-base-400 border-[1px] border-text-50 rounded-lg overflow-hidden">
21
+ <button v-for="column in columns"
22
+ type="button" class="p-3 px-5 text-left hover:bg-primary hover:text-white"
23
+ @click="select(column)">
24
+ {{ column.label ? column.label : column.key }}
25
+ </button>
26
+ </div>
27
+
28
+ </div>
29
+ </Modal>
30
+ </template>
31
+
32
+ <script>
33
+
34
+ export default{
35
+
36
+ emits: [ 'select' ],
37
+
38
+ data(){
39
+ return {
40
+ isOpen: false,
41
+ context: null,
42
+ columns: []
43
+ }
44
+ },
45
+
46
+ methods: {
47
+
48
+ open(context, columns){
49
+ this.context = context
50
+ this.columns = columns
51
+ this.isOpen = true
52
+ },
53
+
54
+ close(){
55
+ this.isOpen = false
56
+ },
57
+
58
+ select(column){
59
+ if(typeof this.context === 'function'){
60
+ this.context(column)
61
+ }
62
+ else{
63
+ this.$emit('select', column, this.context)
64
+ }
65
+ this.close()
66
+ },
67
+
68
+ }
69
+
70
+ }
71
+
72
+ </script>
73
+
74
+ <style module>
75
+
76
+ .comp{
77
+
78
+ }
79
+
80
+ </style>
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <div class="flex flex-row">
3
+ <label class="flex-1 text-text-400">{{ label }}</label>
4
+ <slot v-if="$slots.default" />
5
+ <button v-else-if="removable"
6
+ class="mr-1"
7
+ type="button"
8
+ @click="$emit('remove')">
9
+ <svg width="14" height="14" class="fill-text-300 hover:fill-red-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z"/></svg>
10
+ </button>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+
16
+ export default{
17
+
18
+ emits: [ 'remove' ],
19
+
20
+ props: {
21
+ label: String,
22
+ removable: Boolean,
23
+ }
24
+
25
+ }
26
+
27
+ </script>
28
+
29
+ <style module>
30
+
31
+ .comp{
32
+
33
+ }
34
+
35
+ </style>