@ditojs/admin 2.9.1 → 2.9.2
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/dist/dito-admin.es.js +1445 -1424
- package/dist/dito-admin.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/DitoAdmin.js +2 -2
- package/src/components/DitoClipboard.vue +7 -3
- package/src/components/DitoHeader.vue +3 -101
- package/src/components/DitoNotifications.vue +149 -0
- package/src/components/DitoRoot.vue +4 -52
- package/src/components/DitoSchema.vue +1 -1
- package/src/components/DitoSpinner.vue +46 -43
- package/src/components/DitoTrail.vue +119 -0
- package/src/components/DitoView.vue +9 -5
- package/src/components/index.js +3 -0
- package/src/mixins/RouteMixin.js +3 -3
- package/src/mixins/SourceMixin.js +14 -6
- package/src/styles/style.scss +0 -1
- package/src/styles/_notifications.scss +0 -54
package/src/components/index.js
CHANGED
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
export { default as DitoRoot } from './DitoRoot.vue'
|
|
7
7
|
export { default as DitoMenu } from './DitoMenu.vue'
|
|
8
|
+
export { default as DitoTrail } from './DitoTrail.vue'
|
|
8
9
|
export { default as DitoHeader } from './DitoHeader.vue'
|
|
9
10
|
export { default as DitoNavigation } from './DitoNavigation.vue'
|
|
11
|
+
export { default as DitoNotifications } from './DitoNotifications.vue'
|
|
10
12
|
export { default as DitoSidebar } from './DitoSidebar.vue'
|
|
11
13
|
export { default as DitoAccount } from './DitoAccount.vue'
|
|
12
14
|
export { default as DitoDialog } from './DitoDialog.vue'
|
|
@@ -34,4 +36,5 @@ export { default as DitoTableHead } from './DitoTableHead.vue'
|
|
|
34
36
|
export { default as DitoTableCell } from './DitoTableCell.vue'
|
|
35
37
|
export { default as DitoUploadFile } from './DitoUploadFile.vue'
|
|
36
38
|
export { default as DitoDraggable } from './DitoDraggable.vue'
|
|
39
|
+
export { default as DitoSpinner } from './DitoSpinner.vue'
|
|
37
40
|
export { default as DitoVNode } from './DitoVNode.vue'
|
package/src/mixins/RouteMixin.js
CHANGED
|
@@ -164,15 +164,15 @@ export default {
|
|
|
164
164
|
next(ok)
|
|
165
165
|
},
|
|
166
166
|
|
|
167
|
-
getRoutePath(
|
|
167
|
+
getRoutePath(recordPath) {
|
|
168
168
|
// Maps the route's actual path to the matched routes by counting its
|
|
169
169
|
// parts separated by '/', splitting the path into the mapped parts
|
|
170
170
|
// containing actual parameters.
|
|
171
171
|
const { path } = this.$route
|
|
172
|
-
return
|
|
172
|
+
return recordPath
|
|
173
173
|
? path
|
|
174
174
|
.split('/')
|
|
175
|
-
.slice(0,
|
|
175
|
+
.slice(0, recordPath.split('/').length)
|
|
176
176
|
.join('/')
|
|
177
177
|
: path
|
|
178
178
|
},
|
|
@@ -314,12 +314,20 @@ export default {
|
|
|
314
314
|
},
|
|
315
315
|
|
|
316
316
|
watch: {
|
|
317
|
-
$route
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
317
|
+
$route: {
|
|
318
|
+
// https://github.com/vuejs/vue-router/issues/3393#issuecomment-1158470149
|
|
319
|
+
flush: 'post',
|
|
320
|
+
handler(to, from) {
|
|
321
|
+
if (
|
|
322
|
+
this.providesData &&
|
|
323
|
+
from.path === to.path &&
|
|
324
|
+
from.hash === to.hash
|
|
325
|
+
) {
|
|
326
|
+
// Paths and hashes remain the same, so only queries have changed.
|
|
327
|
+
// Update filter and reload data without clearing.
|
|
328
|
+
this.query = to.query
|
|
329
|
+
this.loadData(false)
|
|
330
|
+
}
|
|
323
331
|
}
|
|
324
332
|
},
|
|
325
333
|
|
package/src/styles/style.scss
CHANGED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
@use 'sass:color';
|
|
2
|
-
|
|
3
|
-
@mixin type($background) {
|
|
4
|
-
background: color.adjust($background, $lightness: 5%);
|
|
5
|
-
color: $color-white;
|
|
6
|
-
border-left: 12px solid color.adjust($background, $lightness: -10%);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.dito-notifications {
|
|
10
|
-
.dito-notification {
|
|
11
|
-
padding: 8px;
|
|
12
|
-
margin: 12px 12px 0;
|
|
13
|
-
font-size: inherit;
|
|
14
|
-
color: $color-white;
|
|
15
|
-
border-radius: $border-radius;
|
|
16
|
-
box-shadow: $shadow-window;
|
|
17
|
-
|
|
18
|
-
.notification-title {
|
|
19
|
-
font-weight: bold;
|
|
20
|
-
padding-bottom: 8px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.notification-content {
|
|
24
|
-
p {
|
|
25
|
-
margin: 0;
|
|
26
|
-
|
|
27
|
-
& + p {
|
|
28
|
-
margin-top: 8px;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&,
|
|
34
|
-
&.info {
|
|
35
|
-
@include type($color-active);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&.success {
|
|
39
|
-
@include type($color-success);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&.warning {
|
|
43
|
-
@include type($color-warning);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&.error {
|
|
47
|
-
@include type($color-error);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.vue-notification-wrapper {
|
|
52
|
-
overflow: visible;
|
|
53
|
-
}
|
|
54
|
-
}
|