@ditojs/admin 2.47.0 → 2.48.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 +819 -828
- package/dist/dito-admin.umd.js +3 -3
- package/package.json +5 -5
- package/src/DitoAdmin.js +2 -12
- package/src/components/DitoRoot.vue +0 -1
- package/src/components/DitoSchema.vue +0 -3
- package/src/mixins/DitoMixin.js +1 -3
- package/src/mixins/NumberMixin.js +1 -1
- package/src/mixins/OptionsMixin.js +0 -2
- package/src/mixins/ValueMixin.js +0 -1
- package/src/types/DitoTypeMarkup.vue +0 -1
- package/src/utils/filter.js +1 -1
- package/src/utils/schema.js +0 -2
- package/types/index.d.ts +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/admin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.48.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",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"not ie_mob > 0"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@ditojs/ui": "^2.
|
|
43
|
-
"@ditojs/utils": "^2.
|
|
42
|
+
"@ditojs/ui": "^2.48.0",
|
|
43
|
+
"@ditojs/utils": "^2.48.0",
|
|
44
44
|
"@kyvg/vue3-notification": "^3.4.1",
|
|
45
45
|
"@lk77/vue3-color": "^3.0.6",
|
|
46
46
|
"@tiptap/core": "^2.11.9",
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
"vue-upload-component": "^3.1.17"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@ditojs/build": "^2.
|
|
87
|
+
"@ditojs/build": "^2.48.0",
|
|
88
88
|
"typescript": "^5.8.3",
|
|
89
89
|
"vite": "^6.3.4"
|
|
90
90
|
},
|
|
91
91
|
"types": "types",
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "bacff1f9a6b314fad4f01b4a83d5cf4778d344e1"
|
|
93
93
|
}
|
package/src/DitoAdmin.js
CHANGED
|
@@ -7,8 +7,7 @@ import {
|
|
|
7
7
|
assignDeeply,
|
|
8
8
|
hyphenate,
|
|
9
9
|
camelize,
|
|
10
|
-
defaultFormats
|
|
11
|
-
deprecate
|
|
10
|
+
defaultFormats
|
|
12
11
|
} from '@ditojs/utils'
|
|
13
12
|
import * as components from './components/index.js'
|
|
14
13
|
import * as types from './types/index.js'
|
|
@@ -244,20 +243,11 @@ class RequestError extends Error {
|
|
|
244
243
|
async function request(api, {
|
|
245
244
|
url,
|
|
246
245
|
method = 'get',
|
|
247
|
-
|
|
248
|
-
// remove once not in use anywhere any more.
|
|
249
|
-
params = null,
|
|
250
|
-
query = params || null,
|
|
246
|
+
query = null,
|
|
251
247
|
headers = null,
|
|
252
248
|
data = null,
|
|
253
249
|
signal = null
|
|
254
250
|
}) {
|
|
255
|
-
if (params) {
|
|
256
|
-
deprecate(
|
|
257
|
-
`request.params is deprecated. Use action.method and action.path instead.`
|
|
258
|
-
)
|
|
259
|
-
}
|
|
260
|
-
|
|
261
251
|
const isApiUrl = api.isApiUrl(url)
|
|
262
252
|
|
|
263
253
|
const response = await fetch(api.getApiUrl({ url, query }), {
|
|
@@ -248,7 +248,6 @@ export default DitoComponent.component('DitoRoot', {
|
|
|
248
248
|
// buttons in the dialog can use `dialog.resolve()` and `dialog.reject()`
|
|
249
249
|
// to close the modal dialog and resolve / reject the promise at once.
|
|
250
250
|
return new Promise(
|
|
251
|
-
// eslint-disable-next-line no-async-promise-executor
|
|
252
251
|
async (resolve, reject) => {
|
|
253
252
|
// Process components to resolve async schemas.
|
|
254
253
|
const routes = []
|
|
@@ -245,14 +245,12 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
245
245
|
// @override
|
|
246
246
|
processedData() {
|
|
247
247
|
// TODO: Fix side-effects
|
|
248
|
-
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
|
249
248
|
return this.processData({ target: 'server', schemaOnly: true })
|
|
250
249
|
},
|
|
251
250
|
|
|
252
251
|
clipboardData: {
|
|
253
252
|
get() {
|
|
254
253
|
// TODO: Fix side-effects
|
|
255
|
-
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
|
256
254
|
return this.processData({ target: 'clipboard', schemaOnly: true })
|
|
257
255
|
},
|
|
258
256
|
|
|
@@ -671,7 +669,6 @@ export default DitoComponent.component('DitoSchema', {
|
|
|
671
669
|
setData(data) {
|
|
672
670
|
for (const name in data) {
|
|
673
671
|
if (name in this.data) {
|
|
674
|
-
// eslint-disable-next-line vue/no-mutating-props
|
|
675
672
|
if (!equals(this.data[name], data[name])) {
|
|
676
673
|
// eslint-disable-next-line vue/no-mutating-props
|
|
677
674
|
this.data[name] = data[name]
|
package/src/mixins/DitoMixin.js
CHANGED
|
@@ -392,9 +392,7 @@ export default {
|
|
|
392
392
|
} ${
|
|
393
393
|
options.url
|
|
394
394
|
} ${
|
|
395
|
-
|
|
396
|
-
// 2022-11-01, remove once not in use anywhere any more.
|
|
397
|
-
JSON.stringify(options.query || options.params || '')
|
|
395
|
+
JSON.stringify(options.query || '')
|
|
398
396
|
} ${
|
|
399
397
|
JSON.stringify(options.data || '')
|
|
400
398
|
}`
|
|
@@ -189,8 +189,6 @@ export default {
|
|
|
189
189
|
for (const option of options) {
|
|
190
190
|
if (!('id' in option)) {
|
|
191
191
|
// TODO: Fix side-effects
|
|
192
|
-
// eslint-disable-next-line max-len
|
|
193
|
-
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
|
194
192
|
setTemporaryId(option, 'id')
|
|
195
193
|
}
|
|
196
194
|
}
|
package/src/mixins/ValueMixin.js
CHANGED
|
@@ -326,7 +326,6 @@ export default DitoTypeComponent.register('markup', {
|
|
|
326
326
|
// See if `href` can be parsed as a URL, and if not,
|
|
327
327
|
// prefix it with a default protocol.
|
|
328
328
|
try {
|
|
329
|
-
// eslint-disable-next-line no-new
|
|
330
329
|
new URL(href)
|
|
331
330
|
} catch {
|
|
332
331
|
href = `https://${href}`
|
package/src/utils/filter.js
CHANGED
package/src/utils/schema.js
CHANGED
|
@@ -719,14 +719,12 @@ export function computeValue(schema, data, name, dataPath, {
|
|
|
719
719
|
// Access `data[name]` directly to update the value without calling
|
|
720
720
|
// parse():
|
|
721
721
|
// TODO: Fix side-effects
|
|
722
|
-
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
|
723
722
|
data[name] = value
|
|
724
723
|
}
|
|
725
724
|
}
|
|
726
725
|
// If the value is still missing after compute, set the default for it:
|
|
727
726
|
if (!(name in data) && !shouldIgnoreMissingValue(schema, context)) {
|
|
728
727
|
// TODO: Fix side-effects
|
|
729
|
-
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
|
730
728
|
data[name] = getDefaultValue(schema, context)
|
|
731
729
|
}
|
|
732
730
|
// Now access the value. This is important for reactivity and needs to
|
package/types/index.d.ts
CHANGED
|
@@ -35,8 +35,6 @@ export type RequestMethod = <T>({
|
|
|
35
35
|
*/
|
|
36
36
|
method: HTTPVerb
|
|
37
37
|
data: any
|
|
38
|
-
/** @deprecated use query instead */
|
|
39
|
-
params: Record<string, string | string[]> | [string, string][]
|
|
40
38
|
query: Record<string, string | string[]> | [string, string][]
|
|
41
39
|
headers: Record<string, string>
|
|
42
40
|
}) => Promise<RequestMethodResponse<T>>
|
|
@@ -1018,8 +1016,6 @@ export type DitoContext<$Item = any> = {
|
|
|
1018
1016
|
* @default 'get'
|
|
1019
1017
|
*/
|
|
1020
1018
|
method?: HTTPVerb
|
|
1021
|
-
/** @deprecated use query instead */
|
|
1022
|
-
params?: Record<string, string | string[]> | [string, string][]
|
|
1023
1019
|
query?: Record<string, string | string[]> | [string, string][]
|
|
1024
1020
|
data?: any
|
|
1025
1021
|
resource?: Resource
|