@mapomodule/uikit 1.0.0-alpha.2 → 1.0.0-alpha.22

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +406 -0
  2. package/components/Detail/Detail.vue +288 -260
  3. package/components/Detail/DetailLangSwitch.vue +1 -1
  4. package/components/DropArea.vue +3 -3
  5. package/components/Form/Form.vue +224 -0
  6. package/components/Form/FormField.vue +185 -0
  7. package/components/Form/FormGroup.vue +88 -0
  8. package/components/Form/FormTabs.vue +134 -0
  9. package/components/Form/defaults.js +58 -0
  10. package/components/{fields → Form/fields}/DateField.vue +9 -3
  11. package/components/Form/fields/FileField.vue +125 -0
  12. package/components/Form/fields/FksField.vue +88 -0
  13. package/components/{fields → Form/fields}/MediaField.vue +36 -6
  14. package/components/{fields → Form/fields}/MediaM2mField.vue +8 -3
  15. package/components/Form/fields/Repeater.vue +562 -0
  16. package/components/Form/fields/SeoPreview.vue +89 -0
  17. package/components/{fields/TinyMce → Form/fields/wygEditor}/defaults.js +7 -5
  18. package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/events.js +0 -0
  19. package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/mapomedia.plugin.js +7 -6
  20. package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/script.injector.js +0 -0
  21. package/components/Form/fields/wygEditor/wygEditor.vue +256 -0
  22. package/components/List/List.vue +120 -42
  23. package/components/List/ListActions.vue +56 -17
  24. package/components/List/ListFilters.vue +158 -113
  25. package/components/List/ListHead.vue +30 -12
  26. package/components/List/ListQuickEdit.vue +128 -59
  27. package/components/List/ListTable.vue +293 -80
  28. package/components/Login.vue +14 -5
  29. package/components/MediaManager/MediaEditor.vue +253 -107
  30. package/components/MediaManager/MediaFolders.vue +134 -43
  31. package/components/MediaManager/MediaGallery.vue +56 -52
  32. package/components/MediaManager/MediaManager.vue +127 -83
  33. package/components/MediaManager/MediaManagerDialog.vue +19 -22
  34. package/components/MediaManager/MediaPreview.vue +180 -0
  35. package/components/MediaManager/MediaUploader.vue +35 -32
  36. package/components/SnackBar.vue +3 -4
  37. package/components/ThemeToggle.vue +13 -0
  38. package/components/layout/Sidebar/Sidebar.vue +35 -32
  39. package/components/layout/Sidebar/SidebarFooter.vue +42 -46
  40. package/components/layout/Sidebar/SidebarList.vue +13 -14
  41. package/components/layout/Sidebar/SidebarListItem.vue +99 -38
  42. package/components/layout/Sidebar/SidebarProfile.vue +42 -0
  43. package/components/layout/Topbar/Topbar.vue +3 -35
  44. package/components/layout/routebuilder.js +3 -3
  45. package/defaults.js +2 -2
  46. package/layouts/default.vue +20 -18
  47. package/layouts/empty.vue +10 -0
  48. package/module.js +1 -1
  49. package/package.json +5 -4
  50. package/pages/index.vue +1 -2
  51. package/components/Detail/DetailField.vue +0 -129
  52. package/components/Detail/defaults.js +0 -50
  53. package/components/fields/M2mField.vue +0 -95
  54. package/components/fields/TinyMce/TinyMce.vue +0 -177
  55. package/layouts/error.vue +0 -45
@@ -1,37 +1,41 @@
1
1
  <template>
2
- <div :style="indent" class="sidebar__link__wrapper">
3
- <NuxtLink v-if="link" class="sidebar__link" :to="link">
4
- <v-icon v-if="icon" class="sidebar__link__icon">{{ icon }}</v-icon>
5
- {{ label }}
2
+ <div v-if="userCanSee" :class="{ child, expanded, 'spider-menu': spiderMenu }">
3
+ <v-list-item
4
+ :style="indent"
5
+ :exact-path="expanded"
6
+ :input-value="!expanded && !link && activeChild"
7
+ @click.native="!link && (expanded = !expanded)"
8
+ link
9
+ :to="link"
10
+ >
11
+ <v-list-item-icon v-if="icon">
12
+ <v-icon>{{ icon }}</v-icon>
13
+ </v-list-item-icon>
14
+ <v-list-item-title>
15
+ {{ label }}
16
+ </v-list-item-title>
6
17
  <v-icon
