@ozdao/prometheus-framework 0.1.53 → 0.1.55

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/dist/components/Upload/Upload.vue.d.ts.map +1 -1
  2. package/dist/main.css +1 -1
  3. package/dist/modules/constructor/components/elements/Audio.vue.d.ts +9 -0
  4. package/dist/modules/constructor/components/elements/Embed.vue.d.ts +9 -0
  5. package/dist/modules/constructor/components/elements/H2.vue.d.ts +1 -1
  6. package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +1 -1
  7. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +36 -27
  9. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  11. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -0
  12. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +46 -0
  13. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -0
  14. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +48 -0
  15. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +69 -60
  17. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +11 -2
  21. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +2 -11
  23. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +15 -15
  27. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +81 -99
  29. package/dist/prometheus-framework.cjs.js +19 -19
  30. package/dist/prometheus-framework.es.js +530 -522
  31. package/dist/style.css +1 -1
  32. package/package.json +3 -3
  33. package/src/components/Button/Button.vue +1 -1
  34. package/src/components/Upload/Upload.vue +28 -8
  35. package/src/modules/constructor/components/elements/Audio.vue +82 -0
  36. package/src/modules/constructor/components/elements/Embed.vue +85 -0
  37. package/src/modules/constructor/components/sections/Constructor.vue +54 -7
  38. package/src/modules/globals/mixins/mixins.js +52 -0
  39. package/src/modules/globals/router/routerGuards.js +28 -0
  40. package/src/modules/marketplace/components/layouts/Marketplace.vue +0 -1
  41. package/src/modules/organizations/components/pages/Organization.vue +2 -2
  42. package/src/modules/users/components/pages/Profile.vue +5 -3
  43. package/src/styles/theme.scss +0 -1
  44. package/src/styles/components/button.scss +0 -253
@@ -36,17 +36,60 @@ a<template>
36
36
  <transition name="fade">
37
37
  <div
38
38
  v-if="showControls === index"
39
- class="pos-absolute pos-r-100 pos-t-0 z-index-4 i-semi"
39
+ class="pos-absolute z-index-4 i-semi"
40
+ style="right: calc(100% + 0.5rem); top: calc(50% - 1.125rem);"
40
41
  @mousedown.prevent="startDragging = true"
41
42
  >
42
- <button @click="showMenu = !showMenu" class="mn-small w-100 i-semi bg-white radius-thin">{{ block.content ? '...' : '+' }}</button>
43
- <div v-if="showMenu" class="z-index-5 radius-thin mn-small relative left-0 mt-2 w-max bg-white shadow-lg rounded">
44
- <button @click="handleDeleteBlock(block)" class="block w-max text-left px-4 py-2 hover:bg-gray-200">Remove</button>
45
- <button @click="handleAddBlock('ImageUpload', '', index)" class="block w-max text-left px-4 py-2 hover:bg-gray-200">Add Image</button>
46
- <button @click="handleAddBlock('H2', '', index)" class="block w-max text-left px-4 py-2 hover:bg-gray-200">Add Title</button>
43
+ <button
44
+ @click="showMenu = !showMenu"
45
+ class="mn-small cursor-pointer w-100 i-semi bg-white radius-thin"
46
+ >
47
+ {{ block.content ? '...' : '+' }}
48
+ </button>
49
+
50
+ <div
51
+ v-if="showMenu"
52
+ class="z-index-5 radius-thin pd-thin bg-white w-max mn-small flex-nowrap flex-column flex"
53
+ >
54
+ <span
55
+ @click="handleDeleteBlock(block)"
56
+ class="mn-thin w-max t-red bg-white button-small button"
57
+ >
58
+ Remove
59
+ </span>
60
+ <span
61
+ @click="handleAddBlock('ImageUpload', '', index)"
62
+ class="mn-thin w-max t-black bg-white button-small button"
63
+ >
64
+ Add Image
65
+ </span>
66
+ <span
67
+ @click="handleAddBlock('H2', '', index)"
68
+ class="w-max button-small t-black bg-white button"
69
+ >
70
+ Add Title
71
+ </span>
72
+ <span
73
+ @click="handleAddBlock('Embed', '', index)"
74
+ class="w-max button-small t-black bg-white button"
75
+ >
76
+ Add Embed
77
+ </span>
78
+ <!-- <span
79
+ @click="handleAddBlock('Audio', '', index)"
80
+ class="w-max button-small t-black bg-white button"
81
+ >
82
+ Add Audio
83
+ </span> -->
84
+
47
85
  </div>
86
+
87
+
48
88
  </div>
49
89
  </transition>
