@tiddh/brave-vue 1.92.21 → 1.92.23

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.
@@ -26,12 +26,11 @@
26
26
  kind="primary"
27
27
  size="xl"
28
28
  width="circle"
29
- class="arrow"
30
- :disabled="false"
29
+ :disabled="currentPage == 1"
31
30
  :inverted="true"
32
- @click="toTheLeft()"
33
- icon="chevron-left"
31
+ @click="toTheLeft"
34
32
  >
33
+ <Icon name="chevron-left" stroke="transparent" size="md" />
35
34
  </Button>
36
35
  </div>
37
36
 
@@ -40,12 +39,11 @@
40
39
  kind="primary"
41
40
  size="xl"
42
41
  width="circle"
43
- class="arrow"
44
- :disabled="false"
42
+ :disabled="currentPage == pages"
45
43
  :inverted="true"
46
- @click="toTheRight()"
47
- icon="chevron-right"
44
+ @click="toTheRight"
48
45
  >
46
+ <Icon name="chevron-right" stroke="transparent" size="md" />
49
47
  </Button>
50
48
  </div>
51
49
  </div>
@@ -54,14 +52,13 @@
54
52
 
55
53
  <script>
56
54
  import Language from "./js/language.json";
55
+ import Icon from "../Icons/Icon.vue";
56
+ import Button from "../Buttons/Button.vue";
57
57
 
58
- import jQuery from "jquery";
59
58
  import "./js/turn.min.js";
60
59
  import "./js/zoom.min.js";
61
- import Icon from "../Icons/Icon.vue";
62
-
63
- import Button from "../Buttons/Button.vue";
64
60
 
61
+ import jQuery from "jquery";
65
62
  const $ = jQuery;
66
63
  const axios = require("axios");
67
64
 
@@ -248,34 +245,9 @@
248
245
  InitialPages +=
249
246
  "<div class='hard'><img src='data:image/png;base64," +
250
247
  url +
251
- "' alt='' firstPage='true'></div>";
248
+ "' alt='' width='100%' firstPage='true'></div>";
252
249
  }
253
250
 
254
- // InitialPages +=
255
- // "<div class='hard back-side'><img src='" +
256
- // this.apiUrl +
257
- // "/api/builder/getpreview/" +
258
- // this.uuid +
259
- // "?page=" +
260
- // (this.pages - 1) +
261
- // "&w=" +
262
- // this.bookDimensions.width +
263
- // "&v=0&update=" +
264
- // n +
265
- // "' alt=''></div>";
266
- // InitialPages +=
267
- // "<div class='hard'><img src='" +
268
- // this.apiUrl +
269
- // "/api/builder/getpreview/" +
270
- // this.uuid +
271
- // "?page=" +
272
- // this.pages +
273
- // "&w=" +
274
- // this.bookDimensions.width +
275
- // "&v=0&update=" +
276
- // n +
277
- // "' alt=''></div>";
278
-
279
251
  $("#flipbook").html(InitialPages);
280
252
  return true;
281
253
  },
@@ -665,6 +637,22 @@
665
637
  };
666
638
  },
667
639
  },