7
18
  class="expand-icon"
8
19
  v-if="childrens.length"
9
20
  :style="rotate"
10
- @click.native.prevent="expanded = !expanded"
21
+ @click.native.prevent="link && (expanded = !expanded)"
11
22
  >mdi-chevron-down</v-icon
12
23
  >
13
- </NuxtLink>
14
- <span
15
- @click.prevent="expanded = !expanded"
16
- v-if="!link"
17
- class="sidebar__link"
18
- >
19
- <v-icon v-if="icon" class="sidebar__link__icon">{{ icon }}</v-icon>
20
- {{ label }}
21
- <v-icon :style="rotate" class="expand-icon" v-if="childrens.length"
22
- >mdi-chevron-down</v-icon
23
- >
24
- </span>
25
- <div v-if="childrens.length && expanded">
24
+ </v-list-item>
25
+
26
+ <div class="child-menu" :style="indent" v-if="childrens.length && expanded && !forceCollapse">
26
27
  <SidebarListItem
27
- class="sidebar__list__item"
28
28
  v-for="(item, i) in childrens"
29
29
  :key="i"
30
30
  :link="item.link"
31
31
  :label="item.label"
32
+ :meta="item.meta"
32
33
  :childrens="item.childrens"
33
- :depth="depth || 0 + 1"
34
+ :depth="(depth || 0) + 1"
34
35
  :icon="item.icon"
36
+ :force-collapse="forceCollapse"
37
+ :spider-menu="spiderMenu"
38
+ child
35
39
  />
36
40
  </div>
37
41
  </div>
@@ -48,24 +52,56 @@
48
52
  border-radius: 50%;
49
53
  }
50
54
  }