90
+
91
+
92
+
50
93
  </div>
51
94
  </VueDraggableNext>
52
95
  </section>
@@ -59,6 +102,8 @@ import H2 from '../elements/H2.vue';
59
102
  import Caption from '../elements/Caption.vue';
60
103
  import Bullets from '../elements/Bullets.vue';
61
104
  import ImageUpload from '../elements/ImageUpload.vue';
105
+ import Embed from '../elements/Embed.vue';
106
+ import Audio from '../elements/Audio.vue';
62
107
 
63
108
  import { ref, watchEffect, computed, emit } from 'vue';
64
109
  import { VueDraggableNext } from 'vue-draggable-next';
@@ -76,7 +121,9 @@ const ComponentMap = {
76
121
  'H2': H2,
77
122
  'Bullets': Bullets,
78
123
  'Caption': Caption,
79
- 'ImageUpload': ImageUpload
124
+ 'ImageUpload': ImageUpload,
125
+ 'Embed': Embed,
126
+ 'Audio': Audio
80
127
  };
81
128
 
82
129
  function handleAddBlock(type = 'Textarea', content = '', index, data) {
@@ -0,0 +1,52 @@
1
+ // mixins.js
2
+ export const globalMixins = {
3
+ methods: {
4
+ returnCurrency() {
5
+ const currency = '฿'
6
+ return currency
7
+ },
8
+ formatPrice(number) {
9
+ const currency = this.returnCurrency();
10
+ let formattedNumber = number.toFixed(2).replace('.', ',').replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
11
+ return `${formattedNumber} ${currency}`;
12
+ },
13
+ formatDate(d) {
14
+ var fixedDate = new Date(d);
15
+ var yyyy = fixedDate.getFullYear().toString();
16
+ var mm = (fixedDate.getMonth() + 1).toString();
17
+ var dd = fixedDate.getDate().toString();
18
+ var hh = fixedDate.getHours().toString();
19
+ var minmin = fixedDate.getMinutes().toString();
20
+
21
+ return yyyy + '.' + (mm[1] ? mm : "0" + mm[0]) + '.' + (dd[1] ? dd : "0" + dd[0]) + " в " + (hh[1] ? hh : "0" + hh[0]) + ':' + (minmin[1] ? minmin : "0" + minmin[0]);
22
+ },
23
+ normalizeUrlParam(param) {
24
+ if (!param) param = ''
25
+
26
+ return param
27
+ .toLowerCase()
28
+ .replace(/ /g, '-')
29
+ .replace(/[^a-z0-9-]/g, '');
30
+ },
31
+ getMarketplaceLink(categories, country, state, city) {
32
+ categories = []
33
+
34
+ let country_normalized = this.normalizeUrlParam(country);
35
+ let state_normalized = this.normalizeUrlParam(state);
36
+ let city_normalized = this.normalizeUrlParam(city);
37
+ let base = `/marketplace/${country_normalized || ''}${state_normalized ? `/${state_normalized}` : ''}${city_normalized ? `/${city_normalized}` : ''}`;
38
+
39
+ if (categories.length) {
40
+ base += `?categories=${categories.join(",")}`;
41
+ }
42
+
43
+ return base;
44
+ },
45
+ getSpotsLink(country, state, city) {
46
+ let country_normalized = this.normalizeUrlParam(country);
47
+ let state_normalized = this.normalizeUrlParam(state);
48
+ let city_normalized = this.normalizeUrlParam(city);
49
+ return `/spots/${country_normalized || ''}${state_normalized ? `/${state_normalized}` : ''}${city_normalized ? `/${city_normalized}` : ''}`;
50
+ },
51
+ }
52
+ }
@@ -0,0 +1,28 @@
1
+ // routerGuards.js
2
+ export function setupRouterGuards(router, store, app) {
3
+ router.beforeEach((to, from, next) => {
4
+ const { authorize } = to.meta;
5
+
6
+ if (authorize) {
7
+ if (store.auth.state.access.status === false) {
8
+ return next({ path: '/', query: { returnUrl: to.path } });
9
+ }
10
+
11
+ if (authorize.length && !authorize.some(r => store.auth.state.access.roles.includes(r))) {
12
+ return next({ path: '/' });
13
+ }
14
+ }
15
+
16
+ const locale = to.params.locale;
17
+ if (
18
+ app.config.globalProperties.$i18n.locale !== locale
19
+ && locale
20
+ && Object.keys(i18n.global.availableLocales).includes(locale)
21
+ ) {
22
+ app.config.globalProperties.$i18n.locale = locale;
23
+ return next();
24
+ }
25
+
26
+ next();
27
+ });
28
+ }
@@ -2,7 +2,6 @@
2
2
  <div class="min-h-100vh pd-thin">
3
3
 
4
4
  <div class=" br-solid br-1px br-grey bg-grey radius-big">
5
- <Breadcrumbs class=" br-b br-solid br-black-transp pd-medium"/>
6
5
 
7
6
  <header class=" pd-medium mn-r-auto flex-v-center t-left flex-nowrap flex">
8
7
  <h2 class="t-left">
@@ -49,9 +49,9 @@
49
49
  :tabs="[
50
50
 
51
51
  { name: 'Community', value: 'community' },
52
- { name: 'Products', value: 'products' },
52
+ // { name: 'Products', value: 'products' },
53
53
  { name: 'Events', value: 'events' },
54
- { name: 'Spots', value: 'spots' }
54
+ // { name: 'Spots', value: 'spots' }
55
55
  ]"
