@mapomodule/uikit 1.0.0-alpha.20 → 1.0.0-alpha.21

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,14 @@
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.21](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.20...v1.0.0-alpha.21) (2022-04-25)
7
+
8
+ **Note:** Version bump only for package @mapomodule/uikit
9
+
10
+
11
+
12
+
13
+
6
14
  # [1.0.0-alpha.20](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.19...v1.0.0-alpha.20) (2022-04-25)
7
15
 
8
16
 
@@ -213,7 +213,7 @@ export default {
213
213
  // Makes the repeater field sortable.
214
214
  sortable: Boolean,
215
215
  // Make the repeater multilanguage. This means that it's going to inherit the languages and the current language from the parent detail component, creating the translations for each line of the repeater.
216
- multilang: Boolean,
216
+ translatable: Boolean,
217
217
  // This callback is called during sort/add/remove item if the Repeater is sortable. Use this callback to change some prop of the items in the list.
218
218
  sortCallback: {
219
219
  type: Function,
@@ -279,9 +279,9 @@ export default {
279
279
  parseConf(field, i) {
280
280
  const conf = typeof field === "string" ? { value: field } : field;
281
281
  conf.value = conf.value || "";
282
- conf.value = this.multilang ? conf.value.replace(new RegExp(`^translations\.(${this.langs.join("|")})\.?`), "") : conf.value;
282
+ conf.value = this.translatable ? conf.value.replace(new RegExp(`^translations\.(${this.langs.join("|")})\.?`), "") : conf.value;
283
283
  conf.slotName = `fields.${conf.value || i}`;
284
- if (this.multilang && this.currentLang && !field.synci18n) {
284
+ if (this.translatable && this.currentLang && !field.synci18n) {
285
285
  const base = `translations.${this.currentLang}`;
286
286
  conf.value = (conf.value && `${base}.${conf.value}`) || base;
287
287
  }
@@ -291,7 +291,7 @@ export default {
291
291
  return conf;
292
292
  },
293
293
  mapConf(fields) {
294
- fields = this.multilang ? JSON.parse(JSON.stringify(fields)) : fields; // this hack fixes rendering loop on multilang scenario. :/
294
+ fields = this.translatable ? JSON.parse(JSON.stringify(fields)) : fields; // this hack fixes rendering loop on translatable repeater. :/
295
295
  const icon = "mdi-cube-outline";
296
296
  const parseGroup = (group) => typeof group === "string" ? { name: group, icon } : { ...group, icon: group.icon !== undefined ? group.icon : icon };
297
297
  return fields.map((f, i) =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapomodule/uikit",
3
- "version": "1.0.0-alpha.20",
3
+ "version": "1.0.0-alpha.21",
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>",
@@ -14,5 +14,5 @@
14
14
  "publishConfig": {
15
15
  "access": "public"
16
16
  },
17
- "gitHead": "8f3b7f4cfbde70e26be50593eaf8238b7ccf5c18"
17
+ "gitHead": "2331ccbff7c6f457455c42831981eec9f5ed6570"
18
18
  }