Compare commits
1 Commits
main
..
6c1c87b5d2
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c1c87b5d2 |
Generated
+14
-14
@@ -1896,9 +1896,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/nanoid": {
|
"node_modules/nanoid": {
|
||||||
"version": "3.3.19",
|
"version": "3.3.17",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.19.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.17.tgz",
|
||||||
"integrity": "sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==",
|
"integrity": "sha512-xQLf0A3HOMlgHq0n247/LRuAOYmB7dXJ/DvAxGvsSBij45XtBSmQycu+F8ODbHwns/XyFZagyL1+J0Offw1E0g==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
@@ -2066,9 +2066,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/postcss": {
|
"node_modules/postcss": {
|
||||||
"version": "8.5.28",
|
"version": "8.5.26",
|
||||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz",
|
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz",
|
||||||
"integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==",
|
"integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -2085,7 +2085,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nanoid": "^3.3.18",
|
"nanoid": "^3.3.17",
|
||||||
"picocolors": "^1.1.1",
|
"picocolors": "^1.1.1",
|
||||||
"source-map-js": "^1.2.1"
|
"source-map-js": "^1.2.1"
|
||||||
},
|
},
|
||||||
@@ -2445,16 +2445,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
"version": "8.3.0",
|
"version": "8.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-8.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz",
|
||||||
"integrity": "sha512-lhZBVvEHefgE+HQZC9O7EBJgCU/nVzFNl7vkS4RE0APtWLP02/8QVIkQtzBxPquh7lq5/78NHipTj7ODQ6XuyQ==",
|
"integrity": "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==",
|
||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lightningcss": "^1.33.0",
|
"lightningcss": "^1.33.0",
|
||||||
"picomatch": "^4.0.7",
|
"picomatch": "^4.0.5",
|
||||||
"postcss": "^8.5.28",
|
"postcss": "^8.5.26",
|
||||||
"rolldown": "~1.2.6",
|
"rolldown": "~1.2.4",
|
||||||
"tinyglobby": "^0.2.17"
|
"tinyglobby": "^0.2.17"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -2471,7 +2471,7 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@types/node": "^20.19.0 || >=22.12.0",
|
"@types/node": "^20.19.0 || >=22.12.0",
|
||||||
"@vitejs/devtools": "^0.7.1",
|
"@vitejs/devtools": "^0.4.0 || ^0.5.0",
|
||||||
"esbuild": "^0.27.0 || ^0.28.0",
|
"esbuild": "^0.27.0 || ^0.28.0",
|
||||||
"jiti": ">=1.21.0",
|
"jiti": ">=1.21.0",
|
||||||
"less": "^4.0.0",
|
"less": "^4.0.0",
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* useFileEditor — resolves which registered editor can handle a given MIME type.
|
* useFileEditor — resolves which registered editor can handle a given MIME type.
|
||||||
*
|
*
|
||||||
* Other modules register editors at the `documents_editor` integration
|
* Other modules register editors at the `documents_file_editor` integration
|
||||||
* point by including an entry in their `integrations.ts`:
|
* point by including an entry in their `integrations.ts`:
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* documents_editor: [{
|
* documents_file_editor: [{
|
||||||
* id: 'my_editor',
|
* id: 'my_editor',
|
||||||
* meta: { mimeTypes: ['text/plain'] },
|
* meta: { mimeTypes: ['text/plain'] },
|
||||||
* component: () => import('./components/MyEditor.vue'),
|
* component: () => import('./components/MyEditor.vue'),
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
import { useIntegrationStore } from '@KTXC'
|
import { useIntegrationStore } from '@KTXC'
|
||||||
import type { EntityObject } from '@DocumentsManager/models/entity'
|
import type { EntityObject } from '@DocumentsManager/models/entity'
|
||||||
|
|
||||||
const INTEGRATION_POINT = 'documents_editor'
|
const INTEGRATION_POINT = 'documents_file_editor'
|
||||||
|
|
||||||
function mimeMatchesPattern(mime: string, pattern: string): boolean {
|
function mimeMatchesPattern(mime: string, pattern: string): boolean {
|
||||||
if (pattern.endsWith('/*')) {
|
if (pattern.endsWith('/*')) {
|
||||||
|
|||||||
+1
-1
@@ -126,7 +126,7 @@ function entityToViewerItem(entity: EntityObject): ViewerItem {
|
|||||||
return {
|
return {
|
||||||
id: String(entity.identifier ?? ''),
|
id: String(entity.identifier ?? ''),
|
||||||
title: entity.properties.label ?? String(entity.identifier ?? ''),
|
title: entity.properties.label ?? String(entity.identifier ?? ''),
|
||||||
mime: 'image/webp',
|
mime: entity.properties.mime ?? '',
|
||||||
meta: { collection: entity.collection ? String(entity.collection) : null },
|
meta: { collection: entity.collection ? String(entity.collection) : null },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user