@tiddh/brave-vue 1.9.21 → 1.9.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brave-vue.esm.js +166 -65
- package/dist/brave-vue.min.js +1 -1
- package/dist/brave-vue.ssr.js +183 -82
- package/package.json +1 -2
- package/src/components/Avatar/Avatar.vue +18 -0
- package/src/components/Avatar/elements/CustomizationPanel.vue +9 -0
- package/src/components/Avatar/elements/CustomizationView.vue +28 -0
- package/src/components/Modal/Modal.vue +388 -371
- package/src/components/Preview/Preview.vue +971 -933
- package/src/components/Preview/PreviewTools.vue +2148 -1164
- package/src/components/Preview/PreviewWithTools.vue +252 -248
|
@@ -1,255 +1,259 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
:have_birth_date="have_birth_date"
|
|
42
|
-
:have_pet="have_pet"
|
|
43
|
-
|
|
44
|
-
:typeLanguage="typeLanguage"
|
|
45
|
-
|
|
46
|
-
@isLoadingMethod="isLoadingMethod"
|
|
47
|
-
@changeUuid="changeUuid"
|
|
48
|
-
/>
|
|
49
|
-
</div>
|
|
50
|
-
|
|
51
|
-
</div>
|
|
52
|
-
|
|
2
|
+
<div class="preview-full">
|
|
3
|
+
<div class="preview-desktop-area" v-if="isLoaded && !isMobile">
|
|
4
|
+
<Preview
|
|
5
|
+
:uuid="uuid"
|
|
6
|
+
:pages="pages"
|
|
7
|
+
:age="age"
|
|
8
|
+
:product_id="product_id"
|
|
9
|
+
:typeLanguage="typeLanguage"
|
|
10
|
+
/>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div class="preview-mobile-area" v-if="isLoaded && isMobile">
|
|
14
|
+
<PreviewMobile
|
|
15
|
+
:uuid="uuid"
|
|
16
|
+
:pages="pages"
|
|
17
|
+
:age="age"
|
|
18
|
+
:product_id="product_id"
|
|
19
|
+
:typeLanguage="typeLanguage"
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="preview-mobile-tools" :class="!isLoaded ? 'invisible' : ''">
|
|
24
|
+
<PreviewTools
|
|
25
|
+
v-if="have_tools"
|
|
26
|
+
:current_name="current_name"
|
|
27
|
+
:uuid="uuid"
|
|
28
|
+
:slug="slug"
|
|
29
|
+
:character_id="character_id"
|
|
30
|
+
:dedication_text="dedication_text"
|
|
31
|
+
:product_id="product_id"
|
|
32
|
+
:gender="gender"
|
|
33
|
+
:typeLanguage="typeLanguage"
|
|
34
|
+
:preview_color="preview_color"
|
|
35
|
+
:character_position_id="character_position_id"
|
|
36
|
+
@isLoadingMethod="isLoadingMethod"
|
|
37
|
+
@changeUuid="changeUuid"
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
53
41
|
</template>
|
|
54
42
|
|
|
55
43
|
<script>
|
|
56
|
-
import Preview from "./Preview.vue"
|
|
57
|
-
import PreviewMobile from "./PreviewMobile.vue"
|
|
58
|
-
import PreviewTools from "./PreviewTools.vue"
|
|
59
|
-
|
|
60
|
-
//const $ = jQuery
|
|
61
|
-
const axios = require("axios")
|
|
62
|
-
|
|
63
|
-
export default {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
44
|
+
import Preview from "./Preview.vue";
|
|
45
|
+
import PreviewMobile from "./PreviewMobile.vue";
|
|
46
|
+
import PreviewTools from "./PreviewTools.vue";
|
|
47
|
+
|
|
48
|
+
//const $ = jQuery
|
|
49
|
+
const axios = require("axios");
|
|
50
|
+
|
|
51
|
+
export default {
|
|
52
|
+
name: "PreviewWithTools",
|
|
53
|
+
components: { Preview, PreviewMobile, PreviewTools },
|
|
54
|
+
props: {
|
|
55
|
+
/** Name of protagonist. `Diego` */
|
|
56
|
+
current_name: {
|
|
57
|
+
type: String,
|
|
58
|
+
required: true,
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
dedication_text: {
|
|
62
|
+
type: String,
|
|
63
|
+
required: false,
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
pages: {
|
|
67
|
+
type: Number,
|
|
68
|
+
required: true,
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
age: {
|
|
72
|
+
type: Number,
|
|
73
|
+
required: true,
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
/** Product id of Builder. `595` */
|
|
77
|
+
product_id: {
|
|
78
|
+
type: Number,
|
|
79
|
+
required: true,
|
|
80
|
+
},
|
|
81
|
+
/** Character id of Builder. `57` */
|
|
82
|
+
character_id: {
|
|
83
|
+
type: Number,
|
|
84
|
+
required: true,
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
/** Character id of Builder. `906` */
|
|
88
|
+
character_position_id: {
|
|
89
|
+
type: Number,
|
|
90
|
+
required: true,
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
/** Type id of Gender. `89` */
|
|
94
|
+
gender: {
|
|
95
|
+
type: String,
|
|
96
|
+
required: true,
|
|
97
|
+
},
|
|
98
|
+
/** Slug of product on builder `bb-a-grande-viagem` */
|
|
99
|
+
slug: {
|
|
100
|
+
type: String,
|
|
101
|
+
required: true,
|
|
102
|
+
},
|
|
103
|
+
/** Character uuid. `ddh5e177ff920f15` */
|
|
104
|
+
uuid: {
|
|
105
|
+
type: String,
|
|
106
|
+
required: true,
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
/** Show edit name. */
|
|
110
|
+
have_tools: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
required: true,
|
|
113
|
+
default: true,
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
/** Character uuid. `ddh5e177ff920f15` */
|
|
117
|
+
preview_color: {
|
|
118
|
+
type: String,
|
|
119
|
+
default: "#68596e",
|
|
120
|
+
required: true,
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
/** Show edit name. */
|
|
124
|
+
// have_name: {
|
|
125
|
+
// type: Boolean,
|
|
126
|
+
// required: false,
|
|
127
|
+
// default: false,
|
|
128
|
+
// },
|
|
129
|
+
|
|
130
|
+
// /** Show number at shirt. */
|
|
131
|
+
// have_shirt_number: {
|
|
132
|
+
// type: Boolean,
|
|
133
|
+
// required: false,
|
|
134
|
+
// default: false,
|
|
135
|
+
// },
|
|
136
|
+
|
|
137
|
+
// /** Show layout changes. */
|
|
138
|
+
// have_layout: {
|
|
139
|
+
// type: Boolean,
|
|
140
|
+
// required: false,
|
|
141
|
+
// default: false,
|
|
142
|
+
// },
|
|
143
|
+
|
|
144
|
+
// /** Show Birth date. */
|
|
145
|
+
// have_birth_date: {
|
|
146
|
+
// type: Boolean,
|
|
147
|
+
// required: false,
|
|
148
|
+
// default: false,
|
|
149
|
+
// },
|
|
150
|
+
|
|
151
|
+
// /** Show Pet. */
|
|
152
|
+
// have_pet: {
|
|
153
|
+
// type: Boolean,
|
|
154
|
+
// required: false,
|
|
155
|
+
// default: false,
|
|
156
|
+
// },
|
|
157
|
+
|
|
158
|
+
typeLanguage: {
|
|
159
|
+
type: String,
|
|
160
|
+
required: false,
|
|
161
|
+
default: "br",
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
data() {
|
|
165
|
+
return {
|
|
166
|
+
isLoaded: true,
|
|
167
|
+
isMobile: false,
|
|
168
|
+
|
|
169
|
+
// uuid: "",
|
|
170
|
+
// pages: 32,
|
|
171
|
+
// age: 6,
|
|
172
|
+
// character_id: 57,
|
|
173
|
+
// product_id: 595,
|
|
174
|
+
};
|
|
175
|
+
},
|
|
176
|
+
mounted() {
|
|
177
|
+
const self = this;
|
|
178
|
+
|
|
179
|
+
self.isMobile = self.detectSize();
|
|
180
|
+
|
|
181
|
+
window.addEventListener("resize", function(e) {
|
|
182
|
+
self.isMobile = self.detectSize();
|
|
183
|
+
});
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
methods: {
|
|
187
|
+
detectSize() {
|
|
188
|
+
var menuStatus = false;
|
|
189
|
+
if (window.innerWidth < 990) {
|
|
190
|
+
menuStatus = true;
|
|
191
|
+
}
|
|
192
|
+
return menuStatus;
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
isLoadingMethod(payload) {
|
|
196
|
+
const self = this;
|
|
197
|
+
self.isLoaded = payload;
|
|
198
|
+
},
|
|
199
|
+
|
|
200
|
+
changeUuid(payload) {
|
|
201
|
+
const self = this;
|
|
202
|
+
self.uuid = payload; //.uuid
|
|
203
|
+
self.isLoaded = true;
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
};
|
|
210
207
|
</script>
|
|
211
208
|
|
|
212
|
-
|
|
213
209
|
<style lang="scss">
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
210
|
+
@import "./node_modules/@tiddh/brave-tokens/dist/styles/style.scss";
|
|
211
|
+
.storybook {
|
|
212
|
+
&-6 {
|
|
213
|
+
width: columns("lg", 6);
|
|
214
|
+
}
|
|
215
|
+
&-12 {
|
|
216
|
+
width: columns("lg", 12);
|
|
217
|
+
}
|
|
218
|
+
&-25 {
|
|
219
|
+
width: columns("lg", 25);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.invisible {
|
|
224
|
+
opacity: 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.preview-full {
|
|
228
|
+
height: 100vh;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.preview-mobile-area {
|
|
232
|
+
width: 100%;
|
|
233
|
+
position: relative;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.preview-desktop-area {
|
|
237
|
+
position: relative;
|
|
238
|
+
z-index: 4;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.preview-mobile-tools {
|
|
242
|
+
// width: 100vw;
|
|
243
|
+
// position: fixed;
|
|
244
|
+
// height: 100vh;
|
|
245
|
+
// top: 0px;
|
|
246
|
+
// left: 0px;
|
|
247
|
+
// z-index: 3;
|
|
248
|
+
|
|
249
|
+
@media (max-width: 990px) {
|
|
250
|
+
position: relative;
|
|
251
|
+
z-index:20;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.custom-properties {
|
|
256
|
+
position: absolute;
|
|
257
|
+
top: 30px;
|
|
258
|
+
}
|
|
259
|
+
</style>
|