56
56
  class="mn-small o-hidden h5 radius-big bg-grey"
57
57
  />
@@ -192,11 +192,14 @@
192
192
 
193
193
 
194
194
 
195
- <Menu class="mn-regular bg-grey">
195
+ <!-- <Menu class="mn-regular bg-grey">
196
196
  <MenuItem @click="router.push({name: 'User Wallet', params: {_id: route.params._id}})" class="cursor-pointer">
197
197
  <IconGroups class="i-semi" :icon="true"/>
198
198
  <span>Wallet</span>
199
199
  </MenuItem>
200
+ </Menu> -->
201
+
202
+
200
203
 
201
204
  <!-- <MenuItem @click="router.push({name: 'User Comments', params: {_id: route.params._id}})" class="cursor-pointer">
202
205
  <span>Comments</span>
@@ -204,8 +207,7 @@
204
207
  <MenuItem @click="router.push({name: 'User Likes', params: {_id: route.params._id}})" class="cursor-pointer">
205
208
  <span>Likes</span>
206
209
  </MenuItem> -->
207
- </Menu>
208
-
210
+
209
211
  <Menu
210
212
  v-if="auth.state.user._id === route.params._id"
211
213
  class="bg-grey"
@@ -1,6 +1,5 @@
1
1
  @import './components/block';
2
2
  @import './components/breadcrumbs';
3
- @import './components/button';
4
3
  @import './components/card';
5
4
  // @import './components/input';
6
5
  @import './components/item';
