@ditojs/admin 1.19.0 → 1.20.0
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 +3518 -1801
- package/dist/dito-admin.umd.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +8 -5
- package/src/DitoAdmin.js +20 -0
- package/src/components/DitoAccount.vue +2 -0
- package/src/components/DitoContainer.vue +2 -0
- package/src/components/DitoDialog.vue +1 -1
- package/src/components/DitoErrors.vue +2 -0
- package/src/components/DitoHeader.vue +2 -0
- package/src/components/DitoLabel.vue +2 -0
- package/src/components/DitoMenu.vue +2 -0
- package/src/components/DitoPagination.vue +1 -1
- package/src/components/DitoPane.vue +2 -0
- package/src/components/DitoPanel.vue +2 -0
- package/src/components/DitoPanels.vue +2 -0
- package/src/components/DitoRoot.vue +1 -1
- package/src/components/DitoSchema.vue +3 -1
- package/src/components/DitoSchemaInlined.vue +2 -0
- package/src/components/DitoScopes.vue +2 -0
- package/src/components/DitoTableHead.vue +2 -0
- package/src/components/DitoTabs.vue +2 -0
- package/src/components/DitoTreeItem.vue +2 -0
- package/src/mixins/DomMixin.js +1 -1
- package/src/styles/style.sass +1 -1
- package/src/types/TypeCheckbox.vue +2 -0
- package/src/types/TypeCheckboxes.vue +2 -0
- package/src/types/TypeCode.vue +2 -0
- package/src/types/TypeColor.vue +3 -1
- package/src/types/TypeDate.vue +1 -1
- package/src/types/TypeList.vue +9 -3
- package/src/types/TypeMarkup.vue +3 -1
- package/src/types/TypeMultiselect.vue +1 -1
- package/src/types/TypeNumber.vue +1 -1
- package/src/types/TypeObject.vue +2 -0
- package/src/types/TypeRadio.vue +2 -0
- package/src/types/TypeSection.vue +2 -0
- package/src/types/TypeSelect.vue +2 -0
- package/src/types/TypeSlider.vue +3 -1
- package/src/types/TypeSwitch.vue +3 -1
- package/src/types/TypeText.vue +1 -1
- package/src/types/TypeTextarea.vue +2 -0
- package/src/types/TypeTreeList.vue +2 -0
- package/src/types/TypeUpload.vue +2 -0
- package/src/styles/_vendors.sass +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/admin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Dito.js Admin is a schema based admin interface for Dito.js Server, featuring auto-generated views and forms and built with Vue.js",
|
|
6
6
|
"repository": "https://github.com/ditojs/dito/tree/master/packages/admin",
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
"import": "./dist/dito-admin.es.js",
|
|
14
14
|
"require": "./dist/dito-admin.umd.js"
|
|
15
15
|
},
|
|
16
|
-
"./style.css": "./dist/style.css"
|
|
16
|
+
"./style.css": "./dist/style.css",
|
|
17
|
+
"./src": "./src/index.js",
|
|
18
|
+
"./imports.sass": "./src/styles/_imports.sass"
|
|
17
19
|
},
|
|
18
20
|
"files": [
|
|
19
21
|
"src/",
|
|
@@ -37,8 +39,9 @@
|
|
|
37
39
|
"not ie_mob > 0"
|
|
38
40
|
],
|
|
39
41
|
"dependencies": {
|
|
40
|
-
"@ditojs/
|
|
41
|
-
"@ditojs/
|
|
42
|
+
"@ditojs/build": "^1.20.0",
|
|
43
|
+
"@ditojs/ui": "^1.20.0",
|
|
44
|
+
"@ditojs/utils": "^1.20.0",
|
|
42
45
|
"codeflask": "^1.4.1",
|
|
43
46
|
"filesize": "^10.0.5",
|
|
44
47
|
"filesize-parser": "^1.5.0",
|
|
@@ -69,5 +72,5 @@
|
|
|
69
72
|
"vite-plugin-vue2": "^2.0.2"
|
|
70
73
|
},
|
|
71
74
|
"types": "types",
|
|
72
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "049aa3611927f3f096bc6230f0ce93e1419303e4"
|
|
73
76
|
}
|
package/src/DitoAdmin.js
CHANGED
|
@@ -22,6 +22,10 @@ Vue.use(VueRouter)
|
|
|
22
22
|
Vue.use(VueModal, { dynamic: true })
|
|
23
23
|
Vue.use(VueNotifications)
|
|
24
24
|
|
|
25
|
+
// Workaround for a strange Vite hot-reloading bug, see:
|
|
26
|
+
// https://github.com/vitejs/vite/issues/7839#issuecomment-1340109679
|
|
27
|
+
import.meta.hot?.on('vite:beforeUpdate', onBeforeViteUpdate)
|
|
28
|
+
|
|
25
29
|
export default class DitoAdmin {
|
|
26
30
|
constructor(el, {
|
|
27
31
|
// `dito` contains the base and api settings passed from `AdminController`
|
|
@@ -274,3 +278,19 @@ function formatQuery(query) {
|
|
|
274
278
|
)
|
|
275
279
|
).toString()
|
|
276
280
|
}
|
|
281
|
+
|
|
282
|
+
function onBeforeViteUpdate(event) {
|
|
283
|
+
if (event.type === 'update') {
|
|
284
|
+
// Patch `event.updates` to remove the version query parameter from path,
|
|
285
|
+
// so that the update gets picked up.
|
|
286
|
+
// Why the stored `deps` are missing this part of the URL, I cannot say…
|
|
287
|
+
const updates = []
|
|
288
|
+
for (const update of event.updates) {
|
|
289
|
+
updates.push(update, {
|
|
290
|
+
...update,
|
|
291
|
+
acceptedPath: update.acceptedPath.replace(/\?v=[0-9a-f]+&/, '?')
|
|
292
|
+
})
|
|
293
|
+
}
|
|
294
|
+
event.updates = updates
|
|
295
|
+
}
|
|
296
|
+
}
|
|
@@ -80,6 +80,8 @@
|
|
|
80
80
|
</template>
|
|
81
81
|
|
|
82
82
|
<style lang="sass">
|
|
83
|
+
@import '../styles/_imports'
|
|
84
|
+
|
|
83
85
|
.dito-schema
|
|
84
86
|
box-sizing: border-box
|
|
85
87
|
// To display schema next to panels:
|
|
@@ -153,7 +155,7 @@ import {
|
|
|
153
155
|
isObject, isArray, isFunction, isRegExp,
|
|
154
156
|
parseDataPath, normalizeDataPath, labelize
|
|
155
157
|
} from '@ditojs/utils'
|
|
156
|
-
import { TransitionHeight } from '@ditojs/ui'
|
|
158
|
+
import { TransitionHeight } from '@ditojs/ui/src'
|
|
157
159
|
import DitoComponent from '../DitoComponent.js'
|
|
158
160
|
import ItemMixin from '../mixins/ItemMixin.js'
|
|
159
161
|
import { appendDataPath, getParentItem } from '../utils/data.js'
|
package/src/mixins/DomMixin.js
CHANGED
package/src/styles/style.sass
CHANGED
package/src/types/TypeCode.vue
CHANGED
package/src/types/TypeColor.vue
CHANGED
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
</template>
|
|
36
36
|
|
|
37
37
|
<style lang="sass">
|
|
38
|
+
@import '../styles/_imports'
|
|
39
|
+
|
|
38
40
|
$color-swatch-width: $pattern-transparency-size
|
|
39
41
|
$color-swatch-radius: $border-radius - $border-width
|
|
40
42
|
.dito-color
|
|
@@ -71,7 +73,7 @@
|
|
|
71
73
|
import tinycolor from 'tinycolor2'
|
|
72
74
|
import { Sketch as SketchPicker } from 'vue-color'
|
|
73
75
|
import TypeComponent from '../TypeComponent.js'
|
|
74
|
-
import { Trigger } from '@ditojs/ui'
|
|
76
|
+
import { Trigger } from '@ditojs/ui/src'
|
|
75
77
|
import { getSchemaAccessor } from '../utils/accessor.js'
|
|
76
78
|
|
|
77
79
|
// @vue/component
|
package/src/types/TypeDate.vue
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<script>
|
|
16
16
|
import TypeComponent from '../TypeComponent.js'
|
|
17
17
|
import { getSchemaAccessor } from '../utils/accessor.js'
|
|
18
|
-
import { DatePicker, TimePicker, DateTimePicker } from '@ditojs/ui'
|
|
18
|
+
import { DatePicker, TimePicker, DateTimePicker } from '@ditojs/ui/src'
|
|
19
19
|
import { isDate } from '@ditojs/utils'
|
|
20
20
|
|
|
21
21
|
export default TypeComponent.register([
|
package/src/types/TypeList.vue
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:style="schema.style"
|
|
7
7
|
)
|
|
8
8
|
.dito-navigation(
|
|
9
|
-
v-if="scopes ||
|
|
9
|
+
v-if="scopes || hasPagination"
|
|
10
10
|
)
|
|
11
11
|
dito-scopes(
|
|
12
12
|
v-if="scopes"
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
// When there's only pagination without scopes, we need a good ol' spacer
|
|
17
17
|
// div, for the layout not to break...
|
|
18
18
|
.dito-spacer(
|
|
19
|
-
v-else-if="
|
|
19
|
+
v-else-if="hasPagination"
|
|
20
20
|
)
|
|
21
21
|
dito-pagination(
|
|
22
|
-
v-if="
|
|
22
|
+
v-if="hasPagination"
|
|
23
23
|
:query="query"
|
|
24
24
|
:limit="paginate"
|
|
25
25
|
:total="total || 0"
|
|
@@ -147,6 +147,8 @@
|
|
|
147
147
|
</template>
|
|
148
148
|
|
|
149
149
|
<style lang="sass">
|
|
150
|
+
@import '../styles/_imports'
|
|
151
|
+
|
|
150
152
|
.dito-list
|
|
151
153
|
position: relative
|
|
152
154
|
.dito-navigation
|
|
@@ -226,6 +228,10 @@ export default TypeComponent.register('list', {
|
|
|
226
228
|
},
|
|
227
229
|
|
|
228
230
|
computed: {
|
|
231
|
+
hasPagination() {
|
|
232
|
+
return this.paginate && this.total > this.paginate
|
|
233
|
+
},
|
|
234
|
+
|
|
229
235
|
hasListButtons() {
|
|
230
236
|
return !!(
|
|
231
237
|
this.buttonSchemas ||
|
package/src/types/TypeMarkup.vue
CHANGED
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<style lang="sass">
|
|
30
|
+
@import '../styles/_imports'
|
|
31
|
+
|
|
30
32
|
.dito-markup
|
|
31
33
|
@extend %input
|
|
32
34
|
position: relative
|
|
@@ -133,7 +135,7 @@ import {
|
|
|
133
135
|
// Tools:
|
|
134
136
|
History
|
|
135
137
|
} from 'tiptap-extensions'
|
|
136
|
-
import { Icon } from '@ditojs/ui'
|
|
138
|
+
import { Icon } from '@ditojs/ui/src'
|
|
137
139
|
import {
|
|
138
140
|
isArray, isObject, underscore, hyphenate, debounce
|
|
139
141
|
} from '@ditojs/utils'
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<style lang="sass">
|
|
42
|
+
@import '../styles/_imports'
|
|
42
43
|
@import 'vue-multiselect/dist/vue-multiselect.min.css'
|
|
43
44
|
|
|
44
45
|
$spinner-width: $select-arrow-width
|
|
@@ -227,7 +228,6 @@ import DitoContext from '../DitoContext.js'
|
|
|
227
228
|
import OptionsMixin from '../mixins/OptionsMixin.js'
|
|
228
229
|
import VueMultiselect from 'vue-multiselect'
|
|
229
230
|
import { getSchemaAccessor } from '../utils/accessor.js'
|
|
230
|
-
import 'vue-multiselect/dist/vue-multiselect.min.css'
|
|
231
231
|
|
|
232
232
|
// @vue/component
|
|
233
233
|
export default TypeComponent.register('multiselect', {
|
package/src/types/TypeNumber.vue
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<script>
|
|
25
25
|
import TypeComponent from '../TypeComponent.js'
|
|
26
26
|
import NumberMixin from '../mixins/NumberMixin.js'
|
|
27
|
-
import { InputField } from '@ditojs/ui'
|
|
27
|
+
import { InputField } from '@ditojs/ui/src'
|
|
28
28
|
|
|
29
29
|
export default TypeComponent.register([
|
|
30
30
|
'number', 'integer'
|
package/src/types/TypeObject.vue
CHANGED
package/src/types/TypeRadio.vue
CHANGED
package/src/types/TypeSelect.vue
CHANGED
package/src/types/TypeSlider.vue
CHANGED
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<style lang="sass">
|
|
27
|
+
@import '../styles/_imports'
|
|
28
|
+
|
|
27
29
|
.dito-slider
|
|
28
30
|
@extend %input
|
|
29
31
|
display: flex
|
|
@@ -41,7 +43,7 @@
|
|
|
41
43
|
import TypeComponent from '../TypeComponent.js'
|
|
42
44
|
import NumberMixin from '../mixins/NumberMixin.js'
|
|
43
45
|
import { getSchemaAccessor } from '../utils/accessor.js'
|
|
44
|
-
import { InputField } from '@ditojs/ui'
|
|
46
|
+
import { InputField } from '@ditojs/ui/src'
|
|
45
47
|
|
|
46
48
|
// @vue/component
|
|
47
49
|
export default TypeComponent.register('slider', {
|
package/src/types/TypeSwitch.vue
CHANGED
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<style lang="sass">
|
|
14
|
+
@import '../styles/_imports'
|
|
15
|
+
|
|
14
16
|
.dito-switch
|
|
15
17
|
.dito-switch-label
|
|
16
18
|
font-size: $font-size-small
|
|
@@ -18,7 +20,7 @@
|
|
|
18
20
|
|
|
19
21
|
<script>
|
|
20
22
|
import TypeComponent from '../TypeComponent.js'
|
|
21
|
-
import { SwitchButton } from '@ditojs/ui'
|
|
23
|
+
import { SwitchButton } from '@ditojs/ui/src'
|
|
22
24
|
|
|
23
25
|
// @vue/component
|
|
24
26
|
export default TypeComponent.register('switch', {
|
package/src/types/TypeText.vue
CHANGED
package/src/types/TypeUpload.vue
CHANGED
package/src/styles/_vendors.sass
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import '@ditojs/ui/style.css'
|