51
-
52
- .sidebar {
53
- &__link {
54
- display: flex;
55
- align-items: center;
56
- justify-content: flex-start;
57
- width: 100%;
58
- padding: 0.5rem 1rem;
59
- text-decoration: none;
60
- color: $white;
61
- background: rgba(0, 0, 0, 0);
62
- transition: all linear 0.25s;
63
- text-transform: capitalize;
64
- &:hover {
65
- background: rgba(0, 0, 0, 0.25);
55
+ .spider-menu.child {
56
+ .v-list-item__icon {
57
+ &::after {
58
+ content: "";
59
+ position: absolute;
60
+ width: 5px;
61
+ height: 30px;
62
+ top: -9px;
63
+ margin-left: -4px;
64
+ border-bottom: solid 3px #acacac;
65
+ border-left: solid 3px #acacac;
66
+ z-index: -1;
67
+ }
68
+ &::before {
69
+ content: "";
70
+ position: absolute;
71
+ width: 5px;
72
+ height: 10px;
73
+ top: 21px;
74
+ margin-left: -4px;
75
+ border-left: solid 3px #acacac;
76
+ z-index: -1;
77
+ }
78
+ }
79
+ .child-menu {
80
+ position: relative;
81
+ &::after {
82
+ content: "";
83
+ position: absolute;
84
+ width: 0px;
85
+ height: 100%;
86
+ top: -9px;
87
+ margin-left: -4px;
88
+ border-left: solid 3px #acacac;
89
+ z-index: -1;
66
90
  }
67
- &__icon {
68
- margin-right: 0.5rem;
91
+ }
92
+ }
93
+ .spider-menu.child:last-child {
94
+ .v-list-item__icon {
95
+ &::before {
96
+ height: 0px;
97
+ }
98
+ &::after {
99
+ border-bottom-left-radius: 3px;
100
+ }
101
+ }
102
+ .child-menu{
103
+ &::after {
104
+ height: 0px;
69
105
  }
70
106
  }
71
107
  }
@@ -77,11 +113,15 @@ export default {
77
113
  data() {
78
114
  return {
79
115
  expanded: false,
116
+ nestDepth: 14,
80
117
  };
81
118
  },
82
119
  computed: {
83
120
  indent() {
84
- return { marginLeft: `${+this.depth * 10}px` };
121
+ return {
122
+ paddingLeft: `calc(1rem + ${+this.depth * this.nestDepth}px)`,
123
+ marginLeft: this.depth > 1 && `calc(-1rem - ${(this.depth - 1) * this.nestDepth}px)`,
124
+ };
85
125
  },
86
126
  rotate() {
87
127
  return {
@@ -89,13 +129,34 @@ export default {
89
129
  transition: "transform 225ms cubic-bezier(0.4, 0, 0.2, 1)",
90
130
  };
91
131
  },
132
+ activeChild() {
133
+ return (this.childrens || []).some((child) => this.$nuxt.$route.path.startsWith(child.link));
134
+ },
135
+ userCanSee() {
136
+ const middleware = this.$mapo.$auth.getRouteMiddlewares({ meta: this.meta })
137
+ if (middleware.includes("permissions")){
138
+ const userInfo = this.$mapo.$auth.user.info
139
+ if (userInfo.is_superuser) return true
140
+ const { model } = this.meta?.permissions || {}
141
+ const userPermission = (userInfo.user_permissions || []).filter(perm => perm.codename.endsWith(model)).map(({ codename }) => codename.replace(`_${model}`, ''))
142
+ return userPermission.includes('view')
143
+ }
144
+ if (middleware.includes("auth")){
145
+ return this.$mapo.$auth.user.isLoggedIn
146
+ }
147
+ return true
148
+ },
92
149
  },
93
150
  props: {
94
151
  link: String,
95
152
  label: String,
96
153
  icon: String,
97
154
  childrens: Array,
155
+ meta: Object,
98
156
  depth: Number,
157
+ forceCollapse: Boolean,
158
+ child: Boolean,
159
+ spiderMenu: Boolean,
99
160
  },
100
161
  };
101
162
  </script>
@@ -0,0 +1,42 @@
1
+ <template>
2
+ <v-list-item>
3
+ <v-list-item-avatar v-if="avatar">
4
+ <v-img :src="avatar"></v-img>
5
+ </v-list-item-avatar>
6
+ <v-list-item-icon v-else>
7
+ <v-icon>mdi-account</v-icon>
8
+ </v-list-item-icon>
9
+ <v-list-item-title>
10
+ <span v-if="isLoggedIn">
11
+ {{ username }}
12
+ </span>
13
+ <NuxtLink v-else to="/login"> Login </NuxtLink>
14
+ </v-list-item-title>
15
+ <v-btn icon @click.stop="toggleMiniVariant">
16
+ <v-icon>mdi-chevron-left</v-icon>
17
+ </v-btn>
18
+ </v-list-item>
19
+ </template>
20
+
21
+
22
+ <script>
23
+ // @vuese
24
+ export default {
25
+ computed: {
26
+ username() {
27
+ return this.isLoggedIn ? this.$mapo.$auth.user.username : "";
28
+ },
29
+ avatar() {
30
+ return this.$mapo.$auth.user.avatar;
31
+ },
32
+ isLoggedIn() {
33
+ return this.$mapo.$auth.user.isLoggedIn;
34
+ },
35
+ },
36
+ methods: {
37
+ toggleMiniVariant() {
38
+ this.$store.dispatch("mapo/app/toggleSidebarMinivariant");
39
+ },
40
+ },
41
+ };
42
+ </script>
@@ -5,54 +5,22 @@
5
5
  app
6
6
  flat
7
7
  dense
8
- class="topbar__wrapper"
9
8
  >
10
9
  <v-app-bar-nav-icon @click.stop="drawerReverse()" />
11
10
  <v-toolbar-title v-text="title" />
12
11
  <v-spacer />
13
-
14
- <div class="topbar__user">
15
- <span class="topbar__user__name">
16
- Ciao, {{ this.$mapo.$auth.user.username }}
17
- </span>
18
- <v-btn
19
- class="topbar__user__btn"
20
- icon
21
- >
22
- <v-icon>mdi-account</v-icon>
23
- </v-btn>
24
- </div>
12
+ <ThemeToggle/>
25
13
  </v-app-bar>
26
14
  </template>
27
15
 
28
- <style lang="scss" scoped>
29
- @import '@mapomodule/uikit/assets/variables.scss';
30
-
31
- .topbar {
32
- &__wrapper {
33
- // background: $black!important;
34
- // color: $white;
35
- }
36
- &__user {
37
- display: flex;
38
- align-items: center;
39
- &__name {
40
- margin-right: 0.5rem;
41
- }
42
- }
43
- }
44
- </style>
45
-
46
16
  <script>
47
- import { mapMutations } from 'vuex'
48
-
49
17
  export default {
50
18
  name: "Topbar",
51
19
  props: {
52
- title: String
20
+ title: String,
53
21
  },
54
22
  methods: {
55
- drawerReverse () {
23
+ drawerReverse() {
56
24
  this.$store.dispatch("mapo/app/toggleSidebarDrawer");
57
25
  },
58
26
  },
@@ -13,7 +13,7 @@ function buildRoutes(routes, defaultIcon) {
13
13
  .map((route) => {
14
14
  const { meta, path, name } = route
15
15
  const label = (route.meta && route.meta.label) || (path.split("/").pop() || "").replaceAll(':', '').replaceAll('-', ' ') || 'home'
16
- const icon = (route.meta && route.meta.icon) || getDefaultIcon({ route, label }, defaultIcon)
16
+ const icon = route.meta && route.meta.icon !== undefined ? route.meta.icon : getDefaultIcon({ route, label }, defaultIcon)
17
17
  return { label, icon, meta, name, link: path, relPath: path.slice(1), childrens: [] };
18
18
  }),
19
19
  defaultIcon
@@ -22,7 +22,7 @@ function buildRoutes(routes, defaultIcon) {
22
22
 
23
23
  function nestReduce(array, defaultIcon) {
24
24
  return array.reduce((stack, route) => {
25
- const names = route.relPath.split("/");
25
+ const names = (route.relPath || "").split("/");
26
26
  if (names.length === 1) {
27
27
  stack.push(route);
28
28
  } else {
@@ -31,7 +31,7 @@ function nestReduce(array, defaultIcon) {
31
31
  if (pIndex === -1) {
32
32
  const label = (route.meta && route.meta.parentLabel) || name
33
33
  const icon = (route.meta && route.meta.parentIcon) || getDefaultIcon({ route, label }, defaultIcon)
34
- stack.push({ name, label, icon, childrens: [] });
34
+ stack.push({ name, label, icon, relPath: name, childrens: [] });
35
35
  pIndex = stack.length - 1;
36
36
  }
37
37
  stack[pIndex].childrens.push(
package/defaults.js CHANGED
@@ -6,7 +6,7 @@ export default {
6
6
  dark: true,
7
7
  themes: {
8
8
  dark: {
9
- primary: '#309A00',
9
+ primary: '#51beaa',
10
10
  accent: colors.grey.darken3,
11
11
  secondary: colors.amber.darken3,
12
12
  info: colors.teal.lighten1,
@@ -15,7 +15,7 @@ export default {
15
15
  success: colors.green.accent3
16
16
  },
17
17
  light: {
18
- primary: '#309A00',
18
+ primary: '#51beaa',
19
19
  accent: colors.indigo.accent1,
20
20
  secondary: colors.amber.accent2,
21
21
  info: colors.teal.lighten1,
@@ -1,32 +1,34 @@
1
1
  <template>
2
- <v-app class="app__wrapper">
2
+ <v-app>
3
3
  <Sidebar />
4
- <Topbar :title="title" :drawer="this.$store.getters['mapo/app/drawer']" />
4
+ <Topbar />
5
5
  <v-main>
6
- <v-container>
7
- <nuxt />
8
- <root-components />
9
- </v-container>
6
+ <nuxt />
7
+ <root-components />
10
8
  </v-main>
11
9
  </v-app>
12
10
  </template>
13
11
 
14
- <style lang="scss" scoped>
15
- @import "@mapomodule/uikit/assets/variables.scss";
16
-
17
- .app {
18
- &__wrapper {
19
- // background: $w-1;
12
+ <style lang="scss">
13
+ html { overflow-y: auto }
14
+ .v-main__wrap {
15
+ .__nuxt-error-page {
16
+ background: transparent;
17
+ .error {
18
+ background: transparent !important;
19
+ svg {
20
+ // fill: #ff5252 !important;
21
+ }
22
+ }
20
23
  }
21
24
  }
22
25
  </style>
23
26
 
24
27
  <script>
28
+ import initDraggable from "@mapomodule/utils/plugins/v-draggable-modals";
25
29
  export default {
26
- data() {
27
- return {
28
- title: "Pannello"
29
- };
30
- }
30
+ mounted() {
31
+ initDraggable();
32
+ },
31
33
  };
32
- </script>
34
+ </script>
package/layouts/empty.vue CHANGED
@@ -4,3 +4,13 @@
4
4
  <root-components />
5
5
  </v-app>
6
6
  </template>
7
+
8
+
9
+ <script>
10
+ import initDraggable from "@mapomodule/utils/plugins/v-draggable-modals";
11
+ export default {
12
+ mounted() {
13
+ initDraggable();
14
+ },
15
+ };
16
+ </script>
package/module.js CHANGED
@@ -39,7 +39,7 @@ export default async function (moduleOptions) {
39
39
 
40
40
  // INJECT COMPONENTS
41
41
  this.nuxt.hook('components:dirs', (dirs) => {
42
- const mapoComponents = ['components', 'components/fields', 'components/layout']
42
+ const mapoComponents = ['components', 'components/Form/fields', 'components/layout']
43
43
  mapoComponents.forEach(d => dirs.unshift({ path: path.resolve(__dirname, d)}))
44
44
  })
45
45
  this.nuxt.hook('components:extend', (components) => {
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "@mapomodule/uikit",
3
- "version": "1.0.0-alpha.2",
3
+ "version": "1.0.0-alpha.22",
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.1",
11
- "@nuxtjs/vuetify": "^1.12.1"
10
+ "@mapomodule/utils": "^1.0.0-alpha.22",
11
+ "@nuxtjs/vuetify": "^1.12.3",
12
+ "vuedraggable": "^2.24.3"
12
13
  },
13
14
  "publishConfig": {
14
15
  "access": "public"
15
16
  },
16
- "gitHead": "0e0250444e8db547df4a3b3e70364880fde8f36b"
17
+ "gitHead": "49f5a6c1ed148cfdaf80a6b610ffc4233aa177cb"
17
18
  }
package/pages/index.vue CHANGED
@@ -20,14 +20,13 @@
20
20
 
21
21
  <style scoped>
22
22
  .mapo-info {
23
- background: #333333;
24
23
  border-radius: 8px;
25
24
  margin: 10px 5%;
26
25
  padding: 10px;
27
26
  }
28
27
  </style>
29
28
  <script>
30
- import { version } from "@mapomodule/core/package.json";
29
+ import { version } from "mapomodule/package.json";
31
30
  export default {
32
31
  data: () => ({
33
32
  version: version
@@ -1,129 +0,0 @@
1
- <template>
2
- <component :is="is" v-model="model" v-bind="fieldProp"></component>
3
- </template>
4
-
5
- <script>
6
- import TinyMce from "@mapomodule/uikit/components/fields/TinyMce/TinyMce.vue";
7
- import DateField from "@mapomodule/uikit/components/fields/DateField.vue";
8
- import M2mField from "@mapomodule/uikit/components/fields/M2mField.vue";
9
- import MediaM2mField from "@mapomodule/uikit/components/fields/MediaM2mField.vue";
10
- import MediaField from "@mapomodule/uikit/components/fields/MediaField.vue";
11
-
12
- import { getPointed, setPointed } from "@mapomodule/utils/helpers/objHelpers";
13
- import defaults from "./defaults";
14
-
15
- /**
16
- * This is mainly an internal component. It is used by the [`DetailComponent`](/components/detail/Detail/) in order to render dinamic fields inside the main form.
17
- */
18
- export default {
19
- name: "DetailField",
20
- components: {
21
- TinyMce,
22
- DateField,
23
- M2mField,
24
- MediaM2mField,
25
- MediaField
26
- },
27
-
28
- data() {
29
- return {
30
- model: null,
31
- fieldsMap: defaults.mapping,
32
- fieldsProps: defaults.props,
33
- fieldsAccess: defaults.accessor
34
- };
35
- },
36
- props: {
37
- // V-model of the payload needed to edit the field value in realtime.
38
- value: {
39
- type: Object,
40
- required: true
41
- },
42
- // 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.
43
- errors: Object,
44
- // The main configuration that determines the rendering of the field. See [FieldConfiguration](/components/detail/Detail/#fieldconfiguration).
45
- conf: {
46
- // [`FieldConfiguration`](/components/detail/Detail/#fieldconfiguration)
47
- type: Object,
48
- required: true
49
- }
50
- },
51
- watch: {
52
- value: {
53
- deep: true,
54
- handler(val) {
55
- this.setModel(val);
56
- }
57
- },
58
- conf(newConf, oldConf) {
59
- if (newConf.value !== oldConf.value) {
60
- this.setModel();
61
- }
62
- },
63
- model(val) {
64
- const dump = { ...this.value };
65
- setPointed(
66
- dump,
67
- this.conf.value,
68
- this.accessor.set({ model: { ...this.value }, val })
69
- );
70
- // Fired when the v-model changes.
71
- // @arg Emits the entire payload modified.
72
- this.$emit("input", dump);
73
- }
74
- },
75
- methods: {
76
- setModel(val = this.value) {
77
- var model = this.accessor.get({
78
- model: { ...val },
79
- val: getPointed({ ...val }, this.conf.value)
80
- });
81
- if (val && JSON.stringify(this.model) !== JSON.stringify(model))
82
- this.model = model;
83
- }
84
- },
85
- computed: {
86
- accessor() {
87
- let func = function({ val }) {
88
- return val;
89
- };
90
- return {
91
- get: func,
92
- set: func,
93
- ...(this.fieldsAccess[this.is] || {}),
94
- ...this.conf.accessor
95
- };
96
- },
97
- fieldProp() {
98
- return {
99
- label: this.label,
100
- errorMessages: getPointed(this.errors || {}, this.conf.value, []),
101
- ...(this.fieldsProps[this.is] || {}),
102
- ...this.conf.attrs
103
- };
104
- },
105
- label() {
106
- if (this.conf.label !== undefined) {
107
- return this.conf.label;
108
- }
109
- const titleCase = string =>
110
- (string && string[0].toUpperCase() + string.slice(1).toLowerCase()) ||
111
- "";
112
- return titleCase(
113
- (this.conf.value || "")
114
- .replace(/^translations\.\w\w\./, "")
115
- .split(".")
116
- .join(" ")
117
- .replace(/_/, " ")
118
- );
119
- },
120
- is() {
121
- return (
122
- this.conf.is ||
123
- (this.conf.type && this.fieldsMap[this.conf.type]) ||
124
- "v-text-field"
125
- );
126
- }
127
- }
128
- };
129
- </script>
@@ -1,50 +0,0 @@
1
- const mapping = {
2
- text: "v-text-field",
3
- select: "v-select",
4
- date: "date-field",
5
- textarea: "v-textarea",
6
- switch: "v-switch",
7
- slider: "v-slider",
8
- file: "v-file-input",
9
- editor: "tiny-mce",
10
- media: "media-field",
11
- m2m: "m2m-field",
12
- mediaList: "media-m2m-field"
13
- }
14
-
15
- const props = {
16
- "v-text-field": {
17
- outlined: true
18
- },
19
- "v-textarea": {
20
- outlined: true
21
- },
22
- "date-field": {
23
- outlined: true
24
- },
25
- "v-select": {
26
- outlined: true,
27
- itemText: "text",
28
- itemValue: "value"
29
- },
30
- "v-switch": {
31
- inset: true,
32
- ripple: false
33
- }
34
- }
35
-
36
- const dateFunc = function ({ val }) {
37
- return val && new Date(val).toISOString().split("T")[0];
38
- };
39
-
40
- const accessor = {
41
- "v-date-picker": {
42
- get: dateFunc, set: dateFunc
43
- },
44
- "date-field": {
45
- get: dateFunc, set: dateFunc
46
- }
47
- }
48
- export default {
49
- mapping, props, accessor
50
- }