@mapomodule/uikit 1.0.0-alpha.52 → 1.0.0-alpha.54

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/CHANGELOG.md CHANGED
@@ -3,6 +3,30 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.0.0-alpha.54](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.53...v1.0.0-alpha.54) (2025-03-10)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **repeater:** fix lower-case control and add example to repeater ([#56](https://github.com/lotrekagency/mapo/issues/56)) ([b897150](https://github.com/lotrekagency/mapo/commit/b89715054b8ba6df4c1d66dc853b64a840a5e433))
12
+
13
+
14
+
15
+
16
+
17
+ # [1.0.0-alpha.53](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.52...v1.0.0-alpha.53) (2024-07-11)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **editor config:** added iframe configuration allowing js execution ([2d7b729](https://github.com/lotrekagency/mapo/commit/2d7b729279c5bec8f08344f884360e184c30d508))
23
+ * **editor config:** now using props conf object, allowing component customization ([aed3c05](https://github.com/lotrekagency/mapo/commit/aed3c053bfbc9bb75648f5b0688d26232e07d4a9))
24
+ * **mapField:** added hasErrors computed missing property ([36e9049](https://github.com/lotrekagency/mapo/commit/36e90496068ed56f2fa1eb2508e531ab0b03df90))
25
+
26
+
27
+
28
+
29
+
6
30
  # [1.0.0-alpha.52](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.51...v1.0.0-alpha.52) (2024-07-04)
7
31
 
8
32
 
@@ -57,9 +57,10 @@
57
57
  </v-container>
58
58
  </div>
59
59
  <div class="repeater-side-bar grey lighten-2">
60
- <span class="repeater-counter grey--text text--darken-2 text-truncate">{{
61
- index + 1
62
- }}</span>
60
+ <span
61
+ class="repeater-counter grey--text text--darken-2 text-truncate"
62
+ >{{ index + 1 }}</span
63
+ >
63
64
  <v-tooltip right>
64
65
  <template v-slot:activator="{ on, attrs }">
65
66
  <v-icon
@@ -120,7 +121,11 @@
120
121
  }}</v-card-title>
121
122
  <v-card-text>
122
123
  <div class="row mt-4">
123
- <div v-for="(template, i) in templates" :key="i" class="col-12 col-md-6 pa-0">
124
+ <div
125
+ v-for="(template, i) in templates"
126
+ :key="i"
127
+ class="col-12 col-md-6 pa-0"
128
+ >
124
129
  <div @click="tModalCallback(template)" class="template-button">
125
130
  <span class="text-h5">{{ template.name }}</span
126
131
  ><br />
@@ -312,7 +317,9 @@ export default {
312
317
  langs: {
313
318
  // `Array<String>`
314
319
  type: Array,
315
- default() { return this.$mapo.$options?.content?.languages || []; },
320
+ default() {
321
+ return this.$mapo.$options?.content?.languages || [];
322
+ },
316
323
  },
317
324
  // This is mainly an internal property. It is used by DetailField to pass the active language inherited from the Detail component.
318
325
  currentLang: String,
@@ -321,7 +328,11 @@ export default {
321
328
  watch: {
322
329
  value(val) {
323
330
  const isEmpty = (v) => !v || Object.keys(v).length == 0;
324
- if (isEmpty(val) && isEmpty(this.items) || JSON.stringify(val) === JSON.stringify(this.items)) return;
331
+ if (
332
+ (isEmpty(val) && isEmpty(this.items)) ||
333
+ JSON.stringify(val) === JSON.stringify(this.items)
334
+ )
335
+ return;
325
336
  this.items = (val && deepClone(val)) || [];
326
337
  if (val.length != this.collapsedStack.length)
327
338
  this.collapsedStack = (val || []).map(() => !!this.collapsable);
@@ -330,7 +341,7 @@ export default {
330
341
  handler(val) {
331
342
  this.$emit("input", deepClone(val));
332
343
  },
333
- deep: true
344
+ deep: true,
334
345
  },
335
346
  tModalOpen(val) {
336
347
  !val && this.tModalCallback();
@@ -383,14 +394,18 @@ export default {
383
394
  },
384
395
  getFields(model) {
385
396
  if (this.hasTemplates) {
386
- const template = this.templates.find((t) => model[t.tCodeField] == t.tCode);
397
+ const template = this.templates.find(
398
+ (t) => model[t.tCodeField] == t.tCode
399
+ );
387
400
  return template ? template.fields : [];
388
401
  }
389
402
  return this.fields;
390
403
  },
391
404
  templateSlots(model, slots) {
392
405
  if (this.hasTemplates) {
393
- const template = this.templates.find((t) => model[t.tCodeField] == t.tCode);
406
+ const template = this.templates.find(
407
+ (t) => model[t.tCodeField] == t.tCode
408
+ );
394
409
  return nameSpacedSlots(slots, `template.${template.tCode}.`).reduce(
395
410
  (acc, v) => ({ [`template.${template.tCode}.${v}`]: v, ...acc }),
396
411
  {}
@@ -407,7 +422,7 @@ export default {
407
422
  return this.collapsedLabel(model);
408
423
  default:
409
424
  const field = this.getFields(model).find(
410
- (f) => !f.type || f.type.lower() == "text"
425
+ (f) => !f.type || f.type.toLowerCase() == "text"
411
426
  );
412
427
  return getPointed(model, field.value, fallback);
413
428
  }
@@ -452,8 +467,15 @@ export default {
452
467
  },
453
468
  maxHeightStyle() {
454
469
  if (this.maxHeight !== undefined) {
455
- const maxHeight = isNaN(this.maxHeight) ? this.maxHeight : `${this.maxHeight}px`;
456
- return { maxHeight, paddingTop: "15px", overflowX: "hidden", overflowY: "auto" };
470
+ const maxHeight = isNaN(this.maxHeight)
471
+ ? this.maxHeight
472
+ : `${this.maxHeight}px`;
473
+ return {
474
+ maxHeight,
475
+ paddingTop: "15px",
476
+ overflowX: "hidden",
477
+ overflowY: "auto",
478
+ };
457
479
  }
458
480
  },
459
481
  },
@@ -119,6 +119,7 @@ export default {
119
119
  // V-model property.
120
120
  value: {
121
121
  type: Array,
122
+ default: () => [],
122
123
  },
123
124
  // This label will be shown at the top of the editor.
124
125
  label: String,
@@ -325,6 +326,7 @@ export default {
325
326
  hasTemplates() {
326
327
  return typeof this.fields == "object" && !Array.isArray(this.fields);
327
328
  },
329
+ hasErrors () { return this.errorMessages && this.errorMessages.length },
328
330
  templates() {
329
331
  const templates = {};
330
332
  if (this.hasTemplates) {
@@ -8,6 +8,9 @@ const defaultConfig = ({ assetsBasePath, isDark }) => {
8
8
  removePlugins: "image,exportpdf",
9
9
  extraPlugins: "image2",
10
10
  versionCheck: false,
11
+ iframe_attributes: {
12
+ sandbox: "allow-same-origin allow-scripts allow-popups allow-forms",
13
+ },
11
14
  toolbar: [
12
15
  {
13
16
  name: "clipboard",
@@ -113,7 +113,7 @@ a.cke_button_off:hover, a.cke_button_disabled:hover {
113
113
  import injectScript from "./utils/ckeditor.injector.js";
114
114
  import defaultConfig from "./defaults.js";
115
115
  import ThemeToggle from "../../../ThemeToggle.vue";
116
-
116
+ import _ from "lodash";
117
117
  /**
118
118
 
119
119
  */
@@ -158,7 +158,7 @@ export default {
158
158
  const { base } = this.$router.options;
159
159
  const assetsBasePath = `${base}mapo/ckeditor/`;
160
160
  const { isDark } = this.$vuetify.theme;
161
- return defaultConfig({ assetsBasePath, isDark });
161
+ return _.merge(defaultConfig({ assetsBasePath, isDark }), this.conf);
162
162
  },
163
163
  },
164
164
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapomodule/uikit",
3
- "version": "1.0.0-alpha.52",
3
+ "version": "1.0.0-alpha.54",
4
4
  "license": "MIT",
5
5
  "description": "This is part of Mapo nuxt module. Injects Mapo ui components in the nuxt component discovery system.",
6
6
  "author": "bnznamco <gabriele.baldi.01@gmail.com>",
@@ -15,5 +15,5 @@
15
15
  "publishConfig": {
16
16
  "access": "public"
17
17
  },
18
- "gitHead": "abccec94f5ff410e552aba9cd818b772985443a4"
18
+ "gitHead": "57f850d66b0ea3a72c3fcab6073a4efa3af62fc3"
19
19
  }