640
+
641
+ beforeDestroy() {
642
+ // Clean up imported modules
643
+ // Assuming the imported modules have global side effects, you can remove them from the window object
644
+ delete window.turn;
645
+ delete window.Zoom;
646
+
647
+ // Clean up jQuery instance
648
+ // Assuming you have assigned the jQuery instance to the global window object, you can remove it
649
+ delete window.$;
650
+
651
+ // Clean up Axios module
652
+ // Assuming you have assigned the Axios module to the global window object, you can remove it
653
+ //delete window.axios;
654
+ },
655
+
668
656
  computed: {
669
657
  shadowVar() {
670
658
  return {
@@ -44,7 +44,7 @@
44
44
  <div class="itens-properties" v-if="properties">
45
45
  <div
46
46
  class="item"
47
- @click="showModal(property.code)"
47
+ @click="showModal(property)"
48
48
  v-for="(property, index) in properties"
49
49
  :key="index"
50
50
  >
@@ -1190,43 +1190,43 @@
1190
1190
  //var modalName = Object.keys(key)[0];
1191
1191
  // console.log(modalName);
1192
1192
 
1193
- if (modalName === "nome") {
1193
+ if (modalName.code === "nome" || modalName.property_id === 24) {
1194
1194
  this.modalName = true;
1195
1195
  }
1196
1196
 
1197
- if (modalName.includes("dedicatoria")) {
1197
+ if (modalName.code == "dedicatoria" || modalName.property_id === 26) {
1198
1198
  this.modalDedication = true;
1199
1199
  }
1200
1200
 
1201
- if (modalName.includes("nome-do-mooner")) {
1201
+ if (modalName.code == "nome-do-mooner") {
1202
1202
  this.modalMooner = true;
1203
1203
  }
1204
1204
 
1205
- if (modalName.includes("nome-pet")) {
1205
+ if (modalName.code == "nome-pet") {
1206
1206
  this.modalPet = true;
1207
1207
  }
1208
1208
 
1209
- if (modalName.includes("script")) {
1209
+ if (modalName.code == "script") {
1210
1210
  this.modalLayout = true;
1211
1211
  }
1212
1212
 
1213
- if (modalName.includes("camisa")) {
1213
+ if (modalName.code == "camisa") {
1214
1214
  this.modalShirtNumber = true;
1215
1215
  }
1216
1216
 
1217
- if (modalName.includes("birthday")) {
1217
+ if (modalName.code == "birthday") {
1218
1218
  this.modalBirthdate = true;
1219
1219
  }
1220
1220
 
1221
- if (modalName.includes("fantasy")) {
1221
+ if (modalName.code == "fantasy") {
1222
1222
  this.modalFantasy = true;
1223
1223
  }
1224
1224
 
1225
- if (modalName.includes("languages")) {
1225
+ if (modalName.code == "languages") {
1226
1226
  this.modalLanguage = true;
1227
1227
  }
1228
1228
 
1229
- if (modalName.includes("layouts")) {
1229
+ if (modalName.code == "layouts") {
1230
1230
  this.modalLayout = true;
1231
1231
  }
1232
1232
  },
@@ -1761,7 +1761,7 @@
1761
1761
  dedicatoria: {
1762
1762
  code: "dedicatoria",
1763
1763
  property_id: 26,
1764
- value: self.dedicationText,
1764
+ value: self.dedicationText ? self.dedicationText : " ",
1765
1765
  },
1766
1766
  },
1767
1767
  },
@@ -258,7 +258,7 @@
258
258
  },
259
259
 
260
260
  changeUrl(payload) {
261
- alert("Change url ");
261
+ //alert("Change url ");
262
262
  this.$emit("changeUrl", payload);
263
263
  },
264
264
 
@@ -26,12 +26,11 @@
26
26
  kind="primary"
27
27
  size="xl"
28
28
  width="circle"
29
- class="arrow"
30
- :disabled="false"
29
+ :disabled="currentPage == 1"
31
30
  :inverted="true"
32
- @click="toTheLeft()"
33
- icon="chevron-left"
31
+ @click="toTheLeft"
34
32
  >
33
+ <Icon name="chevron-left" stroke="transparent" size="md" />
35
34
  </Button>
36
35
  </div>
37
36
 
@@ -40,12 +39,11 @@
40
39
  kind="primary"
41
40
  size="xl"
42
41
  width="circle"
43
- class="arrow"
44
- :disabled="false"
42
+ :disabled="currentPage == pages"
45
43
  :inverted="true"
46
- @click="toTheRight()"
47
- icon="chevron-right"
44
+ @click="toTheRight"
48
45
  >
46
+ <Icon name="chevron-right" stroke="transparent" size="md" />
49
47
  </Button>
50
48
  </div>
51
49
  </div>
@@ -54,14 +52,13 @@
54
52
 
55
53
  <script>
56
54
  import Language from "./js/language.json";
55
+ import Icon from "../Icons/Icon.vue";
56
+ import Button from "../Buttons/Button.vue";
57
57
 
58
- import jQuery from "jquery";
59
58
  import "./js/turn.min.js";
60
59
  import "./js/zoom.min.js";
61
- import Icon from "../Icons/Icon.vue";
62
-
63
- import Button from "../Buttons/Button.vue";
64
60
 
61
+ import jQuery from "jquery";
65
62
  const $ = jQuery;
66
63
  const axios = require("axios");
67
64
 
@@ -248,34 +245,9 @@
248
245
  InitialPages +=
249
246
  "<div class='hard'><img src='data:image/png;base64," +
250
247
  url +
251
- "' alt='' firstPage='true'></div>";
248
+ "' alt='' width='100%' firstPage='true'></div>";
252
249
  }
253
250
 
254
- // InitialPages +=
255
- // "<div class='hard back-side'><img src='" +
256
- // this.apiUrl +
257
- // "/api/builder/getpreview/" +
258
- // this.uuid +
259
- // "?page=" +
260
- // (this.pages - 1) +
261
- // "&w=" +
262
- // this.bookDimensions.width +
263
- // "&v=0&update=" +
264
- // n +
265
- // "' alt=''></div>";
266
- // InitialPages +=
267
- // "<div class='hard'><img src='" +
268
- // this.apiUrl +
269
- // "/api/builder/getpreview/" +
270
- // this.uuid +
271
- // "?page=" +
272
- // this.pages +
273
- // "&w=" +
274
- // this.bookDimensions.width +
275
- // "&v=0&update=" +
276
- // n +
277
- // "' alt=''></div>";
278
-
279
251
  $("#flipbook").html(InitialPages);
280
252
  return true;
281
253
  },
@@ -665,6 +637,22 @@
665
637
  };
666
638
  },
667
639
  },
640
+
641
+ beforeDestroy() {
642
+ // Clean up imported modules
643
+ // Assuming the imported modules have global side effects, you can remove them from the window object
644
+ delete window.turn;
645
+ delete window.Zoom;
646
+
647
+ // Clean up jQuery instance
648
+ // Assuming you have assigned the jQuery instance to the global window object, you can remove it
649
+ delete window.$;
650
+
651
+ // Clean up Axios module
652
+ // Assuming you have assigned the Axios module to the global window object, you can remove it
653
+ //delete window.axios;
654
+ },
655
+
668
656
  computed: {
669
657
  shadowVar() {
670
658
  return {
@@ -44,7 +44,7 @@
44
44
  <div class="itens-properties" v-if="properties">
45
45
  <div
46
46
  class="item"
47
- @click="showModal(property.code)"
47
+ @click="showModal(property)"
48
48
  v-for="(property, index) in properties"
49
49
  :key="index"
50
50
  >
@@ -1190,43 +1190,43 @@
1190
1190
  //var modalName = Object.keys(key)[0];
1191
1191
  // console.log(modalName);
1192
1192
 
1193
- if (modalName === "nome") {
1193
+ if (modalName.code === "nome" || modalName.property_id === 24) {
1194
1194
  this.modalName = true;
1195
1195
  }
1196
1196
 
1197
- if (modalName.includes("dedicatoria")) {
1197
+ if (modalName.code == "dedicatoria" || modalName.property_id === 26) {
1198
1198
  this.modalDedication = true;
1199
1199
  }
1200
1200
 
1201
- if (modalName.includes("nome-do-mooner")) {
1201
+ if (modalName.code == "nome-do-mooner") {
1202
1202
  this.modalMooner = true;
1203
1203
  }
1204
1204
 
1205
- if (modalName.includes("nome-pet")) {
1205
+ if (modalName.code == "nome-pet") {
1206
1206
  this.modalPet = true;
1207
1207
  }
1208
1208
 
1209
- if (modalName.includes("script")) {
1209
+ if (modalName.code == "script") {
1210
1210
  this.modalLayout = true;
1211
1211
  }
1212
1212
 
1213
- if (modalName.includes("camisa")) {
1213
+ if (modalName.code == "camisa") {
1214
1214
  this.modalShirtNumber = true;
1215
1215
  }
1216
1216
 
1217
- if (modalName.includes("birthday")) {
1217
+ if (modalName.code == "birthday") {
1218
1218
  this.modalBirthdate = true;
1219
1219
  }
1220
1220
 
1221
- if (modalName.includes("fantasy")) {
1221
+ if (modalName.code == "fantasy") {
1222
1222
  this.modalFantasy = true;
1223
1223
  }
1224
1224
 
1225
- if (modalName.includes("languages")) {
1225
+ if (modalName.code == "languages") {
1226
1226
  this.modalLanguage = true;
1227
1227
  }
1228
1228
 
1229
- if (modalName.includes("layouts")) {
1229
+ if (modalName.code == "layouts") {
1230
1230
  this.modalLayout = true;
1231
1231
  }
1232
1232
  },
@@ -1761,7 +1761,7 @@
1761
1761
  dedicatoria: {
1762
1762
  code: "dedicatoria",
1763
1763
  property_id: 26,
1764
- value: self.dedicationText,
1764
+ value: self.dedicationText ? self.dedicationText : " ",
1765
1765
  },
1766
1766
  },
1767
1767
  },
@@ -258,7 +258,7 @@
258
258
  },
259
259
 
260
260
  changeUrl(payload) {
261
- alert("Change url ");
261
+ //alert("Change url ");
262
262
  this.$emit("changeUrl", payload);
263
263
  },
264
264
 
@@ -26,12 +26,11 @@
26
26
  kind="primary"
27
27
  size="xl"
28
28
  width="circle"
29
- class="arrow"
30
- :disabled="false"
29
+ :disabled="currentPage == 1"
31
30
  :inverted="true"
32
- @click="toTheLeft()"
33
- icon="chevron-left"
31
+ @click="toTheLeft"
34
32
  >
33
+ <Icon name="chevron-left" stroke="transparent" size="md" />
35
34
  </Button>
36
35
  </div>
37
36
 
@@ -40,12 +39,11 @@
40
39
  kind="primary"
41
40
  size="xl"
42
41
  width="circle"
43
- class="arrow"
44
- :disabled="false"
42
+ :disabled="currentPage == pages"
45
43
  :inverted="true"
46
- @click="toTheRight()"
47
- icon="chevron-right"
44
+ @click="toTheRight"
48
45
  >
46
+ <Icon name="chevron-right" stroke="transparent" size="md" />
49
47
  </Button>
50
48
  </div>
51
49
  </div>
@@ -54,14 +52,13 @@
54
52
 
55
53
  <script>
56
54
  import Language from "./js/language.json";
55
+ import Icon from "../Icons/Icon.vue";
56
+ import Button from "../Buttons/Button.vue";
57
57
 
58
- import jQuery from "jquery";
59
58
  import "./js/turn.min.js";
60
59
  import "./js/zoom.min.js";
61
- import Icon from "../Icons/Icon.vue";
62
-
63
- import Button from "../Buttons/Button.vue";
64
60
 
61
+ import jQuery from "jquery";
65
62
  const $ = jQuery;
66
63
  const axios = require("axios");
67
64
 
@@ -248,34 +245,9 @@
248
245
  InitialPages +=
249
246
  "<div class='hard'><img src='data:image/png;base64," +
250
247
  url +
251
- "' alt='' firstPage='true'></div>";
248
+ "' alt='' width='100%' firstPage='true'></div>";
252
249
  }
253
250
 
254
- // InitialPages +=
255
- // "<div class='hard back-side'><img src='" +
256
- // this.apiUrl +
257
- // "/api/builder/getpreview/" +
258
- // this.uuid +
259
- // "?page=" +
260
- // (this.pages - 1) +
261
- // "&w=" +
262
- // this.bookDimensions.width +
263
- // "&v=0&update=" +
264
- // n +
265
- // "' alt=''></div>";
266
- // InitialPages +=
267
- // "<div class='hard'><img src='" +
268
- // this.apiUrl +
269
- // "/api/builder/getpreview/" +
270
- // this.uuid +
271
- // "?page=" +
272
- // this.pages +
273
- // "&w=" +
274
- // this.bookDimensions.width +
275
- // "&v=0&update=" +
276
- // n +
277
- // "' alt=''></div>";
278
-
279
251
  $("#flipbook").html(InitialPages);
280
252
  return true;
281
253
  },
@@ -665,6 +637,22 @@
665
637
  };
666
638
  },
667
639
  },
640
+
641
+ beforeDestroy() {
642
+ // Clean up imported modules
643
+ // Assuming the imported modules have global side effects, you can remove them from the window object
644
+ delete window.turn;
645
+ delete window.Zoom;
646
+
647
+ // Clean up jQuery instance
648
+ // Assuming you have assigned the jQuery instance to the global window object, you can remove it
649
+ delete window.$;
650
+
651
+ // Clean up Axios module
652
+ // Assuming you have assigned the Axios module to the global window object, you can remove it
653
+ //delete window.axios;
654
+ },
655
+
668
656
  computed: {
669
657
  shadowVar() {
670
658
  return {
@@ -44,7 +44,7 @@
44
44
  <div class="itens-properties" v-if="properties">
45
45
  <div
46
46
  class="item"
47
- @click="showModal(property.code)"
47
+ @click="showModal(property)"
48
48
  v-for="(property, index) in properties"
49
49
  :key="index"
50
50
  >
@@ -1190,43 +1190,43 @@
1190
1190
  //var modalName = Object.keys(key)[0];
1191
1191
  // console.log(modalName);
1192
1192
 
1193
- if (modalName === "nome") {
1193
+ if (modalName.code === "nome" || modalName.property_id === 24) {
1194
1194
  this.modalName = true;
1195
1195
  }
1196
1196
 
1197
- if (modalName.includes("dedicatoria")) {
1197
+ if (modalName.code == "dedicatoria" || modalName.property_id === 26) {
1198
1198
  this.modalDedication = true;
1199
1199
  }
1200
1200
 
1201
- if (modalName.includes("nome-do-mooner")) {
1201
+ if (modalName.code == "nome-do-mooner") {
1202
1202
  this.modalMooner = true;
1203
1203
  }
1204
1204
 
1205
- if (modalName.includes("nome-pet")) {
1205
+ if (modalName.code == "nome-pet") {
1206
1206
  this.modalPet = true;
1207
1207
  }
1208
1208
 
1209
- if (modalName.includes("script")) {
1209
+ if (modalName.code == "script") {
1210
1210
  this.modalLayout = true;
1211
1211
  }
1212
1212
 
1213
- if (modalName.includes("camisa")) {
1213
+ if (modalName.code == "camisa") {
1214
1214
  this.modalShirtNumber = true;
1215
1215
  }
1216
1216
 
1217
- if (modalName.includes("birthday")) {
1217
+ if (modalName.code == "birthday") {
1218
1218
  this.modalBirthdate = true;
1219
1219
  }
1220
1220
 
1221
- if (modalName.includes("fantasy")) {
1221
+ if (modalName.code == "fantasy") {
1222
1222
  this.modalFantasy = true;
1223
1223
  }
1224
1224
 
1225
- if (modalName.includes("languages")) {
1225
+ if (modalName.code == "languages") {
1226
1226
  this.modalLanguage = true;
1227
1227
  }
1228
1228
 
1229
- if (modalName.includes("layouts")) {
1229
+ if (modalName.code == "layouts") {
1230
1230
  this.modalLayout = true;
1231
1231
  }
1232
1232
  },
@@ -1761,7 +1761,7 @@
1761
1761
  dedicatoria: {
1762
1762
  code: "dedicatoria",
1763
1763
  property_id: 26,
1764
- value: self.dedicationText,
1764
+ value: self.dedicationText ? self.dedicationText : " ",
1765
1765
  },
1766
1766
  },
1767
1767
  },
@@ -258,7 +258,7 @@
258
258
  },
259
259
 
260
260
  changeUrl(payload) {
261
- alert("Change url ");
261
+ //alert("Change url ");
262
262
  this.$emit("changeUrl", payload);
263
263
  },
264
264
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiddh/brave-vue",
3
- "version": "1.92.21",
3
+ "version": "1.92.23",
4
4
  "private": false,
5
5
  "main": "dist/brave-vue.ssr.js",
6
6
  "browser": "dist/brave-vue.esm.js",