@@ -1,253 +0,0 @@
1
- button[disabled] {background: grey; &:hover {background: grey; } }
2
-
3
- .button {
4
- display: flex;
5
- width: fit-content;
6
-
7
- padding: 1rem 1.75rem;
8
- border-radius: 3rem;
9
-
10
- transform: scale(1);
11
- opacity: 1;
12
-
13
- align-items: center;
14
- justify-content: center;
15
-
16
- text-align: center;
17
- text-transform: uppercase;
18
- font-size: 1rem;
19
- font-weight: 500;
20
- letter-spacing: 5%;
21
-
22
- transition: all 0.33s ease;
23
-
24
- &:hover {
25
- opacity: 1;
26
- cursor: pointer;
27
- }
28
-
29
- &:active {
30
- transform: scale(0.95);
31
- }
32
-
33
- &-small {
34
- padding: 0.5rem 0.75rem;
35
- border-radius: 0.5rem;
36
- height: fit-content;
37
- }
38
-
39
- &-square {
40
- height: 2.5rem;
41
- width: 2.5rem;
42
-
43
- padding: 1rem;
44
- border-radius: 0.5rem;
45
- font-size: 1.125rem;
46
- }
47
-
48
- &-close-popup {
49
- position: absolute;
50
-
51
- right: 0;
52
- top: 0;
53
-
54
- width: 3rem;
55
- height: 3rem;
56
-
57
- background: transparent;
58
-
59
- padding: 0;
60
-
61
- border-radius: 0;
62
-
63
- img {
64
- width: 33%;
65
- }
66
- }
67
-
68
- &-delete {
69
- &:hover {
70
- background: red;
71
- }
72
- }
73
-
74
- &-grey {
75
- background: rgba(var(--dark), 1);;
76
- background-color: #F7F7F7;
77
- }
78
-
79
- &-sort {
80
- height: 2.5rem;
81
-
82
- padding: 0.5rem 1.25rem;
83
-
84
- text-transform: none;
85
- font-size: 1rem;
86
- background: rgba(var(--dark), 1);;
87
- background-color: #F7F7F7;
88
- }
89
-
90
- &-active {
91
- background: rgb(var(--main));;
92
- color: white;
93
- &:hover {
94
- background: rgb(var(--main));;
95
- color: rgba(255,255,255,0.75);
96
-
97
- }
98
- }
99
-
100
-
101
-
102
-
103
- &-filter {
104
- height: 2.5rem;
105
-
106
- padding: 0;
107
- border-radius: 0.5rem;
108
- font-size: 1.125rem;
109
-
110
- background: rgba(var(--dark), 1);;
111
- background: white;
112
- }
113
-
114
- &-disabled {
115
- color: rgba(0,0,0,0.5);
116
-
117
- &:hover {
118
- color: rgba(0,0,0,0.5);
119
- }
120
- &:active {
121
- pointer-events: none;
122
- transform: scale(1,1);
123
- }
124
- }
125
- &-active {
126
- background: rgb(var(--main));;
127
- color: white;
128
- &:hover {
129
- background: rgb(var(--main));;
130
- color: rgba(255,255,255,0.75);
131
-
132
- }
133
- }
134
- &-reset-filter {
135
- width: 100%;
136
- text-transform: uppecase;
137
- height: 3.75rem;
138
-
139
- background: transparent;
140
-
141
- &:hover {
142
- background: rgb(var(--main));;
143
- color: black;
144
-
145
- }
146
- }
147
-
148
- &-icon {
149
- height: 1rem; width: 1rem; background: transparent; img { width: 100%; height: 100%}
150
- background: transparent;
151
- box-shadow: none;
152
- border-radius: 0;
153
- padding: 0;
154
-
155
- &:hover {
156
- cursor: pointer;
157
- }
158
- }
159
-
160
-
161
- &-link {
162
- color: rgba(0, 0, 0, 0.5);
163
- font-size: 1.125rem;
164
- display: flex;
165
- align-items: center;
166
- font-weight: 600;
167
-
168
- &-blue {color: #2495FF;}
169
-
170
- &-black{color: rgba(0, 0, 0, 0.5);}
171
-
172
- &-cream {color: #DBADAA; text-align: left; font-weight: 600; letter-spacing: 0;}
173
-
174
- }
175
-
176
- &-otr-link {
177
- display: inline-flex;
178
- margin-top: 0.25rem;
179
- align-items: center;
180
- color: #000;
181
-
182
- img { margin-right: 0.5rem;}
183
- }
184
-
185
- &-cart {
186
- display: inline-flex;
187
- color: #000;
188
- height: 3rem;
189
- width: 3rem;
190
- font-weight: 700;
191
- width: fit-content;
192
- font-size: 1.5rem;
193
- background: rgb(var(--main));;
194
- background: #FAF7F3;
195
- text-transform: none;
196
- padding: 0.75rem 1rem;
197
- border-radius: 4rem;
198
-
199
- &:hover {
200
- background: rgb(var(--main));;
201
- color: white;
202
- opacity: 1;
203
-
204
- cursor: pointer;
205
- }
206
- }
207
-
208
- &-cart-big {
209
- display: inline-flex;
210
- color: #000;
211
- font-weight: 700;
212
- width: fit-content;
213
- background: #FFE500;
214
- text-transform: none;
215
- font-size: 2rme;
216
- padding: 1.5rem 2rem;
217
- border-radius: 2rem;
218
- }
219
-
220
- &-blog {
221
- padding: 0.75rem 1rem;
222
- background-color: #2495FF;
223
- color: #fff;
224
- border-radius: 0.375rem;
225
- font-size: 1.125rem;
226
- text-transform: uppercase;
227
- width: fit-content;
228
- }
229
-
230
- &-nav-footer{
231
- color: #000;
232
- font-size: 0.875rem;
233
- font-weight: 700; display: flex;
234
- align-items: center;
235
- svg {margin-right: 0.5rem;}}
236
-
237
- &-inst {
238
- background: radial-gradient(179.06% 43.44% at -16.75% 7.2%, #3771C8 0%, #3771C8 12.8%, rgba(102, 0, 255, 0) 100%),
239
- radial-gradient(92.18% 99.11% at 26.56% 107.7%, #FFDD55 0%, #FFDD55 10%, #FF543E 50%, #C837AB 100%);
240
- color: white;
241
- font-size: 1.125rem;
242
- font-weight: 700;
243
- text-transform: uppercase;
244
- padding: 0.75rem 0.75rem;
245
- border-radius: 0.5625rem;
246
- display: flex;
247
- align-items: center;
248
- justify-content: center;
249
- width: fit-content;
250
- box-shadow: 4px 4px 24px -12px rgba(201, 163, 163, 0.5);
251
- img {margin-right: 0.5rem}
252
- }
253
- }