Browse Source

提交合并后

liwenxuan_v2
超级管理员 2 years ago
parent
commit
4ca78b222c
  1. 84
      node_modules/.package-lock.json
  2. 2
      node_modules/magic-string/README.md
  3. 97
      node_modules/magic-string/dist/magic-string.cjs.js
  4. 2
      node_modules/magic-string/dist/magic-string.cjs.js.map
  5. 97
      node_modules/magic-string/dist/magic-string.es.mjs
  6. 2
      node_modules/magic-string/dist/magic-string.es.mjs.map
  7. 97
      node_modules/magic-string/dist/magic-string.umd.js
  8. 2
      node_modules/magic-string/dist/magic-string.umd.js.map
  9. 262
      node_modules/magic-string/index.d.ts
  10. 27
      node_modules/magic-string/package.json
  11. 85
      package-lock.json
  12. 1
      package.json
  13. 85
      src/types/components.d.ts
  14. 8
      src/views/knowledge/ask/dialog.vue
  15. 8
      src/views/knowledge/knowledge/bb.vue
  16. 234
      src/views/knowledge/knowledge/dialog.vue
  17. 13
      src/views/sysworkflow/flow/flowDrawingBoard.vue

84
node_modules/.package-lock.json

@ -789,11 +789,68 @@
"resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
}, },
"node_modules/@rollup/plugin-commonjs": {
"version": "25.0.7",
"resolved": "https://registry.npmmirror.com/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz",
"integrity": "sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==",
"dependencies": {
"@rollup/pluginutils": "^5.0.1",
"commondir": "^1.0.1",
"estree-walker": "^2.0.2",
"glob": "^8.0.3",
"is-reference": "1.2.1",
"magic-string": "^0.30.3"
},
"engines": {
"node": ">=14.0.0"
},
"peerDependencies": {
"rollup": "^2.68.0||^3.0.0||^4.0.0"
},
"peerDependenciesMeta": {
"rollup": {
"optional": true
}
}
},
"node_modules/@rollup/plugin-commonjs/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/@rollup/plugin-commonjs/node_modules/glob": {
"version": "8.1.0",
"resolved": "https://registry.npmmirror.com/glob/-/glob-8.1.0.tgz",
"integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^5.0.1",
"once": "^1.3.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/@rollup/plugin-commonjs/node_modules/minimatch": {
"version": "5.1.6",
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.1.6.tgz",
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=10"
}
},
"node_modules/@rollup/pluginutils": { "node_modules/@rollup/pluginutils": {
"version": "5.0.2", "version": "5.0.2",
"resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", "resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz",
"integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==",
"dev": true,
"dependencies": { "dependencies": {
"@types/estree": "^1.0.0", "@types/estree": "^1.0.0",
"estree-walker": "^2.0.2", "estree-walker": "^2.0.2",
@ -852,8 +909,7 @@
"node_modules/@types/estree": { "node_modules/@types/estree": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.1.tgz", "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.1.tgz",
"integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA=="
"dev": true
}, },
"node_modules/@types/event-emitter": { "node_modules/@types/event-emitter": {
"version": "0.3.3", "version": "0.3.3",
@ -2709,6 +2765,11 @@
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
"dev": true "dev": true
}, },
"node_modules/commondir": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/commondir/-/commondir-1.0.1.tgz",
"integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg=="
},
"node_modules/compare-func": { "node_modules/compare-func": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/compare-func/-/compare-func-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/compare-func/-/compare-func-2.0.0.tgz",
@ -5153,6 +5214,14 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/is-reference": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/is-reference/-/is-reference-1.2.1.tgz",
"integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",
"dependencies": {
"@types/estree": "*"
}
},
"node_modules/is-stream": { "node_modules/is-stream": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz", "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz",
@ -5903,11 +5972,11 @@
} }
}, },
"node_modules/magic-string": { "node_modules/magic-string": {
"version": "0.30.0", "version": "0.30.5",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.0.tgz", "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.5.tgz",
"integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==", "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",
"dependencies": { "dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.13" "@jridgewell/sourcemap-codec": "^1.4.15"
}, },
"engines": { "engines": {
"node": ">=12" "node": ">=12"
@ -6882,7 +6951,6 @@
"version": "2.3.1", "version": "2.3.1",
"resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"devOptional": true,
"engines": { "engines": {
"node": ">=8.6" "node": ">=8.6"
} }

2
node_modules/magic-string/README.md

@ -107,7 +107,7 @@ Generates a [version 3 sourcemap](https://docs.google.com/document/d/1U1RGAehQwR
* `file` - the filename where you plan to write the sourcemap * `file` - the filename where you plan to write the sourcemap
* `source` - the filename of the file containing the original source * `source` - the filename of the file containing the original source
* `includeContent` - whether to include the original content in the map's `sourcesContent` array * `includeContent` - whether to include the original content in the map's `sourcesContent` array
* `hires` - whether the mapping should be high-resolution. Hi-res mappings map every single character, meaning (for example) your devtools will always be able to pinpoint the exact location of function calls and so on. With lo-res mappings, devtools may only be able to identify the correct line - but they're quicker to generate and less bulky. If sourcemap locations have been specified with `s.addSourceMapLocation()`, they will be used here. * `hires` - whether the mapping should be high-resolution. Hi-res mappings map every single character, meaning (for example) your devtools will always be able to pinpoint the exact location of function calls and so on. With lo-res mappings, devtools may only be able to identify the correct line - but they're quicker to generate and less bulky. You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary instead of per character, suitable for string semantics that are separated by words. If sourcemap locations have been specified with `s.addSourcemapLocation()`, they will be used here.
The returned sourcemap has two (non-enumerable) methods attached for convenience: The returned sourcemap has two (non-enumerable) methods attached for convenience:

97
node_modules/magic-string/dist/magic-string.cjs.js

@ -111,6 +111,13 @@ class Chunk {
this.end = index; this.end = index;
if (this.edited) { if (this.edited) {
// after split we should save the edit content record into the correct chunk
// to make sure sourcemap correct
// For example:
// ' test'.trim()
// split -> ' ' + 'test'
// ✔️ edit -> '' + 'test'
// ✖️ edit -> 'test' + ''
// TODO is this block necessary?... // TODO is this block necessary?...
newChunk.edit('', false); newChunk.edit('', false);
this.content = ''; this.content = '';
@ -139,6 +146,10 @@ class Chunk {
if (trimmed.length) { if (trimmed.length) {
if (trimmed !== this.content) { if (trimmed !== this.content) {
this.split(this.start + trimmed.length).edit('', undefined, true); this.split(this.start + trimmed.length).edit('', undefined, true);
if (this.edited) {
// save the change, if it has been edited
this.edit(trimmed, this.storeName, true);
}
} }
return true; return true;
} else { } else {
@ -157,7 +168,11 @@ class Chunk {
if (trimmed.length) { if (trimmed.length) {
if (trimmed !== this.content) { if (trimmed !== this.content) {
this.split(this.end - trimmed.length); const newChunk = this.split(this.end - trimmed.length);
if (this.edited) {
// save the change, if it has been edited
newChunk.edit(trimmed, this.storeName, true);
}
this.edit('', undefined, true); this.edit('', undefined, true);
} }
return true; return true;
@ -170,7 +185,7 @@ class Chunk {
} }
} }
function getBtoa () { function getBtoa() {
if (typeof window !== 'undefined' && typeof window.btoa === 'function') { if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
return (str) => window.btoa(unescape(encodeURIComponent(str))); return (str) => window.btoa(unescape(encodeURIComponent(str)));
} else if (typeof Buffer === 'function') { } else if (typeof Buffer === 'function') {
@ -283,6 +298,8 @@ function getLocator(source) {
}; };
} }
const wordRegex = /\w/;
class Mappings { class Mappings {
constructor(hires) { constructor(hires) {
this.hires = hires; this.hires = hires;
@ -295,26 +312,64 @@ class Mappings {
addEdit(sourceIndex, content, loc, nameIndex) { addEdit(sourceIndex, content, loc, nameIndex) {
if (content.length) { if (content.length) {
let contentLineEnd = content.indexOf('\n', 0);
let previousContentLineEnd = -1;
while (contentLineEnd >= 0) {
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
if (nameIndex >= 0) {
segment.push(nameIndex);
}
this.rawSegments.push(segment);
this.generatedCodeLine += 1;
this.raw[this.generatedCodeLine] = this.rawSegments = [];
this.generatedCodeColumn = 0;
previousContentLineEnd = contentLineEnd;
contentLineEnd = content.indexOf('\n', contentLineEnd + 1);
}
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
if (nameIndex >= 0) { if (nameIndex >= 0) {
segment.push(nameIndex); segment.push(nameIndex);
} }
this.rawSegments.push(segment); this.rawSegments.push(segment);
this.advance(content.slice(previousContentLineEnd + 1));
} else if (this.pending) { } else if (this.pending) {
this.rawSegments.push(this.pending); this.rawSegments.push(this.pending);
this.advance(content);
} }
this.advance(content);
this.pending = null; this.pending = null;
} }
addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {
let originalCharIndex = chunk.start; let originalCharIndex = chunk.start;
let first = true; let first = true;
// when iterating each char, check if it's in a word boundary
let charInHiresBoundary = false;
while (originalCharIndex < chunk.end) { while (originalCharIndex < chunk.end) {
if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
this.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]); const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
if (this.hires === 'boundary') {
// in hires "boundary", group segments per word boundary than per char
if (wordRegex.test(original[originalCharIndex])) {
// for first char in the boundary found, start the boundary by pushing a segment
if (!charInHiresBoundary) {
this.rawSegments.push(segment);
charInHiresBoundary = true;
}
} else {
// for non-word char, end the boundary by pushing a segment
this.rawSegments.push(segment);
charInHiresBoundary = false;
}
} else {
this.rawSegments.push(segment);
}
} }
if (original[originalCharIndex] === '\n') { if (original[originalCharIndex] === '\n') {
@ -487,7 +542,7 @@ class MagicString {
sourceIndex, sourceIndex,
chunk.content, chunk.content,
loc, loc,
chunk.storeName ? names.indexOf(chunk.original) : -1 chunk.storeName ? names.indexOf(chunk.original) : -1,
); );
} else { } else {
mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);
@ -498,11 +553,13 @@ class MagicString {
return { return {
file: options.file ? options.file.split(/[/\\]/).pop() : undefined, file: options.file ? options.file.split(/[/\\]/).pop() : undefined,
sources: [options.source ? getRelativePath(options.file || '', options.source) : (options.file || '')], sources: [
options.source ? getRelativePath(options.file || '', options.source) : options.file || '',
],
sourcesContent: options.includeContent ? [this.original] : undefined, sourcesContent: options.includeContent ? [this.original] : undefined,
names, names,
mappings: mappings.raw, mappings: mappings.raw,
x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,
}; };
} }
@ -616,14 +673,14 @@ class MagicString {
insert() { insert() {
throw new Error( throw new Error(
'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)' 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',
); );
} }
insertLeft(index, content) { insertLeft(index, content) {
if (!warned.insertLeft) { if (!warned.insertLeft) {
console.warn( console.warn(
'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead' 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',
); // eslint-disable-line no-console ); // eslint-disable-line no-console
warned.insertLeft = true; warned.insertLeft = true;
} }
@ -634,7 +691,7 @@ class MagicString {
insertRight(index, content) { insertRight(index, content) {
if (!warned.insertRight) { if (!warned.insertRight) {
console.warn( console.warn(
'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead' 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',
); // eslint-disable-line no-console ); // eslint-disable-line no-console
warned.insertRight = true; warned.insertRight = true;
} }
@ -693,7 +750,7 @@ class MagicString {
if (end > this.original.length) throw new Error('end is out of bounds'); if (end > this.original.length) throw new Error('end is out of bounds');
if (start === end) if (start === end)
throw new Error( throw new Error(
'Cannot overwrite a zero-length range – use appendLeft or prependRight instead' 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',
); );
this._split(start); this._split(start);
@ -702,7 +759,7 @@ class MagicString {
if (options === true) { if (options === true) {
if (!warned.storeName) { if (!warned.storeName) {
console.warn( console.warn(
'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string' 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',
); // eslint-disable-line no-console ); // eslint-disable-line no-console
warned.storeName = true; warned.storeName = true;
} }
@ -924,7 +981,7 @@ class MagicString {
// zero-length edited chunks are a special case (overlapping replacements) // zero-length edited chunks are a special case (overlapping replacements)
const loc = getLocator(this.original)(index); const loc = getLocator(this.original)(index);
throw new Error( throw new Error(
`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")` `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`,
); );
} }
@ -1083,7 +1140,7 @@ class MagicString {
this.overwrite( this.overwrite(
match.index, match.index,
match.index + match[0].length, match.index + match[0].length,
getReplacement(match, this.original) getReplacement(match, this.original),
); );
}); });
} else { } else {
@ -1092,7 +1149,7 @@ class MagicString {
this.overwrite( this.overwrite(
match.index, match.index,
match.index + match[0].length, match.index + match[0].length,
getReplacement(match, this.original) getReplacement(match, this.original),
); );
} }
return this; return this;
@ -1138,7 +1195,7 @@ class MagicString {
if (!searchValue.global) { if (!searchValue.global) {
throw new TypeError( throw new TypeError(
'MagicString.prototype.replaceAll called with a non-global RegExp argument' 'MagicString.prototype.replaceAll called with a non-global RegExp argument',
); );
} }
@ -1168,7 +1225,7 @@ class Bundle {
if (!isObject(source) || !source.content) { if (!isObject(source) || !source.content) {
throw new Error( throw new Error(
'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`' 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',
); );
} }
@ -1262,7 +1319,7 @@ class Bundle {
sourceIndex, sourceIndex,
chunk.content, chunk.content,
loc, loc,
chunk.storeName ? names.indexOf(chunk.original) : -1 chunk.storeName ? names.indexOf(chunk.original) : -1,
); );
} else { } else {
mappings.addUneditedChunk( mappings.addUneditedChunk(
@ -1270,7 +1327,7 @@ class Bundle {
chunk, chunk,
magicString.original, magicString.original,
loc, loc,
magicString.sourcemapLocations magicString.sourcemapLocations,
); );
} }
} else { } else {
@ -1388,7 +1445,7 @@ class Bundle {
length() { length() {
return this.sources.reduce( return this.sources.reduce(
(length, source) => length + source.content.length(), (length, source) => length + source.content.length(),
this.intro.length this.intro.length,
); );
} }

2
node_modules/magic-string/dist/magic-string.cjs.js.map

File diff suppressed because one or more lines are too long

97
node_modules/magic-string/dist/magic-string.es.mjs

@ -109,6 +109,13 @@ class Chunk {
this.end = index; this.end = index;
if (this.edited) { if (this.edited) {
// after split we should save the edit content record into the correct chunk
// to make sure sourcemap correct
// For example:
// ' test'.trim()
// split -> ' ' + 'test'
// ✔️ edit -> '' + 'test'
// ✖️ edit -> 'test' + ''
// TODO is this block necessary?... // TODO is this block necessary?...
newChunk.edit('', false); newChunk.edit('', false);
this.content = ''; this.content = '';
@ -137,6 +144,10 @@ class Chunk {
if (trimmed.length) { if (trimmed.length) {
if (trimmed !== this.content) { if (trimmed !== this.content) {
this.split(this.start + trimmed.length).edit('', undefined, true); this.split(this.start + trimmed.length).edit('', undefined, true);
if (this.edited) {
// save the change, if it has been edited
this.edit(trimmed, this.storeName, true);
}
} }
return true; return true;
} else { } else {
@ -155,7 +166,11 @@ class Chunk {
if (trimmed.length) { if (trimmed.length) {
if (trimmed !== this.content) { if (trimmed !== this.content) {
this.split(this.end - trimmed.length); const newChunk = this.split(this.end - trimmed.length);
if (this.edited) {
// save the change, if it has been edited
newChunk.edit(trimmed, this.storeName, true);
}
this.edit('', undefined, true); this.edit('', undefined, true);
} }
return true; return true;
@ -168,7 +183,7 @@ class Chunk {
} }
} }
function getBtoa () { function getBtoa() {
if (typeof window !== 'undefined' && typeof window.btoa === 'function') { if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
return (str) => window.btoa(unescape(encodeURIComponent(str))); return (str) => window.btoa(unescape(encodeURIComponent(str)));
} else if (typeof Buffer === 'function') { } else if (typeof Buffer === 'function') {
@ -281,6 +296,8 @@ function getLocator(source) {
}; };
} }
const wordRegex = /\w/;
class Mappings { class Mappings {
constructor(hires) { constructor(hires) {
this.hires = hires; this.hires = hires;
@ -293,26 +310,64 @@ class Mappings {
addEdit(sourceIndex, content, loc, nameIndex) { addEdit(sourceIndex, content, loc, nameIndex) {
if (content.length) { if (content.length) {
let contentLineEnd = content.indexOf('\n', 0);
let previousContentLineEnd = -1;
while (contentLineEnd >= 0) {
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
if (nameIndex >= 0) {
segment.push(nameIndex);
}
this.rawSegments.push(segment);
this.generatedCodeLine += 1;
this.raw[this.generatedCodeLine] = this.rawSegments = [];
this.generatedCodeColumn = 0;
previousContentLineEnd = contentLineEnd;
contentLineEnd = content.indexOf('\n', contentLineEnd + 1);
}
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
if (nameIndex >= 0) { if (nameIndex >= 0) {
segment.push(nameIndex); segment.push(nameIndex);
} }
this.rawSegments.push(segment); this.rawSegments.push(segment);
this.advance(content.slice(previousContentLineEnd + 1));
} else if (this.pending) { } else if (this.pending) {
this.rawSegments.push(this.pending); this.rawSegments.push(this.pending);
this.advance(content);
} }
this.advance(content);
this.pending = null; this.pending = null;
} }
addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {
let originalCharIndex = chunk.start; let originalCharIndex = chunk.start;
let first = true; let first = true;
// when iterating each char, check if it's in a word boundary
let charInHiresBoundary = false;
while (originalCharIndex < chunk.end) { while (originalCharIndex < chunk.end) {
if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
this.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]); const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
if (this.hires === 'boundary') {
// in hires "boundary", group segments per word boundary than per char
if (wordRegex.test(original[originalCharIndex])) {
// for first char in the boundary found, start the boundary by pushing a segment
if (!charInHiresBoundary) {
this.rawSegments.push(segment);
charInHiresBoundary = true;
}
} else {
// for non-word char, end the boundary by pushing a segment
this.rawSegments.push(segment);
charInHiresBoundary = false;
}
} else {
this.rawSegments.push(segment);
}
} }
if (original[originalCharIndex] === '\n') { if (original[originalCharIndex] === '\n') {
@ -485,7 +540,7 @@ class MagicString {
sourceIndex, sourceIndex,
chunk.content, chunk.content,
loc, loc,
chunk.storeName ? names.indexOf(chunk.original) : -1 chunk.storeName ? names.indexOf(chunk.original) : -1,
); );
} else { } else {
mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);
@ -496,11 +551,13 @@ class MagicString {
return { return {
file: options.file ? options.file.split(/[/\\]/).pop() : undefined, file: options.file ? options.file.split(/[/\\]/).pop() : undefined,
sources: [options.source ? getRelativePath(options.file || '', options.source) : (options.file || '')], sources: [
options.source ? getRelativePath(options.file || '', options.source) : options.file || '',
],
sourcesContent: options.includeContent ? [this.original] : undefined, sourcesContent: options.includeContent ? [this.original] : undefined,
names, names,
mappings: mappings.raw, mappings: mappings.raw,
x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,
}; };
} }
@ -614,14 +671,14 @@ class MagicString {
insert() { insert() {
throw new Error( throw new Error(
'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)' 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',
); );
} }
insertLeft(index, content) { insertLeft(index, content) {
if (!warned.insertLeft) { if (!warned.insertLeft) {
console.warn( console.warn(
'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead' 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',
); // eslint-disable-line no-console ); // eslint-disable-line no-console
warned.insertLeft = true; warned.insertLeft = true;
} }
@ -632,7 +689,7 @@ class MagicString {
insertRight(index, content) { insertRight(index, content) {
if (!warned.insertRight) { if (!warned.insertRight) {
console.warn( console.warn(
'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead' 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',
); // eslint-disable-line no-console ); // eslint-disable-line no-console
warned.insertRight = true; warned.insertRight = true;
} }
@ -691,7 +748,7 @@ class MagicString {
if (end > this.original.length) throw new Error('end is out of bounds'); if (end > this.original.length) throw new Error('end is out of bounds');
if (start === end) if (start === end)
throw new Error( throw new Error(
'Cannot overwrite a zero-length range – use appendLeft or prependRight instead' 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',
); );
this._split(start); this._split(start);
@ -700,7 +757,7 @@ class MagicString {
if (options === true) { if (options === true) {
if (!warned.storeName) { if (!warned.storeName) {
console.warn( console.warn(
'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string' 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',
); // eslint-disable-line no-console ); // eslint-disable-line no-console
warned.storeName = true; warned.storeName = true;
} }
@ -922,7 +979,7 @@ class MagicString {
// zero-length edited chunks are a special case (overlapping replacements) // zero-length edited chunks are a special case (overlapping replacements)
const loc = getLocator(this.original)(index); const loc = getLocator(this.original)(index);
throw new Error( throw new Error(
`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")` `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`,
); );
} }
@ -1081,7 +1138,7 @@ class MagicString {
this.overwrite( this.overwrite(
match.index, match.index,
match.index + match[0].length, match.index + match[0].length,
getReplacement(match, this.original) getReplacement(match, this.original),
); );
}); });
} else { } else {
@ -1090,7 +1147,7 @@ class MagicString {
this.overwrite( this.overwrite(
match.index, match.index,
match.index + match[0].length, match.index + match[0].length,
getReplacement(match, this.original) getReplacement(match, this.original),
); );
} }
return this; return this;
@ -1136,7 +1193,7 @@ class MagicString {
if (!searchValue.global) { if (!searchValue.global) {
throw new TypeError( throw new TypeError(
'MagicString.prototype.replaceAll called with a non-global RegExp argument' 'MagicString.prototype.replaceAll called with a non-global RegExp argument',
); );
} }
@ -1166,7 +1223,7 @@ class Bundle {
if (!isObject(source) || !source.content) { if (!isObject(source) || !source.content) {
throw new Error( throw new Error(
'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`' 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',
); );
} }
@ -1260,7 +1317,7 @@ class Bundle {
sourceIndex, sourceIndex,
chunk.content, chunk.content,
loc, loc,
chunk.storeName ? names.indexOf(chunk.original) : -1 chunk.storeName ? names.indexOf(chunk.original) : -1,
); );
} else { } else {
mappings.addUneditedChunk( mappings.addUneditedChunk(
@ -1268,7 +1325,7 @@ class Bundle {
chunk, chunk,
magicString.original, magicString.original,
loc, loc,
magicString.sourcemapLocations magicString.sourcemapLocations,
); );
} }
} else { } else {
@ -1386,7 +1443,7 @@ class Bundle {
length() { length() {
return this.sources.reduce( return this.sources.reduce(
(length, source) => length + source.content.length(), (length, source) => length + source.content.length(),
this.intro.length this.intro.length,
); );
} }

2
node_modules/magic-string/dist/magic-string.es.mjs.map

File diff suppressed because one or more lines are too long

97
node_modules/magic-string/dist/magic-string.umd.js

@ -113,6 +113,13 @@
this.end = index; this.end = index;
if (this.edited) { if (this.edited) {
// after split we should save the edit content record into the correct chunk
// to make sure sourcemap correct
// For example:
// ' test'.trim()
// split -> ' ' + 'test'
// ✔️ edit -> '' + 'test'
// ✖️ edit -> 'test' + ''
// TODO is this block necessary?... // TODO is this block necessary?...
newChunk.edit('', false); newChunk.edit('', false);
this.content = ''; this.content = '';
@ -141,6 +148,10 @@
if (trimmed.length) { if (trimmed.length) {
if (trimmed !== this.content) { if (trimmed !== this.content) {
this.split(this.start + trimmed.length).edit('', undefined, true); this.split(this.start + trimmed.length).edit('', undefined, true);
if (this.edited) {
// save the change, if it has been edited
this.edit(trimmed, this.storeName, true);
}
} }
return true; return true;
} else { } else {
@ -159,7 +170,11 @@
if (trimmed.length) { if (trimmed.length) {
if (trimmed !== this.content) { if (trimmed !== this.content) {
this.split(this.end - trimmed.length); const newChunk = this.split(this.end - trimmed.length);
if (this.edited) {
// save the change, if it has been edited
newChunk.edit(trimmed, this.storeName, true);
}
this.edit('', undefined, true); this.edit('', undefined, true);
} }
return true; return true;
@ -260,7 +275,7 @@
return pos; return pos;
} }
function getBtoa () { function getBtoa() {
if (typeof window !== 'undefined' && typeof window.btoa === 'function') { if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
return (str) => window.btoa(unescape(encodeURIComponent(str))); return (str) => window.btoa(unescape(encodeURIComponent(str)));
} else if (typeof Buffer === 'function') { } else if (typeof Buffer === 'function') {
@ -373,6 +388,8 @@
}; };
} }
const wordRegex = /\w/;
class Mappings { class Mappings {
constructor(hires) { constructor(hires) {
this.hires = hires; this.hires = hires;
@ -385,26 +402,64 @@
addEdit(sourceIndex, content, loc, nameIndex) { addEdit(sourceIndex, content, loc, nameIndex) {
if (content.length) { if (content.length) {
let contentLineEnd = content.indexOf('\n', 0);
let previousContentLineEnd = -1;
while (contentLineEnd >= 0) {
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
if (nameIndex >= 0) {
segment.push(nameIndex);
}
this.rawSegments.push(segment);
this.generatedCodeLine += 1;
this.raw[this.generatedCodeLine] = this.rawSegments = [];
this.generatedCodeColumn = 0;
previousContentLineEnd = contentLineEnd;
contentLineEnd = content.indexOf('\n', contentLineEnd + 1);
}
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
if (nameIndex >= 0) { if (nameIndex >= 0) {
segment.push(nameIndex); segment.push(nameIndex);
} }
this.rawSegments.push(segment); this.rawSegments.push(segment);
this.advance(content.slice(previousContentLineEnd + 1));
} else if (this.pending) { } else if (this.pending) {
this.rawSegments.push(this.pending); this.rawSegments.push(this.pending);
this.advance(content);
} }
this.advance(content);
this.pending = null; this.pending = null;
} }
addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {
let originalCharIndex = chunk.start; let originalCharIndex = chunk.start;
let first = true; let first = true;
// when iterating each char, check if it's in a word boundary
let charInHiresBoundary = false;
while (originalCharIndex < chunk.end) { while (originalCharIndex < chunk.end) {
if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
this.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]); const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
if (this.hires === 'boundary') {
// in hires "boundary", group segments per word boundary than per char
if (wordRegex.test(original[originalCharIndex])) {
// for first char in the boundary found, start the boundary by pushing a segment
if (!charInHiresBoundary) {
this.rawSegments.push(segment);
charInHiresBoundary = true;
}
} else {
// for non-word char, end the boundary by pushing a segment
this.rawSegments.push(segment);
charInHiresBoundary = false;
}
} else {
this.rawSegments.push(segment);
}
} }
if (original[originalCharIndex] === '\n') { if (original[originalCharIndex] === '\n') {
@ -577,7 +632,7 @@
sourceIndex, sourceIndex,
chunk.content, chunk.content,
loc, loc,
chunk.storeName ? names.indexOf(chunk.original) : -1 chunk.storeName ? names.indexOf(chunk.original) : -1,
); );
} else { } else {
mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);
@ -588,11 +643,13 @@
return { return {
file: options.file ? options.file.split(/[/\\]/).pop() : undefined, file: options.file ? options.file.split(/[/\\]/).pop() : undefined,
sources: [options.source ? getRelativePath(options.file || '', options.source) : (options.file || '')], sources: [
options.source ? getRelativePath(options.file || '', options.source) : options.file || '',
],
sourcesContent: options.includeContent ? [this.original] : undefined, sourcesContent: options.includeContent ? [this.original] : undefined,
names, names,
mappings: mappings.raw, mappings: mappings.raw,
x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,
}; };
} }
@ -706,14 +763,14 @@
insert() { insert() {
throw new Error( throw new Error(
'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)' 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',
); );
} }
insertLeft(index, content) { insertLeft(index, content) {
if (!warned.insertLeft) { if (!warned.insertLeft) {
console.warn( console.warn(
'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead' 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',
); // eslint-disable-line no-console ); // eslint-disable-line no-console
warned.insertLeft = true; warned.insertLeft = true;
} }
@ -724,7 +781,7 @@
insertRight(index, content) { insertRight(index, content) {
if (!warned.insertRight) { if (!warned.insertRight) {
console.warn( console.warn(
'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead' 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',
); // eslint-disable-line no-console ); // eslint-disable-line no-console
warned.insertRight = true; warned.insertRight = true;
} }
@ -783,7 +840,7 @@
if (end > this.original.length) throw new Error('end is out of bounds'); if (end > this.original.length) throw new Error('end is out of bounds');
if (start === end) if (start === end)
throw new Error( throw new Error(
'Cannot overwrite a zero-length range – use appendLeft or prependRight instead' 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',
); );
this._split(start); this._split(start);
@ -792,7 +849,7 @@
if (options === true) { if (options === true) {
if (!warned.storeName) { if (!warned.storeName) {
console.warn( console.warn(
'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string' 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',
); // eslint-disable-line no-console ); // eslint-disable-line no-console
warned.storeName = true; warned.storeName = true;
} }
@ -1014,7 +1071,7 @@
// zero-length edited chunks are a special case (overlapping replacements) // zero-length edited chunks are a special case (overlapping replacements)
const loc = getLocator(this.original)(index); const loc = getLocator(this.original)(index);
throw new Error( throw new Error(
`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")` `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`,
); );
} }
@ -1173,7 +1230,7 @@
this.overwrite( this.overwrite(
match.index, match.index,
match.index + match[0].length, match.index + match[0].length,
getReplacement(match, this.original) getReplacement(match, this.original),
); );
}); });
} else { } else {
@ -1182,7 +1239,7 @@
this.overwrite( this.overwrite(
match.index, match.index,
match.index + match[0].length, match.index + match[0].length,
getReplacement(match, this.original) getReplacement(match, this.original),
); );
} }
return this; return this;
@ -1228,7 +1285,7 @@
if (!searchValue.global) { if (!searchValue.global) {
throw new TypeError( throw new TypeError(
'MagicString.prototype.replaceAll called with a non-global RegExp argument' 'MagicString.prototype.replaceAll called with a non-global RegExp argument',
); );
} }
@ -1258,7 +1315,7 @@
if (!isObject(source) || !source.content) { if (!isObject(source) || !source.content) {
throw new Error( throw new Error(
'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`' 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',
); );
} }
@ -1352,7 +1409,7 @@
sourceIndex, sourceIndex,
chunk.content, chunk.content,
loc, loc,
chunk.storeName ? names.indexOf(chunk.original) : -1 chunk.storeName ? names.indexOf(chunk.original) : -1,
); );
} else { } else {
mappings.addUneditedChunk( mappings.addUneditedChunk(
@ -1360,7 +1417,7 @@
chunk, chunk,
magicString.original, magicString.original,
loc, loc,
magicString.sourcemapLocations magicString.sourcemapLocations,
); );
} }
} else { } else {
@ -1478,7 +1535,7 @@
length() { length() {
return this.sources.reduce( return this.sources.reduce(
(length, source) => length + source.content.length(), (length, source) => length + source.content.length(),
this.intro.length this.intro.length,
); );
} }

2
node_modules/magic-string/dist/magic-string.umd.js.map

File diff suppressed because one or more lines are too long

262
node_modules/magic-string/index.d.ts

@ -1,262 +0,0 @@
export interface BundleOptions {
intro?: string;
separator?: string;
}
export interface SourceMapOptions {
/**
* Whether the mapping should be high-resolution.
* Hi-res mappings map every single character, meaning (for example) your devtools will always
* be able to pinpoint the exact location of function calls and so on.
* With lo-res mappings, devtools may only be able to identify the correct
* line - but they're quicker to generate and less bulky.
* If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here.
*/
hires?: boolean;
/**
* The filename where you plan to write the sourcemap.
*/
file?: string;
/**
* The filename of the file containing the original source.
*/
source?: string;
/**
* Whether to include the original content in the map's sourcesContent array.
*/
includeContent?: boolean;
}
export type SourceMapSegment =
| [number]
| [number, number, number, number]
| [number, number, number, number, number];
export interface DecodedSourceMap {
file: string;
sources: string[];
sourcesContent: (string | null)[];
names: string[];
mappings: SourceMapSegment[][];
x_google_ignoreList?: number[];
}
export class SourceMap {
constructor(properties: DecodedSourceMap);
version: number;
file: string;
sources: string[];
sourcesContent: (string | null)[];
names: string[];
mappings: string;
x_google_ignoreList?: number[];
/**
* Returns the equivalent of `JSON.stringify(map)`
*/
toString(): string;
/**
* Returns a DataURI containing the sourcemap. Useful for doing this sort of thing:
* `generateMap(options?: SourceMapOptions): SourceMap;`
*/
toUrl(): string;
}
export class Bundle {
constructor(options?: BundleOptions);
/**
* Adds the specified source to the bundle, which can either be a `MagicString` object directly,
* or an options object that holds a magic string `content` property and optionally provides
* a `filename` for the source within the bundle, as well as an optional `ignoreList` hint
* (which defaults to `false`). The `filename` is used when constructing the source map for the
* bundle, to identify this `source` in the source map's `sources` field. The `ignoreList` hint
* is used to populate the `x_google_ignoreList` extension field in the source map, which is a
* mechanism for tools to signal to debuggers that certain sources should be ignored by default
* (depending on user preferences).
*/
addSource(source: MagicString | { filename?: string, content: MagicString, ignoreList?: boolean }): Bundle;
append(str: string, options?: BundleOptions): Bundle;
clone(): Bundle;
generateMap(options?: SourceMapOptions): SourceMap;
generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap;
getIndentString(): string;
indent(indentStr?: string): Bundle;
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
prepend(str: string): Bundle;
toString(): string;
trimLines(): Bundle;
trim(charType?: string): Bundle;
trimStart(charType?: string): Bundle;
trimEnd(charType?: string): Bundle;
isEmpty(): boolean;
length(): number;
}
export type ExclusionRange = [ number, number ];
export interface MagicStringOptions {
filename?: string,
indentExclusionRanges?: ExclusionRange | Array<ExclusionRange>;
}
export interface IndentOptions {
exclude?: ExclusionRange | Array<ExclusionRange>;
indentStart?: boolean;
}
export interface OverwriteOptions {
storeName?: boolean;
contentOnly?: boolean;
}
export interface UpdateOptions {
storeName?: boolean;
overwrite?: boolean;
}
export default class MagicString {
constructor(str: string, options?: MagicStringOptions);
/**
* Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
*/
addSourcemapLocation(char: number): void;
/**
* Appends the specified content to the end of the string.
*/
append(content: string): MagicString;
/**
* Appends the specified content at the index in the original string.
* If a range *ending* with index is subsequently moved, the insert will be moved with it.
* See also `s.prependLeft(...)`.
*/
appendLeft(index: number, content: string): MagicString;
/**
* Appends the specified content at the index in the original string.
* If a range *starting* with index is subsequently moved, the insert will be moved with it.
* See also `s.prependRight(...)`.
*/
appendRight(index: number, content: string): MagicString;
/**
* Does what you'd expect.
*/
clone(): MagicString;
/**
* Generates a version 3 sourcemap.
*/
generateMap(options?: SourceMapOptions): SourceMap;
/**
* Generates a sourcemap object with raw mappings in array form, rather than encoded as a string.
* Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
*/
generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap;
getIndentString(): string;
/**
* Prefixes each line of the string with prefix.
* If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
*/
indent(options?: IndentOptions): MagicString;
/**
* Prefixes each line of the string with prefix.
* If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
*
* The options argument can have an exclude property, which is an array of [start, end] character ranges.
* These ranges will be excluded from the indentation - useful for (e.g.) multiline strings.
*/
indent(indentStr?: string, options?: IndentOptions): MagicString;
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
/**
* Moves the characters from `start and `end` to `index`.
*/
move(start: number, end: number, index: number): MagicString;
/**
* Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in
* that range. The same restrictions as `s.remove()` apply.
*
* The fourth argument is optional. It can have a storeName property if true, the original name will be stored
* for later inclusion in a sourcemap's names array and a contentOnly property which determines whether only
* the content is overwritten, or anything that was appended/prepended to the range as well.
*
* It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content.
*/
overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString;
/**
* Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply.
*
* The fourth argument is optional. It can have a storeName property if true, the original name will be stored
* for later inclusion in a sourcemap's names array and an overwrite property which determines whether only
* the content is overwritten, or anything that was appended/prepended to the range as well.
*/
update(start: number, end: number, content: string, options?: boolean | UpdateOptions): MagicString;
/**
* Prepends the string with the specified content.
*/
prepend(content: string): MagicString;
/**
* Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index
*/
prependLeft(index: number, content: string): MagicString;
/**
* Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
*/
prependRight(index: number, content: string): MagicString;
/**
* Removes the characters from `start` to `end` (of the original string, **not** the generated string).
* Removing the same content twice, or making removals that partially overlap, will cause an error.
*/
remove(start: number, end: number): MagicString;
/**
* Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string.
* Throws error if the indices are for characters that were already removed.
*/
slice(start: number, end: number): string;
/**
* Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed.
*/
snip(start: number, end: number): MagicString;
/**
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
*/
trim(charType?: string): MagicString;
/**
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start.
*/
trimStart(charType?: string): MagicString;
/**
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end.
*/
trimEnd(charType?: string): MagicString;
/**
* Removes empty lines from the start and end.
*/
trimLines(): MagicString;
/**
* String replacement with RegExp or string.
*/
replace(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString;
/**
* Same as `s.replace`, but replace all matched strings instead of just one.
*/
replaceAll(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString;
lastChar(): string;
lastLine(): string;
/**
* Returns true if the resulting source is empty (disregarding white space).
*/
isEmpty(): boolean;
length(): number;
/**
* Indicates if the string has been changed.
*/
hasChanged(): boolean;
original: string;
/**
* Returns the generated string.
*/
toString(): string;
}

27
node_modules/magic-string/package.json

@ -1,6 +1,6 @@
{ {
"name": "magic-string", "name": "magic-string",
"version": "0.30.0", "version": "0.30.5",
"description": "Modify strings, generate sourcemaps", "description": "Modify strings, generate sourcemaps",
"keywords": [ "keywords": [
"string", "string",
@ -15,11 +15,10 @@
"main": "./dist/magic-string.cjs.js", "main": "./dist/magic-string.cjs.js",
"module": "./dist/magic-string.es.mjs", "module": "./dist/magic-string.es.mjs",
"jsnext:main": "./dist/magic-string.es.mjs", "jsnext:main": "./dist/magic-string.es.mjs",
"types": "./index.d.ts", "types": "./dist/magic-string.cjs.d.ts",
"exports": { "exports": {
"./package.json": "./package.json", "./package.json": "./package.json",
".": { ".": {
"types": "./index.d.ts",
"import": "./dist/magic-string.es.mjs", "import": "./dist/magic-string.es.mjs",
"require": "./dist/magic-string.cjs.js" "require": "./dist/magic-string.cjs.js"
} }
@ -30,7 +29,7 @@
"README.md" "README.md"
], ],
"scripts": { "scripts": {
"build": "rollup -c", "build": "rollup -c && cp ./src/index.d.ts ./dist/magic-string.es.d.mts && cp ./src/index.d.ts ./dist/magic-string.cjs.d.ts",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"format": "prettier --single-quote --print-width 100 --use-tabs --write src/*.js src/**/*.js", "format": "prettier --single-quote --print-width 100 --use-tabs --write src/*.js src/**/*.js",
"lint": "eslint src test && publint", "lint": "eslint src test && publint",
@ -43,16 +42,16 @@
"watch": "rollup -cw" "watch": "rollup -cw"
}, },
"devDependencies": { "devDependencies": {
"@rollup/plugin-node-resolve": "^14.1.0", "@rollup/plugin-node-resolve": "^15.2.0",
"@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-replace": "^5.0.2",
"benchmark": "^2.1.4", "benchmark": "^2.1.4",
"bumpp": "^8.2.1", "bumpp": "^9.2.0",
"conventional-changelog-cli": "^2.2.2", "conventional-changelog-cli": "^3.0.0",
"eslint": "^8.23.1", "eslint": "^8.47.0",
"mocha": "^10.0.0", "mocha": "^10.2.0",
"prettier": "^2.7.1", "prettier": "^3.0.2",
"publint": "^0.1.7", "publint": "^0.2.1",
"rollup": "^2.79.1", "rollup": "^3.28.0",
"source-map-js": "^1.0.2", "source-map-js": "^1.0.2",
"source-map-support": "^0.5.21" "source-map-support": "^0.5.21"
}, },
@ -60,6 +59,6 @@
"node": ">=12" "node": ">=12"
}, },
"dependencies": { "dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.13" "@jridgewell/sourcemap-codec": "^1.4.15"
} }
} }

85
package-lock.json

@ -10,6 +10,7 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^2.1.0", "@element-plus/icons-vue": "^2.1.0",
"@rollup/plugin-commonjs": "^25.0.7",
"@vitejs/plugin-vue": "^4.2.3", "@vitejs/plugin-vue": "^4.2.3",
"@vueuse/core": "^10.1.2", "@vueuse/core": "^10.1.2",
"@wangeditor/editor": "^5.1.23", "@wangeditor/editor": "^5.1.23",
@ -1179,11 +1180,68 @@
"resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
}, },
"node_modules/@rollup/plugin-commonjs": {
"version": "25.0.7",
"resolved": "https://registry.npmmirror.com/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz",
"integrity": "sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==",
"dependencies": {
"@rollup/pluginutils": "^5.0.1",
"commondir": "^1.0.1",
"estree-walker": "^2.0.2",
"glob": "^8.0.3",
"is-reference": "1.2.1",
"magic-string": "^0.30.3"
},
"engines": {
"node": ">=14.0.0"
},
"peerDependencies": {
"rollup": "^2.68.0||^3.0.0||^4.0.0"
},
"peerDependenciesMeta": {
"rollup": {
"optional": true
}
}
},
"node_modules/@rollup/plugin-commonjs/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/@rollup/plugin-commonjs/node_modules/glob": {
"version": "8.1.0",
"resolved": "https://registry.npmmirror.com/glob/-/glob-8.1.0.tgz",
"integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^5.0.1",
"once": "^1.3.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/@rollup/plugin-commonjs/node_modules/minimatch": {
"version": "5.1.6",
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.1.6.tgz",
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=10"
}
},
"node_modules/@rollup/pluginutils": { "node_modules/@rollup/pluginutils": {
"version": "5.0.2", "version": "5.0.2",
"resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", "resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz",
"integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==",
"dev": true,
"dependencies": { "dependencies": {
"@types/estree": "^1.0.0", "@types/estree": "^1.0.0",
"estree-walker": "^2.0.2", "estree-walker": "^2.0.2",
@ -1242,8 +1300,7 @@
"node_modules/@types/estree": { "node_modules/@types/estree": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.1.tgz", "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.1.tgz",
"integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA=="
"dev": true
}, },
"node_modules/@types/event-emitter": { "node_modules/@types/event-emitter": {
"version": "0.3.3", "version": "0.3.3",
@ -3099,6 +3156,11 @@
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
"dev": true "dev": true
}, },
"node_modules/commondir": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/commondir/-/commondir-1.0.1.tgz",
"integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg=="
},
"node_modules/compare-func": { "node_modules/compare-func": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/compare-func/-/compare-func-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/compare-func/-/compare-func-2.0.0.tgz",
@ -5556,6 +5618,14 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/is-reference": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/is-reference/-/is-reference-1.2.1.tgz",
"integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",
"dependencies": {
"@types/estree": "*"
}
},
"node_modules/is-stream": { "node_modules/is-stream": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz", "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz",
@ -6306,11 +6376,11 @@
} }
}, },
"node_modules/magic-string": { "node_modules/magic-string": {
"version": "0.30.0", "version": "0.30.5",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.0.tgz", "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.5.tgz",
"integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==", "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",
"dependencies": { "dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.13" "@jridgewell/sourcemap-codec": "^1.4.15"
}, },
"engines": { "engines": {
"node": ">=12" "node": ">=12"
@ -7285,7 +7355,6 @@
"version": "2.3.1", "version": "2.3.1",
"resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"devOptional": true,
"engines": { "engines": {
"node": ">=8.6" "node": ">=8.6"
} }

1
package.json

@ -41,6 +41,7 @@
}, },
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^2.1.0", "@element-plus/icons-vue": "^2.1.0",
"@rollup/plugin-commonjs": "^25.0.7",
"@vitejs/plugin-vue": "^4.2.3", "@vitejs/plugin-vue": "^4.2.3",
"@vueuse/core": "^10.1.2", "@vueuse/core": "^10.1.2",
"@wangeditor/editor": "^5.1.23", "@wangeditor/editor": "^5.1.23",

85
src/types/components.d.ts

@ -18,6 +18,66 @@ declare module '@vue/runtime-core' {
CopyerDrawer: typeof import('./../components/workflow/drwer/copyerDrawer.vue')['default'] CopyerDrawer: typeof import('./../components/workflow/drwer/copyerDrawer.vue')['default']
DiyIconfont: typeof import('./../components/DesignForm/public/expand/diy-iconfont.vue')['default'] DiyIconfont: typeof import('./../components/DesignForm/public/expand/diy-iconfont.vue')['default']
DragControl: typeof import('./../components/DesignForm/dragControl.vue')['default'] DragControl: typeof import('./../components/DesignForm/dragControl.vue')['default']
ElAlert: typeof import('element-plus/es')['ElAlert']
ElAside: typeof import('element-plus/es')['ElAside']
ElAvatar: typeof import('element-plus/es')['ElAvatar']
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
ElButton: typeof import('element-plus/es')['ElButton']
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
ElCard: typeof import('element-plus/es')['ElCard']
ElCarousel: typeof import('element-plus/es')['ElCarousel']
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
ElCascader: typeof import('element-plus/es')['ElCascader']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
ElCol: typeof import('element-plus/es')['ElCol']
ElCollapse: typeof import('element-plus/es')['ElCollapse']
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
ElContainer: typeof import('element-plus/es')['ElContainer']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElDrawer: typeof import('element-plus/es')['ElDrawer']
ElDropdown: typeof import('element-plus/es')['ElDropdown']
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink']
ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopover: typeof import('element-plus/es')['ElPopover']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRow: typeof import('element-plus/es')['ElRow']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSpace: typeof import('element-plus/es')['ElSpace']
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']
ElText: typeof import('element-plus/es')['ElText']
ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree']
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
ElUpload: typeof import('element-plus/es')['ElUpload']
EmployeesDialog: typeof import('./../components/workflow/dialog/employeesDialog.vue')['default'] EmployeesDialog: typeof import('./../components/workflow/dialog/employeesDialog.vue')['default']
EmployeesRoleDialog: typeof import('./../components/workflow/dialog/employeesRoleDialog.vue')['default'] EmployeesRoleDialog: typeof import('./../components/workflow/dialog/employeesRoleDialog.vue')['default']
ErrorDialog: typeof import('./../components/workflow/dialog/errorDialog.vue')['default'] ErrorDialog: typeof import('./../components/workflow/dialog/errorDialog.vue')['default']
@ -36,6 +96,27 @@ declare module '@vue/runtime-core' {
HeadTools: typeof import('./../components/DesignForm/public/headTools.vue')['default'] HeadTools: typeof import('./../components/DesignForm/public/headTools.vue')['default']
HeadToolsNew: typeof import('./../components/DesignForm/public/headToolsNew.vue')['default'] HeadToolsNew: typeof import('./../components/DesignForm/public/headToolsNew.vue')['default']
IconSelect: typeof import('./../components/IconSelect/index.vue')['default'] IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default']
IEpCaretTop: typeof import('~icons/ep/caret-top')['default']
IEpClose: typeof import('~icons/ep/close')['default']
IEpCollection: typeof import('~icons/ep/collection')['default']
IEpDelete: typeof import('~icons/ep/delete')['default']
IEpDownload: typeof import('~icons/ep/download')['default']
IEpEdit: typeof import('~icons/ep/edit')['default']
IEpMessageBox: typeof import('~icons/ep/message-box')['default']
IEpMinus: typeof import('~icons/ep/minus')['default']
IEpOperation: typeof import('~icons/ep/operation')['default']
IEpPicture: typeof import('~icons/ep/picture')['default']
IEpPlus: typeof import('~icons/ep/plus')['default']
IEpPosition: typeof import('~icons/ep/position')['default']
IEpRefresh: typeof import('~icons/ep/refresh')['default']
IEpRefreshLeft: typeof import('~icons/ep/refresh-left')['default']
IEpSearch: typeof import('~icons/ep/search')['default']
IEpSetting: typeof import('~icons/ep/setting')['default']
IEpTop: typeof import('~icons/ep/top')['default']
IEpUploadFilled: typeof import('~icons/ep/upload-filled')['default']
IEpUser: typeof import('~icons/ep/user')['default']
IEpView: typeof import('~icons/ep/view')['default']
LangSelect: typeof import('./../components/LangSelect/index.vue')['default'] LangSelect: typeof import('./../components/LangSelect/index.vue')['default']
List: typeof import('./../components/DesignForm/public/form/components/list.vue')['default'] List: typeof import('./../components/DesignForm/public/form/components/list.vue')['default']
ListTreeSide: typeof import('./../components/DesignForm/public/form/components/listTreeSide.vue')['default'] ListTreeSide: typeof import('./../components/DesignForm/public/form/components/listTreeSide.vue')['default']
@ -50,7 +131,6 @@ declare module '@vue/runtime-core' {
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']
Screen: typeof import('./../components/DesignForm/public/form/components/screen.vue')['default'] Screen: typeof import('./../components/DesignForm/public/form/components/screen.vue')['default']
Select: typeof import('./../components/DesignForm/public/form/select.vue')['default'] Select: typeof import('./../components/DesignForm/public/form/select.vue')['default']
SelectBox: typeof import('./../components/workflow/selectBox.vue')['default']
SelectBoxs: typeof import('./../components/workflow/selectBoxs.vue')['default'] SelectBoxs: typeof import('./../components/workflow/selectBoxs.vue')['default']
SelectResult: typeof import('./../components/workflow/selectResult.vue')['default'] SelectResult: typeof import('./../components/workflow/selectResult.vue')['default']
SingleUpload: typeof import('./../components/Upload/SingleUpload.vue')['default'] SingleUpload: typeof import('./../components/Upload/SingleUpload.vue')['default']
@ -65,4 +145,7 @@ declare module '@vue/runtime-core' {
VueFile: typeof import('./../components/DesignForm/vueFile.vue')['default'] VueFile: typeof import('./../components/DesignForm/vueFile.vue')['default']
WangEditor: typeof import('./../components/WangEditor/index.vue')['default'] WangEditor: typeof import('./../components/WangEditor/index.vue')['default']
} }
export interface ComponentCustomProperties {
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
}
} }

8
src/views/knowledge/ask/dialog.vue

@ -7,16 +7,10 @@
<el-dialog :model-value="true" :title="title" @close="handleClose"> <el-dialog :model-value="true" :title="title" @close="handleClose">
</el-dialog> </el-dialog>
</template> </template>
<<<<<<< HEAD
<script lang="ts">
import { reactive } from "vue";
=======
<script lang="ts" setup> <script lang="ts" setup>
import { reactive,onMounted } from "vue"; import { reactive,onMounted } from "vue";
>>>>>>> luzhiqiang_v1
interface FormInfo { interface FormInfo {
id: string; id: string;
age: string; age: string;

8
src/views/knowledge/knowledge/bb.vue

@ -106,11 +106,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 新建/编辑弹框 --> <!-- 新建/编辑弹框 -->
<Dialog
v-if="data.dialogShow"
v-model:data.dialogShow="data.dialogShow"
:row-info="data.rowInfo"
/>
<!-- 详情弹窗 --> <!-- 详情弹窗 -->
</div> </div>
</template> </template>
@ -121,7 +117,7 @@ import { countdownEmits, ElMessageBox, ElTable } from "element-plus";
import { Timer } from "@element-plus/icons-vue"; import { Timer } from "@element-plus/icons-vue";
import { Check, Close } from '@element-plus/icons-vue' import { Check, Close } from '@element-plus/icons-vue'
import axios from "axios"; // import axios from "axios"; //
import Dialog from "./dialog.vue";
const data = reactive({ const data = reactive({
dialogShow: false, // / dialogShow: false, // /
rowInfo: {}, // / rowInfo: {}, // /

234
src/views/knowledge/knowledge/dialog.vue

@ -1,234 +0,0 @@
<!--
@ 作者: 鲁智强
@ 时间: 2023-08-15 11:34:38
@ 备注:
-->
<template>
<el-dialog :model-value="true" :title="title" @close="handleClose">
<el-form
ref="ruleFormRef"
:model="formData"
label-width="120px"
class="demo-ruleForm"
>
<el-form-item label="文章标题:" prop="name" :rules="nameRules">
<el-input v-model="formData.name" placeholder="请输入标题"></el-input>
</el-form-item>
<el-form-item label="所属栏目:" prop="sex">
<el-select v-model="formData.sex">
<el-option label="工艺技术" value="工艺技术" />
<el-option label="流程制度" value="流程制度" />
<el-option label="设备管理" value="设备管理" />
<el-option label="仪控仪表" value="仪控仪表" />
<el-option label="机电维修" value="机电维修" />
<el-option label="安全生产" value="安全生产" />
<el-option label="质量管理" value="质量管理" />
<el-option label="财务管理" value="财务管理" />
<el-option label="人力资源" value="人力资源" />
<el-option label="仓储物流" value="仓储物流" />
</el-select>
</el-form-item>
<el-form-item label="文档来源">
<el-radio-group v-model="formData.iop">
<el-radio label="1" size="large" border>原创</el-radio>
<el-radio label="2" size="large" border>转贴</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="上传封面">
<el-upload action="#" list-type="picture-card" :auto-upload="false">
<el-icon><Plus /></el-icon>
<template #file="{ file }">
<div>
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
<span class="el-upload-list__item-actions">
<span
class="el-upload-list__item-preview"
>
<el-icon><zoom-in /></el-icon>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
>
<el-icon><Download /></el-icon>
</span>
<span
v-if="!disabled"
class="el-upload-list__item-delete"
>
<el-icon><Delete /></el-icon>
</span>
</span>
</div>
</template>
</el-upload>
<el-dialog v-model="dialogVis">
<img w-full :src="dialogImageUrl" alt="Preview Image" />
</el-dialog>
</el-form-item>
<el-form-item label="文档标签:">
<el-input
v-model="formData.ccc"
placeholder="请输入文本文档,每个标签请用,隔开!"
/>
</el-form-item>
<el-form-item label="文档描述:">
<el-input
v-model="formData.ade"
type="textarea"
placeholder="对于本次检查发现的问题,望相关责任单位安排专人严格按照时间节点及要求进行整改,整改后及时回复。企管部、综合办进行复查。"
/>
</el-form-item>
<el-form-item label="附件下载:">
<el-switch v-model="childBorder" />
</el-form-item>
<el-form-item label="文档正文:">
<Editor v-model="editContvalue" style="height: calc(100vh - 124px)"/>
</el-form-item>
<el-form-item label="排序:">
<el-input
v-model="formData.ddd"
style="width: 200px"
placeholder="请输入文档序号"
/>
</el-form-item>
<el-form-item label="评论设置:">
<el-switch v-model="parentBorder" placeholder="启用" />
</el-form-item>
<el-form-item label="访问权限:" prop="age">
<el-radio-group v-model="formData.age">
<el-radio :label="'公开'">公开</el-radio>
<el-radio :label="'分厂'">分厂</el-radio>
<el-radio :label="'工段'">工段</el-radio>
<el-radio :label="'自定义'">自定义</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</el-dialog>
</template>
<<<<<<< HEAD
<script lang="ts">
import { reactive, toRefs, ref, onMounted} from "vue";
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue";
import { ElMessage,UploadProps} from "element-plus";
import Editor from "@/components/WangEditor/index.vue";
import type { UploadFile } from 'element-plus'
interface FormInfo {
id: string;
age: string;
name: string;
sex: string;
ccc: string;
ade: string;
iop: string;
ddd: string;
}
=======
<script lang="ts" setup>
import { reactive, onMounted } from "vue";
>>>>>>> luzhiqiang_v1
const childBorder = ref(false);
const parentBorder = ref(false);
const editContvalue = ref("");
const dialogImageUrl = ref("");
const dialogVis = ref(false);
const disabled = ref(false);
const nameRules = [
{ required: true, message: "文章标题不能为空", trigger: "blur"},
//
];
const props=defineProps( {
title: {
type: String,
default: "",
},
dialogShow: {
type: Boolean,
default: false,
},
rowInfo: {
type: Object,
default() {
return {};
},
},
arrayNum: {
type: Number,
default: 0,
},
<<<<<<< HEAD
},
emits: ['image-uploaded', 'update:dialogShow', 'editRow', 'addRow'],
setup(props, { emit }) {
// eslint-disable-next-line vue/no-setup-props-destructure
const data = reactive({
dialogFlag: false,
dialogVis: false,
dialogImageUrl: "",
formData: {
// eslint-disable-next-line vue/no-setup-props-destructure
=======
})
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow'])
const data = reactive({
dialogFlag: false,
dialogVis: false,
dialogImageUrl: "",
});
const formData=reactive({
>>>>>>> luzhiqiang_v1
id: props.arrayNum.toString(),
age: "'公开'",
name: "",
sex: "",
ccc: "",
ade: "",
iop: "1",
ddd: "",
})
//
const handleClose=()=> {
emit("update:dialogShow", false);
}
onMounted(()=>{
Object.assign(formData,props.rowInfo)
})
</script>
<style scoped>
.avatar-uploader .avatar {
display: block;
width: 178px;
height: 178px;
}
</style>
<style lang="scss">
.avatar-uploader .el-upload {
position: relative;
overflow: hidden;
cursor: pointer;
border: 1px dashed var(--el-border-color);
border-radius: 6px;
transition: var(--el-transition-duration-fast);
}
.avatar-uploader .el-upload:hover {
border-color: var(--el-color-primary);
}
.el-icon.avatar-uploader-icon {
width: 178px;
height: 178px;
font-size: 28px;
color: #8c939d;
text-align: center;
}
.el-dialog{
width:1200px;
}
</style>

13
src/views/sysworkflow/flow/flowDrawingBoard.vue

@ -8,11 +8,9 @@ import '@/styles/workflowcss/workflow.scss'
import { useStore } from '@/store/workflow/index' import { useStore } from '@/store/workflow/index'
import { flowversion } from '@/api/workflowapi/types' import { flowversion } from '@/api/workflowapi/types'
<<<<<<< HEAD
import { initializeWorkFlow,setWorkFlowData,gainFlowVersionList } from '@/api/workflowapi/index'
=======
import { initializeWorkFlow,setWorkFlowData,gainFlowVersionList,saveFlowCont,gainFlowInfo,editFlowCont,saveNewFlow,switchFlowVersion } from '@/api/workflowapi/index' import { initializeWorkFlow,setWorkFlowData,gainFlowVersionList,saveFlowCont,gainFlowInfo,editFlowCont,saveNewFlow,switchFlowVersion } from '@/api/workflowapi/index'
>>>>>>> v3
// //
import errorDialog from "@/components/workflow/dialog/errorDialog.vue"; import errorDialog from "@/components/workflow/dialog/errorDialog.vue";
@ -85,14 +83,11 @@ const getFlowVerList = ()=>{
enableVersion.value = item.id enableVersion.value = item.id
} }
}) })
<<<<<<< HEAD
versionList.value = data;
=======
isRead.value = true isRead.value = true
}else{ }else{
isRead.value = false isRead.value = false
>>>>>>> v3
} }
} }
console.log("获取工作流版本列表---1-->",activeTabs.value); console.log("获取工作流版本列表---1-->",activeTabs.value);

Loading…
Cancel
Save