@mapomodule/uikit 1.0.0-alpha.38 → 1.0.0-alpha.39
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 +26 -0
- package/components/Detail/Detail.vue +59 -25
- package/components/Detail/DetailLangSwitch.vue +1 -1
- package/components/Form/Form.vue +2 -2
- package/components/Form/FormField.vue +24 -39
- package/components/Form/defaults.js +49 -18
- package/components/Form/fields/ColorField.vue +4 -1
- package/components/Form/fields/DateField.vue +7 -1
- package/components/Form/fields/MediaField.vue +4 -1
- package/components/Form/fields/MediaM2mField.vue +11 -6
- package/components/List/ListTable.vue +1 -1
- package/components/layout/Sidebar/SidebarTitle.vue +14 -11
- package/defaults/vuetify.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,32 @@
|
|
|
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.39](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.38...v1.0.0-alpha.39) (2022-12-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* fix class inheritance for field border radius ([33f1fd9](https://github.com/lotrekagency/mapo/commit/33f1fd9e41edb9f3a396ee8a4c1a7431072b885a))
|
|
12
|
+
* fix list table to fallback to unknown string if navigable but no column value ([dcf400f](https://github.com/lotrekagency/mapo/commit/dcf400f5a728246a9251a464c2d9739246092b9a))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* give the option to rewrite form fields components defaults in nuxt.config.js ([c4e76b1](https://github.com/lotrekagency/mapo/commit/c4e76b153b145cc670ef988e9501e1a8fbc0005e))
|
|
18
|
+
* pass classes also to groups and tabs in formfields ([e975aab](https://github.com/lotrekagency/mapo/commit/e975aabea4ae62be2285262fed8852af45a69f48))
|
|
19
|
+
* restyle media m2m field ([a79e976](https://github.com/lotrekagency/mapo/commit/a79e9763949b032a37180fefbd8a98ad8e0b05a0))
|
|
20
|
+
* specific class names for detail component parts and configurable sidenav col ([e6a5887](https://github.com/lotrekagency/mapo/commit/e6a588712774080dddcf01fb832a0729babb16a7))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Performance Improvements
|
|
24
|
+
|
|
25
|
+
* dynamically import components in FormField to reduce bundle size ([85986c6](https://github.com/lotrekagency/mapo/commit/85986c6859a00d8039dd7e9f703f5dd4b668361f))
|
|
26
|
+
* treeshake vuetify to reduce vendor bundle ([42b31b3](https://github.com/lotrekagency/mapo/commit/42b31b38eb04d561bba1535d8e05d91353679027))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
6
32
|
# [1.0.0-alpha.38](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.37...v1.0.0-alpha.38) (2022-11-22)
|
|
7
33
|
|
|
8
34
|
|
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div v-if="loading">
|
|
2
|
+
<div class="mapo-detail--wrapper">
|
|
3
|
+
<div class="mapo-detail--loader" v-if="loading">
|
|
4
4
|
<v-progress-linear
|
|
5
5
|
color="primary"
|
|
6
6
|
indeterminate
|
|
7
7
|
absolute
|
|
8
|
-
style="top: 0;"
|
|
9
8
|
></v-progress-linear>
|
|
10
|
-
<span class="detail-component-loading
|
|
9
|
+
<span class="detail-component-loading">
|
|
11
10
|
<v-icon size="30">mdi-timer-sand</v-icon>
|
|
12
11
|
{{ $t('mapo.fetchingData') }}
|
|
13
12
|
</span>
|
|
14
13
|
</div>
|
|
15
|
-
<div v-else>
|
|
14
|
+
<div class="mapo-detail--loaded" v-else>
|
|
16
15
|
<!-- Use this to override the title of the detail component. -->
|
|
17
16
|
<slot name="title" v-bind="slotBindings">
|
|
18
17
|
<!-- `<h1> "Create | Edit" + modelName </h1>` -->
|
|
19
|
-
<
|
|
20
|
-
<v-col col="12"><h1 class="display-1">{{ isNew ? $t("mapo.create") : $t("mapo.edit") }} {{ modelName }}</h1></v-col>
|
|
21
|
-
</v-row>
|
|
18
|
+
<h1 class="mapo-detail--title">{{ isNew ? $t("mapo.create") : $t("mapo.edit") }} {{ modelName }}</h1>
|
|
22
19
|
</slot>
|
|
23
|
-
<v-form ref="form">
|
|
20
|
+
<v-form class="mapo-detail--form" ref="form">
|
|
24
21
|
<v-row>
|
|
25
|
-
<v-col cols="12" md="
|
|
22
|
+
<v-col class="mapo-detail--main" cols="12" :md="12 - sidenavCol">
|
|
26
23
|
<!-- Use this to add content at the top of the central layout. -->
|
|
27
24
|
<slot name="body.top" v-bind="slotBindings"></slot>
|
|
28
25
|
<!-- Use this to override the Language Switch panel. -->
|
|
@@ -31,7 +28,7 @@
|
|
|
31
28
|
<DetailLangSwitch
|
|
32
29
|
v-if="langs && langs.length"
|
|
33
30
|
v-show="langs.length > 1"
|
|
34
|
-
class="
|
|
31
|
+
class="mapo-detail--language-tabs"
|
|
35
32
|
v-model="currentLang"
|
|
36
33
|
:langs="langs"
|
|
37
34
|
:errors="errors"
|
|
@@ -62,32 +59,32 @@
|
|
|
62
59
|
<!-- Use this to add content under the main body. -->
|
|
63
60
|
<slot name="body.bottom" v-bind="slotBindings"></slot>
|
|
64
61
|
</v-col>
|
|
65
|
-
<v-col cols="12" md="
|
|
66
|
-
<div class="
|
|
62
|
+
<v-col class="mapo-detail--sidenav" cols="12" :md="sidenavCol">
|
|
63
|
+
<div class="mapo-detail--sidenav-col" :style="stickySide">
|
|
67
64
|
<!-- Use this to add content on the top of the sidebar button panel. -->
|
|
68
65
|
<slot name="side.buttons.top" v-bind="slotBindings"></slot>
|
|
69
66
|
<!-- Use this to override the the sidebar button panel. -->
|
|
70
67
|
<slot name="side.buttons" v-bind="slotBindings">
|
|
71
68
|
<!-- Save, Save and continue, Back, and Delete buttons. -->
|
|
72
|
-
<div class="
|
|
69
|
+
<div class="mapo-detail--buttons">
|
|
73
70
|
<!-- Use this to override the Save button. -->
|
|
74
71
|
<slot name="button.save" v-bind="slotBindings">
|
|
75
72
|
<!-- The Save button. -->
|
|
76
|
-
<v-btn v-show="canGoBack" :loading="buttonClicked == 'saveAndBackBtn'" :disabled="isReadonly"
|
|
73
|
+
<v-btn v-show="canGoBack" :loading="buttonClicked == 'saveAndBackBtn'" :disabled="isReadonly" tile block @click="saveItem(true)">{{
|
|
77
74
|
isNew ? $t("mapo.create") : $t("mapo.save")
|
|
78
75
|
}}</v-btn>
|
|
79
76
|
</slot>
|
|
80
77
|
<!-- Use this to override the Save and continue button. -->
|
|
81
78
|
<slot name="button.savecontinue" v-bind="slotBindings">
|
|
82
79
|
<!-- The Save and continue button. -->
|
|
83
|
-
<v-btn :loading="buttonClicked == 'saveBtn'" :disabled="isReadonly"
|
|
80
|
+
<v-btn :loading="buttonClicked == 'saveBtn'" :disabled="isReadonly" tile block @click="saveItem(false)"
|
|
84
81
|
>{{ isNew ? $t("mapo.createContinue") : $t("mapo.saveContinue") }}</v-btn
|
|
85
82
|
>
|
|
86
83
|
</slot>
|
|
87
84
|
<!-- Use this to override the Back button. -->
|
|
88
85
|
<slot name="button.back" v-bind="slotBindings">
|
|
89
86
|
<!-- The Back button. -->
|
|
90
|
-
<v-btn v-show="canGoBack"
|
|
87
|
+
<v-btn v-show="canGoBack" tile block @click="back"
|
|
91
88
|
>{{ $t("mapo.back") }}</v-btn
|
|
92
89
|
>
|
|
93
90
|
</slot>
|
|
@@ -96,7 +93,6 @@
|
|
|
96
93
|
<!-- The Delete button. -->
|
|
97
94
|
<v-btn
|
|
98
95
|
v-if="!isNew"
|
|
99
|
-
class="mb-2"
|
|
100
96
|
color="error"
|
|
101
97
|
tile
|
|
102
98
|
block
|
|
@@ -137,15 +133,44 @@
|
|
|
137
133
|
</template>
|
|
138
134
|
|
|
139
135
|
<style lang="scss" scoped>
|
|
140
|
-
.detail
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
136
|
+
.mapo-detail--loader {
|
|
137
|
+
.v-progress-linear {
|
|
138
|
+
top: 0;
|
|
139
|
+
}
|
|
140
|
+
span{
|
|
141
|
+
position: absolute;
|
|
142
|
+
top: 50%;
|
|
143
|
+
transform: translateY(-50%);
|
|
144
|
+
width: 100%;
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
align-items: center;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
.mapo-detail--title{
|
|
152
|
+
margin-bottom: 20px;
|
|
153
|
+
font-weight: normal;
|
|
154
|
+
}
|
|
155
|
+
.mapo-detail--language-tabs {
|
|
156
|
+
margin-bottom: 20px;
|
|
157
|
+
}
|
|
158
|
+
.mapo-detail--sidenav-col {
|
|
145
159
|
display: flex;
|
|
146
160
|
flex-direction: column;
|
|
147
|
-
|
|
148
|
-
|
|
161
|
+
}
|
|
162
|
+
.mapo-detail--buttons {
|
|
163
|
+
margin-top: 16px;
|
|
164
|
+
margin-bottom: 0px;
|
|
165
|
+
order: 1;
|
|
166
|
+
@media (min-width: 960px) {
|
|
167
|
+
margin-bottom: 16px;
|
|
168
|
+
margin-top: 0px;
|
|
169
|
+
order: 0;
|
|
170
|
+
}
|
|
171
|
+
.v-btn{
|
|
172
|
+
margin-bottom: 8px;
|
|
173
|
+
}
|
|
149
174
|
}
|
|
150
175
|
</style>
|
|
151
176
|
|
|
@@ -197,6 +222,15 @@ export default {
|
|
|
197
222
|
type: String,
|
|
198
223
|
default: null
|
|
199
224
|
},
|
|
225
|
+
// This determines the width of the sidebar in desktop view in a 12 col grid.
|
|
226
|
+
sidenavCol: {
|
|
227
|
+
type: Number | String,
|
|
228
|
+
default: "4",
|
|
229
|
+
validator: function (value) {
|
|
230
|
+
// The value must be a number between 0 and 12
|
|
231
|
+
return [...Array(12).keys()].indexOf(+value) !== -1;
|
|
232
|
+
},
|
|
233
|
+
},
|
|
200
234
|
// The identifier of the object you need to retrieve and edit. It can be "new" if you need to create a new payload.
|
|
201
235
|
identifier: {
|
|
202
236
|
// `String|Number`.
|
package/components/Form/Form.vue
CHANGED
|
@@ -178,9 +178,9 @@ export default {
|
|
|
178
178
|
mapConf(fields) {
|
|
179
179
|
return fields.map((f, i) =>
|
|
180
180
|
f.tabs
|
|
181
|
-
? { group: this.parseTagsGroup(f), tabs: this.parseTabs(f.tabs) }
|
|
181
|
+
? { ...f, group: this.parseTagsGroup(f), tabs: this.parseTabs(f.tabs) }
|
|
182
182
|
: f.group
|
|
183
|
-
? { group: this.parseGroup(f.group), fields: this.mapConf(f.fields) }
|
|
183
|
+
? { ...f, group: this.parseGroup(f.group), fields: this.mapConf(f.fields) }
|
|
184
184
|
: this.parseConf(f, i)
|
|
185
185
|
);
|
|
186
186
|
},
|
|
@@ -18,48 +18,19 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<script>
|
|
21
|
-
import wygEditor from "@mapomodule/uikit/components/Form/fields/wygEditor/wygEditor.vue";
|
|
22
|
-
import DateField from "@mapomodule/uikit/components/Form/fields/DateField.vue";
|
|
23
|
-
import FksField from "@mapomodule/uikit/components/Form/fields/FksField.vue";
|
|
24
|
-
import MediaM2mField from "@mapomodule/uikit/components/Form/fields/MediaM2mField.vue";
|
|
25
|
-
import MediaField from "@mapomodule/uikit/components/Form/fields/MediaField.vue";
|
|
26
|
-
import EnhancedMediaField from "@mapomodule/uikit/components/Form/fields/EnhancedMediaField.vue";
|
|
27
|
-
|
|
28
|
-
import SeoPreview from "@mapomodule/uikit/components/Form/fields/SeoPreview.vue";
|
|
29
|
-
import FileField from "@mapomodule/uikit/components/Form/fields/FileField.vue";
|
|
30
|
-
import Repeater from "@mapomodule/uikit/components/Form/fields/Repeater.vue";
|
|
31
|
-
|
|
32
21
|
import { getPointed, setPointed } from "@mapomodule/utils/helpers/objHelpers";
|
|
33
22
|
import { titleCase } from "@mapomodule/utils/helpers/formatters";
|
|
34
23
|
|
|
35
24
|
import defaults from "./defaults";
|
|
36
25
|
import { debounce } from "@mapomodule/utils/helpers/debounce";
|
|
26
|
+
const _ = require("lodash");
|
|
37
27
|
|
|
38
28
|
/**
|
|
39
29
|
* 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.
|
|
40
30
|
*/
|
|
41
31
|
export default {
|
|
42
32
|
name: "FormField",
|
|
43
|
-
|
|
44
|
-
wygEditor,
|
|
45
|
-
DateField,
|
|
46
|
-
FksField,
|
|
47
|
-
MediaM2mField,
|
|
48
|
-
MediaField,
|
|
49
|
-
EnhancedMediaField,
|
|
50
|
-
SeoPreview,
|
|
51
|
-
FileField,
|
|
52
|
-
Repeater,
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
data() {
|
|
56
|
-
return {
|
|
57
|
-
model: null,
|
|
58
|
-
defaultMap: defaults.mapping,
|
|
59
|
-
defaultAttrs: defaults.props,
|
|
60
|
-
defaultAccess: defaults.accessor,
|
|
61
|
-
};
|
|
62
|
-
},
|
|
33
|
+
data() { return { model: null, }; },
|
|
63
34
|
props: {
|
|
64
35
|
// V-model of the payload needed to edit the field value in realtime.
|
|
65
36
|
value: {
|
|
@@ -134,6 +105,22 @@ export default {
|
|
|
134
105
|
},
|
|
135
106
|
},
|
|
136
107
|
computed: {
|
|
108
|
+
componentInfo() {
|
|
109
|
+
const originalName = this.is?.options?.name || this.is?.name || this.is;
|
|
110
|
+
const camelName = originalName.replace(/-./g, (x) => x[1].toUpperCase());
|
|
111
|
+
const kebabName = originalName.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
112
|
+
return { originalName, camelName, kebabName }
|
|
113
|
+
},
|
|
114
|
+
options(){
|
|
115
|
+
return _.merge(defaults, this.$mapo.$options?.ui?.forms?.fields);
|
|
116
|
+
},
|
|
117
|
+
defaultAccess() {
|
|
118
|
+
return this.options.accessor[this.componentInfo.camelName] || this.options.accessor[this.componentInfo.kebabName];
|
|
119
|
+
},
|
|
120
|
+
defaultAttrs() {
|
|
121
|
+
const componentAttrs = this.options.attrs[this.componentInfo.camelName] || this.options.attrs[this.componentInfo.kebabName];
|
|
122
|
+
return {...componentAttrs, ...this.options.attrs.All};
|
|
123
|
+
},
|
|
137
124
|
classes() {
|
|
138
125
|
var upperClasses = this.fieldAttrs.class;
|
|
139
126
|
if (typeof upperClasses == "string") {
|
|
@@ -165,7 +152,7 @@ export default {
|
|
|
165
152
|
return {
|
|
166
153
|
get: func,
|
|
167
154
|
set: func,
|
|
168
|
-
...
|
|
155
|
+
...this.defaultAccess,
|
|
169
156
|
...this.conf.accessor,
|
|
170
157
|
};
|
|
171
158
|
},
|
|
@@ -191,10 +178,7 @@ export default {
|
|
|
191
178
|
label: this.label,
|
|
192
179
|
errorMessages: this.errorMessages,
|
|
193
180
|
hideDetails: this.hasErrors,
|
|
194
|
-
...this.defaultAttrs
|
|
195
|
-
...(this.defaultAttrs[
|
|
196
|
-
this.is.replace(/-./g, (x) => x[1].toUpperCase())
|
|
197
|
-
] || {}),
|
|
181
|
+
...this.defaultAttrs,
|
|
198
182
|
readonly: this.readonly,
|
|
199
183
|
...this.conf.attrs,
|
|
200
184
|
currentLang: this.currentLang,
|
|
@@ -214,10 +198,11 @@ export default {
|
|
|
214
198
|
);
|
|
215
199
|
},
|
|
216
200
|
is() {
|
|
201
|
+
const dynImport = typeof this.conf.is == "string" && this.options.components[this.conf.is.replace(/-./g, (x) => x[1].toUpperCase())];
|
|
217
202
|
return (
|
|
218
|
-
this.conf.is ||
|
|
219
|
-
(this.conf.type && this.
|
|
220
|
-
|
|
203
|
+
dynImport || this.conf.is ||
|
|
204
|
+
(this.conf.type && this.options.mapping[this.conf.type]) ||
|
|
205
|
+
this.options.mapping.text
|
|
221
206
|
);
|
|
222
207
|
},
|
|
223
208
|
},
|
|
@@ -1,23 +1,54 @@
|
|
|
1
|
+
const components = {
|
|
2
|
+
// vuetify
|
|
3
|
+
vTextField: () => import("vuetify/lib/components/VTextField"),
|
|
4
|
+
vSelect: () => import("vuetify/lib/components/VSelect"),
|
|
5
|
+
vTextarea: () => import("vuetify/lib/components/VTextarea"),
|
|
6
|
+
vSwitch: () => import("vuetify/lib/components/VSwitch"),
|
|
7
|
+
vSlider: () => import("vuetify/lib/components/VSlider"),
|
|
8
|
+
vAutocomplete: () => import("vuetify/lib/components/VAutocomplete"),
|
|
9
|
+
vCheckbox: () => import("vuetify/lib/components/VCheckbox"),
|
|
10
|
+
vCombobox: () => import("vuetify/lib/components/VCombobox"),
|
|
11
|
+
vFileInput: () => import("vuetify/lib/components/VFileInput"),
|
|
12
|
+
vInput: () => import("vuetify/lib/components/VInput"),
|
|
13
|
+
vOtpInput: () => import("vuetify/lib/components/VOtpInput"),
|
|
14
|
+
vOverflowBtn: () => import("vuetify/lib/components/VOverflowBtn"),
|
|
15
|
+
vRangeSlider: () => import("vuetify/lib/components/VRangeSlider"),
|
|
16
|
+
vRating: () => import("vuetify/lib/components/VRating"),
|
|
17
|
+
vRadioGroup: () => import("vuetify/lib/components/VRadioGroup"),
|
|
18
|
+
|
|
19
|
+
// customs
|
|
20
|
+
wygEditor: () => import("@mapomodule/uikit/components/Form/fields/wygEditor/wygEditor.vue"),
|
|
21
|
+
DateField: () => import("@mapomodule/uikit/components/Form/fields/DateField.vue"),
|
|
22
|
+
FksField: () => import("@mapomodule/uikit/components/Form/fields/FksField.vue"),
|
|
23
|
+
MediaM2mField: () => import("@mapomodule/uikit/components/Form/fields/MediaM2mField.vue"),
|
|
24
|
+
MediaField: () => import("@mapomodule/uikit/components/Form/fields/MediaField.vue"),
|
|
25
|
+
EnhancedMediaField: () => import("@mapomodule/uikit/components/Form/fields/EnhancedMediaField.vue"),
|
|
26
|
+
SeoPreview: () => import("@mapomodule/uikit/components/Form/fields/SeoPreview.vue"),
|
|
27
|
+
FileField: () => import("@mapomodule/uikit/components/Form/fields/FileField.vue"),
|
|
28
|
+
Repeater: () => import("@mapomodule/uikit/components/Form/fields/Repeater.vue"),
|
|
29
|
+
ColorField: () => import("@mapomodule/uikit/components/Form/fields/ColorField.vue"),
|
|
30
|
+
}
|
|
31
|
+
|
|
1
32
|
const mapping = {
|
|
2
|
-
text:
|
|
3
|
-
select:
|
|
4
|
-
date:
|
|
5
|
-
textarea:
|
|
6
|
-
switch:
|
|
7
|
-
slider:
|
|
8
|
-
file:
|
|
9
|
-
editor:
|
|
10
|
-
media:
|
|
11
|
-
enhancedMedia:
|
|
12
|
-
fks:
|
|
13
|
-
m2m:
|
|
14
|
-
mediaList:
|
|
15
|
-
seoPreview:
|
|
16
|
-
repeater:
|
|
17
|
-
color:
|
|
33
|
+
text: components.vTextField,
|
|
34
|
+
select: components.vSelect,
|
|
35
|
+
date: components.DateField,
|
|
36
|
+
textarea: components.vTextarea,
|
|
37
|
+
switch: components.vSwitch,
|
|
38
|
+
slider: components.vSlider,
|
|
39
|
+
file: components.FileField,
|
|
40
|
+
editor: components.wygEditor,
|
|
41
|
+
media: components.MediaField,
|
|
42
|
+
enhancedMedia: components.EnhancedMediaField,
|
|
43
|
+
fks: components.FksField,
|
|
44
|
+
m2m: components.FksField,
|
|
45
|
+
mediaList: components.MediaM2mField,
|
|
46
|
+
seoPreview: components.SeoPreview,
|
|
47
|
+
repeater: components.Repeater,
|
|
48
|
+
color: components.ColorField,
|
|
18
49
|
}
|
|
19
50
|
|
|
20
|
-
const
|
|
51
|
+
const attrs = {
|
|
21
52
|
vSelect: {
|
|
22
53
|
itemText: "text",
|
|
23
54
|
itemValue: "value"
|
|
@@ -56,5 +87,5 @@ const accessor = {
|
|
|
56
87
|
}
|
|
57
88
|
}
|
|
58
89
|
export default {
|
|
59
|
-
mapping,
|
|
90
|
+
mapping, attrs, accessor, components
|
|
60
91
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
readonly
|
|
14
14
|
v-bind="{ ...$attrs, ...attrs }"
|
|
15
15
|
v-on="readonly ? undefined : on"
|
|
16
|
-
class="rounded-
|
|
16
|
+
class="rounded-inherit"
|
|
17
17
|
>
|
|
18
18
|
<template v-if="model" v-slot:append>
|
|
19
19
|
<div class="color-picker-inner-icon" :style="`background-color: ${model}`"></div>
|
|
@@ -39,6 +39,9 @@
|
|
|
39
39
|
height: 20px;
|
|
40
40
|
border-radius: 20px;
|
|
41
41
|
}
|
|
42
|
+
.rounded-inherit{
|
|
43
|
+
border-radius: inherit;
|
|
44
|
+
}
|
|
42
45
|
</style>
|
|
43
46
|
|
|
44
47
|
<script>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
v-bind="{ ...$attrs, ...attrs }"
|
|
18
18
|
v-on="readonly ? undefined : on"
|
|
19
19
|
:clearable="!readonly"
|
|
20
|
-
class="rounded-
|
|
20
|
+
class="rounded-inherit"
|
|
21
21
|
></v-text-field>
|
|
22
22
|
</template>
|
|
23
23
|
<v-date-picker v-model="model" :range="range" no-title>
|
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
|
+
<style scoped>
|
|
32
|
+
.rounded-inherit{
|
|
33
|
+
border-radius: inherit;
|
|
34
|
+
}
|
|
35
|
+
</style>
|
|
36
|
+
|
|
31
37
|
<script>
|
|
32
38
|
/**
|
|
33
39
|
* This component is used to edit a date in iso format. It is a combination of "v-text-field" and "v-date-picker".
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
readonly
|
|
10
10
|
v-bind="{ ...$attrs, ...attrs }"
|
|
11
11
|
v-on="readonly ? undefined : on"
|
|
12
|
-
class="media-field--card
|
|
12
|
+
class="media-field--card"
|
|
13
13
|
:class="{ 'media-field--selected': !!model }"
|
|
14
14
|
:value="model ? ' ' : ''"
|
|
15
15
|
>
|
|
@@ -101,6 +101,9 @@
|
|
|
101
101
|
width: 100px;
|
|
102
102
|
margin-bottom: 10px;
|
|
103
103
|
}
|
|
104
|
+
.media-field--card{
|
|
105
|
+
border-radius: inherit;
|
|
106
|
+
}
|
|
104
107
|
</style>
|
|
105
108
|
|
|
106
109
|
<script>
|
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
<div class="media-m2m--wrapper">
|
|
3
3
|
<v-text-field
|
|
4
4
|
readonly
|
|
5
|
+
hide-details
|
|
5
6
|
v-bind="$attrs"
|
|
6
|
-
@click="hasSelection
|
|
7
|
-
class="media-m2m--card
|
|
7
|
+
@click="!hasSelection && editSelection()"
|
|
8
|
+
class="media-m2m--card"
|
|
8
9
|
:class="{ 'media-m2m--selected': !!hasSelection }"
|
|
9
10
|
:value="hasSelection ? ' ' : ''"
|
|
10
11
|
>
|
|
11
12
|
<template v-slot:append>
|
|
12
|
-
<v-btn v-if="hasSelection" @click="editSelection" tile small>{{
|
|
13
|
-
$t("mapo.mediaM2MField.editSelection")
|
|
14
|
-
}}</v-btn>
|
|
15
13
|
<v-virtual-scroll
|
|
16
14
|
v-if="hasSelection"
|
|
17
15
|
:items="model"
|
|
18
16
|
:height="model.length * 64 > 256 ? 256 : model.length * 64"
|
|
19
17
|
item-height="64"
|
|
18
|
+
class="mb-4"
|
|
20
19
|
>
|
|
21
20
|
<template v-slot:default="{ item }">
|
|
22
21
|
<v-divider></v-divider>
|
|
@@ -53,7 +52,10 @@
|
|
|
53
52
|
</v-virtual-scroll>
|
|
54
53
|
</template>
|
|
55
54
|
</v-text-field>
|
|
56
|
-
|
|
55
|
+
<v-btn v-if="hasSelection" @click="editSelection" tile small block>{{
|
|
56
|
+
$t("mapo.mediaM2MField.editSelection")
|
|
57
|
+
}}</v-btn>
|
|
58
|
+
<v-messages v-if="!$attrs.hideDetails" class="mt-2" :value="$attrs.errorMessages" color="error"/>
|
|
57
59
|
<media-manager-dialog
|
|
58
60
|
v-model="dialog"
|
|
59
61
|
select="multi"
|
|
@@ -90,6 +92,9 @@
|
|
|
90
92
|
display: none;
|
|
91
93
|
}
|
|
92
94
|
}
|
|
95
|
+
.media-m2m--card {
|
|
96
|
+
border-radius: inherit;
|
|
97
|
+
}
|
|
93
98
|
</style>
|
|
94
99
|
|
|
95
100
|
<script>
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
</template>
|
|
60
60
|
<template v-if="navigable" v-slot:[`item.${firstColName}`]="{ item }">
|
|
61
61
|
<NuxtLink :to="detailLink(item)">
|
|
62
|
-
{{ getPointed(item, firstColName, "
|
|
62
|
+
{{ getPointed(item, firstColName, "") || "Unknown" }}
|
|
63
63
|
</NuxtLink>
|
|
64
64
|
</template>
|
|
65
65
|
<template v-slot:item.data-table-select="{ isSelected, select }" v-if="selectAll">
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-list-item class="sidebar-title--container">
|
|
3
|
-
<v-list-item-
|
|
3
|
+
<v-list-item-avatar class="sidebar-title--logo" v-if="logo">
|
|
4
|
+
<v-img :src="logo"></v-img>
|
|
5
|
+
</v-list-item-avatar>
|
|
6
|
+
<v-list-item-icon v-else>
|
|
4
7
|
<v-icon color="secondary">mdi-artstation</v-icon>
|
|
5
8
|
</v-list-item-icon>
|
|
6
9
|
<v-list-item-title>
|
|
7
|
-
<b>
|
|
10
|
+
<b>{{title}}</b>
|
|
8
11
|
</v-list-item-title>
|
|
9
12
|
<v-btn icon @click.stop="toggleMiniVariant">
|
|
10
13
|
<v-icon>mdi-chevron-left</v-icon>
|
|
@@ -17,21 +20,21 @@
|
|
|
17
20
|
background: var(--v-primary-base);
|
|
18
21
|
color: var(--v-secondary-base);
|
|
19
22
|
}
|
|
23
|
+
.sidebar-title--logo{
|
|
24
|
+
left: -8px;
|
|
25
|
+
}
|
|
20
26
|
</style>
|
|
21
27
|
|
|
22
28
|
<script>
|
|
23
29
|
// @vuese
|
|
24
30
|
export default {
|
|
25
|
-
computed:
|
|
26
|
-
|
|
27
|
-
return this
|
|
28
|
-
},
|
|
29
|
-
avatar() {
|
|
30
|
-
return this.$mapo.$auth.user.avatar;
|
|
31
|
-
},
|
|
32
|
-
isLoggedIn() {
|
|
33
|
-
return this.$mapo.$auth.user.isLoggedIn;
|
|
31
|
+
computed:{
|
|
32
|
+
title(){
|
|
33
|
+
return this.$mapo.$options?.ui?.panelName || "BACKOFFICE"
|
|
34
34
|
},
|
|
35
|
+
logo(){
|
|
36
|
+
return this.$mapo.$options?.ui?.panelLogo
|
|
37
|
+
}
|
|
35
38
|
},
|
|
36
39
|
methods: {
|
|
37
40
|
toggleMiniVariant() {
|
package/defaults/vuetify.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapomodule/uikit",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.39",
|
|
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": "
|
|
18
|
+
"gitHead": "11018687c8ee01a219dadc2f770c9f6b09be9f49"
|
|
19
19
|
}
|