@tiddh/brave-vue 1.93.237 → 1.93.239

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.
@@ -154,6 +154,13 @@ const planner = {
154
154
 
155
155
  var emUso = planner;
156
156
 
157
+
158
+ // productColor
159
+ // productImage
160
+ // productType
161
+ // productFormat
162
+ // prodcutProtagonist
163
+
157
164
  export const Basic = () => ({
158
165
  components: { CatalogProduct },
159
166
  props: {
@@ -166,6 +173,11 @@ export const Basic = () => ({
166
173
  <div class="storybook-14" style="background-color: #ccc; width:100%; padding:48px;">
167
174
  <CatalogProduct
168
175
  :product="product"
176
+ :productColor="product.color"
177
+ :productImage="product.coverImageUrl"
178
+ :productType="product.tagSpecs.productType"
179
+ :productFormat="product.tagSpecs.productFormat"
180
+ :productProtagonist="product.protagonist"
169
181
  textCta="Texto"
170
182
  />
171
183
  </div>
@@ -192,6 +192,37 @@ export default {
192
192
  required: true,
193
193
  },
194
194
 
195
+ productColor: {
196
+ type: String,
197
+ required: true,
198
+ },
199
+
200
+ productImage: {
201
+ type: String,
202
+ required: true,
203
+ },
204
+
205
+ productType: {
206
+ type: String,
207
+ required: true,
208
+ },
209
+
210
+ productFormat: {
211
+ type: String,
212
+ required: true,
213
+ },
214
+
215
+ productProtagonist: {
216
+ type: String,
217
+ required: true,
218
+ },
219
+
220
+ // productColor
221
+ // productImage
222
+ // productType
223
+ // productFormat
224
+ // prodcutProtagonist
225
+
195
226
  textCta: {
196
227
  type: String,
197
228
  required: false,
@@ -204,51 +235,51 @@ export default {
204
235
  gridView: true,
205
236
  observer: null,
206
237
  isMobile: false,
207
- productColor: "rgb(23, 184, 188)",
208
- productImage: "",
209
- productType: null,
210
- productFormat: "retangular",
238
+ //productColor: "rgb(23, 184, 188)",
239
+ //productImage: "",
240
+ //productType: null,
241
+ //productFormat: "retangular",
211
242
  };
212
243
  },
213
244
 
214
- created() {
245
+ mounted() {
215
246
  const self = this;
216
247
 
217
248
  self.isMobile = self.detectSize();
218
249
 
219
- document.addEventListener("resize", function (e) {
250
+ window.addEventListener("resize", function (e) {
220
251
  self.isMobile = self.detectSize();
221
252
  });
222
253
 
223
254
  // 1 - Detectar se o produto tem cor
224
- if (self.product.color) {
225
- self.productColor = self.product.color;
226
- }
227
-
228
- // 2 - Detectar objeto da imagem e aplicar
229
- if (self.product.coverImage2xUrl) {
230
- self.productImage = self.product.coverImage2xUrl;
231
- }
232
-
233
- if (
234
- self.product.productDisplayDetails &&
235
- self.product.productDisplayDetails.coverImage
236
- ) {
237
- self.productImage = self.product.productDisplayDetails.coverImage;
238
- }
239
-
240
- // 3 - Detectar o tipo de produto
241
- if (self.product.tagSpecs && self.product.tagSpecs.productType) {
242
- self.productType = self.product.tagSpecs.productType;
243
- }
255
+ // if (self.product.color) {
256
+ // self.productColor = self.product.color;
257
+ // }
258
+
259
+ // // 2 - Detectar objeto da imagem e aplicar
260
+ // if (self.product.coverImage2xUrl) {
261
+ // self.productImage = self.product.coverImage2xUrl;
262
+ // }
263
+
264
+ // if (
265
+ // self.product.productDisplayDetails &&
266
+ // self.product.productDisplayDetails.coverImage
267
+ // ) {
268
+ // self.productImage = self.product.productDisplayDetails.coverImage;
269
+ // }
270
+
271
+ // // 3 - Detectar o tipo de produto
272
+ // if (self.product.tagSpecs && self.product.tagSpecs.productType) {
273
+ // self.productType = self.product.tagSpecs.productType;
274
+ // }
244
275
 
245
276
  //console.log("tagSpecs 1", self.product.tagSpecs);
246
277
 
247
- if (self.product.tagSpecs && self.product.tagSpecs.productFormat) {
248
- //console.log("tagSpecs", self.product.tagSpecs);
278
+ // if (self.product.tagSpecs && self.product.tagSpecs.productFormat) {
279
+ // //console.log("tagSpecs", self.product.tagSpecs);
249
280
 
250
- self.productFormat = self.product.tagSpecs.productFormat;
251
- }
281
+ // self.productFormat = self.product.tagSpecs.productFormat;
282
+ // }
252
283
  },
253
284
 
254
285
  methods: {
@@ -270,7 +301,7 @@ export default {
270
301
 
271
302
  detectSize() {
272
303
  var menuStatus = false;
273
- if (document.innerWidth < 990) {
304
+ if (window.innerWidth < 990) {
274
305
  menuStatus = true;
275
306
  }
276
307
  return menuStatus;
@@ -154,6 +154,13 @@ const planner = {
154
154
 
155
155
  var emUso = planner;
156
156
 
157
+
158
+ // productColor
159
+ // productImage
160
+ // productType
161
+ // productFormat
162
+ // prodcutProtagonist
163
+
157
164
  export const Basic = () => ({
158
165
  components: { CatalogProduct },
159
166
  props: {
@@ -166,6 +173,11 @@ export const Basic = () => ({
166
173
  <div class="storybook-14" style="background-color: #ccc; width:100%; padding:48px;">
167
174
  <CatalogProduct
168
175
  :product="product"
176
+ :productColor="product.color"
177
+ :productImage="product.coverImageUrl"
178
+ :productType="product.tagSpecs.productType"
179
+ :productFormat="product.tagSpecs.productFormat"
180
+ :productProtagonist="product.protagonist"
169
181
  textCta="Texto"
170
182
  />
171
183
  </div>
@@ -192,6 +192,37 @@ export default {
192
192
  required: true,
193
193
  },
194
194
 
195
+ productColor: {
196
+ type: String,
197
+ required: true,
198
+ },
199
+
200
+ productImage: {
201
+ type: String,
202
+ required: true,
203
+ },
204
+
205
+ productType: {
206
+ type: String,
207
+ required: true,
208
+ },
209
+
210
+ productFormat: {
211
+ type: String,
212
+ required: true,
213
+ },
214
+
215
+ productProtagonist: {
216
+ type: String,
217
+ required: true,
218
+ },
219
+
220
+ // productColor
221
+ // productImage
222
+ // productType
223
+ // productFormat
224
+ // prodcutProtagonist
225
+
195
226
  textCta: {
196
227
  type: String,
197
228
  required: false,
@@ -204,51 +235,51 @@ export default {
204
235
  gridView: true,
205
236
  observer: null,
206
237
  isMobile: false,
207
- productColor: "rgb(23, 184, 188)",
208
- productImage: "",
209
- productType: null,
210
- productFormat: "retangular",
238
+ //productColor: "rgb(23, 184, 188)",
239
+ //productImage: "",
240
+ //productType: null,
241
+ //productFormat: "retangular",
211
242
  };
212
243
  },
213
244
 
214
- created() {
245
+ mounted() {
215
246
  const self = this;
216
247
 
217
248
  self.isMobile = self.detectSize();
218
249
 
219
- document.addEventListener("resize", function (e) {
250
+ window.addEventListener("resize", function (e) {
220
251
  self.isMobile = self.detectSize();
221
252
  });
222
253
 
223
254
  // 1 - Detectar se o produto tem cor
224
- if (self.product.color) {
225
- self.productColor = self.product.color;
226
- }
227
-
228
- // 2 - Detectar objeto da imagem e aplicar
229
- if (self.product.coverImage2xUrl) {
230
- self.productImage = self.product.coverImage2xUrl;
231
- }
232
-
233
- if (
234
- self.product.productDisplayDetails &&
235
- self.product.productDisplayDetails.coverImage
236
- ) {
237
- self.productImage = self.product.productDisplayDetails.coverImage;
238
- }
239
-
240
- // 3 - Detectar o tipo de produto
241
- if (self.product.tagSpecs && self.product.tagSpecs.productType) {
242
- self.productType = self.product.tagSpecs.productType;
243
- }
255
+ // if (self.product.color) {
256
+ // self.productColor = self.product.color;
257
+ // }
258
+
259
+ // // 2 - Detectar objeto da imagem e aplicar
260
+ // if (self.product.coverImage2xUrl) {
261
+ // self.productImage = self.product.coverImage2xUrl;
262
+ // }
263
+
264
+ // if (
265
+ // self.product.productDisplayDetails &&
266
+ // self.product.productDisplayDetails.coverImage
267
+ // ) {
268
+ // self.productImage = self.product.productDisplayDetails.coverImage;
269
+ // }
270
+
271
+ // // 3 - Detectar o tipo de produto
272
+ // if (self.product.tagSpecs && self.product.tagSpecs.productType) {
273
+ // self.productType = self.product.tagSpecs.productType;
274
+ // }
244
275
 
245
276
  //console.log("tagSpecs 1", self.product.tagSpecs);
246
277
 
247
- if (self.product.tagSpecs && self.product.tagSpecs.productFormat) {
248
- //console.log("tagSpecs", self.product.tagSpecs);
278
+ // if (self.product.tagSpecs && self.product.tagSpecs.productFormat) {
279
+ // //console.log("tagSpecs", self.product.tagSpecs);
249
280
 
250
- self.productFormat = self.product.tagSpecs.productFormat;
251
- }
281
+ // self.productFormat = self.product.tagSpecs.productFormat;
282
+ // }
252
283
  },
253
284
 
254
285
  methods: {
@@ -270,7 +301,7 @@ export default {
270
301
 
271
302
  detectSize() {
272
303
  var menuStatus = false;
273
- if (document.innerWidth < 990) {
304
+ if (window.innerWidth < 990) {
274
305
  menuStatus = true;
275
306
  }
276
307
  return menuStatus;
@@ -154,6 +154,13 @@ const planner = {
154
154
 
155
155
  var emUso = planner;
156
156
 
157
+
158
+ // productColor
159
+ // productImage
160
+ // productType
161
+ // productFormat
162
+ // prodcutProtagonist
163
+
157
164
  export const Basic = () => ({
158
165
  components: { CatalogProduct },
159
166
  props: {
@@ -166,6 +173,11 @@ export const Basic = () => ({
166
173
  <div class="storybook-14" style="background-color: #ccc; width:100%; padding:48px;">
167
174
  <CatalogProduct
168
175
  :product="product"
176
+ :productColor="product.color"
177
+ :productImage="product.coverImageUrl"
178
+ :productType="product.tagSpecs.productType"
179
+ :productFormat="product.tagSpecs.productFormat"
180
+ :productProtagonist="product.protagonist"
169
181
  textCta="Texto"
170
182
  />
171
183
  </div>
@@ -192,6 +192,37 @@ export default {
192
192
  required: true,
193
193
  },
194
194
 
195
+ productColor: {
196
+ type: String,
197
+ required: true,
198
+ },
199
+
200
+ productImage: {
201
+ type: String,
202
+ required: true,
203
+ },
204
+
205
+ productType: {
206
+ type: String,
207
+ required: true,
208
+ },
209
+
210
+ productFormat: {
211
+ type: String,
212
+ required: true,
213
+ },
214
+
215
+ productProtagonist: {
216
+ type: String,
217
+ required: true,
218
+ },
219
+
220
+ // productColor
221
+ // productImage
222
+ // productType
223
+ // productFormat
224
+ // prodcutProtagonist
225
+
195
226
  textCta: {
196
227
  type: String,
197
228
  required: false,
@@ -204,51 +235,51 @@ export default {
204
235
  gridView: true,
205
236
  observer: null,
206
237
  isMobile: false,
207
- productColor: "rgb(23, 184, 188)",
208
- productImage: "",
209
- productType: null,
210
- productFormat: "retangular",
238
+ //productColor: "rgb(23, 184, 188)",
239
+ //productImage: "",
240
+ //productType: null,
241
+ //productFormat: "retangular",
211
242
  };
212
243
  },
213
244
 
214
- created() {
245
+ mounted() {
215
246
  const self = this;
216
247
 
217
248
  self.isMobile = self.detectSize();
218
249
 
219
- document.addEventListener("resize", function (e) {
250
+ window.addEventListener("resize", function (e) {
220
251
  self.isMobile = self.detectSize();
221
252
  });
222
253
 
223
254
  // 1 - Detectar se o produto tem cor
224
- if (self.product.color) {
225
- self.productColor = self.product.color;
226
- }
227
-
228
- // 2 - Detectar objeto da imagem e aplicar
229
- if (self.product.coverImage2xUrl) {
230
- self.productImage = self.product.coverImage2xUrl;
231
- }
232
-
233
- if (
234
- self.product.productDisplayDetails &&
235
- self.product.productDisplayDetails.coverImage
236
- ) {
237
- self.productImage = self.product.productDisplayDetails.coverImage;
238
- }
239
-
240
- // 3 - Detectar o tipo de produto
241
- if (self.product.tagSpecs && self.product.tagSpecs.productType) {
242
- self.productType = self.product.tagSpecs.productType;
243
- }
255
+ // if (self.product.color) {
256
+ // self.productColor = self.product.color;
257
+ // }
258
+
259
+ // // 2 - Detectar objeto da imagem e aplicar
260
+ // if (self.product.coverImage2xUrl) {
261
+ // self.productImage = self.product.coverImage2xUrl;
262
+ // }
263
+
264
+ // if (
265
+ // self.product.productDisplayDetails &&
266
+ // self.product.productDisplayDetails.coverImage
267
+ // ) {
268
+ // self.productImage = self.product.productDisplayDetails.coverImage;
269
+ // }
270
+
271
+ // // 3 - Detectar o tipo de produto
272
+ // if (self.product.tagSpecs && self.product.tagSpecs.productType) {
273
+ // self.productType = self.product.tagSpecs.productType;
274
+ // }
244
275
 
245
276
  //console.log("tagSpecs 1", self.product.tagSpecs);
246
277
 
247
- if (self.product.tagSpecs && self.product.tagSpecs.productFormat) {
248
- //console.log("tagSpecs", self.product.tagSpecs);
278
+ // if (self.product.tagSpecs && self.product.tagSpecs.productFormat) {
279
+ // //console.log("tagSpecs", self.product.tagSpecs);
249
280
 
250
- self.productFormat = self.product.tagSpecs.productFormat;
251
- }
281
+ // self.productFormat = self.product.tagSpecs.productFormat;
282
+ // }
252
283
  },
253
284
 
254
285
  methods: {
@@ -270,7 +301,7 @@ export default {
270
301
 
271
302
  detectSize() {
272
303
  var menuStatus = false;
273
- if (document.innerWidth < 990) {
304
+ if (window.innerWidth < 990) {
274
305
  menuStatus = true;
275
306
  }
276
307
  return menuStatus;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiddh/brave-vue",
3
- "version": "1.93.237",
3
+ "version": "1.93.239",
4
4
  "private": false,
5
5
  "main": "dist/brave-vue.ssr.js",
6
6
  "browser": "dist/brave-vue.esm.js",