@mapomodule/uikit 1.0.0-alpha.8 → 1.0.0-alpha.9

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,24 @@
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.9](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2022-02-08)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **datefield:** graphic fix for datefield ([2cf2a8f](https://github.com/lotrekagency/mapo/commit/2cf2a8fe4a18717c6a1b1589e9fbc10273399fb5))
12
+ * **fksfield:** added fks alias to field ([d5b5ecf](https://github.com/lotrekagency/mapo/commit/d5b5ecf9f7bc7b270a8a2f22940281ef8453fb78))
13
+
14
+
15
+ ### Features
16
+
17
+ * **detail:** added possibility to remove group icon in detail field configuration ([a8f63e0](https://github.com/lotrekagency/mapo/commit/a8f63e00a03b5467db057f6ab813621e480eaeae))
18
+ * **detailfield:** added hidden label to simplify external graphic personalization of fields ([4e1de0d](https://github.com/lotrekagency/mapo/commit/4e1de0d9a256241ce010daaf058b6282c7279808))
19
+
20
+
21
+
22
+
23
+
6
24
  # [1.0.0-alpha.8](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2022-01-23)
7
25
 
8
26
 
@@ -308,7 +308,7 @@ export default {
308
308
  const parseGroup = group =>
309
309
  typeof group === "string"
310
310
  ? { name: group, icon }
311
- : { ...group, icon: group.icon || icon };
311
+ : { ...group, icon: group.icon !== undefined ? group.icon : icon };
312
312
  return fields.map((f, i) =>
313
313
  f.group
314
314
  ? { group: parseGroup(f.group), fields: this.mapConf(f.fields) }
@@ -461,7 +461,7 @@ Here the list of the FieldConfiguration type association.
461
461
  - `file` ==> [v-file-input](https://vuetifyjs.com/en/components/file-inputs/),
462
462
  - `editor` ==> [wyg-editor](/components/fields/wygEditor/wygEditor/),
463
463
  - `media` ==> [media-field](/components/fields/MediaField/),
464
- - `m2m` ==> [fks-field](/components/fields/FksField/),
464
+ - `m2m` or `fks` ==> [fks-field](/components/fields/FksField/),
465
465
  - `mediaList` ==> [media-fks-field](/components/fields/MediaM2mField/)
466
466
 
467
467
 
@@ -1,7 +1,16 @@
1
1
  <template>
2
- <component :is="is" v-model="model" v-bind="fieldAttrs"></component>
2
+ <div>
3
+ <span class="mapo-label" :class="`mapo-label-${conf.value}`">{{label}}</span>
4
+ <component :is="is" v-model="model" v-bind="fieldAttrs"></component>
5
+ </div>
3
6
  </template>
4
7
 
8
+ <style>
9
+ .mapo-label {
10
+ display: none;
11
+ }
12
+ </style>
13
+
5
14
  <script>
6
15
  import wygEditor from "@mapomodule/uikit/components/fields/wygEditor/wygEditor.vue";
7
16
  import DateField from "@mapomodule/uikit/components/fields/DateField.vue";
@@ -25,7 +34,7 @@ export default {
25
34
  FksField,
26
35
  MediaM2mField,
27
36
  MediaField,
28
- SeoPreview
37
+ SeoPreview,
29
38
  },
30
39
 
31
40
  data() {
@@ -33,14 +42,14 @@ export default {
33
42
  model: null,
34
43
  defaultMap: defaults.mapping,
35
44
  defaultAttrs: defaults.props,
36
- defaultAccess: defaults.accessor
45
+ defaultAccess: defaults.accessor,
37
46
  };
38
47
  },
39
48
  props: {
40
49
  // V-model of the payload needed to edit the field value in realtime.
41
50
  value: {
42
51
  type: Object,
43
- required: true
52
+ required: true,
44
53
  },
45
54
  // An object representing all the errors of all fields. This means that this component will find the error of its field following the dottedPath of the value in the error dict.
46
55
  errors: Object,
@@ -48,15 +57,15 @@ export default {
48
57
  conf: {
49
58
  // [`FieldConfiguration`](/components/detail/Detail/#fieldconfiguration)
50
59
  type: Object,
51
- required: true
52
- }
60
+ required: true,
61
+ },
53
62
  },
54
63
  watch: {
55
64
  value: {
56
65
  deep: true,
57
66
  handler(val) {
58
67
  this.setModel(val);
59
- }
68
+ },
60
69
  },
61
70
  "conf.value"(newValue, oldValue) {
62
71
  if (newValue !== oldValue) {
@@ -73,28 +82,28 @@ export default {
73
82
  // Fired when the v-model changes.
74
83
  // @arg Emits the entire payload modified.
75
84
  this.$emit("input", dump);
76
- }
85
+ },
77
86
  },
78
87
  methods: {
79
88
  setModel(val = this.value) {
80
89
  var model = this.accessor.get({
81
90
  model: { ...val },
82
- val: getPointed({ ...val }, this.conf.value)
91
+ val: getPointed({ ...val }, this.conf.value),
83
92
  });
84
93
  if (val && JSON.stringify(this.model) !== JSON.stringify(model))
85
94
  this.model = model;
86
- }
95
+ },
87
96
  },
88
97
  computed: {
89
98
  accessor() {
90
- let func = function({ val }) {
99
+ let func = function ({ val }) {
91
100
  return val;
92
101
  };
93
102
  return {
94
103
  get: func,
95
104
  set: func,
96
105
  ...(this.defaultAccess[this.is] || {}),
97
- ...this.conf.accessor
106
+ ...this.conf.accessor,
98
107
  };
99
108
  },
100
109
  fieldAttrs() {
@@ -103,14 +112,14 @@ export default {
103
112
  errorMessages: getPointed(this.errors || {}, this.conf.value, []),
104
113
  ...this.defaultAttrs.All,
105
114
  ...(this.defaultAttrs[this.is.replace(/-./g, x=>x[1].toUpperCase())] || {}),
106
- ...this.conf.attrs
115
+ ...this.conf.attrs,
107
116
  };
108
117
  },
109
118
  label() {
110
119
  if (this.conf.label !== undefined) {
111
120
  return this.conf.label;
112
121
  }
113
- const titleCase = string =>
122
+ const titleCase = (string) =>
114
123
  (string && string[0].toUpperCase() + string.slice(1).toLowerCase()) ||
115
124
  "";
116
125
  return titleCase(
@@ -127,7 +136,7 @@ export default {
127
136
  (this.conf.type && this.defaultMap[this.conf.type]) ||
128
137
  "vTextField"
129
138
  );
130
- }
131
- }
139
+ },
140
+ },
132
141
  };
133
142
  </script>
@@ -8,6 +8,7 @@ const mapping = {
8
8
  file: "vFileInput",
9
9
  editor: "wygEditor",
10
10
  media: "MediaField",
11
+ fks: "FksField",
11
12
  m2m: "FksField",
12
13
  mediaList: "MediaM2mField",
13
14
  seoPreview: "SeoPreview"
@@ -241,7 +241,7 @@ export default {
241
241
  const parseGroup = (group) =>
242
242
  typeof group === "string"
243
243
  ? { name: group, icon }
244
- : { ...group, icon: group.icon || icon };
244
+ : { ...group, icon: group.icon !== undefined ? group.icon : icon };
245
245
  return fields.map((f, i) =>
246
246
  f.group
247
247
  ? { group: parseGroup(f.group), fields: this.mapConf(f.fields) }
@@ -17,6 +17,7 @@
17
17
  v-bind="{ ...$attrs, ...attrs }"
18
18
  v-on="readonly ? undefined : on"
19
19
  :clearable="!readonly"
20
+ class="rounded-0"
20
21
  ></v-text-field>
21
22
  </template>
22
23
  <v-date-picker v-model="model" :range="range" no-title>
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@mapomodule/uikit",
3
- "version": "1.0.0-alpha.8",
3
+ "version": "1.0.0-alpha.9",
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>",
7
7
  "repository": "https://github.com/lotrekagency/mapo",
8
8
  "main": "./module.js",
9
9
  "dependencies": {
10
- "@mapomodule/utils": "^1.0.0-alpha.8",
10
+ "@mapomodule/utils": "^1.0.0-alpha.9",
11
11
  "@nuxtjs/vuetify": "^1.12.1"
12
12
  },
13
13
  "publishConfig": {
14
14
  "access": "public"
15
15
  },
16
- "gitHead": "4448ce925e9f3af25f78f86c3e28a88145201520"
16
+ "gitHead": "a75142247a9371981aea57b76828bd354b375aea"
17
17
  }